vk/0.170.2: Update remaining enums
authorChad Versace <chad.versace@intel.com>
Wed, 7 Oct 2015 18:39:49 +0000 (11:39 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 7 Oct 2015 18:39:49 +0000 (11:39 -0700)
include/vulkan/vulkan.h
src/vulkan/anv_formats.c
src/vulkan/anv_image.c

index 1a572136340377a8f69183ce05ceeccd2b5c12b1..62305a6011607e0d2661ffc10162e65c2ee48660 100644 (file)
@@ -44,6 +44,13 @@ extern "C" {
 #define VK_API_VERSION VK_MAKE_VERSION(0, 138, 2)
 
 
+#if defined(__cplusplus) && (_MSC_VER >= 1800 || __cplusplus >= 201103L)
+    #define VK_NULL_HANDLE nullptr
+#else
+    #define VK_NULL_HANDLE 0
+#endif
+
+
 #define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj;
 
 
@@ -104,14 +111,15 @@ VK_DEFINE_NONDISP_HANDLE(VkDescriptorSet)
 VK_DEFINE_NONDISP_HANDLE(VkFramebuffer)
 VK_DEFINE_NONDISP_HANDLE(VkCmdPool)
 
-#define VK_LOD_CLAMP_NONE                 MAX_FLOAT
-#define VK_LAST_MIP_LEVEL                 UINT32_MAX
-#define VK_LAST_ARRAY_SLICE               UINT32_MAX
-#define VK_WHOLE_SIZE                     UINT64_MAX
-#define VK_ATTACHMENT_UNUSED              UINT32_MAX
+#define VK_LOD_CLAMP_NONE                 1000.0f
+#define VK_REMAINING_MIP_LEVELS           (~0U)
+#define VK_REMAINING_ARRAY_LAYERS         (~0U)
+#define VK_WHOLE_SIZE                     (~0ULL)
+#define VK_ATTACHMENT_UNUSED              (~0U)
 #define VK_TRUE                           1
 #define VK_FALSE                          0
-#define VK_NULL_HANDLE                    0
+#define VK_QUEUE_FAMILY_IGNORED           (~0U)
+#define VK_SUBPASS_EXTERNAL               (~0U)
 #define VK_MAX_PHYSICAL_DEVICE_NAME       256
 #define VK_UUID_LENGTH                    16
 #define VK_MAX_MEMORY_TYPES               32
@@ -147,55 +155,52 @@ typedef enum {
     VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
     VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
     VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3,
-    VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO = 4,
-    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 5,
-    VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 6,
-    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 7,
-    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 8,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 9,
-    VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO = 10,
-    VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO = 11,
-    VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO = 12,
-    VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO = 13,
-    VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 14,
-    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 15,
-    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 16,
-    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 17,
-    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 18,
-    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 19,
-    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 20,
-    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 21,
-    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 22,
-    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 23,
-    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 24,
-    VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 25,
-    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 26,
-    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 27,
-    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 28,
-    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 29,
-    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 30,
-    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 31,
-    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 32,
-    VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 33,
-    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 34,
-    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 35,
-    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 36,
-    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 37,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 38,
-    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 39,
-    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 40,
-    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 41,
-    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 42,
-    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 43,
-    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 44,
-    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 45,
-    VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 46,
-    VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 47,
-    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 48,
-    VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 49,
+    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 4,
+    VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 5,
+    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 6,
+    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 7,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 8,
+    VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 9,
+    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
+    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 11,
+    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 12,
+    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 13,
+    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 14,
+    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 15,
+    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 16,
+    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 17,
+    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 18,
+    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 19,
+    VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 20,
+    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 21,
+    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 22,
+    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 23,
+    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 24,
+    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 25,
+    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 26,
+    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 27,
+    VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 28,
+    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 29,
+    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 30,
+    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 31,
+    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 32,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
+    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 34,
+    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 35,
+    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 36,
+    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 37,
+    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 38,
+    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 39,
+    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 40,
+    VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 41,
+    VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 42,
+    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
+    VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 44,
+    VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 45,
+    VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 46,
     VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
-    VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO,
-    VK_STRUCTURE_TYPE_NUM = (VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
+    VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO,
+    VK_STRUCTURE_TYPE_NUM = (VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
     VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
 } VkStructureType;
 
@@ -302,7 +307,7 @@ typedef enum {
     VK_FORMAT_R11G11B10_UFLOAT = 87,
     VK_FORMAT_R9G9B9E5_UFLOAT = 88,
     VK_FORMAT_D16_UNORM = 89,
-    VK_FORMAT_D24_UNORM = 90,
+    VK_FORMAT_D24_UNORM_X8 = 90,
     VK_FORMAT_D32_SFLOAT = 91,
     VK_FORMAT_S8_UINT = 92,
     VK_FORMAT_D16_UNORM_S8_UINT = 93,
@@ -461,9 +466,10 @@ typedef enum {
     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_PREINITIALIZED = 8,
     VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
-    VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL,
-    VK_IMAGE_LAYOUT_NUM = (VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL - VK_IMAGE_LAYOUT_UNDEFINED + 1),
+    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_MAX_ENUM = 0x7FFFFFFF
 } VkImageLayout;
 
@@ -838,7 +844,7 @@ typedef enum {
     VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
     VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
     VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
-    VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020,
+    VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
     VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
     VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
 } VkImageUsageFlagBits;
index 944e05f1476fdd0f1d03c967c70b22ec8ab80420..2690ff24692afe170dca4c8fdc2eb872b0a51caa 100644 (file)
@@ -120,7 +120,7 @@ static const struct anv_format anv_formats[] = {
    fmt(VK_FORMAT_R9G9B9E5_UFLOAT,         R9G9B9E5_SHAREDEXP,     .cpp = 4,   .num_channels = 3),
 
    fmt(VK_FORMAT_D16_UNORM,               R16_UNORM,              .cpp = 2,   .num_channels = 1, .depth_format = D16_UNORM),
-   fmt(VK_FORMAT_D24_UNORM,               R24_UNORM_X8_TYPELESS,  .cpp = 4,   .num_channels = 1, .depth_format = D24_UNORM_X8_UINT),
+   fmt(VK_FORMAT_D24_UNORM_X8,            R24_UNORM_X8_TYPELESS,  .cpp = 4,   .num_channels = 1, .depth_format = D24_UNORM_X8_UINT),
    fmt(VK_FORMAT_D32_SFLOAT,              R32_FLOAT,              .cpp = 4,   .num_channels = 1, .depth_format = D32_FLOAT),
    fmt(VK_FORMAT_S8_UINT,                 R8_UINT,                .cpp = 1,   .num_channels = 1,                                       .has_stencil = true),
    fmt(VK_FORMAT_D16_UNORM_S8_UINT,       R16_UNORM,              .cpp = 2,   .num_channels = 2, .depth_format = D16_UNORM,            .has_stencil = true),
@@ -429,7 +429,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
       }
    }
 
-   if (usage & VK_IMAGE_USAGE_DEPTH_STENCIL_BIT) {
+   if (usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
       if (!(format_feature_flags & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) {
          goto unsupported;
       }
index 014a9b9b342544c452a3429f1c7ecd48d9da630c..e72c592905f1e2c7eab0d672c6655a8c94cfe80d 100644 (file)
@@ -484,7 +484,7 @@ anv_image_view_init(struct anv_image_view *iview,
    assert(image->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
                           VK_IMAGE_USAGE_STORAGE_BIT |
                           VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
-                          VK_IMAGE_USAGE_DEPTH_STENCIL_BIT));
+                          VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT));
 
    switch (image->type) {
    default: