• Home
  • Raw
  • Download

Lines Matching refs:shared

51 free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared);
65 struct gl_shared_state *shared; in _mesa_alloc_shared_state() local
68 shared = CALLOC_STRUCT(gl_shared_state); in _mesa_alloc_shared_state()
69 if (!shared) in _mesa_alloc_shared_state()
72 simple_mtx_init(&shared->Mutex, mtx_plain); in _mesa_alloc_shared_state()
74 shared->DisplayList = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
75 shared->BitmapAtlas = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
76 shared->TexObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
77 shared->Programs = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
79 shared->DefaultVertexProgram = in _mesa_alloc_shared_state()
81 shared->DefaultFragmentProgram = in _mesa_alloc_shared_state()
84 shared->ATIShaders = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
85 shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0); in _mesa_alloc_shared_state()
87 shared->ShaderObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
89 shared->BufferObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
90 shared->ZombieBufferObjects = _mesa_set_create(NULL, _mesa_hash_pointer, in _mesa_alloc_shared_state()
94 shared->SamplerObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
97 _mesa_init_shared_handles(shared); in _mesa_alloc_shared_state()
100 _mesa_init_shader_includes(shared); in _mesa_alloc_shared_state()
101 simple_mtx_init(&shared->ShaderIncludeMutex, mtx_plain); in _mesa_alloc_shared_state()
121 shared->DefaultTex[i] = _mesa_new_texture_object(ctx, 0, targets[i]); in _mesa_alloc_shared_state()
126 shared->DefaultTex[i]->TargetIndex = i; in _mesa_alloc_shared_state()
130 assert(shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount == 1); in _mesa_alloc_shared_state()
133 simple_mtx_init(&shared->TexMutex, mtx_plain); in _mesa_alloc_shared_state()
134 shared->TextureStateStamp = 0; in _mesa_alloc_shared_state()
136 shared->FrameBuffers = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
137 shared->RenderBuffers = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
139 shared->SyncObjects = _mesa_set_create(NULL, _mesa_hash_pointer, in _mesa_alloc_shared_state()
142 shared->MemoryObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
143 shared->SemaphoreObjects = _mesa_NewHashTable(); in _mesa_alloc_shared_state()
145 return shared; in _mesa_alloc_shared_state()
345 free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) in free_shared_state() argument
351 if (shared->FallbackTex[i]) in free_shared_state()
352 _mesa_delete_texture_object(ctx, shared->FallbackTex[i]); in free_shared_state()
358 if (shared->DisplayList) { in free_shared_state()
359 _mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx); in free_shared_state()
360 _mesa_DeleteHashTable(shared->DisplayList); in free_shared_state()
361 free(shared->small_dlist_store.ptr); in free_shared_state()
362 util_idalloc_fini(&shared->small_dlist_store.free_idx); in free_shared_state()
365 if (shared->BitmapAtlas) { in free_shared_state()
366 _mesa_HashDeleteAll(shared->BitmapAtlas, delete_bitmap_atlas_cb, ctx); in free_shared_state()
367 _mesa_DeleteHashTable(shared->BitmapAtlas); in free_shared_state()
370 if (shared->ShaderObjects) { in free_shared_state()
371 _mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx); in free_shared_state()
372 _mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx); in free_shared_state()
373 _mesa_DeleteHashTable(shared->ShaderObjects); in free_shared_state()
376 if (shared->Programs) { in free_shared_state()
377 _mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx); in free_shared_state()
378 _mesa_DeleteHashTable(shared->Programs); in free_shared_state()
381 if (shared->DefaultVertexProgram) in free_shared_state()
382 _mesa_reference_program(ctx, &shared->DefaultVertexProgram, NULL); in free_shared_state()
384 if (shared->DefaultFragmentProgram) in free_shared_state()
385 _mesa_reference_program(ctx, &shared->DefaultFragmentProgram, NULL); in free_shared_state()
387 if (shared->DefaultFragmentShader) in free_shared_state()
388 _mesa_delete_ati_fragment_shader(ctx, shared->DefaultFragmentShader); in free_shared_state()
390 if (shared->ATIShaders) { in free_shared_state()
391 _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx); in free_shared_state()
392 _mesa_DeleteHashTable(shared->ATIShaders); in free_shared_state()
395 if (shared->BufferObjects) { in free_shared_state()
396 _mesa_HashDeleteAll(shared->BufferObjects, delete_bufferobj_cb, ctx); in free_shared_state()
397 _mesa_DeleteHashTable(shared->BufferObjects); in free_shared_state()
400 if (shared->ZombieBufferObjects) { in free_shared_state()
401 set_foreach(shared->ZombieBufferObjects, entry) { in free_shared_state()
404 _mesa_set_destroy(shared->ZombieBufferObjects, NULL); in free_shared_state()
407 if (shared->FrameBuffers) { in free_shared_state()
408 _mesa_HashDeleteAll(shared->FrameBuffers, delete_framebuffer_cb, ctx); in free_shared_state()
409 _mesa_DeleteHashTable(shared->FrameBuffers); in free_shared_state()
412 if (shared->RenderBuffers) { in free_shared_state()
413 _mesa_HashDeleteAll(shared->RenderBuffers, delete_renderbuffer_cb, ctx); in free_shared_state()
414 _mesa_DeleteHashTable(shared->RenderBuffers); in free_shared_state()
417 if (shared->SyncObjects) { in free_shared_state()
418 set_foreach(shared->SyncObjects, entry) { in free_shared_state()
422 _mesa_set_destroy(shared->SyncObjects, NULL); in free_shared_state()
425 if (shared->SamplerObjects) { in free_shared_state()
426 _mesa_HashDeleteAll(shared->SamplerObjects, delete_sampler_object_cb, in free_shared_state()
428 _mesa_DeleteHashTable(shared->SamplerObjects); in free_shared_state()
437 if (shared->DefaultTex[i]) in free_shared_state()
438 _mesa_delete_texture_object(ctx, shared->DefaultTex[i]); in free_shared_state()
442 if (shared->TexObjects) { in free_shared_state()
443 _mesa_HashDeleteAll(shared->TexObjects, delete_texture_cb, ctx); in free_shared_state()
444 _mesa_DeleteHashTable(shared->TexObjects); in free_shared_state()
447 _mesa_free_shared_handles(shared); in free_shared_state()
450 _mesa_destroy_shader_includes(shared); in free_shared_state()
451 simple_mtx_destroy(&shared->ShaderIncludeMutex); in free_shared_state()
453 if (shared->MemoryObjects) { in free_shared_state()
454 _mesa_HashDeleteAll(shared->MemoryObjects, delete_memory_object_cb, ctx); in free_shared_state()
455 _mesa_DeleteHashTable(shared->MemoryObjects); in free_shared_state()
458 if (shared->SemaphoreObjects) { in free_shared_state()
459 _mesa_HashDeleteAll(shared->SemaphoreObjects, delete_semaphore_object_cb, ctx); in free_shared_state()
460 _mesa_DeleteHashTable(shared->SemaphoreObjects); in free_shared_state()
463 simple_mtx_destroy(&shared->Mutex); in free_shared_state()
464 simple_mtx_destroy(&shared->TexMutex); in free_shared_state()
466 FREE(shared); in free_shared_state()