Mesa (master): i965: Fix texture swizzling on Broadwell.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Dec 2 21:25:10 UTC 2013


Module: Mesa
Branch: master
Commit: 5720832f23f486e2c869ecb022a6a9ba47ac1619
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5720832f23f486e2c869ecb022a6a9ba47ac1619

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Jan 14 21:43:28 2013 -0800

i965: Fix texture swizzling on Broadwell.

Like Haswell, we do this in SURFACE_STATE rather than shader
workarounds.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_wm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index bc1480c..226a678 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -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) {




More information about the mesa-commit mailing list