diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index d1d8ea886ed..5a98d5b6d96 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -165,6 +165,24 @@ can_fast_clear_color(struct iris_context *ice, return false; } + /* BSpec 46969 (r45602) tells us that we get no fast-clears for 3D: + * + * 3D/Volumetric surfaces do not support Fast Clear operation. + * + * BLORP has a workaround for Y-tiled surfaces, but not Ys-tiled ones. If + * the entire surface is being cleared, we could teach BLORP to clear it. + * For now, just keep things simple and reject fast clears. HW doesn't + * support compression on 64bpp+ formats anyway and iris doesn't enable + * compression for 32bpp formats. + */ + if (devinfo->verx10 == 120 && + res->surf.tiling == ISL_TILING_ICL_Ys && + res->surf.dim == ISL_SURF_DIM_3D) { + assert(isl_format_get_layout(res->surf.format)->bpb <= 16); + perf_debug(&ice->dbg, "Ys + 3D on gfx12.0. Slow clearing surface."); + 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. */ diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 1c2b647e7cf..1ba94708523 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -3905,6 +3905,23 @@ anv_can_fast_clear_color(const struct anv_cmd_buffer *cmd_buffer, return false; } + /* BSpec 46969 (r45602) tells us that we get no fast-clears for 3D: + * + * 3D/Volumetric surfaces do not support Fast Clear operation. + * + * If the entire surface is being cleared, we could teach BLORP to clear + * it. For now, just keep things simple and reject fast clears. We don't + * support compression on 64bpp+ formats anyway. + */ + if (cmd_buffer->device->info->verx10 == 120 && + anv_surf->isl.dim == ISL_SURF_DIM_3D && + anv_surf->isl.tiling == ISL_TILING_ICL_Ys) { + assert(isl_format_get_layout(anv_surf->isl.format)->bpb <= 32); + anv_perf_warn(VK_LOG_OBJS(&image->vk.base), + "Ys + 3D on gfx12.0. Slow clearing surface"); + 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. */