summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/vulkan/vulkan.h172
-rw-r--r--src/vulkan/anv_device.c2
-rw-r--r--src/vulkan/anv_dump.c2
-rw-r--r--src/vulkan/anv_formats.c14
-rw-r--r--src/vulkan/anv_image.c4
-rw-r--r--src/vulkan/anv_pipeline.c22
-rw-r--r--src/vulkan/anv_wsi_wayland.c2
-rw-r--r--src/vulkan/anv_wsi_x11.c2
-rw-r--r--src/vulkan/gen7_pipeline.c14
-rw-r--r--src/vulkan/genX_cmd_buffer.c4
10 files changed, 112 insertions, 126 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h
index fd898736fc5..b90181a53d4 100644
--- a/include/vulkan/vulkan.h
+++ b/include/vulkan/vulkan.h
@@ -45,7 +45,7 @@ extern "C" {
#define VK_NULL_HANDLE 0
-
+
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
@@ -59,8 +59,8 @@ extern "C" {
-typedef uint32_t VkBool32;
typedef uint32_t VkFlags;
+typedef uint32_t VkBool32;
typedef uint64_t VkDeviceSize;
typedef uint32_t VkSampleMask;
@@ -377,26 +377,26 @@ typedef enum {
VK_FORMAT_MAX_ENUM = 0x7FFFFFFF
} VkFormat;
-typedef enum {
+typedef enum VkImageType {
VK_IMAGE_TYPE_1D = 0,
VK_IMAGE_TYPE_2D = 1,
VK_IMAGE_TYPE_3D = 2,
VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D,
VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D,
- VK_IMAGE_TYPE_NUM = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1),
+ VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1),
VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkImageType;
-typedef enum {
- VK_IMAGE_TILING_LINEAR = 0,
- VK_IMAGE_TILING_OPTIMAL = 1,
- VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_LINEAR,
- VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_OPTIMAL,
- VK_IMAGE_TILING_NUM = (VK_IMAGE_TILING_OPTIMAL - VK_IMAGE_TILING_LINEAR + 1),
+typedef enum VkImageTiling {
+ VK_IMAGE_TILING_OPTIMAL = 0,
+ VK_IMAGE_TILING_LINEAR = 1,
+ VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL,
+ VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR,
+ VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1),
VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF
} VkImageTiling;
-typedef enum {
+typedef enum VkPhysicalDeviceType {
VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
@@ -404,7 +404,7 @@ typedef enum {
VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER,
VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU,
- VK_PHYSICAL_DEVICE_TYPE_NUM = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1),
+ VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1),
VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkPhysicalDeviceType;
@@ -419,41 +419,41 @@ typedef enum {
VK_IMAGE_ASPECT_MAX_ENUM = 0x7FFFFFFF
} VkImageAspect;
-typedef enum {
+typedef enum VkQueryType {
VK_QUERY_TYPE_OCCLUSION = 0,
VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION,
VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_PIPELINE_STATISTICS,
- VK_QUERY_TYPE_NUM = (VK_QUERY_TYPE_PIPELINE_STATISTICS - VK_QUERY_TYPE_OCCLUSION + 1),
+ VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_PIPELINE_STATISTICS - VK_QUERY_TYPE_OCCLUSION + 1),
VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkQueryType;
-typedef enum {
+typedef enum VkSharingMode {
VK_SHARING_MODE_EXCLUSIVE = 0,
VK_SHARING_MODE_CONCURRENT = 1,
VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE,
VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT,
- VK_SHARING_MODE_NUM = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1),
+ VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1),
VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF
} VkSharingMode;
-typedef enum {
+typedef enum VkImageLayout {
VK_IMAGE_LAYOUT_UNDEFINED = 0,
VK_IMAGE_LAYOUT_GENERAL = 1,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
- VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 6,
- VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 7,
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED,
- VK_IMAGE_LAYOUT_NUM = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
+ VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF
} VkImageLayout;
-typedef enum {
+typedef enum VkImageViewType {
VK_IMAGE_VIEW_TYPE_1D = 0,
VK_IMAGE_VIEW_TYPE_2D = 1,
VK_IMAGE_VIEW_TYPE_3D = 2,
@@ -463,7 +463,7 @@ typedef enum {
VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6,
VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D,
VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY,
- VK_IMAGE_VIEW_TYPE_NUM = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1),
+ VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1),
VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkImageViewType;
@@ -502,21 +502,21 @@ typedef enum {
VK_VERTEX_INPUT_STEP_RATE_MAX_ENUM = 0x7FFFFFFF
} VkVertexInputStepRate;
-typedef enum {
+typedef enum VkPrimitiveTopology {
VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
- VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 6,
- VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 7,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 8,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 9,
- VK_PRIMITIVE_TOPOLOGY_PATCH = 10,
+ VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
+ VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
+ VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10,
VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
- VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH,
- VK_PRIMITIVE_TOPOLOGY_NUM = (VK_PRIMITIVE_TOPOLOGY_PATCH - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1),
+ VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST,
+ VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1),
VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF
} VkPrimitiveTopology;
@@ -550,7 +550,7 @@ typedef enum {
VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF
} VkFrontFace;
-typedef enum {
+typedef enum VkCompareOp {
VK_COMPARE_OP_NEVER = 0,
VK_COMPARE_OP_LESS = 1,
VK_COMPARE_OP_EQUAL = 2,
@@ -561,11 +561,11 @@ typedef enum {
VK_COMPARE_OP_ALWAYS = 7,
VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER,
VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS,
- VK_COMPARE_OP_NUM = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1),
+ VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1),
VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF
} VkCompareOp;
-typedef enum {
+typedef enum VkStencilOp {
VK_STENCIL_OP_KEEP = 0,
VK_STENCIL_OP_ZERO = 1,
VK_STENCIL_OP_REPLACE = 2,
@@ -576,11 +576,11 @@ typedef enum {
VK_STENCIL_OP_DEC_WRAP = 7,
VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP,
VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DEC_WRAP,
- VK_STENCIL_OP_NUM = (VK_STENCIL_OP_DEC_WRAP - VK_STENCIL_OP_KEEP + 1),
+ VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DEC_WRAP - VK_STENCIL_OP_KEEP + 1),
VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF
} VkStencilOp;
-typedef enum {
+typedef enum VkLogicOp {
VK_LOGIC_OP_CLEAR = 0,
VK_LOGIC_OP_AND = 1,
VK_LOGIC_OP_AND_REVERSE = 2,
@@ -599,11 +599,11 @@ typedef enum {
VK_LOGIC_OP_SET = 15,
VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR,
VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET,
- VK_LOGIC_OP_NUM = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1),
+ VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1),
VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF
} VkLogicOp;
-typedef enum {
+typedef enum VkBlendFactor {
VK_BLEND_ZERO = 0,
VK_BLEND_ONE = 1,
VK_BLEND_SRC_COLOR = 2,
@@ -625,11 +625,11 @@ typedef enum {
VK_BLEND_ONE_MINUS_SRC1_ALPHA = 18,
VK_BLEND_BEGIN_RANGE = VK_BLEND_ZERO,
VK_BLEND_END_RANGE = VK_BLEND_ONE_MINUS_SRC1_ALPHA,
- VK_BLEND_NUM = (VK_BLEND_ONE_MINUS_SRC1_ALPHA - VK_BLEND_ZERO + 1),
+ VK_BLEND_RANGE_SIZE = (VK_BLEND_ONE_MINUS_SRC1_ALPHA - VK_BLEND_ZERO + 1),
VK_BLEND_MAX_ENUM = 0x7FFFFFFF
} VkBlend;
-typedef enum {
+typedef enum VkBlendOp {
VK_BLEND_OP_ADD = 0,
VK_BLEND_OP_SUBTRACT = 1,
VK_BLEND_OP_REVERSE_SUBTRACT = 2,
@@ -637,11 +637,11 @@ typedef enum {
VK_BLEND_OP_MAX = 4,
VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD,
VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX,
- VK_BLEND_OP_NUM = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1),
+ VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1),
VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF
} VkBlendOp;
-typedef enum {
+typedef enum VkDynamicState {
VK_DYNAMIC_STATE_VIEWPORT = 0,
VK_DYNAMIC_STATE_SCISSOR = 1,
VK_DYNAMIC_STATE_LINE_WIDTH = 2,
@@ -653,7 +653,7 @@ typedef enum {
VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT,
VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE,
- VK_DYNAMIC_STATE_NUM = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1),
+ VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1),
VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF
} VkDynamicState;
@@ -688,7 +688,7 @@ typedef enum {
VK_TEX_ADDRESS_MAX_ENUM = 0x7FFFFFFF
} VkTexAddressMode;
-typedef enum {
+typedef enum VkBorderColor {
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
@@ -697,11 +697,11 @@ typedef enum {
VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE,
- VK_BORDER_COLOR_NUM = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1),
+ VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1),
VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF
} VkBorderColor;
-typedef enum {
+typedef enum VkDescriptorType {
VK_DESCRIPTOR_TYPE_SAMPLER = 0,
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
@@ -715,7 +715,7 @@ typedef enum {
VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10,
VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER,
VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
- VK_DESCRIPTOR_TYPE_NUM = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1),
+ VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1),
VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkDescriptorType;
@@ -737,31 +737,31 @@ typedef enum {
VK_DESCRIPTOR_SET_USAGE_MAX_ENUM = 0x7FFFFFFF
} VkDescriptorSetUsage;
-typedef enum {
+typedef enum VkAttachmentLoadOp {
VK_ATTACHMENT_LOAD_OP_LOAD = 0,
VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD,
VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
- VK_ATTACHMENT_LOAD_OP_NUM = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1),
+ VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1),
VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF
} VkAttachmentLoadOp;
-typedef enum {
+typedef enum VkAttachmentStoreOp {
VK_ATTACHMENT_STORE_OP_STORE = 0,
VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE,
VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE,
- VK_ATTACHMENT_STORE_OP_NUM = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1),
+ VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1),
VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF
} VkAttachmentStoreOp;
-typedef enum {
- VK_PIPELINE_BIND_POINT_COMPUTE = 0,
- VK_PIPELINE_BIND_POINT_GRAPHICS = 1,
- VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
- VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
- VK_PIPELINE_BIND_POINT_NUM = (VK_PIPELINE_BIND_POINT_GRAPHICS - VK_PIPELINE_BIND_POINT_COMPUTE + 1),
+typedef enum VkPipelineBindPoint {
+ VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
+ VK_PIPELINE_BIND_POINT_COMPUTE = 1,
+ VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
+ VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
+ VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1),
VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF
} VkPipelineBindPoint;
@@ -774,12 +774,12 @@ typedef enum {
VK_CMD_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF
} VkCmdBufferLevel;
-typedef enum {
+typedef enum VkIndexType {
VK_INDEX_TYPE_UINT16 = 0,
VK_INDEX_TYPE_UINT32 = 1,
VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16,
VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32,
- VK_INDEX_TYPE_NUM = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1),
+ VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1),
VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkIndexType;
@@ -802,7 +802,7 @@ typedef enum {
} VkRenderPassContents;
-typedef enum {
+typedef enum VkFormatFeatureFlagBits {
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
@@ -813,14 +813,14 @@ typedef enum {
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
- VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400,
- VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800,
+ VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
+ VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
} VkFormatFeatureFlagBits;
typedef VkFlags VkFormatFeatureFlags;
-typedef enum {
- VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001,
- VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002,
+typedef enum VkImageUsageFlagBits {
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
@@ -830,7 +830,7 @@ typedef enum {
} VkImageUsageFlagBits;
typedef VkFlags VkImageUsageFlags;
-typedef enum {
+typedef enum VkImageCreateFlagBits {
VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
@@ -839,7 +839,7 @@ typedef enum {
} VkImageCreateFlagBits;
typedef VkFlags VkImageCreateFlags;
-typedef enum {
+typedef enum VkSampleCountFlagBits {
VK_SAMPLE_COUNT_1_BIT = 0x00000001,
VK_SAMPLE_COUNT_2_BIT = 0x00000002,
VK_SAMPLE_COUNT_4_BIT = 0x00000004,
@@ -850,12 +850,11 @@ typedef enum {
} VkSampleCountFlagBits;
typedef VkFlags VkSampleCountFlags;
-typedef enum {
+typedef enum VkQueueFlagBits {
VK_QUEUE_GRAPHICS_BIT = 0x00000001,
VK_QUEUE_COMPUTE_BIT = 0x00000002,
- VK_QUEUE_DMA_BIT = 0x00000004,
- VK_QUEUE_SPARSE_MEMMGR_BIT = 0x00000008,
- VK_QUEUE_EXTENDED_BIT = 0x40000000,
+ VK_QUEUE_TRANSFER_BIT = 0x00000004,
+ VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
} VkQueueFlagBits;
typedef VkFlags VkQueueFlags;
@@ -882,19 +881,19 @@ typedef enum {
} VkSparseImageFormatFlagBits;
typedef VkFlags VkSparseImageFormatFlags;
-typedef enum {
- VK_SPARSE_MEMORY_BIND_REPLICATE_64KIB_BLOCK_BIT = 0x00000001,
+typedef enum VkSparseMemoryBindFlagBits {
+ VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
} VkSparseMemoryBindFlagBits;
typedef VkFlags VkSparseMemoryBindFlags;
-typedef enum {
+typedef enum VkFenceCreateFlagBits {
VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
} VkFenceCreateFlagBits;
typedef VkFlags VkFenceCreateFlags;
typedef VkFlags VkSemaphoreCreateFlags;
typedef VkFlags VkEventCreateFlags;
-typedef enum {
+typedef enum VkQueryPipelineStatisticFlagBits {
VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = 0x00000001,
VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = 0x00000002,
VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = 0x00000004,
@@ -909,7 +908,7 @@ typedef enum {
} VkQueryPipelineStatisticFlagBits;
typedef VkFlags VkQueryPipelineStatisticFlags;
-typedef enum {
+typedef enum VkQueryResultFlagBits {
VK_QUERY_RESULT_DEFAULT = 0,
VK_QUERY_RESULT_64_BIT = 0x00000001,
VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
@@ -918,9 +917,9 @@ typedef enum {
} VkQueryResultFlagBits;
typedef VkFlags VkQueryResultFlags;
-typedef enum {
- VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001,
- VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002,
+typedef enum VkBufferUsageFlagBits {
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
+ VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
@@ -962,25 +961,26 @@ typedef enum {
} VkChannelFlagBits;
typedef VkFlags VkChannelFlags;
-typedef enum {
+typedef enum VkPipelineCreateFlagBits {
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
} VkPipelineCreateFlagBits;
typedef VkFlags VkPipelineCreateFlags;
-typedef enum {
+typedef enum VkShaderStageFlagBits {
VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
- VK_SHADER_STAGE_TESS_CONTROL_BIT = 0x00000002,
- VK_SHADER_STAGE_TESS_EVALUATION_BIT = 0x00000004,
+ VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
+ VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
+ VK_SHADER_STAGE_ALL_GRAPHICS = 0x1F,
VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
} VkShaderStageFlagBits;
typedef VkFlags VkShaderStageFlags;
-typedef enum {
+typedef enum VkAttachmentDescriptionFlagBits {
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
} VkAttachmentDescriptionFlagBits;
typedef VkFlags VkAttachmentDescriptionFlags;
@@ -990,13 +990,13 @@ typedef enum {
} VkSubpassDescriptionFlagBits;
typedef VkFlags VkSubpassDescriptionFlags;
-typedef enum {
+typedef enum VkPipelineStageFlagBits {
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001,
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002,
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004,
VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008,
- VK_PIPELINE_STAGE_TESS_CONTROL_SHADER_BIT = 0x00000010,
- VK_PIPELINE_STAGE_TESS_EVALUATION_SHADER_BIT = 0x00000020,
+ VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010,
+ VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020,
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080,
VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100,
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c
index aca082ac1b5..ebb86c09001 100644
--- a/src/vulkan/anv_device.c
+++ b/src/vulkan/anv_device.c
@@ -533,7 +533,7 @@ VkResult anv_GetPhysicalDeviceQueueFamilyProperties(
*pQueueFamilyProperties = (VkQueueFamilyProperties) {
.queueFlags = VK_QUEUE_GRAPHICS_BIT |
VK_QUEUE_COMPUTE_BIT |
- VK_QUEUE_DMA_BIT,
+ VK_QUEUE_TRANSFER_BIT,
.queueCount = 1,
.supportsTimestamps = true,
};
diff --git a/src/vulkan/anv_dump.c b/src/vulkan/anv_dump.c
index 3878941896c..3634ae68732 100644
--- a/src/vulkan/anv_dump.c
+++ b/src/vulkan/anv_dump.c
@@ -52,7 +52,7 @@ anv_dump_image_to_ppm(struct anv_device *device,
.arraySize = 1,
.samples = 1,
.tiling = VK_IMAGE_TILING_LINEAR,
- .usage = VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT,
+ .usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT,
.flags = 0,
}, &copy_image);
assert(result == VK_SUCCESS);
diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c
index f1c8da00b3c..8d5eae4c12e 100644
--- a/src/vulkan/anv_formats.c
+++ b/src/vulkan/anv_formats.c
@@ -260,10 +260,10 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
if (physical_device->info->gen >= 8) {
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
- tiled |= VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
+ tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT;
}
if (format->depth_format) {
- tiled |= VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT;
+ tiled |= VK_FORMAT_FEATURE_BLIT_DST_BIT;
}
} else {
/* The surface_formats table only contains color formats */
@@ -273,13 +273,13 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
if (info->sampling <= gen) {
flags = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
- VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
+ VK_FORMAT_FEATURE_BLIT_SRC_BIT;
linear |= flags;
tiled |= flags;
}
if (info->render_target <= gen) {
flags = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
- VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT;
+ VK_FORMAT_FEATURE_BLIT_DST_BIT;
linear |= flags;
tiled |= flags;
}
@@ -387,19 +387,19 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
break;
}
- if (usage & VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT) {
+ if (usage & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) {
/* Meta implements transfers by sampling from the source image. */
if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) {
goto unsupported;
}
}
- if (usage & VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT) {
+ if (usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) {
if (format->has_stencil) {
/* Not yet implemented because copying to a W-tiled surface is crazy
* hard.
*/
- anv_finishme("support VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT for "
+ anv_finishme("support VK_IMAGE_USAGE_TRANSFER_DST_BIT for "
"stencil format");
goto unsupported;
}
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c
index d344fcc2bea..973e8bd609a 100644
--- a/src/vulkan/anv_image.c
+++ b/src/vulkan/anv_image.c
@@ -274,12 +274,12 @@ anv_image_get_full_usage(const VkImageCreateInfo *info)
{
VkImageUsageFlags usage = info->usage;
- if (usage & VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT) {
+ if (usage & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) {
/* Meta will transfer from the image by binding it as a texture. */
usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
}
- if (usage & VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT) {
+ if (usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) {
/* Meta will transfer to the image by binding it as a color attachment,
* even if the image format is not a color format.
*/
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index a0606adaea6..a61f0c16757 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -239,17 +239,17 @@ void anv_DestroyPipeline(
}
static const uint32_t vk_to_gen_primitive_type[] = {
- [VK_PRIMITIVE_TOPOLOGY_POINT_LIST] = _3DPRIM_POINTLIST,
- [VK_PRIMITIVE_TOPOLOGY_LINE_LIST] = _3DPRIM_LINELIST,
- [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP] = _3DPRIM_LINESTRIP,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST] = _3DPRIM_TRILIST,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
- [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ] = _3DPRIM_LINELIST_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ] = _3DPRIM_LINESTRIP_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ] = _3DPRIM_TRILIST_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ] = _3DPRIM_TRISTRIP_ADJ,
-/* [VK_PRIMITIVE_TOPOLOGY_PATCH] = _3DPRIM_PATCHLIST_1 */
+ [VK_PRIMITIVE_TOPOLOGY_POINT_LIST] = _3DPRIM_POINTLIST,
+ [VK_PRIMITIVE_TOPOLOGY_LINE_LIST] = _3DPRIM_LINELIST,
+ [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP] = _3DPRIM_LINESTRIP,
+ [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST] = _3DPRIM_TRILIST,
+ [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
+ [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
+ [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY] = _3DPRIM_LINELIST_ADJ,
+ [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY] = _3DPRIM_LINESTRIP_ADJ,
+ [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY] = _3DPRIM_TRILIST_ADJ,
+ [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,
+/* [VK_PRIMITIVE_TOPOLOGY_PATCH_LIST] = _3DPRIM_PATCHLIST_1 */
};
static void
diff --git a/src/vulkan/anv_wsi_wayland.c b/src/vulkan/anv_wsi_wayland.c
index f32fda20c09..d226c8d06c1 100644
--- a/src/vulkan/anv_wsi_wayland.c
+++ b/src/vulkan/anv_wsi_wayland.c
@@ -330,7 +330,7 @@ wsi_wl_get_surface_properties(struct anv_wsi_implementation *impl,
props->currentTransform = VK_SURFACE_TRANSFORM_NONE_KHR;
props->maxImageArraySize = 1;
props->supportedUsageFlags =
- VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT |
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT |
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
return VK_SUCCESS;
diff --git a/src/vulkan/anv_wsi_x11.c b/src/vulkan/anv_wsi_x11.c
index 9a5e41d025a..4beffce3ce5 100644
--- a/src/vulkan/anv_wsi_x11.c
+++ b/src/vulkan/anv_wsi_x11.c
@@ -82,7 +82,7 @@ x11_get_surface_properties(struct anv_wsi_implementation *impl,
props->currentTransform = VK_SURFACE_TRANSFORM_NONE_KHR;
props->maxImageArraySize = 1;
props->supportedUsageFlags =
- VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT |
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT |
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
return VK_SUCCESS;
diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c
index 7d44c72b1a2..2d26a0380c5 100644
--- a/src/vulkan/gen7_pipeline.c
+++ b/src/vulkan/gen7_pipeline.c
@@ -316,20 +316,6 @@ gen7_emit_cb_state(struct anv_pipeline *pipeline,
.BlendStatePointer = pipeline->blend_state.offset);
}
-static const uint32_t vk_to_gen_primitive_type[] = {
- [VK_PRIMITIVE_TOPOLOGY_POINT_LIST] = _3DPRIM_POINTLIST,
- [VK_PRIMITIVE_TOPOLOGY_LINE_LIST] = _3DPRIM_LINELIST,
- [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP] = _3DPRIM_LINESTRIP,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST] = _3DPRIM_TRILIST,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
- [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ] = _3DPRIM_LINELIST_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ] = _3DPRIM_LINESTRIP_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ] = _3DPRIM_TRILIST_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ] = _3DPRIM_TRISTRIP_ADJ,
- [VK_PRIMITIVE_TOPOLOGY_PATCH] = _3DPRIM_PATCHLIST_1
-};
-
static inline uint32_t
scratch_space(const struct brw_stage_prog_data *prog_data)
{
diff --git a/src/vulkan/genX_cmd_buffer.c b/src/vulkan/genX_cmd_buffer.c
index cba0515161a..31dcdcd8dd5 100644
--- a/src/vulkan/genX_cmd_buffer.c
+++ b/src/vulkan/genX_cmd_buffer.c
@@ -164,8 +164,8 @@ void genX(CmdPipelineBarrier)(
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT |
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
- VK_PIPELINE_STAGE_TESS_CONTROL_SHADER_BIT |
- VK_PIPELINE_STAGE_TESS_EVALUATION_SHADER_BIT |
+ VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
+ VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT |