From: Christoph Bumiller Date: Thu, 2 Jun 2011 12:01:24 +0000 (+0200) Subject: d3d1x/sm4: fix swizzle for 1 component operands X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a531513b06be45868bc4d4f6a9757fe6992ef304;p=mesa.git d3d1x/sm4: fix swizzle for 1 component operands For example, "mov o0.w, l(1)" would use imm_values[3], which is not valid. --- diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp index 2c0f8269af3..de4a1e551e2 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp +++ b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp @@ -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;