mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
radeonsi/gfx9: fix and enable single-sample CMASK fast clear
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
d4bb4583b0
commit
6ab2042761
2 changed files with 11 additions and 4 deletions
|
|
@ -2639,10 +2639,6 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
|
|||
if (rctx->render_cond)
|
||||
return;
|
||||
|
||||
/* TODO: fix CMASK and DCC fast clear */
|
||||
if (rctx->chip_class >= GFX9)
|
||||
return;
|
||||
|
||||
for (i = 0; i < fb->nr_cbufs; i++) {
|
||||
struct r600_texture *tex;
|
||||
unsigned clear_bit = PIPE_CLEAR_COLOR0 << i;
|
||||
|
|
@ -2710,6 +2706,10 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
|
|||
uint32_t reset_value;
|
||||
bool clear_words_needed;
|
||||
|
||||
/* TODO: fix DCC clear */
|
||||
if (rctx->chip_class >= GFX9)
|
||||
continue;
|
||||
|
||||
if (rctx->screen->debug_flags & DBG_NO_DCC_CLEAR)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -655,6 +655,13 @@ static int gfx9_compute_miptree(struct amdgpu_winsys *ws,
|
|||
surf->u.gfx9.surf.swizzle_mode = in->swizzleMode;
|
||||
surf->u.gfx9.surf.epitch = out.epitchIsHeight ? out.mipChainHeight - 1 :
|
||||
out.mipChainPitch - 1;
|
||||
|
||||
/* CMASK fast clear uses these even if FMASK isn't allocated.
|
||||
* FMASK only supports the Z swizzle modes, whose numbers are multiples of 4.
|
||||
*/
|
||||
surf->u.gfx9.fmask.swizzle_mode = surf->u.gfx9.surf.swizzle_mode & ~0x3;
|
||||
surf->u.gfx9.fmask.epitch = surf->u.gfx9.surf.epitch;
|
||||
|
||||
surf->u.gfx9.surf_slice_size = out.sliceSize;
|
||||
surf->u.gfx9.surf_pitch = out.pitch;
|
||||
surf->u.gfx9.surf_height = out.height;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue