Mesa (nvfx-next-6): nvfx: fix fragment program constant updates

Luca Barbieri lb at kemper.freedesktop.org
Sun Apr 18 07:25:32 PDT 2010


Module: Mesa
Branch: nvfx-next-6
Commit: 2ac088141a1d150e0468ba5b74a3c8a99ee78124
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ac088141a1d150e0468ba5b74a3c8a99ee78124

Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Apr 18 14:44:26 2010 +0200

nvfx: fix fragment program constant updates

---

 src/gallium/drivers/nvfx/nvfx_fragprog.c |    5 ++++-
 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 aaa30bd..0a4f35e 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) {



More information about the mesa-commit mailing list