From aa10a08696cae93799fcddae3f0245ceee905e01 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 6 Sep 2012 08:48:23 +0200 Subject: xserver mesa git update 6 sep 2012 --- mesalib/src/mesa/main/atifragshader.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'mesalib/src/mesa/main/atifragshader.c') diff --git a/mesalib/src/mesa/main/atifragshader.c b/mesalib/src/mesa/main/atifragshader.c index c74c999f8..63608a33f 100644 --- a/mesalib/src/mesa/main/atifragshader.c +++ b/mesalib/src/mesa/main/atifragshader.c @@ -83,10 +83,8 @@ _mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_sha { GLuint i; for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { - if (s->Instructions[i]) - free(s->Instructions[i]); - if (s->SetupInst[i]) - free(s->SetupInst[i]); + free(s->Instructions[i]); + free(s->SetupInst[i]); } free(s); } @@ -342,21 +340,17 @@ _mesa_BeginFragmentShaderATI(void) (or, could use the same mem but would need to reinitialize) */ /* no idea if it's allowed to redefine a shader */ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { - if (ctx->ATIFragmentShader.Current->Instructions[i]) - free(ctx->ATIFragmentShader.Current->Instructions[i]); - if (ctx->ATIFragmentShader.Current->SetupInst[i]) - free(ctx->ATIFragmentShader.Current->SetupInst[i]); + free(ctx->ATIFragmentShader.Current->Instructions[i]); + free(ctx->ATIFragmentShader.Current->SetupInst[i]); } /* malloc the instructions here - not sure if the best place but its a start */ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { ctx->ATIFragmentShader.Current->Instructions[i] = - (struct atifs_instruction *) calloc(1, sizeof(struct atifs_instruction) * (MAX_NUM_INSTRUCTIONS_PER_PASS_ATI)); ctx->ATIFragmentShader.Current->SetupInst[i] = - (struct atifs_setupinst *) calloc(1, sizeof(struct atifs_setupinst) * (MAX_NUM_FRAGMENT_REGISTERS_ATI)); } -- cgit v1.2.3