summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2017-06-29 08:18:24 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2017-07-21 13:52:11 +0300
commite53df4454cace9062a677e0f544c4908ecaabe5d (patch)
treeb65e09fd826409fa2a30b0c4dfa7ab1608d47d8a
parent25cb1868a7f9e210f2eb25efadaa30b5b80703ba (diff)
i965/miptree: Drop miptree_array_layout in get_isl_dim_layout()
This was only needed for checking gen6 stencil which is already using isl. One could delete GEN6_HIZ_STENCIL layout altogether but that will be gone with the rest after a while anyway. The dim_layout converter is needed even after transition to isl when setting up surface states - see brw_emit_surface_state(). Hence dropping the unneeded argument separately. Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c5
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c11
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h3
3 files changed, 8 insertions, 11 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 45ac106f3f..e9a50b89eb 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -88,9 +88,10 @@ get_isl_surf(struct brw_context *brw, struct intel_mipmap_tree *mt,
surf->dim = get_isl_surf_dim(target);
}
+ assert(mt->array_layout != GEN6_HIZ_STENCIL);
+
const enum isl_dim_layout dim_layout =
- get_isl_dim_layout(&brw->screen->devinfo, mt->surf.tiling, target,
- mt->array_layout);
+ get_isl_dim_layout(&brw->screen->devinfo, mt->surf.tiling, target);
if (surf->dim_layout == dim_layout)
return;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 73637b0fc5..3a2395b030 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3819,12 +3819,8 @@ get_isl_surf_dim(GLenum target)
enum isl_dim_layout
get_isl_dim_layout(const struct gen_device_info *devinfo,
- enum isl_tiling tiling, GLenum target,
- enum miptree_array_layout array_layout)
+ enum isl_tiling tiling, GLenum target)
{
- if (array_layout == GEN6_HIZ_STENCIL)
- return ISL_DIM_LAYOUT_GEN6_STENCIL_HIZ;
-
switch (target) {
case GL_TEXTURE_1D:
case GL_TEXTURE_1D_ARRAY:
@@ -3865,10 +3861,11 @@ intel_miptree_get_isl_surf(struct brw_context *brw,
const struct intel_mipmap_tree *mt,
struct isl_surf *surf)
{
+ assert(mt->array_layout != GEN6_HIZ_STENCIL);
+
surf->dim = get_isl_surf_dim(mt->target);
surf->dim_layout = get_isl_dim_layout(&brw->screen->devinfo,
- mt->surf.tiling, mt->target,
- mt->array_layout);
+ mt->surf.tiling, mt->target);
surf->msaa_layout = mt->surf.msaa_layout;
surf->tiling = intel_miptree_get_isl_tiling(mt);
surf->row_pitch = mt->surf.row_pitch;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index e7872ff96c..7de7f86eee 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -668,8 +668,7 @@ get_isl_surf_dim(GLenum target);
enum isl_dim_layout
get_isl_dim_layout(const struct gen_device_info *devinfo,
- enum isl_tiling tiling,
- GLenum target, enum miptree_array_layout array_layout);
+ enum isl_tiling tiling, GLenum target);
enum isl_tiling
intel_miptree_get_isl_tiling(const struct intel_mipmap_tree *mt);