summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-04-18 14:44:26 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-04-18 16:23:11 +0200
commit2ac088141a1d150e0468ba5b74a3c8a99ee78124 (patch)
tree09f633072ff576ea2f82dfd7c355fc3a9b839655
parent7a1b5c937fa32968a04a11649e456a1ef8c5b442 (diff)
nvfx: fix fragment program constant updates
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index aaa30bd60e3..0a4f35ef8e7 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -874,7 +874,10 @@ nvfx_fragprog_validate(struct nvfx_context *nvfx)
fp->bo_prog_idx = fp->progs_per_bo - 1;
}
- if (nvfx->dirty & NVFX_NEW_FRAGCONST)
+ /* we must update constants even on "just" fragprog changes, because
+ we don't check whether the current constant buffer matches the latest
+ one bound to this fragment program */
+ if (nvfx->dirty & (NVFX_NEW_FRAGCONST | NVFX_NEW_FRAGPROG))
update = TRUE;
if(update) {