Lines Matching refs:sh
53 * Set ptr to point to sh.
56 * Then set ptr to point to sh, incrementing its refcount.
60 struct gl_shader *sh)
63 if (*ptr == sh) {
83 if (sh) {
85 p_atomic_inc(&sh->RefCount);
86 *ptr = sh;
123 _mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
125 _mesa_shader_spirv_data_reference(&sh->spirv_data, NULL);
126 free((void *)sh->Source);
127 free((void *)sh->FallbackSource);
128 free(sh->Label);
129 ralloc_free(sh);
138 struct gl_linked_shader *sh)
140 _mesa_shader_spirv_data_reference(&sh->spirv_data, NULL);
141 _mesa_reference_program(ctx, &sh->Program, NULL);
142 ralloc_free(sh);
153 struct gl_shader *sh = (struct gl_shader *)
159 if (sh && sh->Type == GL_SHADER_PROGRAM_MESA) {
162 return sh;
179 struct gl_shader *sh = (struct gl_shader *)
181 if (!sh) {
185 if (sh->Type == GL_SHADER_PROGRAM_MESA) {
189 return sh;
329 for (gl_shader_stage sh = 0; sh < MESA_SHADER_STAGES; sh++) {
330 if (shProg->_LinkedShaders[sh] != NULL) {
331 _mesa_delete_linked_shader(ctx, shProg->_LinkedShaders[sh]);
332 shProg->_LinkedShaders[sh] = NULL;