Home | History | Annotate | Download | only in main

Lines Matching defs:shProg

189  * Set ptr to point to shProg.
192 * Then set ptr to point to shProg, incrementing its refcount.
197 struct gl_shader_program *shProg)
200 if (*ptr == shProg) {
227 if (shProg) {
228 shProg->RefCount++;
231 (void *) shProg, shProg->Name, shProg->RefCount);
233 *ptr = shProg;
265 struct gl_shader_program *shProg;
266 shProg = rzalloc(NULL, struct gl_shader_program);
267 if (shProg) {
268 shProg->Name = name;
269 _mesa_init_shader_program(ctx, shProg);
271 return shProg;
280 struct gl_shader_program *shProg)
282 if (shProg->UniformStorage) {
284 for (i = 0; i < shProg->NumUserUniformStorage; ++i)
285 _mesa_uniform_detach_all_driver_storage(&shProg->UniformStorage[i]);
286 ralloc_free(shProg->UniformStorage);
287 shProg->NumUserUniformStorage = 0;
288 shProg->UniformStorage = NULL;
291 if (shProg->UniformHash) {
292 string_to_uint_map_dtor(shProg->UniformHash);
293 shProg->UniformHash = NULL;
296 assert(shProg->InfoLog != NULL);
297 ralloc_free(shProg->InfoLog);
298 shProg->InfoLog = ralloc_strdup(shProg, "");
308 struct gl_shader_program *shProg)
313 assert(shProg->Type == GL_SHADER_PROGRAM_MESA);
315 _mesa_clear_shader_program_data(ctx, shProg);
317 if (shProg->AttributeBindings) {
318 string_to_uint_map_dtor(shProg->AttributeBindings);
319 shProg->AttributeBindings = NULL;
322 if (shProg->FragDataBindings) {
323 string_to_uint_map_dtor(shProg->FragDataBindings);
324 shProg->FragDataBindings = NULL;
327 if (shProg->FragDataIndexBindings) {
328 string_to_uint_map_dtor(shProg->FragDataIndexBindings);
329 shProg->FragDataIndexBindings = NULL;
333 for (i = 0; i < shProg->NumShaders; i++) {
334 _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL);
336 shProg->NumShaders = 0;
338 if (shProg->Shaders) {
339 free(shProg->Shaders);
340 shProg->Shaders = NULL;
344 for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
345 free(shProg->TransformFeedback.VaryingNames[i]);
347 free(shProg->TransformFeedback.VaryingNames);
348 shProg->TransformFeedback.VaryingNames = NULL;
349 shProg->TransformFeedback.NumVarying = 0;
353 if (shProg->_LinkedShaders[sh] != NULL) {
354 ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[sh]);
355 shProg->_LinkedShaders[sh] = NULL;
366 _mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *shProg)
368 _mesa_free_shader_program_data(ctx, shProg);
370 ralloc_free(shProg);
380 struct gl_shader_program *shProg;
382 shProg = (struct gl_shader_program *)
388 if (shProg && shProg->Type != GL_SHADER_PROGRAM_MESA) {
391 return shProg;
409 struct gl_shader_program *shProg = (struct gl_shader_program *)
411 if (!shProg) {
415 if (shProg->Type != GL_SHADER_PROGRAM_MESA) {
419 return shProg;