r300/compiler: handle DPH and XPD in rc_compute_sources_for_writemask
authorMarek Olšák <maraeo@gmail.com>
Wed, 8 Dec 2010 00:59:33 +0000 (01:59 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 8 Dec 2010 03:39:50 +0000 (04:39 +0100)
This bug can only be triggered if you put deadcode before native rewrite.

src/mesa/drivers/dri/r300/compiler/radeon_opcodes.c

index 113b27632a20db7e8bf432329c56ed33d00ba0e9..25afd272beefd397326c360882ddeeb3311a171c 100644 (file)
@@ -460,6 +460,7 @@ void rc_compute_sources_for_writemask(
                        srcmasks[1] |= RC_MASK_XY;
                        break;
                case RC_OPCODE_DP3:
+               case RC_OPCODE_XPD:
                        srcmasks[0] |= RC_MASK_XYZ;
                        srcmasks[1] |= RC_MASK_XYZ;
                        break;
@@ -467,6 +468,10 @@ void rc_compute_sources_for_writemask(
                        srcmasks[0] |= RC_MASK_XYZW;
                        srcmasks[1] |= RC_MASK_XYZW;
                        break;
+               case RC_OPCODE_DPH:
+                       srcmasks[0] |= RC_MASK_XYZ;
+                       srcmasks[1] |= RC_MASK_XYZW;
+                       break;
                case RC_OPCODE_TXB:
                case RC_OPCODE_TXP:
                        srcmasks[0] |= RC_MASK_W;