summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-11-02 17:26:51 -0700
committerChad Versace <[email protected]>2017-11-09 16:01:59 -0800
commit6720abf292e77d44467419a82af40d63572c6e5a (patch)
tree04f39d629c64ca75e795330ec59dc45cdbbca4cb /src/intel/vulkan/anv_image.c
parent342c811646c0d12256b2a0b0d8ddf70f7fbdfcf7 (diff)
anv: Better types for 'aspect' function params
Some functions have a comment that says "Exactly one bit must be in 'aspect'". So change the type of their 'aspect' parameter from VkImageAspectFlags to VkImageAspectFlagBits. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 73777d86a44..32aa8741ffd 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -34,14 +34,11 @@
#include "vk_format_info.h"
-/**
- * Exactly one bit must be set in \a aspect.
- */
static isl_surf_usage_flags_t
choose_isl_surf_usage(VkImageCreateFlags vk_create_flags,
VkImageUsageFlags vk_usage,
isl_surf_usage_flags_t isl_extra_usage,
- VkImageAspectFlags aspect)
+ VkImageAspectFlagBits aspect)
{
isl_surf_usage_flags_t isl_usage = isl_extra_usage;
@@ -93,11 +90,8 @@ choose_isl_surf_usage(VkImageCreateFlags vk_create_flags,
return isl_usage;
}
-/**
- * Exactly one bit must be set in \a aspect.
- */
static struct anv_surface *
-get_surface(struct anv_image *image, VkImageAspectFlags aspect)
+get_surface(struct anv_image *image, VkImageAspectFlagBits aspect)
{
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
return &image->planes[plane].surface;
@@ -253,14 +247,12 @@ add_fast_clear_state_buffer(struct anv_image *image,
/**
* Initialize the anv_image::*_surface selected by \a aspect. Then update the
* image's memory requirements (that is, the image's size and alignment).
- *
- * Exactly one bit must be set in \a aspect.
*/
static VkResult
make_surface(const struct anv_device *dev,
struct anv_image *image,
const struct anv_image_create_info *anv_info,
- VkImageAspectFlags aspect)
+ VkImageAspectFlagBits aspect)
{
const VkImageCreateInfo *vk_info = anv_info->vk_info;
bool ok UNUSED;