VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkPhysicalDeviceType;
-typedef enum {
- VK_IMAGE_ASPECT_COLOR = 0,
- VK_IMAGE_ASPECT_DEPTH = 1,
- VK_IMAGE_ASPECT_STENCIL = 2,
- VK_IMAGE_ASPECT_METADATA = 3,
- VK_IMAGE_ASPECT_BEGIN_RANGE = VK_IMAGE_ASPECT_COLOR,
- VK_IMAGE_ASPECT_END_RANGE = VK_IMAGE_ASPECT_METADATA,
- VK_IMAGE_ASPECT_NUM = (VK_IMAGE_ASPECT_METADATA - VK_IMAGE_ASPECT_COLOR + 1),
- VK_IMAGE_ASPECT_MAX_ENUM = 0x7FFFFFFF
-} VkImageAspect;
-
typedef enum VkQueryType {
VK_QUERY_TYPE_OCCLUSION = 0,
VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
} VkSparseImageOpaqueMemoryBindInfo;
typedef struct VkImageSubresource {
- VkImageAspect aspect;
+ VkImageAspectFlags aspectMask;
uint32_t mipLevel;
uint32_t arrayLayer;
} VkImageSubresource;
VkSubresourceLayout layout;
anv_GetImageSubresourceLayout(vk_device, copy_image,
&(VkImageSubresource) {
- .aspect = VK_IMAGE_ASPECT_COLOR,
+ .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.mipLevel = 0,
.arrayLayer = 0,
}, &layout);
{
ANV_FROM_HANDLE(anv_image, image, _image);
- switch (pSubresource->aspect) {
- case VK_IMAGE_ASPECT_COLOR:
+ assert(__builtin_popcount(pSubresource->aspectMask) == 1);
+
+ switch (pSubresource->aspectMask) {
+ case VK_IMAGE_ASPECT_COLOR_BIT:
anv_surface_get_subresource_layout(image, &image->color_surface,
pSubresource, pLayout);
break;
- case VK_IMAGE_ASPECT_DEPTH:
+ case VK_IMAGE_ASPECT_DEPTH_BIT:
anv_surface_get_subresource_layout(image, &image->depth_surface,
pSubresource, pLayout);
break;
- case VK_IMAGE_ASPECT_STENCIL:
+ case VK_IMAGE_ASPECT_STENCIL_BIT:
anv_surface_get_subresource_layout(image, &image->stencil_surface,
pSubresource, pLayout);
break;
image->format->isl_layout->bs);
}
- if (subresource->aspectMask & VK_IMAGE_ASPECT_STENCIL) {
+ if (subresource->aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) {
/* FINISHME: Is it legal to have an R8 view of S8? */
assert(image->format->has_stencil);
assert(view_format_info->has_stencil);