From c00e162b88e931f0d4b37e7e102c6eb77d83a11c Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 1 Sep 2014 10:47:37 -0700 Subject: [PATCH] Unpack d3dcolor const. --- src/alloy/backend/x64/x64_sequences.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/alloy/backend/x64/x64_sequences.cc b/src/alloy/backend/x64/x64_sequences.cc index c11016f03..0a9de3fbc 100644 --- a/src/alloy/backend/x64/x64_sequences.cc +++ b/src/alloy/backend/x64/x64_sequences.cc @@ -5089,7 +5089,12 @@ EMITTER(UNPACK, MATCH(I, V128<>>)) { // ARGB (WXYZ) -> RGBA (XYZW) // XMLoadColor if (i.src1.is_constant) { - assert_always(); + if (i.src1.value->IsConstantZero()) { + e.vmovaps(i.dest, e.GetXmmConstPtr(XMMOne)); + return; + } else { + assert_always(); + } } // src = ZZYYXXWW // Unpack to 000000ZZ,000000YY,000000XX,000000WW