freedreno/a6xx: gen8 lrz support

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:
Rob Clark 2025-12-11 15:52:35 -08:00 committed by Marge Bot
parent 0e82a8d759
commit a520752328
2 changed files with 12 additions and 7 deletions

View file

@ -237,7 +237,7 @@ emit_lrz(fd_cs &cs, struct fd_batch *batch, struct fd_batch_subpass *subpass)
struct pipe_framebuffer_state *pfb = &batch->framebuffer;
if (!subpass->lrz) {
fd_crb crb(cs, 8);
fd_crb crb(cs, 9);
crb.add(GRAS_LRZ_BUFFER_BASE(CHIP));
crb.add(GRAS_LRZ_BUFFER_PITCH(CHIP));
@ -249,6 +249,10 @@ emit_lrz(fd_cs &cs, struct fd_batch *batch, struct fd_batch_subpass *subpass)
crb.add(GRAS_LRZ_CNTL2(CHIP));
}
if (CHIP >= A8XX) {
crb.add(GRAS_LRZ_BUFFER_SLICE_PITCH(CHIP));
}
return;
}
@ -260,7 +264,7 @@ emit_lrz(fd_cs &cs, struct fd_batch *batch, struct fd_batch_subpass *subpass)
*/
fd6_event_write<CHIP>(batch->ctx, cs, FD_LRZ_FLUSH);
fd_crb crb(cs, 8);
fd_crb crb(cs, 9);
struct fd_resource *zsbuf = fd_resource(pfb->zsbuf.texture);
@ -290,6 +294,12 @@ emit_lrz(fd_cs &cs, struct fd_batch *batch, struct fd_batch_subpass *subpass)
.fc_enable = lrzfc_enabled<CHIP>(zsbuf),
));
}
if (CHIP >= A8XX) {
crb.add(GRAS_LRZ_BUFFER_SLICE_PITCH(CHIP,
zsbuf->lrz_layout.lrz_slice_pitch
));
}
}
/* Emit any needed lrz clears to the prologue cmds

View file

@ -995,11 +995,6 @@ fd_screen_create(int fd,
screen->dev_info = info;
screen->info = &screen->dev_info;
if (screen->gen == 8) {
/* gen8 TODO */
fd_mesa_debug |= FD_DBG_NOLRZ;
}
switch (screen->gen) {
case 2:
fd2_screen_init(pscreen);