Commit 336cdd90 by Nicolas Capens Committed by Nicolas Capens

Don't flag temporary registers as used samplers.

This fixes a undefined shift if the temporary register has an index higher than 32 (also, we only have 16 samplers currently). For GLSL we declare all actual sampler units during ASM output, so we don't have to rely on analyzing the instructions afterwards (that is only still relevant for Direct3D 8/9 shaders). Change-Id: I11a58964d53fcc2c29e0ad923d9a4a4161a545f4 Reviewed-on: https://swiftshader-review.googlesource.com/18748Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent e76163e3
......@@ -1856,7 +1856,10 @@ namespace sw
if(majorVersion >= 2)
{
usedSamplers |= 1 << src1.index;
if(src1.type == PARAMETER_SAMPLER)
{
usedSamplers |= 1 << src1.index;
}
}
else
{
......
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