summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-02-09 14:50:01 -0800
committerJason Ekstrand <[email protected]>2018-05-09 11:16:33 -0700
commit23d703de1fb140bb2ed4da247961d89a69f27140 (patch)
tree30fc67072239c304733575661340e0ce29b97756 /src
parent293b8de16159912133fde59c62c58b42ad80e1af (diff)
i965/surface_state: Use an identity swizzle pre-Haswell
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 96c93a7e5bf..67438b0f7e3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -592,6 +592,12 @@ static void brw_update_texture_surface(struct gl_context *ctx,
.usage = ISL_SURF_USAGE_TEXTURE_BIT,
};
+ /* On Ivy Bridge and earlier, we handle texture swizzle with shader
+ * code. The actual surface swizzle should be identity.
+ */
+ if (devinfo->gen <= 7 && !devinfo->is_haswell)
+ view.swizzle = ISL_SWIZZLE_IDENTITY;
+
if (obj->Target == GL_TEXTURE_CUBE_MAP ||
obj->Target == GL_TEXTURE_CUBE_MAP_ARRAY)
view.usage |= ISL_SURF_USAGE_CUBE_BIT;