Mesa (master): anv: Respect ISL_SURF_USAGE_DISABLE_AUX_BIT in make_surface()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 12 21:57:47 UTC 2020


Module: Mesa
Branch: master
Commit: c13202af7a86976e6d0400f2cee77afcc60ea828
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c13202af7a86976e6d0400f2cee77afcc60ea828

Author: Chad Versace <chadversary at chromium.org>
Date:   Wed Oct 30 09:15:48 2019 -0700

anv: Respect ISL_SURF_USAGE_DISABLE_AUX_BIT in make_surface()

If set, then don't make the aux surface.

Only anv_android.c used the flag, but anv_image.c fully ignored it.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3797>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3797>

---

 src/intel/vulkan/anv_image.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index e55d6b2db8b..83dcdb18668 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -409,9 +409,10 @@ make_surface(struct anv_device *device,
       add_surface(image, &image->planes[plane].shadow_surface, plane);
    }
 
-   /* Add a HiZ surface to a depth buffer that will be used for rendering.
-    */
-   if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) {
+   /* Add aux surface. */
+   if ((isl_extra_usage_flags & ISL_SURF_USAGE_DISABLE_AUX_BIT)) {
+      /* Nevermind. No aux surface. */
+   } else if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) {
       /* We don't advertise that depth buffers could be used as storage
        * images.
        */



More information about the mesa-commit mailing list