{
unbind_array_object_vbos(ctx, obj);
_mesa_reference_buffer_object(ctx, &obj->IndexBufferObj, NULL);
- mtx_destroy(&obj->Mutex);
free(obj->Label);
free(obj);
}
GLboolean deleteFlag = GL_FALSE;
struct gl_vertex_array_object *oldObj = *ptr;
- mtx_lock(&oldObj->Mutex);
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
- mtx_unlock(&oldObj->Mutex);
if (deleteFlag)
_mesa_delete_vao(ctx, oldObj);
if (vao) {
/* reference new array object */
- mtx_lock(&vao->Mutex);
assert(vao->RefCount > 0);
vao->RefCount++;
*ptr = vao;
- mtx_unlock(&vao->Mutex);
}
}
vao->Name = name;
- mtx_init(&vao->Mutex, mtx_plain);
vao->RefCount = 1;
/* Init the individual arrays */
GLchar *Label; /**< GL_KHR_debug */
- mtx_t Mutex;
-
/**
* Does the VAO use ARB semantics or Apple semantics?
*
GLint RefCount;
- mtx_t Mutex;
-
GLchar *Label; /**< GL_KHR_debug */
/**
}
_mesa_reference_shader_program(ctx, &obj->ActiveProgram, NULL);
- mtx_destroy(&obj->Mutex);
free(obj->Label);
ralloc_free(obj);
}
struct gl_pipeline_object *obj = rzalloc(NULL, struct gl_pipeline_object);
if (obj) {
obj->Name = name;
- mtx_init(&obj->Mutex, mtx_plain);
obj->RefCount = 1;
obj->Flags = _mesa_get_shader_flags();
obj->InfoLog = NULL;
GLboolean deleteFlag = GL_FALSE;
struct gl_pipeline_object *oldObj = *ptr;
- mtx_lock(&oldObj->Mutex);
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
- mtx_unlock(&oldObj->Mutex);
if (deleteFlag) {
_mesa_delete_pipeline_object(ctx, oldObj);
if (obj) {
/* reference new pipeline object */
- mtx_lock(&obj->Mutex);
assert(obj->RefCount > 0);
obj->RefCount++;
*ptr = obj;
- mtx_unlock(&obj->Mutex);
}
}
/* Extended for ARB_separate_shader_objects */
ctx->Shader.RefCount = 1;
- mtx_init(&ctx->Shader.Mutex, mtx_plain);
-
ctx->TessCtrlProgram.patch_vertices = 3;
for (i = 0; i < 4; ++i)
ctx->TessCtrlProgram.patch_default_outer_level[i] = 1.0;
_mesa_reference_pipeline_object(ctx, &ctx->_Shader, NULL);
assert(ctx->Shader.RefCount == 1);
- mtx_destroy(&ctx->Shader.Mutex);
}