summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl_surface_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/isl/isl_surface_state.c')
-rw-r--r--src/intel/isl/isl_surface_state.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 979e1402e8c..5c5386e297c 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -288,8 +288,6 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
s.RenderTargetViewExtent = s.Depth;
break;
case SURFTYPE_3D:
- s.MinimumArrayElement = info->view->base_array_layer;
-
/* From the Broadwell PRM >> RENDER_SURFACE_STATE::Depth:
*
* If the volume texture is MIP-mapped, this field specifies the
@@ -309,11 +307,16 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
* textures with more levels than we can render to. In order to prevent
* assert-failures in the packing function below, we only set the field
* when it's actually going to be used by the hardware.
+ *
+ * Similaraly, the MinimumArrayElement field is ignored by all hardware
+ * prior to Sky Lake when texturing and we want it set to 0 anyway.
+ * Since it's already initialized to 0, we can just leave it alone for
+ * texture surfaces.
*/
if (info->view->usage & (ISL_SURF_USAGE_RENDER_TARGET_BIT |
ISL_SURF_USAGE_STORAGE_BIT)) {
- s.RenderTargetViewExtent = isl_minify(info->surf->logical_level0_px.depth,
- info->view->base_level) - 1;
+ s.MinimumArrayElement = info->view->base_array_layer;
+ s.RenderTargetViewExtent = info->view->array_len - 1;
}
break;
default: