mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
radv: fix clearing DCC on GFX9
dcc_slice_size is in DWORD on GFX9... Also, layers aren't supported
because they might be interleaved. Fix this by clearing the entire
DCC buffer.
Fixes: 5e8f6967b1 ("radv: add support for fast-clearing DCC layers on GFX9+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8443>
This commit is contained in:
parent
36e1c902b9
commit
dbe845624b
1 changed files with 5 additions and 1 deletions
|
|
@ -1412,12 +1412,16 @@ radv_clear_dcc(struct radv_cmd_buffer *cmd_buffer,
|
|||
uint32_t level = range->baseMipLevel + l;
|
||||
uint64_t size;
|
||||
|
||||
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) {
|
||||
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10) {
|
||||
/* Mipmap levels aren't implemented. */
|
||||
assert(level == 0);
|
||||
|
||||
offset += image->planes[0].surface.dcc_slice_size * range->baseArrayLayer;
|
||||
size = image->planes[0].surface.dcc_slice_size * layer_count;
|
||||
} else if (cmd_buffer->device->physical_device->rad_info.chip_class == GFX9) {
|
||||
/* Mipmap levels and layers aren't implemented. */
|
||||
assert(level == 0);
|
||||
size = image->planes[0].surface.dcc_size;
|
||||
} else {
|
||||
const struct legacy_surf_level *surf_level =
|
||||
&image->planes[0].surface.u.legacy.level[level];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue