i965: Fix texture swizzling on Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 15 Jan 2013 05:43:28 +0000 (21:43 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Dec 2013 21:25:23 +0000 (13:25 -0800)
Like Haswell, we do this in SURFACE_STATE rather than shader
workarounds.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_wm.c

index bc1480c3a96e9a8df6ce3f050d0cd4994c878caa..226a678b6efca985004b666aae0e9ee3f0acb583 100644 (file)
@@ -331,7 +331,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
          /* Haswell handles texture swizzling as surface format overrides
           * (except for GL_ALPHA); all other platforms need MOVs in the shader.
           */
-         if (!brw->is_haswell || alpha_depth)
+         if (alpha_depth || (brw->gen < 8 && !brw->is_haswell))
             key->swizzles[s] = brw_get_texture_swizzle(ctx, t);
 
         if (img->InternalFormat == GL_YCBCR_MESA) {