diff options
author | Ilia Mirkin <[email protected]> | 2015-06-29 02:38:38 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-06-29 23:03:27 -0400 |
commit | bad107f2ec24b16118f4d99c54b853277b1a966d (patch) | |
tree | 86b22b1008947d0673267be9f5b7904113e6b047 /src/gallium | |
parent | b875198f1f0b7c90bcb22511c0050b06d8a33ac4 (diff) |
nv30: reset fragprog bufctx at bind time
A clear will do a partial validate, which will in turn reference all the
buffers in the bufctx again. However the fragprog last validated might
have already been deleted. So reset the bufctx when updating state.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_fragprog.c | 9 |
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; } |