Previously, we left the swizzle key field as zero for unused texture
units. The precompile sets all of them to SWIZZLE_NOOP, which meant
that we mismatched almost every time.
Since either works equally well, change it to SWIZZLE_NOOP to match
the precompiles.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
struct brw_sampler_prog_key_data *key)
{
for (int i = 0; i < BRW_MAX_TEX_UNIT; i++) {
+ key->swizzles[i] = SWIZZLE_NOOP;
+
if (!prog->TexturesUsed[i])
continue;
key->gl_clamp_mask[2] |= 1 << i;
}
}
- else {
- key->swizzles[i] = SWIZZLE_NOOP;
- }
}
}