aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-11-02 10:21:20 +0000
committerLionel Landwerlin <[email protected]>2018-11-13 18:56:31 +0000
commitea53f76d7b96cb32bde493a7c7548bf9c8c794f3 (patch)
treefd46b769e03230681230a059e068272c9c905ed1 /src/intel/vulkan
parent8b00d3d6ebd3a9e6694a43168a76dc9ce6e8c8a0 (diff)
anv: move helper function internally
It's only used in anv_image.c Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_image.c22
-rw-r--r--src/intel/vulkan/anv_private.h22
2 files changed, 22 insertions, 22 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 4a0284cf212..4003ac28444 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -1245,6 +1245,28 @@ remap_aspect_flags(VkImageAspectFlags view_aspects)
return view_aspects;
}
+static uint32_t
+anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
+{
+ uint32_t planes = 0;
+
+ if (aspect_mask & (VK_IMAGE_ASPECT_COLOR_BIT |
+ VK_IMAGE_ASPECT_DEPTH_BIT |
+ VK_IMAGE_ASPECT_STENCIL_BIT |
+ VK_IMAGE_ASPECT_PLANE_0_BIT))
+ planes++;
+ if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT)
+ planes++;
+ if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
+ planes++;
+
+ if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0 &&
+ (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0)
+ planes++;
+
+ return planes;
+}
+
VkResult
anv_CreateImageView(VkDevice _device,
const VkImageViewCreateInfo *pCreateInfo,
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index b6e3d1a36d4..62c563294f5 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2584,28 +2584,6 @@ anv_image_aspect_to_plane(VkImageAspectFlags image_aspects,
}
}
-static inline uint32_t
-anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
-{
- uint32_t planes = 0;
-
- if (aspect_mask & (VK_IMAGE_ASPECT_COLOR_BIT |
- VK_IMAGE_ASPECT_DEPTH_BIT |
- VK_IMAGE_ASPECT_STENCIL_BIT |
- VK_IMAGE_ASPECT_PLANE_0_BIT))
- planes++;
- if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT)
- planes++;
- if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
- planes++;
-
- if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0 &&
- (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0)
- planes++;
-
- return planes;
-}
-
static inline VkImageAspectFlags
anv_plane_to_aspect(VkImageAspectFlags image_aspects,
uint32_t plane)