1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00

Fixed order of operations for -swizzle using 0, 1

This commit is contained in:
Chuck Walbourn 2021-06-16 00:02:58 -07:00
parent fb8393ec8e
commit b6aa25280b
2 changed files with 6 additions and 6 deletions

View File

@ -2028,10 +2028,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
for (size_t j = 0; j < w; ++j)
{
XMVECTOR pixel1 = XMVectorSelect(inPixels[j], g_XMZero, zc);
pixel1 = XMVectorSelect(pixel1, g_XMOne, oc);
outPixels[j] = XMVectorPermute(pixel1, inPixels2[j],
XMVECTOR pixel = XMVectorPermute(inPixels[j], inPixels2[j],
permuteElements[0], permuteElements[1], permuteElements[2], permuteElements[3]);
pixel = XMVectorSelect(pixel, g_XMZero, zc);
outPixels[j] = XMVectorSelect(pixel, g_XMOne, oc);
}
}, result);
if (FAILED(hr))

View File

@ -2458,10 +2458,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
for (size_t j = 0; j < w; ++j)
{
XMVECTOR pixel = XMVectorSelect(inPixels[j], g_XMZero, zc);
pixel = XMVectorSelect(pixel, g_XMOne, oc);
outPixels[j] = XMVectorSwizzle(pixel,
XMVECTOR pixel = XMVectorSwizzle(inPixels[j],
swizzleElements[0], swizzleElements[1], swizzleElements[2], swizzleElements[3]);
pixel = XMVectorSelect(pixel, g_XMZero, zc);
outPixels[j] = XMVectorSelect(pixel, g_XMOne, oc);
}
}, *timage);
if (FAILED(hr))