summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_tex_image.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-03-03 11:13:29 -0800
committerKenneth Graunke <kenneth@whitecape.org>2016-03-04 21:25:08 -0800
commit4ba7ad6cc13b087e5e95073ab2e24de591d8b5a5 (patch)
treeb631fb8f29f3a233ceff7f40da6b1b8e3d377794 /src/mesa/drivers/dri/i965/intel_tex_image.c
parent2f76a9924e7b0b33a508ee3651b0cb2ab536a7dc (diff)
downloadexternal_mesa3d-4ba7ad6cc13b087e5e95073ab2e24de591d8b5a5.zip
external_mesa3d-4ba7ad6cc13b087e5e95073ab2e24de591d8b5a5.tar.gz
external_mesa3d-4ba7ad6cc13b087e5e95073ab2e24de591d8b5a5.tar.bz2
i965: Only magnify depth for 3D textures, not array textures.
When BaseLevel > 0, we magnify the dimensions to fill out the size of miplevels [0..BaseLevel). In particular, this was magnifying depth, thinking that the depth doubles at each level. This is perfectly reasonable for 3D textures, but dead wrong for array textures. Changing the depth != 1 condition to a target == GL_TEXTURE_3D check should make this only happen in the appropriate cases. Fixes about 32 dEQP tests: - dEQP-GLES31.functional.texture.gather.*.level_{1,2} Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex_image.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 8525902..1601edd 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -50,7 +50,7 @@ intel_miptree_create_for_teximage(struct brw_context *brw,
width <<= 1;
if (height != 1)
height <<= 1;
- if (depth != 1)
+ if (intelObj->base.Target == GL_TEXTURE_3D)
depth <<= 1;
}