Commit 2a3932cb by Nicolas Capens Committed by Nicolas Capens

Work around Visual Studio bug causing access violation.

The Reactor Value resulting from loading the value from the dereferenced Pointer does not get passed to the Int4 cast constructor correctly. This happens in 32-bit builds on Visual Studio 2017 (15.3.5), but not in 64-bit builds. Change-Id: I68e1639ada436c65bb4f3bf9b3ac88d503f10e30 Reviewed-on: https://swiftshader-review.googlesource.com/13554Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 185c18ba
......@@ -1715,8 +1715,10 @@ namespace sw
if(hasOffset)
{
uuuu = applyOffset(uuuu, offset.x, Int4(*Pointer<UShort4>(mipmap + OFFSET(Mipmap, width))), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeU);
vvvv = applyOffset(vvvv, offset.y, Int4(*Pointer<UShort4>(mipmap + OFFSET(Mipmap, height))), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeV);
UShort4 w = *Pointer<UShort4>(mipmap + OFFSET(Mipmap, width));
uuuu = applyOffset(uuuu, offset.x, Int4(w), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeU);
UShort4 h = *Pointer<UShort4>(mipmap + OFFSET(Mipmap, height));
vvvv = applyOffset(vvvv, offset.y, Int4(h), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeV);
}
Short4 uuu2 = uuuu;
......@@ -1736,7 +1738,8 @@ namespace sw
if(hasOffset)
{
wwww = applyOffset(wwww, offset.z, Int4(*Pointer<UShort4>(mipmap + OFFSET(Mipmap, depth))), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeW);
UShort4 d = *Pointer<UShort4>(mipmap + OFFSET(Mipmap, depth));
wwww = applyOffset(wwww, offset.z, Int4(d), texelFetch ? ADDRESSING_TEXELFETCH : state.addressingModeW);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment