i965: Return the correct layout from get_isl_dim_layout for pre-ILK cube textures.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 22 Jul 2016 05:09:46 +0000 (22:09 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 26 Aug 2016 01:36:07 +0000 (18:36 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 533b09f8c320172ab9873771a28e3ce18a5b9277..e7aa6318109caaa34d9382878b25305c39bc5cb3 100644 (file)
@@ -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);