mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
pvr: use pvr_csb_pack() to setup CR_FB_CDC_ZLS
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872>
This commit is contained in:
parent
e714b35301
commit
b0a45fc618
2 changed files with 25 additions and 2 deletions
|
|
@ -685,4 +685,21 @@ SOFTWARE.
|
|||
<field name="val" start="0" end="31" type="uint"/>
|
||||
</struct>
|
||||
|
||||
<!-- FIXME: When csbgen supports conditional structs, make this conditional
|
||||
on FB_CDC.
|
||||
-->
|
||||
<struct name="FB_CDC_ZLS" length="2">
|
||||
<condition type="if" check="!ROGUEXE"/>
|
||||
<field name="fbc_iaddr_mode" start="42" end="42" type="bool"/>
|
||||
<field name="fbdc_iaddr_mode" start="41" end="41" type="bool"/>
|
||||
<condition type="endif" check="!ROGUEXE"/>
|
||||
<!-- FIXME: should be dependent on !ROGUEXE || (ROGUEXE && FB_CDC_V4) -->
|
||||
<field name="fbdc_stencil_fmt" start="34" end="40" type="uint"/>
|
||||
<!-- FIXME: should be dependent on !ROGUEXE || (ROGUEXE && FB_CDC_V4) -->
|
||||
<field name="fbdc_depth_fmt" start="27" end="33" type="uint"/>
|
||||
<field name="fbc_num_tiles" start="4" end="26" type="uint"/>
|
||||
<field name="fbc_iaddr" start="1" end="1" type="bool"/>
|
||||
<field name="fbdc_iaddr" start="0" end="0" type="bool"/>
|
||||
</struct>
|
||||
|
||||
</csbgen>
|
||||
|
|
|
|||
|
|
@ -1171,8 +1171,14 @@ static void pvr_frag_state_stream_init(struct pvr_render_ctx *ctx,
|
|||
stream_ptr += pvr_cmd_length(CR_ISP_STENCIL_LOAD_BASE);
|
||||
|
||||
if (PVR_HAS_FEATURE(dev_info, requires_fb_cdc_zls_setup)) {
|
||||
*(uint64_t *)stream_ptr = 0;
|
||||
stream_ptr += 2U;
|
||||
/* Currently no support for FBC, so just go ahead and set the default
|
||||
* values.
|
||||
*/
|
||||
pvr_csb_pack ((uint64_t *)stream_ptr, CR_FB_CDC_ZLS, value) {
|
||||
value.fbdc_depth_fmt = PVRX(TEXSTATE_FORMAT_F32);
|
||||
value.fbdc_stencil_fmt = PVRX(TEXSTATE_FORMAT_U8);
|
||||
}
|
||||
stream_ptr += pvr_cmd_length(CR_FB_CDC_ZLS);
|
||||
}
|
||||
|
||||
STATIC_ASSERT(ARRAY_SIZE(job->pbe_reg_words) == 8U);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue