freedreno/a6xx: Document per-view viewport in GRAS_SU_CNTL

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20304>
This commit is contained in:
Connor Abbott 2022-11-21 12:21:10 +01:00 committed by Marge Bot
parent 768dcc7a27
commit ab75e0a126
4 changed files with 22 additions and 7 deletions

View file

@ -146,6 +146,12 @@ struct fd_dev_info {
bool has_lrz_dir_tracking;
bool lrz_track_quirk;
/* Some generations have a bit to add the multiview index to the
* viewport index, which lets us implement different scaling for
* different views.
*/
bool has_per_view_viewport;
struct {
uint32_t PC_POWER_CNTL;
uint32_t TPL1_DBG_ECO_CNTL;

View file

@ -238,6 +238,7 @@ a6xx_gen3 = dict(
has_lrz_dir_tracking = True,
enable_lrz_fast_clear = True,
lrz_track_quirk = True,
has_per_view_viewport = True,
)
# a635, a660:
@ -263,6 +264,7 @@ a6xx_gen4 = dict(
has_dp4acc = True,
enable_lrz_fast_clear = True,
has_lrz_dir_tracking = True,
has_per_view_viewport = True,
)
add_gpus([

View file

@ -1732,12 +1732,19 @@ to upconvert to 32b float internally?
<bitfield name="LINE_MODE" pos="13" type="a5xx_line_mode"/>
<bitfield name="UNK15" low="15" high="16"/>
<!--
This is set by the blob when multiview is enabled, but doesn't seem
to do anything.
On gen1 only MULTIVIEW_ENABLE exists. On gen3 we have
the ability to add the view index to either the RT array
index or the viewport index, and it seems that
MULTIVIEW_ENABLE doesn't do anything, instead we need to
set at least one of RENDERTARGETINDEXINCR or
VIEWPORTINDEXINCR to enable multiview. The blob still
sets MULTIVIEW_ENABLE regardless.
TODO: what about gen2 (a640)?
-->
<bitfield name="UNK17" pos="17" type="boolean"/>
<bitfield name="MULTIVIEW_ENABLE" pos="18" type="boolean"/>
<bitfield name="UNK19" low="19" high="22"/>
<bitfield name="MULTIVIEW_ENABLE" pos="17" type="boolean"/>
<bitfield name="RENDERTARGETINDEXINCR" pos="18" type="boolean"/>
<bitfield name="VIEWPORTINDEXINCR" pos="19" type="boolean"/>
<bitfield name="UNK20" low="20" high="22"/>
</reg32>
<reg32 offset="0x8091" name="GRAS_SU_POINT_MINMAX">
<bitfield name="MIN" low="0" high="15" type="ufixed" radix="4"/>

View file

@ -2205,8 +2205,8 @@ tu6_gras_su_cntl(const VkPipelineRasterizationStateCreateInfo *rast_info,
if (multiview) {
gras_su_cntl |=
A6XX_GRAS_SU_CNTL_UNK17 |
A6XX_GRAS_SU_CNTL_MULTIVIEW_ENABLE;
A6XX_GRAS_SU_CNTL_MULTIVIEW_ENABLE |
A6XX_GRAS_SU_CNTL_RENDERTARGETINDEXINCR;
}
return gras_su_cntl;