panfrost: Rename depth bias fields
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sun, 24 Oct 2021 23:33:37 +0000 (19:33 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 26 Oct 2021 18:45:08 +0000 (18:45 +0000)
Make it clear that the distinction is the facingness of the primitives
the depth bias applies to.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13509>

src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/lib/genxml/v4.xml
src/panfrost/lib/genxml/v5.xml
src/panfrost/lib/genxml/v6.xml
src/panfrost/lib/genxml/v7.xml
src/panfrost/vulkan/panvk_vX_cs.c

index ae5e116..a2f2cbf 100644 (file)
@@ -3214,8 +3214,8 @@ panfrost_create_rasterizer_state(
         }
 
         pan_pack(&so->stencil_misc, STENCIL_MASK_MISC, cfg) {
-                cfg.depth_range_1 = cso->offset_tri;
-                cfg.depth_range_2 = cso->offset_tri;
+                cfg.front_facing_depth_bias = cso->offset_tri;
+                cfg.back_facing_depth_bias = cso->offset_tri;
                 cfg.single_sampled_lines = !cso->multisample;
         }
 
index cc39b4f..cbdfd1b 100644 (file)
     <field name="sRGB" size="1" start="24" type="bool"/>
     <field name="Dither disable" size="1" start="25" type="bool"/>
     <field name="Force seamless cubemaps" size="1" start="26" type="bool"/>
-    <field name="Depth Range 1" size="1" start="28" type="bool"/>
-    <field name="Depth Range 2" size="1" start="29" type="bool"/>
+    <field name="Front-facing depth bias" size="1" start="28" type="bool"/>
+    <field name="Back-facing depth bias" size="1" start="29" type="bool"/>
     <field name="Single-sampled lines" size="1" start="30" type="bool"/>
     <field name="Point snap" size="1" start="31" type="bool"/>
   </struct>
index e4b0b29..fb2e9c5 100644 (file)
     <field name="Alpha-to-coverage Invert" size="1" start="18" type="bool"/>
     <field name="Alpha test compare function" size="3" start="21" type="Func"/>
     <field name="Force seamless cubemaps" size="1" start="26" type="bool"/>
-    <field name="Depth Range 1" size="1" start="28" type="bool"/>
-    <field name="Depth Range 2" size="1" start="29" type="bool"/>
+    <field name="Front-facing depth bias" size="1" start="28" type="bool"/>
+    <field name="Back-facing depth bias" size="1" start="29" type="bool"/>
     <field name="Single-sampled lines" size="1" start="30" type="bool"/>
     <field name="Point snap" size="1" start="31" type="bool"/>
   </struct>
index 64bf699..d9004e2 100644 (file)
     <field name="Alpha-to-coverage Invert" size="1" start="18" type="bool"/>
     <field name="Alpha test compare function" size="3" start="21" type="Func"/>
     <field name="Force seamless cubemaps" size="1" start="26" type="bool"/>
-    <field name="Depth Range 1" size="1" start="28" type="bool"/>
-    <field name="Depth Range 2" size="1" start="29" type="bool"/>
+    <field name="Front-facing depth bias" size="1" start="28" type="bool"/>
+    <field name="Back-facing depth bias" size="1" start="29" type="bool"/>
     <field name="Single-sampled lines" size="1" start="30" type="bool"/>
     <field name="Point snap" size="1" start="31" type="bool"/>
   </struct>
index 770df9a..027b3c5 100644 (file)
     <field name="Alpha-to-coverage Invert" size="1" start="18" type="bool"/>
     <field name="Alpha test compare function" size="3" start="21" type="Func"/>
     <field name="Force seamless cubemaps" size="1" start="26" type="bool"/>
-    <field name="Depth Range 1" size="1" start="28" type="bool"/>
-    <field name="Depth Range 2" size="1" start="29" type="bool"/>
+    <field name="Front-facing depth bias" size="1" start="28" type="bool"/>
+    <field name="Back-facing depth bias" size="1" start="29" type="bool"/>
     <field name="Single-sampled lines" size="1" start="30" type="bool"/>
     <field name="Point snap" size="1" start="31" type="bool"/>
   </struct>
index 521648d..fc39ab8 100644 (file)
@@ -770,8 +770,8 @@ panvk_per_arch(emit_base_fs_rsd)(const struct panvk_device *dev,
       cfg.stencil_mask_misc.stencil_enable = pipeline->zs.s_test;
       cfg.stencil_mask_misc.alpha_to_coverage = pipeline->ms.alpha_to_coverage;
       cfg.stencil_mask_misc.alpha_test_compare_function = MALI_FUNC_ALWAYS;
-      cfg.stencil_mask_misc.depth_range_1 = pipeline->rast.depth_bias.enable;
-      cfg.stencil_mask_misc.depth_range_2 = pipeline->rast.depth_bias.enable;
+      cfg.stencil_mask_misc.front_facing_depth_bias = pipeline->rast.depth_bias.enable;
+      cfg.stencil_mask_misc.back_facing_depth_bias = pipeline->rast.depth_bias.enable;
       cfg.stencil_mask_misc.single_sampled_lines = pipeline->ms.rast_samples <= 1;
 
       if (!(pipeline->dynamic_state_mask & (1 << VK_DYNAMIC_STATE_DEPTH_BIAS))) {