diff options
author | Nanley Chery <[email protected]> | 2017-07-05 12:15:24 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-22 20:12:09 -0700 |
commit | 325ecffc62c311dba37ae6b86b7f2bf13ab8763e (patch) | |
tree | 0fe04d5fd24b2f528bef16a29cde834ef24a70a0 /src/intel | |
parent | 01db9a74c6b39984c50a9794e69908aab51d67c4 (diff) |
anv/image: Disable CCS if the image doesn't support rendering
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_image.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 4f0057c9527..f33a445d1d0 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -214,6 +214,21 @@ make_surface(const struct anv_device *dev, ok = isl_surf_get_ccs_surf(&dev->isl_dev, &anv_surf->isl, &image->aux_surface.isl, 0); 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."); + image->aux_surface.isl.size = 0; + return VK_SUCCESS; + } + add_surface(image, &image->aux_surface); /* For images created without MUTABLE_FORMAT_BIT set, we know that |