X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fatifragshader.c;h=44097e1a266059bf26d695326d802755cce232a1;hb=d9e591391d490c83ce301aa568a2e0afe4cc3c0a;hp=550f50b7a00fbe5fabbb8cfb6b8dc38acb560a74;hpb=70c8d29b6bb3214966892d51e6b2befa7040622d;p=mesa.git diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c index 550f50b7a00..44097e1a266 100644 --- a/src/mesa/main/atifragshader.c +++ b/src/mesa/main/atifragshader.c @@ -26,6 +26,7 @@ #include "main/hash.h" #include "main/imports.h" #include "main/macros.h" +#include "main/mfeatures.h" #include "main/enums.h" #include "main/mtypes.h" #include "main/dispatch.h" @@ -62,7 +63,7 @@ _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp) * Allocate and initialize a new ATI fragment shader object. */ struct ati_fragment_shader * -_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id) +_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id) { struct ati_fragment_shader *s = CALLOC_STRUCT(ati_fragment_shader); (void) ctx; @@ -78,7 +79,7 @@ _mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id) * Delete the given ati fragment shader */ void -_mesa_delete_ati_fragment_shader(GLcontext *ctx, struct ati_fragment_shader *s) +_mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_shader *s) { GLuint i; for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { @@ -316,6 +317,7 @@ _mesa_DeleteFragmentShaderATI(GLuint id) if (prog) { prog->RefCount--; if (prog->RefCount <= 0) { + assert(prog != &DummyShader); free(prog); } }