Signed-off-by: Nanley Chery <nanley.g.ch...@intel.com> --- src/intel/vulkan/anv_image.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index c84fc8ddea..df505ce8f0 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -213,6 +213,20 @@ make_surface(const struct anv_device *dev, ok = isl_surf_get_ccs_surf(&dev->isl_dev, &anv_surf->isl, &image->aux_surface.isl); if (ok) { + + /* Disable CCS when it is not useful (i.e., when you can't render + * to the image with CCS enabled). + */ + if (!isl_format_supports_rendering(&dev->info, format)) { + /* While it may be technically possible to enable CCS for this + * image, we currently don't have things hooked up to get it + * working. + */ + anv_perf_warn("This image format doesn't support rendering. " + "Not allocating an CCS buffer."); + return VK_SUCCESS; + } + add_surface(image, &image->aux_surface); /* For images created without MUTABLE_FORMAT_BIT set, we know that -- 2.13.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev