Mesa (master): nv30/shader: SSG, LIT only requires one source register
Ben Skeggs
darktama at kemper.freedesktop.org
Sat May 12 02:37:19 UTC 2012
Module: Mesa
Branch: master
Commit: 897d2351322e4c516eee622b3f49eedca7a2e308
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=897d2351322e4c516eee622b3f49eedca7a2e308
Author: Roy Spliet <r.spliet at student.tudelft.nl>
Date: Sat May 12 03:42:30 2012 +0200
nv30/shader: SSG, LIT only requires one source register
Fixes crashing due to assertion error
Signed-off-by: Roy Spliet <r.spliet at student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
src/gallium/drivers/nv30/nvfx_fragprog.c | 2 +-
src/gallium/drivers/nv30/nvfx_vertprog.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nv30/nvfx_fragprog.c b/src/gallium/drivers/nv30/nvfx_fragprog.c
index 592ad21..320efbb 100644
--- a/src/gallium/drivers/nv30/nvfx_fragprog.c
+++ b/src/gallium/drivers/nv30/nvfx_fragprog.c
@@ -623,7 +623,7 @@ nvfx_fragprog_parse_instruction(struct nv30_context* nvfx, struct nvfx_fpc *fpc,
break;
case TGSI_OPCODE_LIT:
if(!nvfx->is_nv4x)
- nvfx_fp_emit(fpc, arith(sat, LIT_NV30, dst, mask, src[0], src[1], src[2]));
+ nvfx_fp_emit(fpc, arith(sat, LIT_NV30, dst, mask, src[0], none, none));
else {
/* we use FLT_MIN, so that log2 never gives -infinity, and thus multiplication by
* specular 0 always gives 0, so that ex2 gives 1, to satisfy the 0^0 = 1 requirement
diff --git a/src/gallium/drivers/nv30/nvfx_vertprog.c b/src/gallium/drivers/nv30/nvfx_vertprog.c
index 82972b3..f41f82d 100644
--- a/src/gallium/drivers/nv30/nvfx_vertprog.c
+++ b/src/gallium/drivers/nv30/nvfx_vertprog.c
@@ -668,7 +668,7 @@ nvfx_vertprog_parse_instruction(struct nv30_context *nv30, struct nvfx_vpc *vpc,
nvfx_vp_emit(vpc, arith(sat, VEC, SNE, dst, mask, src[0], src[1], none));
break;
case TGSI_OPCODE_SSG:
- nvfx_vp_emit(vpc, arith(sat, VEC, SSG, dst, mask, src[0], src[1], none));
+ nvfx_vp_emit(vpc, arith(sat, VEC, SSG, dst, mask, src[0], none, none));
break;
case TGSI_OPCODE_STR:
nvfx_vp_emit(vpc, arith(sat, VEC, STR, dst, mask, src[0], src[1], none));
More information about the mesa-commit
mailing list