diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 7810920813e..6be35db8eb5 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -147,6 +147,16 @@ can_fast_clear_color(struct iris_context *ice, return false; } + /* On gfx12.0, CCS fast clears don't seem to cover the correct portion of + * the aux buffer when the pitch is not 512B-aligned. + */ + if (devinfo->verx10 == 120 && + res->surf.samples == 1 && + res->surf.row_pitch_B % 512) { + perf_debug(&ice->dbg, "Pitch not 512B-aligned. Slow clearing surface."); + return false; + } + return true; } diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 42289b46c32..28721c4474a 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -3485,6 +3485,17 @@ anv_can_fast_clear_color_view(struct anv_device *device, return false; } + /* On gfx12.0, CCS fast clears don't seem to cover the correct portion of + * the aux buffer when the pitch is not 512B-aligned. + */ + if (device->info->verx10 == 120 && + iview->image->planes->primary_surface.isl.samples == 1 && + iview->image->planes->primary_surface.isl.row_pitch_B % 512) { + anv_perf_warn(VK_LOG_OBJS(&iview->image->vk.base), + "Pitch not 512B-aligned. Slow clearing surface."); + return false; + } + /* Disable sRGB fast-clears for non-0/1 color values on Gfx9. For texturing * and draw calls, HW expects the clear color to be in two different color * spaces after sRGB fast-clears - sRGB in the former and linear in the