summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-07-21 22:09:46 -0700
committerFrancisco Jerez <[email protected]>2016-08-25 18:36:07 -0700
commit0fe732e66f10f526b9187c4d11f134282f5209c8 (patch)
treec7a799916fc88569d55ffc053c369aefa09970b5
parent5759eb458b6bbc85011d4f139d90018bdf6124c0 (diff)
i965: Return the correct layout from get_isl_dim_layout for pre-ILK cube textures.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 533b09f8c32..e7aa6318109 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3016,13 +3016,16 @@ get_isl_dim_layout(const struct brw_device_info *devinfo, uint32_t tiling,
case GL_TEXTURE_2D:
case GL_TEXTURE_2D_ARRAY:
case GL_TEXTURE_RECTANGLE:
- case GL_TEXTURE_CUBE_MAP:
- case GL_TEXTURE_CUBE_MAP_ARRAY:
case GL_TEXTURE_2D_MULTISAMPLE:
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
case GL_TEXTURE_EXTERNAL_OES:
return ISL_DIM_LAYOUT_GEN4_2D;
+ case GL_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ return (devinfo->gen == 4 ? ISL_DIM_LAYOUT_GEN4_3D :
+ ISL_DIM_LAYOUT_GEN4_2D);
+
case GL_TEXTURE_3D:
return (devinfo->gen >= 9 ?
ISL_DIM_LAYOUT_GEN4_2D : ISL_DIM_LAYOUT_GEN4_3D);