Constant D3DCOLOR UNPACK. Could optimize earlier.

This commit is contained in:
Ben Vanik 2014-06-09 21:29:15 -07:00
parent 5343cab851
commit 289075d052
1 changed files with 4 additions and 0 deletions

View File

@ -4716,6 +4716,10 @@ EMITTER(UNPACK, MATCH(I<OPCODE_UNPACK, V128<>, V128<>>)) {
// dest.f4[1] = (float)((src >> 8) & 0xFF) * (1.0f / 255.0f);
// dest.f4[2] = (float)(src & 0xFF) * (1.0f / 255.0f);
// dest.f4[3] = (float)((src >> 24) & 0xFF) * (1.0f / 255.0f);
if (i.src1.is_constant) {
e.vpxor(i.dest, i.dest);
return;
}
// src = ZZYYXXWW
// unpack to 000000ZZ,000000YY,000000XX,000000WW