i965/ivb: Flag RG32F quirk for texture gather regardless of swizzles
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 5 Oct 2013 10:26:07 +0000 (23:26 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sat, 5 Oct 2013 22:25:14 +0000 (11:25 +1300)
As of ARB_gpu_shader5, textureGather doesn't always read the
post-swizzle RED channel -- so we can't just look at the red swizzle
state.

Theoretically we could only flag the quirk if *some* green swizzle is in
use, but that's probably more trouble than it's worth.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm.c

index 6ce58dda35a9e2848ea5e22d8a08b1a6630a9fc4..ebf6b9cfe6ab5750e5293c926a82e2d8309a2a73 100644 (file)
@@ -349,7 +349,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
          /* gather4's channel select for green from RG32F is broken;
           * requires a shader w/a on IVB; fixable with just SCS on HSW. */
          if (brw->gen >= 7 && !brw->is_haswell && prog->UsesGather) {
-            if (img->InternalFormat == GL_RG32F && GET_SWZ(t->_Swizzle, 0) == 1)
+            if (img->InternalFormat == GL_RG32F)
                key->gather_channel_quirk_mask |= 1 << s;
          }
       }