Lines Matching refs:glthread

24 /* This implements vertex array state tracking for glthread. It's separate
26 * to serve glthread.
29 #include "main/glthread.h"
74 struct glthread_state *glthread = &ctx->GLThread;
79 if (glthread->LastLookedUpVAO &&
80 glthread->LastLookedUpVAO->Name == id) {
81 vao = glthread->LastLookedUpVAO;
83 vao = _mesa_HashLookupLocked(glthread->VAOs, id);
87 glthread->LastLookedUpVAO = vao;
96 struct glthread_state *glthread = &ctx->GLThread;
99 glthread->CurrentVAO = &glthread->DefaultVAO;
104 glthread->CurrentVAO = vao;
112 struct glthread_state *glthread = &ctx->GLThread;
130 if (glthread->CurrentVAO == vao)
131 glthread->CurrentVAO = &glthread->DefaultVAO;
133 if (glthread->LastLookedUpVAO == vao)
134 glthread->LastLookedUpVAO = NULL;
137 _mesa_HashRemoveLocked(glthread->VAOs, vao->Name);
146 struct glthread_state *glthread = &ctx->GLThread;
151 /* The IDs have been generated at this point. Create VAOs for glthread. */
162 _mesa_HashInsertLocked(glthread->VAOs, id, vao, true);
179 struct glthread_state *glthread = &ctx->GLThread;
181 glthread->_PrimitiveRestart = glthread->PrimitiveRestart ||
182 glthread->PrimitiveRestartFixedIndex;
183 glthread->_RestartIndex[0] =
184 _mesa_get_prim_restart_index(glthread->PrimitiveRestartFixedIndex,
185 glthread->RestartIndex, 1);
186 glthread->_RestartIndex[1] =
187 _mesa_get_prim_restart_index(glthread->PrimitiveRestartFixedIndex,
188 glthread->RestartIndex, 2);
189 glthread->_RestartIndex[3] =
190 _mesa_get_prim_restart_index(glthread->PrimitiveRestartFixedIndex,
191 glthread->RestartIndex, 4);
299 set_attrib_binding(struct glthread_state *glthread, struct glthread_vao *vao,
345 attrib_pointer(struct glthread_state *glthread, struct glthread_vao *vao,
360 set_attrib_binding(glthread, vao, attrib, attrib);
373 struct glthread_state *glthread = &ctx->GLThread;
375 attrib_pointer(glthread, glthread->CurrentVAO,
376 glthread->CurrentArrayBufferName,
386 struct glthread_state *glthread = &ctx->GLThread;
393 attrib_pointer(glthread, vao, buffer, attrib, size, type, stride,
398 attrib_format(struct glthread_state *glthread, struct glthread_vao *vao,
416 struct glthread_state *glthread = &ctx->GLThread;
418 attrib_format(glthread, glthread->CurrentVAO, attribindex, size, type,
427 struct glthread_state *glthread = &ctx->GLThread;
431 attrib_format(glthread, vao, attribindex, size, type, relativeoffset);
435 bind_vertex_buffer(struct glthread_state *glthread, struct glthread_vao *vao,
456 struct glthread_state *glthread = &ctx->GLThread;
458 bind_vertex_buffer(glthread, glthread->CurrentVAO, bindingindex, buffer,
467 struct glthread_state *glthread = &ctx->GLThread;
471 bind_vertex_buffer(glthread, vao, bindingindex, buffer, offset, stride);
481 struct glthread_state *glthread = &ctx->GLThread;
489 bind_vertex_buffer(glthread, vao, first + i, buffers[i], offsets[i],
495 binding_divisor(struct glthread_state *glthread, struct glthread_vao *vao,
514 struct glthread_state *glthread = &ctx->GLThread;
516 binding_divisor(glthread, glthread->CurrentVAO, bindingindex, divisor);
523 struct glthread_state *glthread = &ctx->GLThread;
527 binding_divisor(glthread, vao, bindingindex, divisor);
534 struct glthread_state *glthread = &ctx->GLThread;
540 set_attrib_binding(glthread, glthread->CurrentVAO,
549 struct glthread_state *glthread = &ctx->GLThread;
557 set_attrib_binding(glthread, vao,
577 struct glthread_state *glthread = &ctx->GLThread;
579 if (glthread->ClientAttribStackTop >= MAX_CLIENT_ATTRIB_STACK_DEPTH)
583 &glthread->ClientAttribStack[glthread->ClientAttribStackTop];
586 top->VAO = *glthread->CurrentVAO;
587 top->CurrentArrayBufferName = glthread->CurrentArrayBufferName;
588 top->ClientActiveTexture = glthread->ClientActiveTexture;
589 top->RestartIndex = glthread->RestartIndex;
590 top->PrimitiveRestart = glthread->PrimitiveRestart;
591 top->PrimitiveRestartFixedIndex = glthread->PrimitiveRestartFixedIndex;
597 glthread->ClientAttribStackTop++;
606 struct glthread_state *glthread = &ctx->GLThread;
608 if (glthread->ClientAttribStackTop == 0)
611 glthread->ClientAttribStackTop--;
614 &glthread->ClientAttribStack[glthread->ClientAttribStackTop];
628 glthread->CurrentArrayBufferName = top->CurrentArrayBufferName;
629 glthread->ClientActiveTexture = top->ClientActiveTexture;
630 glthread->RestartIndex = top->RestartIndex;
631 glthread->PrimitiveRestart = top->PrimitiveRestart;
632 glthread->PrimitiveRestartFixedIndex = top->PrimitiveRestartFixedIndex;
635 vao = &glthread->DefaultVAO;
639 glthread->CurrentVAO = vao;
645 struct glthread_state *glthread = &ctx->GLThread;
650 glthread->CurrentArrayBufferName = 0;
651 glthread->ClientActiveTexture = 0;
652 glthread->RestartIndex = 0;
653 glthread->PrimitiveRestart = false;
654 glthread->PrimitiveRestartFixedIndex = false;
655 glthread->CurrentVAO = &glthread->DefaultVAO;
656 _mesa_glthread_reset_vao(glthread->CurrentVAO);