d3d1x/sm4: fix swizzle for 1 component operands
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 2 Jun 2011 12:01:24 +0000 (14:01 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 2 Jun 2011 12:10:34 +0000 (14:10 +0200)
For example, "mov o0.w, l(1)" would use imm_values[3], which is
not valid.

src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp

index 2c0f8269af3b3a549684dcd73008678f12448bde..de4a1e551e24892518b5c56111612c3547eedfa0 100644 (file)
@@ -91,6 +91,7 @@ struct sm4_parser
                        break;
                case SM4_OPERAND_COMPNUM_1:
                        op.comps = 1;
+                       op.swizzle[1] = op.swizzle[2] = op.swizzle[3] = 0;
                        break;
                case SM4_OPERAND_COMPNUM_4:
                        op.comps = 4;