pvr: Adjust clear's region clip words
authorJames Glanville <james.glanville@imgtec.com>
Tue, 2 May 2023 14:46:45 +0000 (15:46 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 4 May 2023 08:42:31 +0000 (08:42 +0000)
Co-Authored-By: : Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22822>

src/imagination/csbgen/rogue_ppp.xml
src/imagination/vulkan/pvr_clear.c

index 37ffea6..61605e6 100644 (file)
@@ -168,6 +168,9 @@ SOFTWARE.
     <field name="swmask" start="0" end="7" type="uint"/>
   </struct>
 
+  <!-- `REGION_CLIP{0,1}` `left`,`right`,`top`,`bottom`, are all 9 bits. -->
+  <define name="REGION_CLIP_MAX" value="0x1FF"/>
+
   <struct name="REGION_CLIP0" length="1">
     <field name="mode" start="31" end="31" type="REGION_CLIP_MODE"/>
     <field name="left" start="16" end="24" type="uint"/>
index 8ed1bdf..fee7b11 100644 (file)
@@ -121,9 +121,13 @@ static void pvr_device_setup_graphics_static_clear_ppp_templates(
       template->config.pds_state = NULL;
 
       template->config.region_clip0 = CS_HEADER(TA_REGION_CLIP0);
-      template->config.region_clip0.mode = PVRX(TA_REGION_CLIP_MODE_NONE);
+      template->config.region_clip0.mode = PVRX(TA_REGION_CLIP_MODE_OUTSIDE);
+      template->config.region_clip0.left = 0;
+      template->config.region_clip0.right = PVRX(TA_REGION_CLIP_MAX);
 
       template->config.region_clip1 = CS_HEADER(TA_REGION_CLIP1);
+      template->config.region_clip1.top = 0;
+      template->config.region_clip1.bottom = PVRX(TA_REGION_CLIP_MAX);
 
       template->config.output_sel = CS_HEADER(TA_OUTPUT_SEL);
       template->config.output_sel.vtxsize = 4;