Changeset 78116 in vbox for trunk/src/VBox
- Timestamp:
- Apr 12, 2019 10:03:24 AM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py
r69392 r78116 558 558 #====================================================================== 559 559 560 def _needPointerOrigin(name, type): 561 return type == 'const GLvoid *' and (name == 'pointer' or name == 'NULL'); 562 560 563 def MakeCallString(params): 561 564 """Given a list of (name, type, vectorSize) parameters, make a C-style … … 575 578 #enddef 576 579 580 def MakeCallStringForDispatcher(params): 581 """Same as MakeCallString, but with 'pointer' origin hack for bugref:9407.""" 582 strResult = '' 583 fFirst = True; 584 for (name, type, vecSize) in params: 585 if not fFirst: strResult += ', '; 586 else: fFirst = False; 587 strResult += name; 588 if _needPointerOrigin(name, type): 589 if name != 'NULL': strResult += ', fRealPtr'; 590 else: strResult += ', 0 /*fRealPtr*/'; 591 return strResult; 592 577 593 578 594 def MakeDeclarationString(params): … … 596 612 #endif 597 613 #enddef 614 615 def MakeDeclarationStringForDispatcher(params): 616 """Same as MakeDeclarationString, but with 'pointer' origin hack for bugref:9407.""" 617 if len(params) == 0: 618 return 'void'; 619 strResult = ''; 620 fFirst = True; 621 for (name, type, vecSize) in params: 622 if not fFirst: strResult += ', '; 623 else: fFirst = False; 624 strResult = strResult + type + ' ' + name; 625 if _needPointerOrigin(name, type): 626 strResult = strResult + ' CRVBOX_HOST_ONLY_PARAM(int fRealPtr)'; 627 return strResult; 598 628 599 629 def MakeDeclarationStringWithContext(ctx_macro_prefix, params): … … 632 662 #endif 633 663 #enddef 664 665 def MakePrototypeStringForDispatcher(params): 666 """Same as MakePrototypeString, but with 'pointer' origin hack for bugref:9407.""" 667 if len(params) == 0: 668 return 'void' 669 strResult = '' 670 fFirst = True; 671 for (name, type, vecSize) in params: 672 if not fFirst: strResult += ', '; 673 else: fFirst = False; 674 strResult = strResult + type 675 if _needPointerOrigin(name, type): 676 strResult += ' CRVBOX_HOST_ONLY_PARAM(int)'; 677 return strResult; 634 678 635 679 -
trunk/src/VBox/GuestHost/OpenGL/include/chromium.h
r76563 r78116 138 138 #ifndef APIENTRY 139 139 #define APIENTRY 140 #endif 141 142 /** For the pointer hack, bugref:9407. */ 143 #ifdef IN_GUEST 144 # define CRVBOX_HOST_ONLY_PARAM(a_Stuff) 145 #else 146 # define CRVBOX_HOST_ONLY_PARAM(a_Stuff) , a_Stuff 140 147 #endif 141 148 -
trunk/src/VBox/GuestHost/OpenGL/include/state/cr_client.h
r69474 r78116 62 62 GLboolean enabled; 63 63 GLboolean normalized; /* Added with GL_ARB_vertex_program */ 64 # ifndef IN_GUEST 65 GLboolean fRealPtr; /**< @bugref{9407} */ 66 # endif 64 67 int bytesPerIndex; 65 68 #ifdef CR_ARB_vertex_buffer_object … … 68 71 #ifdef CR_EXT_compiled_vertex_array 69 72 GLboolean locked; 73 # ifndef IN_GUEST 74 GLboolean fPrevRealPtr; /**< @bugref{9407} */ 75 # endif 70 76 unsigned char *prevPtr; 71 77 GLint prevStride; -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/dispatchheader.py
r69392 r78116 45 45 params = apiutil.Parameters(func_name) 46 46 47 print('typedef %s (SPU_APIENTRY *%sFunc_t)(%s);' % (return_type, func_name, apiutil.MakePrototypeString (params)))47 print('typedef %s (SPU_APIENTRY *%sFunc_t)(%s);' % (return_type, func_name, apiutil.MakePrototypeStringForDispatcher(params))) 48 48 print('') 49 49 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
r69392 r78116 1041 1041 { 1042 1042 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1043 diff_api.VertexPointer(cp->size, cp->type, cp->stride, cp->p );1043 diff_api.VertexPointer(cp->size, cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1044 1044 } 1045 1045 … … 1048 1048 { 1049 1049 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1050 diff_api.ColorPointer(cp->size, cp->type, cp->stride, cp->p );1050 diff_api.ColorPointer(cp->size, cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1051 1051 } 1052 1052 … … 1055 1055 { 1056 1056 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1057 diff_api.FogCoordPointerEXT(cp->type, cp->stride, cp->p );1057 diff_api.FogCoordPointerEXT(cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1058 1058 } 1059 1059 … … 1062 1062 { 1063 1063 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1064 diff_api.SecondaryColorPointerEXT(cp->size, cp->type, cp->stride, cp->p );1064 diff_api.SecondaryColorPointerEXT(cp->size, cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1065 1065 } 1066 1066 … … 1069 1069 { 1070 1070 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1071 diff_api.EdgeFlagPointer(cp->stride, cp->p );1071 diff_api.EdgeFlagPointer(cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1072 1072 } 1073 1073 … … 1076 1076 { 1077 1077 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1078 diff_api.IndexPointer(cp->type, cp->stride, cp->p );1078 diff_api.IndexPointer(cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1079 1079 } 1080 1080 … … 1083 1083 { 1084 1084 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1085 diff_api.NormalPointer(cp->type, cp->stride, cp->p );1085 diff_api.NormalPointer(cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1086 1086 } 1087 1087 … … 1094 1094 diff_api.ActiveTextureARB(i+GL_TEXTURE0_ARB); 1095 1095 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1096 diff_api.TexCoordPointer(cp->size, cp->type, cp->stride, cp->p );1096 diff_api.TexCoordPointer(cp->size, cp->type, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1097 1097 } 1098 1098 } … … 1108 1108 { 1109 1109 diff_api.BindBufferARB(GL_ARRAY_BUFFER_ARB, cp->buffer->hwid); 1110 diff_api.VertexAttribPointerARB(i, cp->size, cp->type, cp->normalized, cp->stride, cp->p );1110 diff_api.VertexAttribPointerARB(i, cp->size, cp->type, cp->normalized, cp->stride, cp->p CRVBOX_HOST_ONLY_PARAM(-1 /*fRealPtr*/)); 1111 1111 } 1112 1112 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
r71903 r78116 73 73 } 74 74 75 static void crStateUnlockClientPointer(CRClientPointer* cp )75 static void crStateUnlockClientPointer(CRClientPointer* cp, int fFreePointer) 76 76 { 77 77 if (cp->locked) 78 78 { 79 79 #ifndef IN_GUEST 80 if (cp->p) crFree(cp->p); 80 if (cp->p && fFreePointer != 0) 81 { 82 if (cp->fRealPtr) 83 { 84 crFree(cp->p); 85 cp->fRealPtr = 0; 86 } 87 cp->p = NULL; 88 } 89 #else 90 RT_NOREF(fFreePointer); 81 91 #endif 82 92 cp->locked = GL_FALSE; … … 92 102 unsigned int i; 93 103 94 crStateUnlockClientPointer(&c->array.v );95 crStateUnlockClientPointer(&c->array.c );96 crStateUnlockClientPointer(&c->array.f );97 crStateUnlockClientPointer(&c->array.s );98 crStateUnlockClientPointer(&c->array.e );99 crStateUnlockClientPointer(&c->array.i );100 crStateUnlockClientPointer(&c->array.n );104 crStateUnlockClientPointer(&c->array.v, 1 /*fFreePointer*/); 105 crStateUnlockClientPointer(&c->array.c, 1 /*fFreePointer*/); 106 crStateUnlockClientPointer(&c->array.f, 1 /*fFreePointer*/); 107 crStateUnlockClientPointer(&c->array.s, 1 /*fFreePointer*/); 108 crStateUnlockClientPointer(&c->array.e, 1 /*fFreePointer*/); 109 crStateUnlockClientPointer(&c->array.i, 1 /*fFreePointer*/); 110 crStateUnlockClientPointer(&c->array.n, 1 /*fFreePointer*/); 101 111 for (i = 0 ; i < CR_MAX_TEXTURE_UNITS ; i++) 102 112 { 103 crStateUnlockClientPointer(&c->array.t[i] );113 crStateUnlockClientPointer(&c->array.t[i], 1 /*fFreePointer*/); 104 114 } 105 115 for (i = 0; i < CR_MAX_VERTEX_ATTRIBS; i++) 106 116 { 107 crStateUnlockClientPointer(&c->array.a[i] );117 crStateUnlockClientPointer(&c->array.a[i], 1 /*fFreePointer*/); 108 118 } 109 119 } … … 152 162 c->array.v.stride = 0; 153 163 c->array.v.enabled = 0; 164 #ifndef IN_GUEST 165 c->array.v.fRealPtr = 0; 166 #endif 154 167 #ifdef CR_ARB_vertex_buffer_object 155 168 c->array.v.buffer = ctx->bufferobject.arrayBuffer; … … 161 174 c->array.v.prevPtr = NULL; 162 175 c->array.v.prevStride = 0; 176 # ifndef IN_GUEST 177 c->array.v.fPrevRealPtr = 0; 178 # endif 163 179 #endif 164 180 … … 169 185 c->array.c.stride = 0; 170 186 c->array.c.enabled = 0; 187 #ifndef IN_GUEST 188 c->array.c.fRealPtr = 0; 189 #endif 171 190 #ifdef CR_ARB_vertex_buffer_object 172 191 c->array.c.buffer = ctx->bufferobject.arrayBuffer; … … 178 197 c->array.c.prevPtr = NULL; 179 198 c->array.c.prevStride = 0; 199 # ifndef IN_GUEST 200 c->array.c.fPrevRealPtr = 0; 201 # endif 180 202 #endif 181 203 … … 186 208 c->array.f.stride = 0; 187 209 c->array.f.enabled = 0; 210 #ifndef IN_GUEST 211 c->array.f.fRealPtr = 0; 212 #endif 188 213 #ifdef CR_ARB_vertex_buffer_object 189 214 c->array.f.buffer = ctx->bufferobject.arrayBuffer; … … 195 220 c->array.f.prevPtr = NULL; 196 221 c->array.f.prevStride = 0; 222 # ifndef IN_GUEST 223 c->array.f.fPrevRealPtr = 0; 224 # endif 197 225 #endif 198 226 … … 203 231 c->array.s.stride = 0; 204 232 c->array.s.enabled = 0; 233 #ifndef IN_GUEST 234 c->array.s.fRealPtr = 0; 235 #endif 205 236 #ifdef CR_ARB_vertex_buffer_object 206 237 c->array.s.buffer = ctx->bufferobject.arrayBuffer; … … 212 243 c->array.s.prevPtr = NULL; 213 244 c->array.s.prevStride = 0; 245 # ifndef IN_GUEST 246 c->array.s.fPrevRealPtr = 0; 247 # endif 214 248 #endif 215 249 … … 220 254 c->array.e.stride = 0; 221 255 c->array.e.enabled = 0; 256 #ifndef IN_GUEST 257 c->array.e.fRealPtr = 0; 258 #endif 222 259 #ifdef CR_ARB_vertex_buffer_object 223 260 c->array.e.buffer = ctx->bufferobject.arrayBuffer; … … 229 266 c->array.e.prevPtr = NULL; 230 267 c->array.e.prevStride = 0; 268 # ifndef IN_GUEST 269 c->array.e.fPrevRealPtr = 0; 270 # endif 231 271 #endif 232 272 … … 237 277 c->array.i.stride = 0; 238 278 c->array.i.enabled = 0; 279 #ifndef IN_GUEST 280 c->array.i.fRealPtr = 0; 281 #endif 239 282 #ifdef CR_ARB_vertex_buffer_object 240 283 c->array.i.buffer = ctx->bufferobject.arrayBuffer; … … 246 289 c->array.i.prevPtr = NULL; 247 290 c->array.i.prevStride = 0; 291 # ifndef IN_GUEST 292 c->array.i.fPrevRealPtr = 0; 293 # endif 248 294 #endif 249 295 … … 254 300 c->array.n.stride = 0; 255 301 c->array.n.enabled = 0; 302 #ifndef IN_GUEST 303 c->array.n.fRealPtr = 0; 304 #endif 256 305 #ifdef CR_ARB_vertex_buffer_object 257 306 c->array.n.buffer = ctx->bufferobject.arrayBuffer; … … 263 312 c->array.n.prevPtr = NULL; 264 313 c->array.n.prevStride = 0; 314 # ifndef IN_GUEST 315 c->array.n.fPrevRealPtr = 0; 316 # endif 265 317 #endif 266 318 … … 273 325 c->array.t[i].stride = 0; 274 326 c->array.t[i].enabled = 0; 327 #ifndef IN_GUEST 328 c->array.t[i].fRealPtr = 0; 329 #endif 275 330 #ifdef CR_ARB_vertex_buffer_object 276 331 c->array.t[i].buffer = ctx->bufferobject.arrayBuffer; … … 283 338 c->array.t[i].prevStride = 0; 284 339 #endif 340 # ifndef IN_GUEST 341 c->array.t[i].fPrevRealPtr = 0; 342 # endif 285 343 } 286 344 … … 292 350 c->array.a[i].size = 4; 293 351 c->array.a[i].stride = 0; 352 # ifndef IN_GUEST 353 c->array.a[i].fRealPtr = 0; 354 # endif 294 355 #ifdef CR_ARB_vertex_buffer_object 295 356 c->array.a[i].buffer = ctx->bufferobject.arrayBuffer; … … 301 362 c->array.a[i].prevPtr = NULL; 302 363 c->array.a[i].prevStride = 0; 364 # ifndef IN_GUEST 365 c->array.a[i].fPrevRealPtr = 0; 366 # endif 303 367 #endif 304 368 } … … 586 650 587 651 static void 588 crStateClientSetPointer(CRClientPointer *cp, GLint size, 589 GLenum type, GLboolean normalized, 590 GLsizei stride, const GLvoid *pointer) 652 crStateClientSetPointer(CRClientPointer *cp, GLint size, GLenum type, GLboolean normalized, GLsizei stride, 653 const GLvoid *pointer CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 591 654 { 592 655 CRContext *g = GetCurrentContext(); 593 656 594 657 #ifdef CR_EXT_compiled_vertex_array 595 crStateUnlockClientPointer(cp); 658 crStateUnlockClientPointer(cp, 0 /*fFreePointer*/); 659 # ifndef IN_GUEST 660 if (cp->prevPtr && cp->fPrevRealPtr) 661 { 662 crFree(cp->prevPtr); 663 cp->fPrevRealPtr = 0; 664 } 665 # endif 596 666 cp->prevPtr = cp->p; 597 667 cp->prevStride = cp->stride; 668 # ifndef IN_GUEST 669 cp->fPrevRealPtr = cp->fRealPtr; 670 # endif 598 671 #endif 599 672 … … 602 675 cp->type = type; 603 676 cp->normalized = normalized; 677 #ifndef IN_GUEST 678 cp->fRealPtr = fRealPtr; 679 #endif 604 680 605 681 /* Calculate the bytes per index for address calculation */ … … 653 729 } 654 730 655 void STATE_APIENTRY crStateVertexPointer(GLint size, GLenum type, 656 GLsizei stride, const GLvoid *p) 731 void STATE_APIENTRY crStateVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 657 732 { 658 733 CRContext *g = GetCurrentContext(); … … 680 755 } 681 756 682 crStateClientSetPointer(&(c->array.v), size, type, GL_FALSE, stride, p );757 crStateClientSetPointer(&(c->array.v), size, type, GL_FALSE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 683 758 DIRTY(cb->dirty, g->neg_bitid); 684 759 DIRTY(cb->clientPointer, g->neg_bitid); … … 686 761 } 687 762 688 void STATE_APIENTRY crStateColorPointer(GLint size, GLenum type, 689 GLsizei stride, const GLvoid *p) 763 void STATE_APIENTRY crStateColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 690 764 { 691 765 CRContext *g = GetCurrentContext(); … … 715 789 } 716 790 717 crStateClientSetPointer(&(c->array.c), size, type, GL_TRUE, stride, p );791 crStateClientSetPointer(&(c->array.c), size, type, GL_TRUE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 718 792 DIRTY(cb->dirty, g->neg_bitid); 719 793 DIRTY(cb->clientPointer, g->neg_bitid); … … 721 795 } 722 796 723 void STATE_APIENTRY crStateSecondaryColorPointerEXT(GLint size, 724 GLenum type, GLsizei stride, const GLvoid *p) 797 void STATE_APIENTRY crStateSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 725 798 { 726 799 CRContext *g = GetCurrentContext(); … … 765 838 } 766 839 767 crStateClientSetPointer(&(c->array.s), size, type, GL_TRUE, stride, p );840 crStateClientSetPointer(&(c->array.s), size, type, GL_TRUE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 768 841 DIRTY(cb->dirty, g->neg_bitid); 769 842 DIRTY(cb->clientPointer, g->neg_bitid); … … 771 844 } 772 845 773 void STATE_APIENTRY crStateIndexPointer(GLenum type, GLsizei stride, 774 const GLvoid *p) 846 void STATE_APIENTRY crStateIndexPointer(GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 775 847 { 776 848 CRContext *g = GetCurrentContext(); … … 793 865 } 794 866 795 crStateClientSetPointer(&(c->array.i), 1, type, GL_TRUE, stride, p );867 crStateClientSetPointer(&(c->array.i), 1, type, GL_TRUE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 796 868 DIRTY(cb->dirty, g->neg_bitid); 797 869 DIRTY(cb->clientPointer, g->neg_bitid); … … 799 871 } 800 872 801 void STATE_APIENTRY crStateNormalPointer(GLenum type, GLsizei stride, 802 const GLvoid *p) 873 void STATE_APIENTRY crStateNormalPointer(GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 803 874 { 804 875 CRContext *g = GetCurrentContext(); … … 822 893 } 823 894 824 crStateClientSetPointer(&(c->array.n), 3, type, GL_TRUE, stride, p );895 crStateClientSetPointer(&(c->array.n), 3, type, GL_TRUE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 825 896 DIRTY(cb->dirty, g->neg_bitid); 826 897 DIRTY(cb->clientPointer, g->neg_bitid); … … 828 899 } 829 900 830 void STATE_APIENTRY crStateTexCoordPointer(GLint size, GLenum type, 831 GLsizei stride, const GLvoid *p) 901 void STATE_APIENTRY crStateTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 832 902 { 833 903 CRContext *g = GetCurrentContext(); … … 855 925 } 856 926 857 crStateClientSetPointer(&(c->array.t[c->curClientTextureUnit]), size, type, GL_FALSE, stride, p );927 crStateClientSetPointer(&(c->array.t[c->curClientTextureUnit]), size, type, GL_FALSE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 858 928 DIRTY(cb->dirty, g->neg_bitid); 859 929 DIRTY(cb->clientPointer, g->neg_bitid); … … 861 931 } 862 932 863 void STATE_APIENTRY crStateEdgeFlagPointer(GLsizei stride, const GLvoid *p )933 void STATE_APIENTRY crStateEdgeFlagPointer(GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 864 934 { 865 935 CRContext *g = GetCurrentContext(); … … 876 946 } 877 947 878 crStateClientSetPointer(&(c->array.e), 1, GL_UNSIGNED_BYTE, GL_FALSE, stride, p );948 crStateClientSetPointer(&(c->array.e), 1, GL_UNSIGNED_BYTE, GL_FALSE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 879 949 DIRTY(cb->dirty, g->neg_bitid); 880 950 DIRTY(cb->clientPointer, g->neg_bitid); … … 882 952 } 883 953 884 void STATE_APIENTRY crStateFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *p )954 void STATE_APIENTRY crStateFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 885 955 { 886 956 CRContext *g = GetCurrentContext(); … … 905 975 } 906 976 907 crStateClientSetPointer(&(c->array.f), 1, type, GL_FALSE, stride, p );977 crStateClientSetPointer(&(c->array.f), 1, type, GL_FALSE, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 908 978 DIRTY(cb->dirty, g->neg_bitid); 909 979 DIRTY(cb->clientPointer, g->neg_bitid); … … 912 982 913 983 914 void STATE_APIENTRY crStateVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *p )984 void STATE_APIENTRY crStateVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 915 985 { 916 986 GLboolean normalized = GL_FALSE; … … 922 992 return; 923 993 } 924 crStateVertexAttribPointerARB(index, size, type, normalized, stride, p); 925 } 926 927 928 void STATE_APIENTRY crStateVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *p) 994 crStateVertexAttribPointerARB(index, size, type, normalized, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 995 } 996 997 998 void STATE_APIENTRY crStateVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, 999 GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 929 1000 { 930 1001 CRContext *g = GetCurrentContext(); … … 959 1030 } 960 1031 961 crStateClientSetPointer(&(c->array.a[index]), size, type, normalized, stride, p );1032 crStateClientSetPointer(&(c->array.a[index]), size, type, normalized, stride, p CRVBOX_HOST_ONLY_PARAM(fRealPtr)); 962 1033 DIRTY(cb->dirty, g->neg_bitid); 963 1034 DIRTY(cb->clientPointer, g->neg_bitid); … … 1005 1076 ** lets me use the same glDrawArrays method. 1006 1077 */ 1007 void STATE_APIENTRY crStateInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *p )1078 void STATE_APIENTRY crStateInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *p CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 1008 1079 { 1009 1080 CRContext *g = GetCurrentContext(); … … 1063 1134 1064 1135 #ifdef CR_EXT_compiled_vertex_array 1065 crStateUnlockClientPointer(cp );1136 crStateUnlockClientPointer(cp, 1 /*fFreePointer*/); 1066 1137 #endif 1067 1138 … … 1143 1214 cp->stride = stride; 1144 1215 #ifdef CR_EXT_compiled_vertex_array 1145 crStateUnlockClientPointer(cp );1216 crStateUnlockClientPointer(cp, 1 /*fFreePointer*/); 1146 1217 #endif 1147 1218 … … 1194 1265 cp->stride = stride; 1195 1266 #ifdef CR_EXT_compiled_vertex_array 1196 crStateUnlockClientPointer(cp );1267 crStateUnlockClientPointer(cp, 1 /*fFreePointer*/); 1197 1268 #endif 1198 1269 … … 1268 1339 cp->stride = stride; 1269 1340 #ifdef CR_EXT_compiled_vertex_array 1270 crStateUnlockClientPointer(cp );1341 crStateUnlockClientPointer(cp, 1 /*fFreePointer*/); 1271 1342 #endif 1272 1343 … … 1464 1535 static void crStateLockClientPointer(CRClientPointer* cp) 1465 1536 { 1466 crStateUnlockClientPointer(cp );1537 crStateUnlockClientPointer(cp, 1 /*fFreePointer*/); 1467 1538 if (cp->enabled) 1468 1539 { … … 1527 1598 for (i=0; i<CRSTATECLIENT_MAX_VERTEXARRAYS; ++i) 1528 1599 { 1529 crStateUnlockClientPointer(crStateGetClientPointerByIndex(i, &c->array) );1530 } 1531 } 1532 1533 void STATE_APIENTRY crStateVertexArrayRangeNV(GLsizei length, const GLvoid *pointer )1600 crStateUnlockClientPointer(crStateGetClientPointerByIndex(i, &c->array), 1 /*fFreePointer*/); 1601 } 1602 } 1603 1604 void STATE_APIENTRY crStateVertexArrayRangeNV(GLsizei length, const GLvoid *pointer CRVBOX_HOST_ONLY_PARAM(int fRealPtr)) 1534 1605 { 1535 1606 /* XXX todo */ 1536 1607 crWarning("crStateVertexArrayRangeNV not implemented"); 1537 (void)length; (void)pointer ;1608 (void)length; (void)pointer CRVBOX_HOST_ONLY_PARAM((void)fRealPtr); 1538 1609 } 1539 1610 … … 1736 1807 idHwArrayBuffer = idHwArrayBufferUsed; 1737 1808 } 1738 diff_api.VertexPointer(to->array.v.size, to->array.v.type, 1739 to->array.v.stride, to->array.v.p); 1809 diff_api.VertexPointer(to->array.v.size, to->array.v.type, to->array.v.stride, to->array.v.p CRVBOX_HOST_ONLY_PARAM(to->array.v.fRealPtr)); 1740 1810 from->array.v.size = to->array.v.size; 1741 1811 from->array.v.type = to->array.v.type; … … 1758 1828 idHwArrayBuffer = idHwArrayBufferUsed; 1759 1829 } 1760 diff_api.NormalPointer(to->array.n.type, 1761 to->array.n.stride, to->array.n.p); 1830 diff_api.NormalPointer(to->array.n.type, to->array.n.stride, to->array.n.p CRVBOX_HOST_ONLY_PARAM(to->array.n.fRealPtr)); 1762 1831 from->array.n.type = to->array.n.type; 1763 1832 from->array.n.stride = to->array.n.stride; … … 1780 1849 idHwArrayBuffer = idHwArrayBufferUsed; 1781 1850 } 1782 diff_api.ColorPointer(to->array.c.size, to->array.c.type, 1783 to->array.c.stride, to->array.c.p); 1851 diff_api.ColorPointer(to->array.c.size, to->array.c.type, to->array.c.stride, to->array.c.p CRVBOX_HOST_ONLY_PARAM(to->array.c.fRealPtr)); 1784 1852 from->array.c.size = to->array.c.size; 1785 1853 from->array.c.type = to->array.c.type; … … 1802 1870 idHwArrayBuffer = idHwArrayBufferUsed; 1803 1871 } 1804 diff_api.IndexPointer(to->array.i.type, 1805 to->array.i.stride, to->array.i.p); 1872 diff_api.IndexPointer(to->array.i.type, to->array.i.stride, to->array.i.p CRVBOX_HOST_ONLY_PARAM(to->array.i.fRealPtr)); 1806 1873 from->array.i.type = to->array.i.type; 1807 1874 from->array.i.stride = to->array.i.stride; … … 1827 1894 diff_api.ClientActiveTextureARB(GL_TEXTURE0_ARB + i); 1828 1895 curClientTextureUnit = i; 1829 diff_api.TexCoordPointer(to->array.t[i].size, to->array.t[i].type, 1830 to->array.t[i].stride, to->array.t[i].p); 1896 diff_api.TexCoordPointer(to->array.t[i].size, to->array.t[i].type, to->array.t[i].stride, to->array.t[i].p CRVBOX_HOST_ONLY_PARAM(to->array.t[i].fRealPtr)); 1831 1897 from->array.t[i].size = to->array.t[i].size; 1832 1898 from->array.t[i].type = to->array.t[i].type; … … 1849 1915 idHwArrayBuffer = idHwArrayBufferUsed; 1850 1916 } 1851 diff_api.EdgeFlagPointer(to->array.e.stride, to->array.e.p );1917 diff_api.EdgeFlagPointer(to->array.e.stride, to->array.e.p CRVBOX_HOST_ONLY_PARAM(to->array.e.fRealPtr)); 1852 1918 from->array.e.stride = to->array.e.stride; 1853 1919 from->array.e.p = to->array.e.p; … … 1869 1935 idHwArrayBuffer = idHwArrayBufferUsed; 1870 1936 } 1871 diff_api.SecondaryColorPointerEXT(to->array.s.size, to->array.s.type, 1872 to->array.s.stride, to->array.s.p); 1937 diff_api.SecondaryColorPointerEXT(to->array.s.size, to->array.s.type, to->array.s.stride, to->array.s.p CRVBOX_HOST_ONLY_PARAM(to->array.s.fRealPtr)); 1873 1938 from->array.s.size = to->array.s.size; 1874 1939 from->array.s.type = to->array.s.type; … … 1891 1956 idHwArrayBuffer = idHwArrayBufferUsed; 1892 1957 } 1893 diff_api.FogCoordPointerEXT(to->array.f.type, 1894 to->array.f.stride, to->array.f.p); 1958 diff_api.FogCoordPointerEXT(to->array.f.type, to->array.f.stride, to->array.f.p CRVBOX_HOST_ONLY_PARAM(to->array.f.fRealPtr)); 1895 1959 from->array.f.type = to->array.f.type; 1896 1960 from->array.f.stride = to->array.f.stride; … … 1916 1980 idHwArrayBuffer = idHwArrayBufferUsed; 1917 1981 } 1918 diff_api.VertexAttribPointerARB(i, to->array.a[i].size, 1919 to->array.a[i].type, 1920 to->array.a[i].normalized, 1921 to->array.a[i].stride, 1922 to->array.a[i].p); 1982 diff_api.VertexAttribPointerARB(i, to->array.a[i].size, to->array.a[i].type, to->array.a[i].normalized, 1983 to->array.a[i].stride, to->array.a[i].p CRVBOX_HOST_ONLY_PARAM(to->array.a[i].fRealPtr)); 1923 1984 from->array.a[i].size = to->array.a[i].size; 1924 1985 from->array.a[i].type = to->array.a[i].type; … … 2032 2093 idHwArrayBuffer = idHwArrayBufferUsed; 2033 2094 } 2034 diff_api.VertexPointer(to->array.v.size, to->array.v.type, 2035 to->array.v.stride, to->array.v.p); 2095 diff_api.VertexPointer(to->array.v.size, to->array.v.type, to->array.v.stride, to->array.v.p CRVBOX_HOST_ONLY_PARAM(to->array.v.fRealPtr)); 2036 2096 FILLDIRTY(cb->v); 2037 2097 FILLDIRTY(cb->clientPointer); … … 2052 2112 idHwArrayBuffer = idHwArrayBufferUsed; 2053 2113 } 2054 diff_api.NormalPointer(to->array.n.type, 2055 to->array.n.stride, to->array.n.p); 2114 diff_api.NormalPointer(to->array.n.type, to->array.n.stride, to->array.n.p CRVBOX_HOST_ONLY_PARAM(to->array.n.fRealPtr)); 2056 2115 FILLDIRTY(cb->n); 2057 2116 FILLDIRTY(cb->clientPointer); … … 2073 2132 idHwArrayBuffer = idHwArrayBufferUsed; 2074 2133 } 2075 diff_api.ColorPointer(to->array.c.size, to->array.c.type, 2076 to->array.c.stride, to->array.c.p); 2134 diff_api.ColorPointer(to->array.c.size, to->array.c.type, to->array.c.stride, to->array.c.p CRVBOX_HOST_ONLY_PARAM(to->array.c.fRealPtr)); 2077 2135 FILLDIRTY(cb->c); 2078 2136 FILLDIRTY(cb->clientPointer); … … 2093 2151 idHwArrayBuffer = idHwArrayBufferUsed; 2094 2152 } 2095 diff_api.IndexPointer(to->array.i.type, 2096 to->array.i.stride, to->array.i.p); 2153 diff_api.IndexPointer(to->array.i.type, to->array.i.stride, to->array.i.p CRVBOX_HOST_ONLY_PARAM(to->array.i.fRealPtr)); 2097 2154 FILLDIRTY(cb->i); 2098 2155 FILLDIRTY(cb->dirty); … … 2117 2174 diff_api.ClientActiveTextureARB(GL_TEXTURE0_ARB + i); 2118 2175 curClientTextureUnit = i; 2119 diff_api.TexCoordPointer(to->array.t[i].size, to->array.t[i].type, 2120 to->array.t[i].stride, to->array.t[i].p); 2176 diff_api.TexCoordPointer(to->array.t[i].size, to->array.t[i].type, to->array.t[i].stride, to->array.t[i].p CRVBOX_HOST_ONLY_PARAM(to->array.t[i].fRealPtr)); 2121 2177 FILLDIRTY(cb->t[i]); 2122 2178 FILLDIRTY(cb->clientPointer); … … 2137 2193 idHwArrayBuffer = idHwArrayBufferUsed; 2138 2194 } 2139 diff_api.EdgeFlagPointer(to->array.e.stride, to->array.e.p );2195 diff_api.EdgeFlagPointer(to->array.e.stride, to->array.e.p CRVBOX_HOST_ONLY_PARAM(to->array.e.fRealPtr)); 2140 2196 FILLDIRTY(cb->e); 2141 2197 FILLDIRTY(cb->clientPointer); … … 2157 2213 idHwArrayBuffer = idHwArrayBufferUsed; 2158 2214 } 2159 diff_api.SecondaryColorPointerEXT(to->array.s.size, to->array.s.type, 2160 to->array.s.stride, to->array.s.p); 2215 diff_api.SecondaryColorPointerEXT(to->array.s.size, to->array.s.type, to->array.s.stride, to->array.s.p CRVBOX_HOST_ONLY_PARAM(to->array.s.fRealPtr)); 2161 2216 FILLDIRTY(cb->s); 2162 2217 FILLDIRTY(cb->clientPointer); … … 2177 2232 idHwArrayBuffer = idHwArrayBufferUsed; 2178 2233 } 2179 diff_api.FogCoordPointerEXT(to->array.f.type, 2180 to->array.f.stride, to->array.f.p); 2234 diff_api.FogCoordPointerEXT(to->array.f.type, to->array.f.stride, to->array.f.p CRVBOX_HOST_ONLY_PARAM(to->array.f.fRealPtr)); 2181 2235 FILLDIRTY(cb->f); 2182 2236 FILLDIRTY(cb->clientPointer); … … 2201 2255 idHwArrayBuffer = idHwArrayBufferUsed; 2202 2256 } 2203 diff_api.VertexAttribPointerARB(i, to->array.a[i].size, 2204 to->array.a[i].type, 2205 to->array.a[i].normalized, 2206 to->array.a[i].stride, 2207 to->array.a[i].p); 2257 diff_api.VertexAttribPointerARB(i, to->array.a[i].size, to->array.a[i].type, to->array.a[i].normalized, 2258 to->array.a[i].stride, to->array.a[i].p CRVBOX_HOST_ONLY_PARAM(to->array.a[i].fRealPtr)); 2208 2259 FILLDIRTY(cb->a[i]); 2209 2260 FILLDIRTY(cb->clientPointer); -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_funcs.py
r69392 r78116 41 41 return_type = apiutil.ReturnType(func_name) 42 42 params = apiutil.Parameters(func_name) 43 print('DECLEXPORT(%s) STATE_APIENTRY crState%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationString (params)))43 print('DECLEXPORT(%s) STATE_APIENTRY crState%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationStringForDispatcher(params))) 44 44 45 45 for func_name in apiutil.AllSpecials( "state_feedback" ): 46 46 return_type = apiutil.ReturnType(func_name) 47 47 params = apiutil.Parameters(func_name) 48 print('DECLEXPORT(%s) STATE_APIENTRY crStateFeedback%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationString (params)))48 print('DECLEXPORT(%s) STATE_APIENTRY crStateFeedback%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationStringForDispatcher(params))) 49 49 50 50 for func_name in apiutil.AllSpecials( "state_select" ): 51 51 return_type = apiutil.ReturnType(func_name) 52 52 params = apiutil.Parameters(func_name) 53 print('DECLEXPORT(%s) STATE_APIENTRY crStateSelect%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationString (params)))53 print('DECLEXPORT(%s) STATE_APIENTRY crStateSelect%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationStringForDispatcher(params))) 54 54 55 55 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
r76553 r78116 1259 1259 { 1260 1260 CRASSERT(cp->p); 1261 rc = SSMR3PutMem(pSSM, cp->p, cp->stride*(pArrays->lockFirst+pArrays->lockCount)); 1262 AssertRCReturn(rc, rc); 1261 if (cp->fRealPtr) 1262 { 1263 rc = SSMR3PutMem(pSSM, cp->p, cp->stride*(pArrays->lockFirst+pArrays->lockCount)); 1264 AssertRCReturn(rc, rc); 1265 } 1266 else 1267 { 1268 crError("crStateSaveClientPointer: cp=%#p doesn't point to host memory!\n", cp); 1269 return VERR_INVALID_STATE; 1270 } 1263 1271 } 1264 1272 #endif -
trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp
r76553 r78116 767 767 768 768 pBlitter->pDispatch->EnableClientState(GL_VERTEX_ARRAY); 769 pBlitter->pDispatch->VertexPointer(2, GL_FLOAT, 0, pVerticies );769 pBlitter->pDispatch->VertexPointer(2, GL_FLOAT, 0, pVerticies CRVBOX_HOST_ONLY_PARAM(1 /*fRealPtr*/)); 770 770 771 771 pBlitter->pDispatch->EnableClientState(GL_TEXTURE_COORD_ARRAY); 772 pBlitter->pDispatch->TexCoordPointer(2, GL_FLOAT, 0, pTexCoords );772 pBlitter->pDispatch->TexCoordPointer(2, GL_FLOAT, 0, pTexCoords CRVBOX_HOST_ONLY_PARAM(1 /*fRealPtr*/)); 773 773 774 774 pBlitter->pDispatch->Enable(pSrc->target); … … 795 795 796 796 pBlitter->pDispatch->EnableClientState(GL_VERTEX_ARRAY); 797 pBlitter->pDispatch->VertexPointer(2, GL_FLOAT, 0, pVerticies );797 pBlitter->pDispatch->VertexPointer(2, GL_FLOAT, 0, pVerticies CRVBOX_HOST_ONLY_PARAM(1 /*fRealPtr*/)); 798 798 799 799 pBlitter->pDispatch->EnableClientState(GL_TEXTURE_COORD_ARRAY); 800 pBlitter->pDispatch->TexCoordPointer(2, GL_FLOAT, 0, pTexCoords );800 pBlitter->pDispatch->TexCoordPointer(2, GL_FLOAT, 0, pTexCoords CRVBOX_HOST_ONLY_PARAM(1 /*fRealPtr*/)); 801 801 802 802 pBlitter->pDispatch->Enable(pSrc->target); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_dispatch.py
r69390 r78116 35 35 if wrap: 36 36 print('#if defined(CR_%s)' % wrap) 37 print('void SERVER_DISPATCH_APIENTRY crServerDispatch%s(%s)' % ( func_name, apiutil.MakeDeclarationString ( params ) ))37 print('void SERVER_DISPATCH_APIENTRY crServerDispatch%s(%s)' % ( func_name, apiutil.MakeDeclarationStringForDispatcher( params ) )) 38 38 print('{') 39 print('\tcrState%s(%s);' % (func_name, apiutil.MakeCallString ( params ) ))40 print('\tcr_server.head_spu->dispatch_table.%s(%s);' % (func_name, apiutil.MakeCallString ( params ) ))39 print('\tcrState%s(%s);' % (func_name, apiutil.MakeCallStringForDispatcher( params ) )) 40 print('\tcr_server.head_spu->dispatch_table.%s(%s);' % (func_name, apiutil.MakeCallStringForDispatcher( params ) )) 41 41 print('}') 42 42 if wrap: … … 109 109 print('\t%s' % (condition)) 110 110 print('\t{') 111 print('\t\tcr_server.head_spu->dispatch_table.%s(%s);' % (func_name, apiutil.MakeCallString (params) ))111 print('\t\tcr_server.head_spu->dispatch_table.%s(%s);' % (func_name, apiutil.MakeCallStringForDispatcher(params) )) 112 112 print("\t\tcr_server.current.c.%s.%s%s = cr_unpackData;" % (name,type,array)) 113 113 print('\t}') -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_dispatch_header.py
r69390 r78116 41 41 return_type = apiutil.ReturnType(func_name) 42 42 43 print('%s SERVER_DISPATCH_APIENTRY crServerDispatch%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationString ( params )))43 print('%s SERVER_DISPATCH_APIENTRY crServerDispatch%s(%s);' % (return_type, func_name, apiutil.MakeDeclarationStringForDispatcher( params ))) 44 44 45 45 print(""" -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py
r78086 r78116 122 122 else: 123 123 print("\t", end="") 124 print("cr_unpackDispatch.%s(%s);" % (func_name, apiutil.MakeCallString (params)))124 print("cr_unpackDispatch.%s(%s);" % (func_name, apiutil.MakeCallStringForDispatcher(params))) 125 125 126 126 -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_arrays.c
r71903 r78116 26 26 GLsizei stride = READ_DATA( 16, GLsizei ); 27 27 GLintptrARB pointer = (GLintptrARB) READ_DATA( 20, GLuint ); 28 cr_unpackDispatch.VertexPointer( size, type, stride, (void *) pointer );28 cr_unpackDispatch.VertexPointer( size, type, stride, (void *) pointer, false /*fRealPtr*/ ); 29 29 } 30 30 … … 35 35 GLsizei stride = READ_DATA( 16, GLsizei ); 36 36 GLintptrARB pointer = READ_DATA( 20, GLuint ); 37 cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer );37 cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer, false /*fRealPtr*/ ); 38 38 } 39 39 … … 43 43 GLsizei stride = READ_DATA( 12, GLsizei ); 44 44 GLintptrARB pointer = READ_DATA( 16, GLuint ); 45 cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer );45 cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer, false /*fRealPtr*/ ); 46 46 } 47 47 … … 51 51 GLsizei stride = READ_DATA( 12, GLsizei ); 52 52 GLintptrARB pointer = READ_DATA( 16, GLuint ); 53 cr_unpackDispatch.IndexPointer( type, stride, (void *) pointer );53 cr_unpackDispatch.IndexPointer( type, stride, (void *) pointer, false /*fRealPtr*/ ); 54 54 } 55 55 … … 58 58 GLsizei stride = READ_DATA( 8, GLsizei ); 59 59 GLintptrARB pointer = READ_DATA( 12, GLuint ); 60 cr_unpackDispatch.EdgeFlagPointer( stride, (void *) pointer );60 cr_unpackDispatch.EdgeFlagPointer( stride, (void *) pointer, false /*fRealPtr*/ ); 61 61 } 62 62 … … 67 67 GLsizei stride = READ_DATA( 16, GLsizei ); 68 68 GLintptrARB pointer = READ_DATA( 20, GLuint ); 69 cr_unpackDispatch.ColorPointer( size, type, stride, (void *) pointer );69 cr_unpackDispatch.ColorPointer( size, type, stride, (void *) pointer, false /*fRealPtr*/ ); 70 70 } 71 71 … … 75 75 GLsizei stride = READ_DATA( 12, GLsizei ); 76 76 GLintptrARB pointer = READ_DATA( 16, GLuint ); 77 cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer );77 cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer, false /*fRealPtr*/ ); 78 78 } 79 79 … … 84 84 GLsizei stride = READ_DATA( 16, GLsizei ); 85 85 GLintptrARB pointer = READ_DATA( 20, GLuint ); 86 cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer );86 cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer, false /*fRealPtr*/ ); 87 87 } 88 88 … … 95 95 GLsizei stride = READ_DATA( 24, GLsizei ); 96 96 GLintptrARB pointer = READ_DATA( 28, GLuint ); 97 cr_unpackDispatch.VertexAttribPointerARB( index, size, type, normalized, stride, (void *) pointer );97 cr_unpackDispatch.VertexAttribPointerARB( index, size, type, normalized, stride, (void *) pointer, false /*fRealPtr*/ ); 98 98 } 99 99 … … 105 105 GLsizei stride = READ_DATA( 20, GLsizei ); 106 106 GLintptrARB pointer = READ_DATA( 24, GLuint ); 107 cr_unpackDispatch.VertexAttribPointerNV( index, size, type, stride, (void *) pointer );107 cr_unpackDispatch.VertexAttribPointerNV( index, size, type, stride, (void *) pointer, false /*fRealPtr*/ ); 108 108 } 109 109 … … 113 113 GLsizei stride = READ_DATA( 12, GLsizei ); 114 114 GLintptrARB pointer = READ_DATA( 16, GLuint ); 115 cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer );115 cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer, false /*fRealPtr*/ ); 116 116 } 117 117 … … 162 162 static void crUnpackSetClientPointerByIndex(int index, GLint size, 163 163 GLenum type, GLboolean normalized, 164 GLsizei stride, const GLvoid *pointer, CRClientState *c )164 GLsizei stride, const GLvoid *pointer, CRClientState *c, int fRealPtr) 165 165 { 166 166 /*crDebug("crUnpackSetClientPointerByIndex: %i(s=%i, t=0x%x, n=%i, str=%i) -> %p", index, size, type, normalized, stride, pointer);*/ … … 171 171 { 172 172 case 0: 173 cr_unpackDispatch.VertexPointer(size, type, stride, pointer );173 cr_unpackDispatch.VertexPointer(size, type, stride, pointer, fRealPtr); 174 174 break; 175 175 case 1: 176 cr_unpackDispatch.ColorPointer(size, type, stride, pointer );176 cr_unpackDispatch.ColorPointer(size, type, stride, pointer, fRealPtr); 177 177 break; 178 178 case 2: 179 cr_unpackDispatch.FogCoordPointerEXT(type, stride, pointer );179 cr_unpackDispatch.FogCoordPointerEXT(type, stride, pointer, fRealPtr); 180 180 break; 181 181 case 3: 182 cr_unpackDispatch.SecondaryColorPointerEXT(size, type, stride, pointer );182 cr_unpackDispatch.SecondaryColorPointerEXT(size, type, stride, pointer, fRealPtr); 183 183 break; 184 184 case 4: 185 cr_unpackDispatch.EdgeFlagPointer(stride, pointer );185 cr_unpackDispatch.EdgeFlagPointer(stride, pointer, fRealPtr); 186 186 break; 187 187 case 5: 188 cr_unpackDispatch.IndexPointer(type, stride, pointer );188 cr_unpackDispatch.IndexPointer(type, stride, pointer, fRealPtr); 189 189 break; 190 190 case 6: 191 cr_unpackDispatch.NormalPointer(type, stride, pointer );191 cr_unpackDispatch.NormalPointer(type, stride, pointer, fRealPtr); 192 192 break; 193 193 } … … 200 200 cr_unpackDispatch.ClientActiveTextureARB(GL_TEXTURE0_ARB+index-7); 201 201 } 202 cr_unpackDispatch.TexCoordPointer(size, type, stride, pointer );202 cr_unpackDispatch.TexCoordPointer(size, type, stride, pointer, fRealPtr); 203 203 if ((index-7)!=curTexUnit) 204 204 { … … 209 209 { 210 210 cr_unpackDispatch.VertexAttribPointerARB(index-7-CR_MAX_TEXTURE_UNITS, 211 size, type, normalized, stride, pointer );211 size, type, normalized, stride, pointer, fRealPtr); 212 212 } 213 213 } … … 265 265 /*crDebug("crUnpackExtendLockArraysEXT: old cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", 266 266 index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/ 267 crUnpackSetClientPointerByIndex(index, cp->size, cp->type, cp->normalized, 0, data, c );267 crUnpackSetClientPointerByIndex(index, cp->size, cp->type, cp->normalized, 0, data, c, 1 /*fRealPtr*/); 268 268 /*crDebug("crUnpackExtendLockArraysEXT: new cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", 269 269 index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/ … … 305 305 /*crDebug("crUnpackExtendUnlockArraysEXT: old cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", 306 306 i, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/ 307 crUnpackSetClientPointerByIndex(i, cp->size, cp->type, cp->normalized, cp->prevStride, cp->prevPtr, c); 307 unsigned char *prevPtr = cp->prevPtr; 308 int fRealPtr = cp->fPrevRealPtr; 309 cp->prevPtr = NULL; 310 cp->fPrevRealPtr = 0; 311 crUnpackSetClientPointerByIndex(i, cp->size, cp->type, cp->normalized, cp->prevStride, prevPtr, c, cp->fPrevRealPtr); 308 312 /*crDebug("crUnpackExtendUnlockArraysEXT: new cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", 309 313 i, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/
Note:
See TracChangeset
for help on using the changeset viewer.