diff options
author | marha <marha@users.sourceforge.net> | 2012-09-06 08:49:13 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-06 08:49:13 +0200 |
commit | ccc8a492607df715b08d27c6bb3b9d13b1ff48a2 (patch) | |
tree | 4311d252acd49786ceed60cb55343af0a9294a2f /mesalib/src/mesa/main/atifragshader.c | |
parent | a4d007b9b60f2fc7c8de46533e2f47ecb24f3c9c (diff) | |
parent | aa10a08696cae93799fcddae3f0245ceee905e01 (diff) | |
download | vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.gz vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.bz2 vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/atifragshader.c')
-rw-r--r-- | mesalib/src/mesa/main/atifragshader.c | 14 |
1 files changed, 4 insertions, 10 deletions
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)); } |