Changeset 44052 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Timestamp:
- Dec 6, 2012 2:49:40 PM (12 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
r41057 r44052 251 251 CRStateBits *sb = GetCurrentBits(); 252 252 CRBufferObjectBits *bb = &(sb->bufferobject); 253 int i ;253 int i, j, k; 254 254 255 255 FLUSH(); … … 302 302 } 303 303 #endif 304 /* @todo check bindings with the vertex arrays */ 305 304 305 #ifdef CR_ARB_vertex_buffer_object 306 for (j=0; j<CRSTATECLIENT_MAX_VERTEXARRAYS; ++j) 307 { 308 CRClientPointer *cp = crStateGetClientPointerByIndex(i, &g->client.array); 309 if (obj == cp->buffer) 310 { 311 cp->buffer = b->nullBuffer; 312 ++b->nullBuffer->refCount; 313 } 314 } 315 316 for (k=0; k<g->client.vertexArrayStackDepth; ++k) 317 { 318 CRVertexArrays *pArray = &g->client.vertexArrayStack[k]; 319 for (j=0; j<CRSTATECLIENT_MAX_VERTEXARRAYS; ++j) 320 { 321 CRClientPointer *cp = crStateGetClientPointerByIndex(i, pArray); 322 if (obj == cp->buffer) 323 { 324 cp->buffer = b->nullBuffer; 325 ++b->nullBuffer->refCount; 326 } 327 } 328 } 329 #endif 306 330 crHashtableDelete(g->shared->buffersTable, buffers[i], crStateFreeBufferObject); 307 331 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
r43775 r44052 153 153 #ifdef CR_ARB_vertex_buffer_object 154 154 c->array.v.buffer = g ? g->bufferobject.arrayBuffer : NULL; 155 if (c->array.v.buffer) 156 ++c->array.v.buffer->refCount; 155 157 #endif 156 158 #ifdef CR_EXT_compiled_vertex_array … … 168 170 #ifdef CR_ARB_vertex_buffer_object 169 171 c->array.c.buffer = g ? g->bufferobject.arrayBuffer : NULL; 172 if (c->array.c.buffer) 173 ++c->array.c.buffer->refCount; 170 174 #endif 171 175 #ifdef CR_EXT_compiled_vertex_array … … 183 187 #ifdef CR_ARB_vertex_buffer_object 184 188 c->array.f.buffer = g ? g->bufferobject.arrayBuffer : NULL; 189 if (c->array.f.buffer) 190 ++c->array.f.buffer->refCount; 185 191 #endif 186 192 #ifdef CR_EXT_compiled_vertex_array … … 198 204 #ifdef CR_ARB_vertex_buffer_object 199 205 c->array.s.buffer = g ? g->bufferobject.arrayBuffer : NULL; 206 if (c->array.s.buffer) 207 ++c->array.s.buffer->refCount; 200 208 #endif 201 209 #ifdef CR_EXT_compiled_vertex_array … … 213 221 #ifdef CR_ARB_vertex_buffer_object 214 222 c->array.e.buffer = g ? g->bufferobject.arrayBuffer : NULL; 223 if (c->array.e.buffer) 224 ++c->array.e.buffer->refCount; 215 225 #endif 216 226 #ifdef CR_EXT_compiled_vertex_array … … 228 238 #ifdef CR_ARB_vertex_buffer_object 229 239 c->array.i.buffer = g ? g->bufferobject.arrayBuffer : NULL; 240 if (c->array.i.buffer) 241 ++c->array.i.buffer->refCount; 230 242 #endif 231 243 #ifdef CR_EXT_compiled_vertex_array … … 243 255 #ifdef CR_ARB_vertex_buffer_object 244 256 c->array.n.buffer = g ? g->bufferobject.arrayBuffer : NULL; 257 if (c->array.n.buffer) 258 ++c->array.n.buffer->refCount; 245 259 #endif 246 260 #ifdef CR_EXT_compiled_vertex_array … … 260 274 #ifdef CR_ARB_vertex_buffer_object 261 275 c->array.t[i].buffer = g ? g->bufferobject.arrayBuffer : NULL; 276 if (c->array.t[i].buffer) 277 ++c->array.t[i].buffer->refCount; 262 278 #endif 263 279 #ifdef CR_EXT_compiled_vertex_array … … 277 293 #ifdef CR_ARB_vertex_buffer_object 278 294 c->array.a[i].buffer = g ? g->bufferobject.arrayBuffer : NULL; 295 if (c->array.a[i].buffer) 296 ++c->array.a[i].buffer->refCount; 279 297 #endif 280 298 #ifdef CR_EXT_compiled_vertex_array … … 623 641 624 642 #ifdef CR_ARB_vertex_buffer_object 643 if (cp->buffer) 644 { 645 --cp->buffer->refCount; 646 CRASSERT(cp->buffer->refCount && cp->buffer->refCount < UINT32_MAX/2); 647 } 625 648 cp->buffer = g->bufferobject.arrayBuffer; 649 if (cp->buffer) 650 ++cp->buffer->refCount; 626 651 #endif 627 652 }
Note:
See TracChangeset
for help on using the changeset viewer.