mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
freedreno/a6xx: Fix GRAS_LRZ_BUFFER_PITCH
The pitch is in bytes, rather than pixels, whereas internally lrz_layout uses a pitch in pixels. Adjust the xml and state emit accordingly. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
This commit is contained in:
parent
17b567485a
commit
cb201e5755
3 changed files with 5 additions and 3 deletions
|
|
@ -2006,7 +2006,7 @@ by a particular renderpass/blit.
|
|||
<reg64 offset="0x8104" name="GRAS_LRZ_BUFFER_BASE" align="256" type="waddress" usage="rp_blit" variants="A8XX-"/>
|
||||
|
||||
<bitset name="a6xx_gras_lrz_buffer_pitch" inline="yes">
|
||||
<bitfield name="PITCH" low="0" high="7" shr="5" type="uint"/>
|
||||
<bitfield name="PITCH" low="0" high="7" shr="6" type="uint"/>
|
||||
<bitfield name="ARRAY_PITCH" low="10" high="28" shr="8" type="uint"/>
|
||||
</bitset>
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ tu6_emit_lrz_buffer(struct tu_cs *cs, struct tu_image *depth_image)
|
|||
tu_cs_emit_regs(
|
||||
cs, GRAS_LRZ_BUFFER_BASE(CHIP, .qword = lrz_iova),
|
||||
GRAS_LRZ_BUFFER_PITCH(
|
||||
CHIP, .pitch = depth_image->lrz_layout.lrz_pitch,
|
||||
CHIP, .pitch = depth_image->lrz_layout.lrz_pitch * sizeof(uint16_t),
|
||||
.array_pitch = depth_image->lrz_layout.lrz_layer_size),
|
||||
A6XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE(.qword = lrz_fc_iova));
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,9 @@ emit_lrz(fd_cs &cs, struct fd_batch *batch, struct fd_batch_subpass *subpass)
|
|||
crb.attach_bo(subpass->lrz);
|
||||
|
||||
crb.add(GRAS_LRZ_BUFFER_BASE(CHIP, .bo = subpass->lrz));
|
||||
crb.add(GRAS_LRZ_BUFFER_PITCH(CHIP, .pitch = zsbuf->lrz_layout.lrz_pitch));
|
||||
crb.add(GRAS_LRZ_BUFFER_PITCH(CHIP,
|
||||
.pitch = zsbuf->lrz_layout.lrz_pitch * sizeof(uint16_t),
|
||||
));
|
||||
crb.add(A6XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE(
|
||||
.bo = zsbuf->lrz_layout.lrz_fc_size ? subpass->lrz : NULL,
|
||||
.bo_offset = zsbuf->lrz_layout.lrz_fc_offset
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue