summaryrefslogtreecommitdiffstats
path: root/src/intel/isl
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-08-16 16:45:47 -0700
committerJordan Justen <[email protected]>2019-10-17 14:47:22 -0700
commit523ba0a3e71107f5ac445895109808c0d820b0d0 (patch)
tree26134e7e4d7d1fe4e61f5a9c71eba09c046ab2ac /src/intel/isl
parentd2a490d1d9bdb4de211215fe132e29ea5993ac47 (diff)
intel/genxml,isl: Add gen12 stencil buffer changes
Rework: * NULL stencil buffer path (Jason) * genxml fixes (Nanley) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/intel/isl')
-rw-r--r--src/intel/isl/isl_emit_depth_stencil.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/intel/isl/isl_emit_depth_stencil.c b/src/intel/isl/isl_emit_depth_stencil.c
index 66a5fe1b979..382c0ce22f5 100644
--- a/src/intel/isl/isl_emit_depth_stencil.c
+++ b/src/intel/isl/isl_emit_depth_stencil.c
@@ -133,7 +133,15 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
#if GEN_GEN >= 7 && GEN_GEN < 12
db.StencilWriteEnable = true;
#endif
-#if GEN_GEN >= 8 || GEN_IS_HASWELL
+#if GEN_GEN >= 12
+ sb.StencilWriteEnable = true;
+ sb.SurfaceType = SURFTYPE_2D;
+ sb.Width = info->stencil_surf->logical_level0_px.width - 1;
+ sb.Height = info->stencil_surf->logical_level0_px.height - 1;
+ sb.Depth = sb.RenderTargetViewExtent = info->view->array_len - 1;
+ sb.SurfLOD = info->view->base_level;
+ sb.MinimumArrayElement = info->view->base_array_layer;
+#elif GEN_GEN >= 8 || GEN_IS_HASWELL
sb.StencilBufferEnable = true;
#endif
sb.SurfaceBaseAddress = info->stencil_address;
@@ -145,6 +153,19 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
sb.SurfaceQPitch =
isl_surf_get_array_pitch_el_rows(info->stencil_surf) >> 2;
#endif
+ } else {
+#if GEN_GEN >= 12
+ sb.SurfaceType = SURFTYPE_NULL;
+
+ /* The docs seem to indicate that if surf-type is null, then we may need
+ * to match the depth-buffer value for `Depth`. It may be a
+ * documentation bug, since the other fields don't require this.
+ *
+ * TODO: Confirm documentation and remove seeting of `Depth` if not
+ * required.
+ */
+ sb.Depth = db.Depth;
+#endif
}
#if GEN_GEN >= 6