summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_sampler_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-03-28 20:07:13 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-03-29 15:43:18 -0700
commitd4a5a61d445e683c20de00c1febe847b4c2db910 (patch)
treeb93b9460f7ffbc3431a6926547530fa498159d16 /src/mesa/drivers/dri/i965/brw_sampler_state.c
parentf8c69fbb5491c8790dd3bcf991f06151d15d92b9 (diff)
downloadexternal_mesa3d-d4a5a61d445e683c20de00c1febe847b4c2db910.zip
external_mesa3d-d4a5a61d445e683c20de00c1febe847b4c2db910.tar.gz
external_mesa3d-d4a5a61d445e683c20de00c1febe847b4c2db910.tar.bz2
i965: Don't use CUBE wrap modes for integer formats on IVB/BYT.
There is no linear filtering for integer formats, so we should always be using CLAMP_TO_EDGE mode. Fixes 46 dEQP cases on Ivybridge (which were likely broken by commit 0faf26e6a0a34c3544644852802484f2404cc83e). This workaround doesn't appear to be necessary on any other hardware; I haven't found any documentation mentioning errata in this area. v2: Only apply on Ivybridge/Baytrail to avoid regressing GLES3.1 tests. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sampler_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sampler_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c
index 3bd22c7..1dc7d71 100644
--- a/src/mesa/drivers/dri/i965/brw_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c
@@ -459,8 +459,12 @@ brw_update_sampler_state(struct brw_context *brw,
target == GL_TEXTURE_CUBE_MAP_ARRAY) {
/* Cube maps must use the same wrap mode for all three coordinate
* dimensions. Prior to Haswell, only CUBE and CLAMP are valid.
+ *
+ * Ivybridge and Baytrail seem to have problems with CUBE mode and
+ * integer formats. Fall back to CLAMP for now.
*/
- if (tex_cube_map_seamless || sampler->CubeMapSeamless) {
+ if ((tex_cube_map_seamless || sampler->CubeMapSeamless) &&
+ !(brw->gen == 7 && !brw->is_haswell && is_integer_format)) {
wrap_s = BRW_TEXCOORDMODE_CUBE;
wrap_t = BRW_TEXCOORDMODE_CUBE;
wrap_r = BRW_TEXCOORDMODE_CUBE;