nv30/shader: SSG, LIT only requires one source register
authorRoy Spliet <r.spliet@student.tudelft.nl>
Sat, 12 May 2012 01:42:30 +0000 (03:42 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 12 May 2012 02:42:47 +0000 (12:42 +1000)
Fixes crashing due to assertion error

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/drivers/nv30/nvfx_fragprog.c
src/gallium/drivers/nv30/nvfx_vertprog.c

index 592ad21c6c89154cd72a00e0be93b2e18b37de8f..320efbb6925c94d1ba8247434a155c158cd77732 100644 (file)
@@ -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
index 82972b3943cf9ac0784b663d9a382c5272b84211..f41f82d49ed9399047162a787719299f9213a4f4 100644 (file)
@@ -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));