mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
freedreno/a6xx: Remove unneeded MSAA clear fallback
This was added in commit 911ce374ca ("freedreno/a6xx: Fix MSAA clear"),
but the only case that can't handle fast-clear is sysmem blitter clear
path.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19884>
This commit is contained in:
parent
87563e64c9
commit
ded82cf4bd
3 changed files with 13 additions and 3 deletions
|
|
@ -806,6 +806,11 @@ fd6_clear_surface(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
}
|
||||
|
||||
uint32_t nr_samples = fd_resource_nr_samples(psurf->texture);
|
||||
|
||||
/* TODO the trick of multiplying the dimensions for MSAA sysmem clears
|
||||
* works for linear, but falls apart with tiled/ubwc.
|
||||
*/
|
||||
|
||||
OUT_PKT4(ring, REG_A6XX_GRAS_2D_DST_TL, 2);
|
||||
OUT_RING(ring, A6XX_GRAS_2D_DST_TL_X(box2d->x * nr_samples) |
|
||||
A6XX_GRAS_2D_DST_TL_Y(box2d->y));
|
||||
|
|
|
|||
|
|
@ -475,9 +475,13 @@ fd6_clear(struct fd_context *ctx, unsigned buffers,
|
|||
const bool has_depth = pfb->zsbuf;
|
||||
unsigned color_buffers = buffers >> 2;
|
||||
|
||||
/* we need to do multisample clear on 3d pipe, so fallback to u_blitter: */
|
||||
if (pfb->samples > 1)
|
||||
return false;
|
||||
/* multisample clear does not work properly for sysmem: */
|
||||
if (pfb->samples > 1) {
|
||||
/* layered rendering forces sysmem, so just bail now: */
|
||||
if (pfb->layers > 1)
|
||||
return false;
|
||||
ctx->batch->gmem_reason |= FD_GMEM_MSAA_CLEAR;
|
||||
}
|
||||
|
||||
/* If we're clearing after draws, fallback to 3D pipe clears. We could
|
||||
* use blitter clears in the draw batch but then we'd have to patch up the
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ enum fd_gmem_reason {
|
|||
FD_GMEM_BLEND_ENABLED = BIT(3),
|
||||
FD_GMEM_LOGICOP_ENABLED = BIT(4),
|
||||
FD_GMEM_FB_READ = BIT(5),
|
||||
FD_GMEM_MSAA_CLEAR = BIT(6),
|
||||
};
|
||||
|
||||
struct fd_screen {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue