st/mesa: fix incorrect freeing of drawpixels vertex shaders

These shaders are not st_vertex_shaders, but tgsi ureg shaders.
Fixes fd.o bug 25959.
This commit is contained in:
Brian Paul
2010-01-22 17:56:35 -07:00
parent dd618a006a
commit 46c7cd665c
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1132,6 +1132,8 @@ st_destroy_drawpix(struct st_context *st)
{
st_reference_fragprog(st, &st->drawpix.z_shader, NULL);
st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
st_reference_vertprog(st, &st->drawpix.vert_shaders[0], NULL);
st_reference_vertprog(st, &st->drawpix.vert_shaders[1], NULL);
if (st->drawpix.vert_shaders[0])
free(st->drawpix.vert_shaders[0]);
if (st->drawpix.vert_shaders[1])
free(st->drawpix.vert_shaders[1]);
}
+1 -1
View File
@@ -159,7 +159,7 @@ struct st_context
/** for glDraw/CopyPixels */
struct {
struct st_fragment_program *z_shader;
struct st_vertex_program *vert_shaders[2];
void *vert_shaders[2]; /**< ureg shaders */
} drawpix;
/** for glClear */