[Mesa-dev] [PATCH] anv: fix number of planes for depth & stencil

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Apr 12 18:37:57 UTC 2018


We're not counting correctly with depth & stencil images.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105994
---
 src/intel/vulkan/anv_private.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 53115ae470f..a4297511bbb 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2356,6 +2356,10 @@ anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
    if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
       planes++;
 
+   if (aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT &&
+       aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT)
+      planes++;
+
    return planes;
 }
 
-- 
2.17.0



More information about the mesa-dev mailing list