Lines Matching defs:glthread
70 struct glthread_state *glthread = &ctx->GLThread;
77 unsigned offset = align(glthread->upload_offset, 8);
80 if (unlikely(!glthread->upload_buffer || offset + size > default_size)) {
100 if (glthread->upload_buffer_private_refcount > 0) {
101 p_atomic_add(&glthread->upload_buffer->RefCount,
102 -glthread->upload_buffer_private_refcount);
103 glthread->upload_buffer_private_refcount = 0;
105 _mesa_reference_buffer_object(ctx, &glthread->upload_buffer, NULL);
106 glthread->upload_buffer =
107 new_upload_buffer(ctx, default_size, &glthread->upload_ptr);
108 glthread->upload_offset = 0;
131 glthread->upload_buffer->RefCount += default_size;
132 glthread->upload_buffer_private_refcount = default_size;
137 memcpy(glthread->upload_ptr + offset, data, size);
139 *out_ptr = glthread->upload_ptr + offset;
141 glthread->upload_offset = offset + size;
145 assert(glthread->upload_buffer_private_refcount > 0);
146 *out_buffer = glthread->upload_buffer;
147 glthread->upload_buffer_private_refcount--;
152 * This is part of what we need to enable glthread on compat-GL contexts that
176 struct glthread_state *glthread = &ctx->GLThread;
180 glthread->CurrentArrayBufferName = buffer;
187 glthread->CurrentVAO->CurrentElementBufferName = buffer;
190 glthread->CurrentDrawIndirectBufferName = buffer;
193 glthread->CurrentPixelPackBufferName = buffer;
196 glthread->CurrentPixelUnpackBufferName = buffer;
205 struct glthread_state *glthread = &ctx->GLThread;
213 if (id == glthread->CurrentArrayBufferName)
215 if (id == glthread->CurrentVAO->CurrentElementBufferName)
217 if (id == glthread->CurrentDrawIndirectBufferName)
219 if (id == glthread->CurrentPixelPackBufferName)
221 if (id == glthread->CurrentPixelUnpackBufferName)
421 * the buffer storage, but we don't know the buffer size in glthread.