summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_fragprog.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
index dbf36fd53b5..54f91bbd48b 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
@@ -165,8 +165,15 @@ static void
nv30_fp_state_bind(struct pipe_context *pipe, void *hwcso)
{
struct nv30_context *nv30 = nv30_context(pipe);
+ struct nv30_fragprog *fp = hwcso;
+
+ /* reset the bucftx so that we don't keep a dangling reference to the fp
+ * code
+ */
+ if (fp != nv30->state.fragprog)
+ PUSH_RESET(nv30->base.pushbuf, BUFCTX_FRAGPROG);
- nv30->fragprog.program = hwcso;
+ nv30->fragprog.program = fp;
nv30->dirty |= NV30_NEW_FRAGPROG;
}