summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-06-01 20:16:20 -0700
committerKeith Whitwell <keithw@vmware.com>2009-06-01 20:35:38 -0700
commit1aef032d438aaa40ec28bf279ad5c089370773f0 (patch)
tree4b81fd950167611e0a8e9ab73c34187cb2860bc6 /src/gallium/auxiliary/draw/draw_pipe_pstipple.c
parent003cfd4dd2491675058c53a8f59553f2443be349 (diff)
gallium/draw: Free specialized versions of driver shaders
The pstipple, aaline and aapoint code would create specialized versions of shaders and upload them to the driver -- but never free them.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_pstipple.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index bc63b700de..30a6d2919d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -650,6 +650,10 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
struct pstip_fragment_shader *aafs = (struct pstip_fragment_shader *) fs;
/* pass-through */
pstip->driver_delete_fs_state(pstip->pipe, aafs->driver_fs);
+
+ if (aafs->pstip_fs)
+ pstip->driver_delete_fs_state(pstip->pipe, aafs->pstip_fs);
+
FREE(aafs);
}