Module: Mesa
Branch: master
Commit: a531513b06be45868bc4d4f6a9757fe6992ef304
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a531513b06be45868bc4d4f6a9757fe6992ef304

Author: Christoph Bumiller <[email protected]>
Date:   Thu Jun  2 14:01:24 2011 +0200

d3d1x/sm4: fix swizzle for 1 component operands

For example, "mov o0.w, l(1)" would use imm_values[3], which is
not valid.

---

 .../d3d1x/d3d1xshader/src/sm4_parse.cpp            |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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 2c0f826..de4a1e5 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to