[Mesa-dev] [PATCH 17/22] anv: Add anv_get_sliceCount()

Nanley Chery nanleychery at gmail.com
Thu Apr 27 18:32:16 UTC 2017


Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 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 667176270a..819fbea567 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2060,6 +2060,10 @@ anv_layout_to_aux_usage(const struct gen_device_info * const devinfo,
    ((_range)->layerCount == VK_REMAINING_ARRAY_LAYERS ? \
     (_image)->array_size - (_range)->baseArrayLayer : (_range)->layerCount)
 
+#define anv_get_sliceCount(_image, _range) \
+   ((_range)->layerCount == VK_REMAINING_ARRAY_LAYERS ? \
+    (_image)->extent.depth - (_range)->baseArrayLayer : (_range)->layerCount)
+
 static inline uint32_t
 anv_get_levelCount(const struct anv_image *image,
                    const VkImageSubresourceRange *range)
-- 
2.12.2



More information about the mesa-dev mailing list