intel: Fix and use HIZ_CCS write through mode
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 21 Aug 2019 17:57:29 +0000 (10:57 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 28 Oct 2019 17:47:06 +0000 (10:47 -0700)
Write through to the CCS if the surface is used as a texture and can be
sampled by the HW with CCS.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/genxml/gen12.xml
src/intel/isl/isl_emit_depth_stencil.c

index 8970ddf51a81945b512a6dc246635cc48081f22f..466ddb6894c19bbc2f82b69a1fe69c3b500ca63e 100644 (file)
     <field name="Command SubType" start="27" end="28" type="uint" default="3"/>
     <field name="Command Type" start="29" end="31" type="uint" default="3"/>
     <field name="Surface Pitch" start="32" end="48" type="uint"/>
+    <field name="Hierarchical Depth Buffer Write Thru Enable" start="52" end="52" type="bool"/>
     <field name="Tiled Resource Mode" start="54" end="55" type="uint">
       <value name="NONE" value="0"/>
       <value name="TILEYF" value="1"/>
index c3815a6ac56e2aff6f626fa6e1728e1ad7426579..fc2cf68ed4cc4c59c7c69bcd574462ed3e497ce3 100644 (file)
@@ -192,6 +192,12 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
       hiz.SurfaceBaseAddress = info->hiz_address;
       hiz.MOCS = info->mocs;
       hiz.SurfacePitch = info->hiz_surf->row_pitch_B - 1;
+#if GEN_GEN >= 12
+      hiz.HierarchicalDepthBufferWriteThruEnable =
+         isl_surf_supports_hiz_ccs_wt(dev->info, info->depth_surf,
+                                      info->hiz_usage);
+#endif
+
 #if GEN_GEN >= 8
       /* From the SKL PRM Vol2a:
        *