Lines Matching refs:shared

60    struct gl_shared_state *shared;  in _mesa_alloc_shared_state()  local
63 shared = CALLOC_STRUCT(gl_shared_state); in _mesa_alloc_shared_state()
64 if (!shared) in _mesa_alloc_shared_state()
67 _glthread_INIT_MUTEX(shared->Mutex); in _mesa_alloc_shared_state()
69 shared->DisplayList = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
70 shared->TexObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
71 shared->Programs = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
74 shared->DefaultVertexProgram = in _mesa_alloc_shared_state()
80 shared->DefaultFragmentProgram = in _mesa_alloc_shared_state()
86 shared->ATIShaders = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
87 shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0); in _mesa_alloc_shared_state()
91 shared->ShaderObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
94 shared->BufferObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
98 shared->SamplerObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
102 shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0); in _mesa_alloc_shared_state()
119 shared->DefaultTex[i] = ctx->Driver.NewTextureObject(ctx, 0, targets[i]); in _mesa_alloc_shared_state()
123 assert(shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount == 1); in _mesa_alloc_shared_state()
126 _glthread_INIT_MUTEX(shared->TexMutex); in _mesa_alloc_shared_state()
127 shared->TextureStateStamp = 0; in _mesa_alloc_shared_state()
130 shared->FrameBuffers = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
131 shared->RenderBuffers = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
134 make_empty_list(& shared->SyncObjects); in _mesa_alloc_shared_state()
136 return shared; in _mesa_alloc_shared_state()
309 free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) in free_shared_state() argument
315 if (shared->FallbackTex[i]) in free_shared_state()
316 ctx->Driver.DeleteTexture(ctx, shared->FallbackTex[i]); in free_shared_state()
322 _mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx); in free_shared_state()
323 _mesa_DeleteHashTable(shared->DisplayList); in free_shared_state()
326 _mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx); in free_shared_state()
327 _mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx); in free_shared_state()
328 _mesa_DeleteHashTable(shared->ShaderObjects); in free_shared_state()
331 _mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx); in free_shared_state()
332 _mesa_DeleteHashTable(shared->Programs); in free_shared_state()
335 _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL); in free_shared_state()
339 _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL); in free_shared_state()
343 _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx); in free_shared_state()
344 _mesa_DeleteHashTable(shared->ATIShaders); in free_shared_state()
345 _mesa_delete_ati_fragment_shader(ctx, shared->DefaultFragmentShader); in free_shared_state()
348 _mesa_HashDeleteAll(shared->BufferObjects, delete_bufferobj_cb, ctx); in free_shared_state()
349 _mesa_DeleteHashTable(shared->BufferObjects); in free_shared_state()
352 _mesa_HashDeleteAll(shared->FrameBuffers, delete_framebuffer_cb, ctx); in free_shared_state()
353 _mesa_DeleteHashTable(shared->FrameBuffers); in free_shared_state()
354 _mesa_HashDeleteAll(shared->RenderBuffers, delete_renderbuffer_cb, ctx); in free_shared_state()
355 _mesa_DeleteHashTable(shared->RenderBuffers); in free_shared_state()
358 _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL); in free_shared_state()
364 foreach_s(node, temp, & shared->SyncObjects) { in free_shared_state()
370 _mesa_HashDeleteAll(shared->SamplerObjects, delete_sampler_object_cb, ctx); in free_shared_state()
371 _mesa_DeleteHashTable(shared->SamplerObjects); in free_shared_state()
381 ctx->Driver.DeleteTexture(ctx, shared->DefaultTex[i]); in free_shared_state()
385 _mesa_HashDeleteAll(shared->TexObjects, delete_texture_cb, ctx); in free_shared_state()
386 _mesa_DeleteHashTable(shared->TexObjects); in free_shared_state()
388 _glthread_DESTROY_MUTEX(shared->Mutex); in free_shared_state()
389 _glthread_DESTROY_MUTEX(shared->TexMutex); in free_shared_state()
391 free(shared); in free_shared_state()