pvr: Adjust clear's region clip words

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>
This commit is contained in:
James Glanville 2023-05-02 15:46:45 +01:00 committed by Marge Bot
parent beffefbf21
commit ba118bb3bc
2 changed files with 8 additions and 1 deletions

View 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"/>

View 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;