Lines Matching refs:shProg
247 struct gl_shader_program *shProg) in _mesa_reference_shader_program_() argument
250 if (*ptr == shProg) { in _mesa_reference_shader_program_()
272 if (shProg) { in _mesa_reference_shader_program_()
273 p_atomic_inc(&shProg->RefCount); in _mesa_reference_shader_program_()
274 *ptr = shProg; in _mesa_reference_shader_program_()
315 struct gl_shader_program *shProg; in _mesa_new_shader_program() local
316 shProg = rzalloc(NULL, struct gl_shader_program); in _mesa_new_shader_program()
317 if (shProg) { in _mesa_new_shader_program()
318 shProg->Name = name; in _mesa_new_shader_program()
319 shProg->data = _mesa_create_shader_program_data(); in _mesa_new_shader_program()
320 if (!shProg->data) { in _mesa_new_shader_program()
321 ralloc_free(shProg); in _mesa_new_shader_program()
324 init_shader_program(shProg); in _mesa_new_shader_program()
326 return shProg; in _mesa_new_shader_program()
335 struct gl_shader_program *shProg) in _mesa_clear_shader_program_data() argument
338 if (shProg->_LinkedShaders[sh] != NULL) { in _mesa_clear_shader_program_data()
339 _mesa_delete_linked_shader(ctx, shProg->_LinkedShaders[sh]); in _mesa_clear_shader_program_data()
340 shProg->_LinkedShaders[sh] = NULL; in _mesa_clear_shader_program_data()
344 if (shProg->UniformRemapTable) { in _mesa_clear_shader_program_data()
345 ralloc_free(shProg->UniformRemapTable); in _mesa_clear_shader_program_data()
346 shProg->NumUniformRemapTable = 0; in _mesa_clear_shader_program_data()
347 shProg->UniformRemapTable = NULL; in _mesa_clear_shader_program_data()
350 if (shProg->UniformHash) { in _mesa_clear_shader_program_data()
351 string_to_uint_map_dtor(shProg->UniformHash); in _mesa_clear_shader_program_data()
352 shProg->UniformHash = NULL; in _mesa_clear_shader_program_data()
355 if (shProg->data) in _mesa_clear_shader_program_data()
356 _mesa_program_resource_hash_destroy(shProg); in _mesa_clear_shader_program_data()
358 _mesa_reference_shader_program_data(&shProg->data, NULL); in _mesa_clear_shader_program_data()
369 struct gl_shader_program *shProg) in _mesa_free_shader_program_data() argument
373 assert(shProg->Type == GL_SHADER_PROGRAM_MESA); in _mesa_free_shader_program_data()
375 _mesa_clear_shader_program_data(ctx, shProg); in _mesa_free_shader_program_data()
377 if (shProg->AttributeBindings) { in _mesa_free_shader_program_data()
378 string_to_uint_map_dtor(shProg->AttributeBindings); in _mesa_free_shader_program_data()
379 shProg->AttributeBindings = NULL; in _mesa_free_shader_program_data()
382 if (shProg->FragDataBindings) { in _mesa_free_shader_program_data()
383 string_to_uint_map_dtor(shProg->FragDataBindings); in _mesa_free_shader_program_data()
384 shProg->FragDataBindings = NULL; in _mesa_free_shader_program_data()
387 if (shProg->FragDataIndexBindings) { in _mesa_free_shader_program_data()
388 string_to_uint_map_dtor(shProg->FragDataIndexBindings); in _mesa_free_shader_program_data()
389 shProg->FragDataIndexBindings = NULL; in _mesa_free_shader_program_data()
393 for (i = 0; i < shProg->NumShaders; i++) { in _mesa_free_shader_program_data()
394 _reference_shader(ctx, &shProg->Shaders[i], NULL, true); in _mesa_free_shader_program_data()
396 shProg->NumShaders = 0; in _mesa_free_shader_program_data()
398 free(shProg->Shaders); in _mesa_free_shader_program_data()
399 shProg->Shaders = NULL; in _mesa_free_shader_program_data()
402 for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) { in _mesa_free_shader_program_data()
403 free(shProg->TransformFeedback.VaryingNames[i]); in _mesa_free_shader_program_data()
405 free(shProg->TransformFeedback.VaryingNames); in _mesa_free_shader_program_data()
406 shProg->TransformFeedback.VaryingNames = NULL; in _mesa_free_shader_program_data()
407 shProg->TransformFeedback.NumVarying = 0; in _mesa_free_shader_program_data()
409 free(shProg->Label); in _mesa_free_shader_program_data()
410 shProg->Label = NULL; in _mesa_free_shader_program_data()
419 struct gl_shader_program *shProg) in _mesa_delete_shader_program() argument
421 _mesa_free_shader_program_data(ctx, shProg); in _mesa_delete_shader_program()
422 ralloc_free(shProg); in _mesa_delete_shader_program()
432 struct gl_shader_program *shProg; in _mesa_lookup_shader_program() local
434 shProg = (struct gl_shader_program *) in _mesa_lookup_shader_program()
440 if (shProg && shProg->Type != GL_SHADER_PROGRAM_MESA) { in _mesa_lookup_shader_program()
443 return shProg; in _mesa_lookup_shader_program()
461 struct gl_shader_program *shProg = (struct gl_shader_program *) in _mesa_lookup_shader_program_err_glthread() local
463 if (!shProg) { in _mesa_lookup_shader_program_err_glthread()
468 if (shProg->Type != GL_SHADER_PROGRAM_MESA) { in _mesa_lookup_shader_program_err_glthread()
473 return shProg; in _mesa_lookup_shader_program_err_glthread()