Lines Matching refs:glthread
70 struct glthread_state *glthread = &ctx->GLThread; in _mesa_glthread_upload() local
77 unsigned offset = align(glthread->upload_offset, 8); in _mesa_glthread_upload()
80 if (unlikely(!glthread->upload_buffer || offset + size > default_size)) { in _mesa_glthread_upload()
100 if (glthread->upload_buffer_private_refcount > 0) { in _mesa_glthread_upload()
101 p_atomic_add(&glthread->upload_buffer->RefCount, in _mesa_glthread_upload()
102 -glthread->upload_buffer_private_refcount); in _mesa_glthread_upload()
103 glthread->upload_buffer_private_refcount = 0; in _mesa_glthread_upload()
105 _mesa_reference_buffer_object(ctx, &glthread->upload_buffer, NULL); in _mesa_glthread_upload()
106 glthread->upload_buffer = in _mesa_glthread_upload()
107 new_upload_buffer(ctx, default_size, &glthread->upload_ptr); in _mesa_glthread_upload()
108 glthread->upload_offset = 0; in _mesa_glthread_upload()
131 glthread->upload_buffer->RefCount += default_size; in _mesa_glthread_upload()
132 glthread->upload_buffer_private_refcount = default_size; in _mesa_glthread_upload()
137 memcpy(glthread->upload_ptr + offset, data, size); in _mesa_glthread_upload()
139 *out_ptr = glthread->upload_ptr + offset; in _mesa_glthread_upload()
141 glthread->upload_offset = offset + size; in _mesa_glthread_upload()
145 assert(glthread->upload_buffer_private_refcount > 0); in _mesa_glthread_upload()
146 *out_buffer = glthread->upload_buffer; in _mesa_glthread_upload()
147 glthread->upload_buffer_private_refcount--; in _mesa_glthread_upload()
176 struct glthread_state *glthread = &ctx->GLThread; in _mesa_glthread_BindBuffer() local
180 glthread->CurrentArrayBufferName = buffer; in _mesa_glthread_BindBuffer()
187 glthread->CurrentVAO->CurrentElementBufferName = buffer; in _mesa_glthread_BindBuffer()
190 glthread->CurrentDrawIndirectBufferName = buffer; in _mesa_glthread_BindBuffer()
199 struct glthread_state *glthread = &ctx->GLThread; in _mesa_glthread_DeleteBuffers() local
207 if (id == glthread->CurrentArrayBufferName) in _mesa_glthread_DeleteBuffers()
209 if (id == glthread->CurrentVAO->CurrentElementBufferName) in _mesa_glthread_DeleteBuffers()
211 if (id == glthread->CurrentDrawIndirectBufferName) in _mesa_glthread_DeleteBuffers()