vulkan: Update from header 0.138.2 to 0.170.2
Change-Id: I011e1f27d025730d448ee5cfefc6701300b455c2
(cherry picked from commit 6761b6067555557599e8c30096614642a5223646)
diff --git a/vulkan/api/platform.api b/vulkan/api/platform.api
index 3da6fed..23f649d 100644
--- a/vulkan/api/platform.api
+++ b/vulkan/api/platform.api
@@ -22,9 +22,3 @@
// Platform types, as defined or included in vk_platform.h
type u64 size_t
-
-type u64 VkDeviceSize
-type u32 VkBool32
-
-type u32 VkSampleMask
-type u32 VkFlags
diff --git a/vulkan/api/templates/vk_xml.tmpl b/vulkan/api/templates/vk_xml.tmpl
index c040938..893bde7 100644
--- a/vulkan/api/templates/vk_xml.tmpl
+++ b/vulkan/api/templates/vk_xml.tmpl
@@ -68,13 +68,18 @@
// the object handle as a bool in expressions like:
// if (obj) vkDestroy(obj);
#define VK_NONDISP_HANDLE_OPERATOR_BOOL() explicit operator bool() const { return handle != 0; }
+ #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ explicit obj(uint64_t x) : handle(x) { } \
+ obj(decltype(nullptr)) : handle(0) { }
«#else»
#define VK_NONDISP_HANDLE_OPERATOR_BOOL()
+ #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ obj(uint64_t x) : handle(x) { }
«#endif
#define <name>VK_DEFINE_NONDISP_HANDLE</name>(obj) \»
struct obj { \
obj() { } \
- obj(uint64_t x) { handle = x; } \
+ VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
obj& operator =(uint64_t x) { handle = x; return *this; } \
bool operator==(const obj& other) const { return handle == other.handle; } \
bool operator!=(const obj& other) const { return handle != other.handle; } \
@@ -87,6 +92,14 @@
#endif
»»</type>
¶
+ <type category="define">
+#if defined(__cplusplus) && ((defined(_MSC_VER) && _MSC_VER >= 1800) || __cplusplus >= 201103L)
+ »#define <name>VK_NULL_HANDLE</name> nullptr
+«#else
+ »#define VK_NULL_HANDLE 0
+«#endif
+ »»</type>
+¶
<type requires="vk_platform" name="VkDeviceSize"/>
<type requires="vk_platform" name="VkSampleMask"/>
<type requires="vk_platform" name="VkFlags"/>
@@ -170,12 +183,13 @@
<enum value="{{$d.Expression}}" name="{{$d.Name}}"/>{{Macro "XML.Docs" $d.Docs}}
{{end}}
{{end}}
- <enum value="MAX_FLOAT" name="VK_LOD_CLAMP_NONE"/>
- <enum value="UINT32_MAX" name="VK_LAST_MIP_LEVEL"/>
- <enum value="UINT32_MAX" name="VK_LAST_ARRAY_SLICE"/>
- <enum value="UINT64_MAX" name="VK_WHOLE_SIZE"/>
- <enum value="UINT32_MAX" name="VK_ATTACHMENT_UNUSED"/>
- <enum value="UINT32_MAX" name="VK_QUEUE_FAMILY_IGNORED"/>
+ <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/>
+ <enum value="(-0U)" name="VK_REMAINING_MIP_LEVELS"/>
+ <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/>
+ <enum value="(_0ULL)" name="VK_WHOLE_SIZE"/>
+ <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/>
+ <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/>
+ <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/>
«</enums>
¶
<!-- Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in»
@@ -217,13 +231,12 @@
«</require>
<require comment="API constants">»
<enum name="VK_LOD_CLAMP_NONE"/>
- <enum name="VK_LAST_MIP_LEVEL"/>
- <enum name="VK_LAST_ARRAY_SLICE"/>
+ <enum name="VK_REMAINING_MIP_LEVELS"/>
+ <enum name="VK_REMAINING_ARRAY_LAYERS"/>
<enum name="VK_WHOLE_SIZE"/>
<enum name="VK_ATTACHMENT_UNUSED"/>
<enum name="VK_TRUE"/>
<enum name="VK_FALSE"/>
- <enum name="VK_NULL_HANDLE"/>
«</require>
<require comment="All functions (TODO: split by type)">»
{{range $f := AllCommands $}}
diff --git a/vulkan/api/templates/vulkan_common.tmpl b/vulkan/api/templates/vulkan_common.tmpl
index 135c835..12d5788 100644
--- a/vulkan/api/templates/vulkan_common.tmpl
+++ b/vulkan/api/templates/vulkan_common.tmpl
@@ -137,7 +137,7 @@
{{define "Parameter"}}
{{AssertType $ "Parameter"}}
- {{Macro "ParameterType" $}} {{$.Name}}{{Macro "ArrayPostfix" $}}
+ {{if GetAnnotation $ "readonly"}}const {{end}}{{Macro "ParameterType" $}} {{$.Name}}{{Macro "ArrayPostfix" $}}
{{end}}
diff --git a/vulkan/api/templates/vulkan_h.tmpl b/vulkan/api/templates/vulkan_h.tmpl
index 6747147..2dee541 100644
--- a/vulkan/api/templates/vulkan_h.tmpl
+++ b/vulkan/api/templates/vulkan_h.tmpl
@@ -53,10 +53,16 @@
#define VK_API_VERSION \
VK_MAKE_VERSION({{Global "VERSION_MAJOR"}}, {{Global "VERSION_MINOR"}}, {{Global "VERSION_PATCH"}})
¶
+#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;
¶
#if defined(__cplusplus)
-#if (_MSC_VER >= 1800 || __cplusplus >= 201103L)
+#if ((defined(_MSC_VER) && _MSC_VER >= 1800 || __cplusplus >= 201103L)
// The bool operator only works if there are no implicit conversions from an obj to
// a bool-compatible type, which can then be used to unintentionally violate type safety.
// C++11 and above supports the "explicit" keyword on conversion operators to stop this
@@ -65,13 +71,18 @@
// if (obj) vkDestroy(obj);
#define VK_NONDISP_HANDLE_OPERATOR_BOOL() \
explicit operator bool() const { return handle != 0; }
+#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ explicit obj(uint64_t x) : handle(x) { } \
+ obj(decltype(nullptr)) : handle(0) { }
#else
#define VK_NONDISP_HANDLE_OPERATOR_BOOL()
+#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ obj(uint64_t x) : handle(x) { }
#endif
#define VK_DEFINE_NONDISP_HANDLE(obj) \
struct obj { \
obj() : handle(0) { } \
- obj(uint64_t x) : handle(x) { } \
+ VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
obj& operator=(uint64_t x) { \
handle = x; \
return *this; \
@@ -87,11 +98,13 @@
typedef struct obj##_T { uint64_t handle; } obj;
#endif
¶
-#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_QUEUE_FAMILY_IGNORED (~0U)
+define VK_SUBPASS_EXTERNAL (~0U)
{{range $d := $.Definitions}}
{{if HasPrefix $d.Name "VK_"}}#define {{$d.Name}} {{$d.Expression}}{{end}}
{{end}}
diff --git a/vulkan/api/vulkan.api b/vulkan/api/vulkan.api
index c014454..9ea1ee4 100644
--- a/vulkan/api/vulkan.api
+++ b/vulkan/api/vulkan.api
@@ -27,7 +27,7 @@
// API version (major.minor.patch)
define VERSION_MAJOR 0
-define VERSION_MINOR 138
+define VERSION_MINOR 170
define VERSION_PATCH 2
// API limits
@@ -41,13 +41,20 @@
// API keywords
define VK_TRUE 1
define VK_FALSE 0
-define VK_NULL_HANDLE 0
+
+// API keyword, but needs special handling by some templates
+define NULL_HANDLE 0
/////////////
// Types //
/////////////
+type u32 VkBool32
+type u32 VkFlags
+type u64 VkDeviceSize
+type u32 VkSampleMask
+
/// Dispatchable handle types.
@dispatchHandle type u64 VkInstance
@dispatchHandle type u64 VkPhysicalDevice
@@ -62,7 +69,6 @@
@nonDispatchHandle type u64 VkBufferView
@nonDispatchHandle type u64 VkImage
@nonDispatchHandle type u64 VkImageView
-@nonDispatchHandle type u64 VkAttachmentView
@nonDispatchHandle type u64 VkShaderModule
@nonDispatchHandle type u64 VkShader
@nonDispatchHandle type u64 VkPipeline
@@ -71,10 +77,6 @@
@nonDispatchHandle type u64 VkDescriptorSet
@nonDispatchHandle type u64 VkDescriptorSetLayout
@nonDispatchHandle type u64 VkDescriptorPool
-@nonDispatchHandle type u64 VkDynamicViewportState
-@nonDispatchHandle type u64 VkDynamicRasterState
-@nonDispatchHandle type u64 VkDynamicColorBlendState
-@nonDispatchHandle type u64 VkDynamicDepthStencilState
@nonDispatchHandle type u64 VkFence
@nonDispatchHandle type u64 VkSemaphore
@nonDispatchHandle type u64 VkEvent
@@ -97,6 +99,7 @@
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access
VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations
+ VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
}
enum VkAttachmentLoadOp {
@@ -138,11 +141,6 @@
VK_IMAGE_ASPECT_METADATA = 0x00000003,
}
-enum VkBufferViewType {
- VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, /// Raw buffer without special structure (UBO, SSBO)
- VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, /// Buffer with format (TBO, IBO)
-}
-
enum VkCmdBufferLevel {
VK_CMD_BUFFER_LEVEL_PRIMARY = 0x00000000,
VK_CMD_BUFFER_LEVEL_SECONDARY = 0x00000001,
@@ -240,12 +238,12 @@
VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
}
-enum VkTexAddress {
- VK_TEX_ADDRESS_WRAP = 0x00000000,
- VK_TEX_ADDRESS_MIRROR = 0x00000001,
- VK_TEX_ADDRESS_CLAMP = 0x00000002,
- VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
- VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
+enum VkTexAddressMode {
+ VK_TEX_ADDRESS_MODE_WRAP = 0x00000000,
+ VK_TEX_ADDRESS_MODE_MIRROR = 0x00000001,
+ VK_TEX_ADDRESS_MODE_CLAMP = 0x00000002,
+ VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 0x00000003,
+ VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 0x00000004,
}
enum VkCompareOp {
@@ -450,7 +448,7 @@
VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
VK_FORMAT_D16_UNORM = 0x00000059,
- VK_FORMAT_D24_UNORM = 0x0000005A,
+ VK_FORMAT_D24_UNORM_X8 = 0x0000005A,
VK_FORMAT_D32_SFLOAT = 0x0000005B,
VK_FORMAT_S8_UINT = 0x0000005C,
VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
@@ -552,52 +550,49 @@
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,
}
enum VkRenderPassContents {
@@ -605,7 +600,7 @@
VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 0x00000001,
}
-@lastUnused(-33)
+@lastUnused(-8)
/// Error and return codes
enum VkResult {
// Return codes for successful operation execution (positive values)
@@ -618,38 +613,26 @@
VK_INCOMPLETE = 0x00000006,
// Error codes (negative values)
- VK_ERROR_UNKNOWN = 0xFFFFFFFF,
- VK_ERROR_UNAVAILABLE = 0xFFFFFFFE,
+ VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE,
VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD,
- VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFC,
- VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFB,
- VK_ERROR_DEVICE_ALREADY_CREATED = 0xFFFFFFFA,
- VK_ERROR_DEVICE_LOST = 0xFFFFFFF9,
- VK_ERROR_INVALID_POINTER = 0xFFFFFFF8,
- VK_ERROR_INVALID_VALUE = 0xFFFFFFF7,
- VK_ERROR_INVALID_HANDLE = 0xFFFFFFF6,
- VK_ERROR_INVALID_ORDINAL = 0xFFFFFFF5,
- VK_ERROR_INVALID_MEMORY_SIZE = 0xFFFFFFF4,
- VK_ERROR_INVALID_EXTENSION = 0xFFFFFFF3,
- VK_ERROR_INVALID_FLAGS = 0xFFFFFFF2,
- VK_ERROR_INVALID_ALIGNMENT = 0xFFFFFFF1,
- VK_ERROR_INVALID_FORMAT = 0xFFFFFFF0,
- VK_ERROR_INVALID_IMAGE = 0xFFFFFFEF,
- VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = 0xFFFFFFEE,
- VK_ERROR_INVALID_QUEUE_TYPE = 0xFFFFFFED,
- VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = 0xFFFFFFEC,
- VK_ERROR_BAD_SHADER_CODE = 0xFFFFFFEB,
- VK_ERROR_BAD_PIPELINE_DATA = 0xFFFFFFEA,
- VK_ERROR_NOT_MAPPABLE = 0xFFFFFFE9,
- VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFE8,
- VK_ERROR_MEMORY_UNMAP_FAILED = 0xFFFFFFE7,
- VK_ERROR_INCOMPATIBLE_DEVICE = 0xFFFFFFE6,
- VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFE5,
- VK_ERROR_INCOMPLETE_COMMAND_BUFFER = 0xFFFFFFE4,
- VK_ERROR_BUILDING_COMMAND_BUFFER = 0xFFFFFFE3,
- VK_ERROR_MEMORY_NOT_BOUND = 0xFFFFFFE2,
- VK_ERROR_INCOMPATIBLE_QUEUE = 0xFFFFFFE1,
- VK_ERROR_INVALID_LAYER = 0xFFFFFFE0,
+ VK_ERROR_DEVICE_LOST = 0xFFFFFFFC,
+ VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB,
+ VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA,
+ VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9,
+ VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF8,
+}
+
+enum VkDynamicState {
+ VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
+ VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
+ VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
+ VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
+ VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
+ VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
+ VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
+ VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
+ VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
}
@@ -657,11 +640,6 @@
// Bitfields //
/////////////////
-/// Device creation flags
-bitfield VkDeviceCreateFlags {
- VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001,
-}
-
/// Queue capabilities
bitfield VkQueueFlags {
VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
@@ -684,7 +662,7 @@
/// Memory heap flags
bitfield VkMemoryHeapFlags {
- VK_MEMORY_HEAP_HOST_LOCAL = 0x00000001, /// If set, heap represents host memory
+ VK_MEMORY_HEAP_HOST_LOCAL_BIT = 0x00000001, /// If set, heap represents host memory
}
/// Memory output flags passed to resource transition commands
@@ -712,7 +690,6 @@
/// Buffer usage flags
bitfield VkBufferUsageFlags {
- VK_BUFFER_USAGE_GENERAL = 0x00000000, /// No special usage
VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, /// Can be used as a source of transfer operations
VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, /// Can be used as a destination of transfer operations
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
@@ -726,7 +703,7 @@
/// Buffer creation flags
bitfield VkBufferCreateFlags {
- VK_BUFFER_CREATE_SPARSE_BIT = 0x00000001, /// Buffer should support sparse backing
+ VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
}
@@ -745,31 +722,29 @@
/// Image usage flags
bitfield VkImageUsageFlags {
- VK_IMAGE_USAGE_GENERAL = 0x00000000, /// No special usage
VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, /// Can be used as a source of transfer operations
VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, /// Can be used as a destination of transfer operations
VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
- VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
+ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
}
/// Image creation flags
bitfield VkImageCreateFlags {
- VK_IMAGE_CREATE_SPARSE_BIT = 0x00000001, /// Image should support sparse backing
+ VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Image should support constent data access to physical memory blocks mapped into multiple locations of sparse images
- VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000008,
- VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000010, /// Allows image views to have different format than the base image
- VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000020, /// Allows creating image views with cube type from the created image
+ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
+ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image
}
/// Framebuffer attachment view creation flags
-bitfield VkAttachmentViewCreateFlags {
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
+bitfield VkImageViewCreateFlags {
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
}
/// Pipeline creation flags
@@ -808,7 +783,8 @@
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
- VK_FORMAT_FEATURE_CONVERSION_BIT = 0x00000400, /// Format can be used as the source or destination of format converting blits
+ VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCmdBlitImage
+ VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800, /// Format can be used as the destination image of blits with vkCmdBlitImage
}
/// Query control flags
@@ -904,11 +880,15 @@
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
- VK_PIPELINE_STAGE_TRANSITION_BIT = 0x00002000, /// Resource transition commands
- VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
+ VK_PIPELINE_STAGE_HOST_BIT = 0x00002000, /// Indicates host (CPU) is a source/sink of the dependency
VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF, /// All stages of the graphics pipeline
- VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00003FFF, /// All graphics, compute, copy, and transition commands
+ VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF, /// All graphics, compute, copy, and transition commands
+}
+
+/// Render pass attachment description flags
+bitfield VkAttachmentDescriptionFlags {
+ VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, /// The attachment may alias physical memory of another attachment in the same renderpass
}
/// Subpass description flags
@@ -924,11 +904,27 @@
/// Command pool reset flags
bitfield VkCmdPoolResetFlags {
- VK_CMD_POOL_RESET_RELEASE_RESOURCES = 0x00000001, /// Release resources owned by the pool
+ VK_CMD_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
}
bitfield VkCmdBufferResetFlags {
- VK_CMD_BUFFER_RESET_RELEASE_RESOURCES = 0x00000001, /// Release resources owned by the buffer
+ VK_CMD_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
+}
+
+bitfield VkSampleCountFlags {
+ VK_SAMPLE_COUNT_1_BIT = 0x00000001,
+ VK_SAMPLE_COUNT_2_BIT = 0x00000002,
+ VK_SAMPLE_COUNT_4_BIT = 0x00000004,
+ VK_SAMPLE_COUNT_8_BIT = 0x00000008,
+ VK_SAMPLE_COUNT_16_BIT = 0x00000010,
+ VK_SAMPLE_COUNT_32_BIT = 0x00000020,
+ VK_SAMPLE_COUNT_64_BIT = 0x00000040,
+}
+
+bitfield VkStencilFaceFlags {
+ VK_STENCIL_FACE_NONE = 0x00000000, /// No faces
+ VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
+ VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
}
@@ -992,6 +988,8 @@
VkPhysicalDeviceType deviceType
char[VK_MAX_PHYSICAL_DEVICE_NAME] deviceName
u8[VK_UUID_LENGTH] pipelineCacheUUID
+ VkPhysicalDeviceLimits limits
+ VkPhysicalDeviceSparseProperties sparseProperties
}
class VkExtensionProperties {
@@ -1023,6 +1021,8 @@
}
class VkDeviceQueueCreateInfo {
+ VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
+ const void* pNext /// Pointer to next structure
u32 queueFamilyIndex
u32 queueCount
}
@@ -1037,7 +1037,6 @@
u32 extensionCount
const char* const* ppEnabledExtensionNames
const VkPhysicalDeviceFeatures* pEnabledFeatures
- VkDeviceCreateFlags flags /// Device creation flags
}
class VkInstanceCreateInfo {
@@ -1051,10 +1050,10 @@
const char* const* ppEnabledExtensionNames /// Extension names to be enabled
}
-class VkPhysicalDeviceQueueProperties {
+class VkQueueFamilyProperties {
VkQueueFlags queueFlags /// Queue flags
u32 queueCount
- platform.VkBool32 supportsTimestamps
+ VkBool32 supportsTimestamps
}
class VkPhysicalDeviceMemoryProperties {
@@ -1067,13 +1066,13 @@
class VkMemoryAllocInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
const void* pNext /// Pointer to next structure
- platform.VkDeviceSize allocationSize /// Size of memory allocation
+ VkDeviceSize allocationSize /// Size of memory allocation
u32 memoryTypeIndex /// Index of the of the memory type to allocate from
}
class VkMemoryRequirements {
- platform.VkDeviceSize size /// Specified in bytes
- platform.VkDeviceSize alignment /// Specified in bytes
+ VkDeviceSize size /// Specified in bytes
+ VkDeviceSize alignment /// Specified in bytes
u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
}
@@ -1086,9 +1085,9 @@
class VkSparseImageMemoryRequirements {
VkSparseImageFormatProperties formatProps
u32 imageMipTailStartLOD
- platform.VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
- platform.VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
- platform.VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
+ VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
+ VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
+ VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
}
class VkMemoryType {
@@ -1097,7 +1096,7 @@
}
class VkMemoryHeap {
- platform.VkDeviceSize size /// Available memory in the heap
+ VkDeviceSize size /// Available memory in the heap
VkMemoryHeapFlags flags /// Flags for the heap
}
@@ -1105,26 +1104,36 @@
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
const void* pNext /// Pointer to next structure
VkDeviceMemory mem /// Mapped memory object
- platform.VkDeviceSize offset /// Offset within the mapped memory the range starts from
- platform.VkDeviceSize size /// Size of the range within the mapped memory
+ VkDeviceSize offset /// Offset within the mapped memory the range starts from
+ VkDeviceSize size /// Size of the range within the mapped memory
}
class VkFormatProperties {
VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
+ VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
}
class VkImageFormatProperties {
- u64 maxResourceSize /// max size (in bytes) of this resource type
- u32 maxSamples /// max sample count for this resource type
+ VkExtent3D maxExtent /// max image dimensions for this resource type
+ u32 maxMipLevels /// max number of mipmap levels for this resource type
+ u32 maxArraySize /// max array size for this resource type
+ VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
+ VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
+}
+
+class VkDescriptorBufferInfo {
+ VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
+ VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
+ VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
}
class VkDescriptorInfo {
VkBufferView bufferView /// Buffer view to write to the descriptor (in case it's a buffer descriptor, otherwise should be VK_NULL_HANDLE)
VkSampler sampler /// Sampler to write to the descriptor (in case it's a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE)
- VkImageView imageView /// Image view to write to the descriptor (in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE)
- VkAttachmentView attachmentView /// Input attachment view to write to the descriptor (in case it's a INPUT_ATTACHMENT descriptor, otherwise should be VK_NULL_HANDLE)
- VkImageLayout imageLayout /// Layout the image is expected to be in when accessed using this descriptor (only used if imageView or attachmentView is not VK_NULL_HANDLE)
+ VkImageView imageView /// Image view to write to the descriptor (in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor, otherwise should be VK_NULL_HANDLE)
+ VkImageLayout imageLayout /// Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE)
+ VkDescriptorBufferInfo bufferInfo /// Raw buffer, size and offset for UNIFORM_BUFFER[_DYNAMIC] or STORAGE_BUFFER[_DYNAMIC] descriptor types. Ignored otherwise.
}
class VkWriteDescriptorSet {
@@ -1153,7 +1162,7 @@
class VkBufferCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
const void* pNext /// Pointer to next structure.
- platform.VkDeviceSize size /// Specified in bytes
+ VkDeviceSize size /// Specified in bytes
VkBufferUsageFlags usage /// Buffer usage flags
VkBufferCreateFlags flags /// Buffer creation flags
VkSharingMode sharingMode
@@ -1165,23 +1174,22 @@
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
const void* pNext /// Pointer to next structure.
VkBuffer buffer
- VkBufferViewType viewType
VkFormat format /// Optionally specifies format of elements
- platform.VkDeviceSize offset /// Specified in bytes
- platform.VkDeviceSize range /// View size specified in bytes
+ VkDeviceSize offset /// Specified in bytes
+ VkDeviceSize range /// View size specified in bytes
}
class VkImageSubresource {
VkImageAspect aspect
u32 mipLevel
- u32 arraySlice
+ u32 arrayLayer
}
class VkImageSubresourceRange {
- VkImageAspect aspect
+ VkImageAspectFlags aspectMask
u32 baseMipLevel
u32 mipLevels
- u32 baseArraySlice
+ u32 baseArrayLayer
u32 arraySize
}
@@ -1200,8 +1208,8 @@
u32 srcQueueFamilyIndex /// Queue family to transition ownership from
u32 destQueueFamilyIndex /// Queue family to transition ownership to
VkBuffer buffer /// Buffer to sync
- platform.VkDeviceSize offset /// Offset within the buffer to sync
- platform.VkDeviceSize size /// Amount of bytes to sync
+ VkDeviceSize offset /// Offset within the buffer to sync
+ VkDeviceSize size /// Amount of bytes to sync
}
class VkImageMemoryBarrier {
@@ -1232,13 +1240,14 @@
VkSharingMode sharingMode /// Cross-queue-family sharing mode
u32 queueFamilyCount /// Number of queue families to share across
const u32* pQueueFamilyIndices /// Array of queue family indices to share across
+ VkImageLayout initialLayout /// Initial image layout for all subresources
}
class VkSubresourceLayout {
- platform.VkDeviceSize offset /// Specified in bytes
- platform.VkDeviceSize size /// Specified in bytes
- platform.VkDeviceSize rowPitch /// Specified in bytes
- platform.VkDeviceSize depthPitch /// Specified in bytes
+ VkDeviceSize offset /// Specified in bytes
+ VkDeviceSize size /// Specified in bytes
+ VkDeviceSize rowPitch /// Specified in bytes
+ VkDeviceSize depthPitch /// Specified in bytes
}
class VkImageViewCreateInfo {
@@ -1249,34 +1258,19 @@
VkFormat format
VkChannelMapping channels
VkImageSubresourceRange subresourceRange
-}
-
-class VkAttachmentViewCreateInfo {
- VkStructureType sType /// Must be VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO
- const void* pNext /// Pointer to next structure
- VkImage image
- VkFormat format
- u32 mipLevel
- u32 baseArraySlice
- u32 arraySize
- VkAttachmentViewCreateFlags flags /// Framebuffer attachment view flags
-}
-
-class VkAttachmentBindInfo {
- VkAttachmentView view
- VkImageLayout layout
+ VkImageViewCreateFlags flags
}
class VkBufferCopy {
- platform.VkDeviceSize srcOffset /// Specified in bytes
- platform.VkDeviceSize destOffset /// Specified in bytes
- platform.VkDeviceSize copySize /// Specified in bytes
+ VkDeviceSize srcOffset /// Specified in bytes
+ VkDeviceSize destOffset /// Specified in bytes
+ VkDeviceSize copySize /// Specified in bytes
}
class VkSparseMemoryBindInfo {
- platform.VkDeviceSize rangeOffset /// Specified in bytes
- platform.VkDeviceSize rangeSize /// Specified in bytes
- platform.VkDeviceSize memOffset /// Specified in bytes
+ VkDeviceSize rangeOffset /// Specified in bytes
+ VkDeviceSize rangeSize /// Specified in bytes
+ VkDeviceSize memOffset /// Specified in bytes
VkDeviceMemory mem
VkSparseMemoryBindFlags flags
}
@@ -1285,41 +1279,48 @@
VkImageSubresource subresource
VkOffset3D offset
VkExtent3D extent
- platform.VkDeviceSize memOffset /// Specified in bytes
+ VkDeviceSize memOffset /// Specified in bytes
VkDeviceMemory mem
VkSparseMemoryBindFlags flags
}
+class VkImageSubresourceCopy {
+ VkImageAspect aspect
+ u32 mipLevel
+ u32 arrayLayer
+ u32 arraySize
+}
+
class VkImageCopy {
- VkImageSubresource srcSubresource
+ VkImageSubresourceCopy srcSubresource
VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
- VkImageSubresource destSubresource
+ VkImageSubresourceCopy destSubresource
VkOffset3D destOffset /// Specified in pixels for both compressed and uncompressed images
VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
}
class VkImageBlit {
- VkImageSubresource srcSubresource
+ VkImageSubresourceCopy srcSubresource
VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
VkExtent3D srcExtent /// Specified in pixels for both compressed and uncompressed images
- VkImageSubresource destSubresource
+ VkImageSubresourceCopy destSubresource
VkOffset3D destOffset /// Specified in pixels for both compressed and uncompressed images
VkExtent3D destExtent /// Specified in pixels for both compressed and uncompressed images
}
class VkBufferImageCopy {
- platform.VkDeviceSize bufferOffset /// Specified in bytes
+ VkDeviceSize bufferOffset /// Specified in bytes
u32 bufferRowLength /// Specified in texels
u32 bufferImageHeight
- VkImageSubresource imageSubresource
+ VkImageSubresourceCopy imageSubresource
VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
}
class VkImageResolve {
- VkImageSubresource srcSubresource
+ VkImageSubresourceCopy srcSubresource
VkOffset3D srcOffset
- VkImageSubresource destSubresource
+ VkImageSubresourceCopy destSubresource
VkOffset3D destOffset
VkExtent3D extent
}
@@ -1338,6 +1339,7 @@
VkShaderModule module /// Module containing entry point
const char* pName /// Null-terminated entry point name
VkShaderCreateFlags flags /// Reserved
+ VkShaderStage stage
}
class VkDescriptorSetLayoutBinding {
@@ -1362,6 +1364,8 @@
class VkDescriptorPoolCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
const void* pNext /// Pointer to next structure
+ VkDescriptorPoolUsage poolUsage
+ u32 maxSets
u32 count
const VkDescriptorTypeCount* pTypeCount
}
@@ -1390,7 +1394,7 @@
class VkComputePipelineCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
const void* pNext /// Pointer to next structure
- VkPipelineShaderStageCreateInfo cs
+ VkPipelineShaderStageCreateInfo stage
VkPipelineCreateFlags flags /// Pipeline creation flags
VkPipelineLayout layout /// Interface layout of the pipeline
VkPipeline basePipelineHandle /// If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of
@@ -1423,7 +1427,7 @@
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
VkPrimitiveTopology topology
- platform.VkBool32 primitiveRestartEnable
+ VkBool32 primitiveRestartEnable
}
class VkPipelineTessellationStateCreateInfo {
@@ -1436,29 +1440,37 @@
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
u32 viewportCount
+ const VkViewport* pViewports
+ u32 scissorCount
+ const VkRect2D* pScissors
}
class VkPipelineRasterStateCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
- platform.VkBool32 depthClipEnable
- platform.VkBool32 rasterizerDiscardEnable
+ VkBool32 depthClipEnable
+ VkBool32 rasterizerDiscardEnable
VkFillMode fillMode /// optional (GL45)
VkCullMode cullMode
VkFrontFace frontFace
+ VkBool32 depthBiasEnable
+ f32 depthBias
+ f32 depthBiasClamp
+ f32 slopeScaledDepthBias
+ f32 lineWidth
}
class VkPipelineMultisampleStateCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
u32 rasterSamples /// Number of samples used for rasterization
- platform.VkBool32 sampleShadingEnable /// optional (GL45)
+ VkBool32 sampleShadingEnable /// optional (GL45)
f32 minSampleShading /// optional (GL45)
- platform.VkSampleMask sampleMask
+ const VkSampleMask* pSampleMask
}
class VkPipelineColorBlendAttachmentState {
- platform.VkBool32 blendEnable
+ VkBool32 blendEnable
VkBlend srcBlendColor
VkBlend destBlendColor
VkBlendOp blendOpColor
@@ -1471,11 +1483,13 @@
class VkPipelineColorBlendStateCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
- platform.VkBool32 alphaToCoverageEnable
- platform.VkBool32 logicOpEnable
+ VkBool32 alphaToCoverageEnable
+ VkBool32 alphaToOneEnable
+ VkBool32 logicOpEnable
VkLogicOp logicOp
u32 attachmentCount /// # of pAttachments
const VkPipelineColorBlendAttachmentState* pAttachments
+ f32[4] blendConst
}
class VkStencilOpState {
@@ -1483,18 +1497,30 @@
VkStencilOp stencilPassOp
VkStencilOp stencilDepthFailOp
VkCompareOp stencilCompareOp
+ u32 stencilCompareMask
+ u32 stencilWriteMask
+ u32 stencilReference
}
class VkPipelineDepthStencilStateCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
const void* pNext /// Pointer to next structure
- platform.VkBool32 depthTestEnable
- platform.VkBool32 depthWriteEnable
+ VkBool32 depthTestEnable
+ VkBool32 depthWriteEnable
VkCompareOp depthCompareOp
- platform.VkBool32 depthBoundsEnable /// optional (depth_bounds_test)
- platform.VkBool32 stencilTestEnable
+ VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
+ VkBool32 stencilTestEnable
VkStencilOpState front
VkStencilOpState back
+ f32 minDepthBounds
+ f32 maxDepthBounds
+}
+
+class VkPipelineDynamicStateCreateInfo {
+ VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
+ const void* pNext /// Pointer to next structure
+ u32 dynamicStateCount
+ const VkDynamicState* pDynamicStates
}
class VkGraphicsPipelineCreateInfo {
@@ -1510,6 +1536,7 @@
const VkPipelineMultisampleStateCreateInfo* pMultisampleState
const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
const VkPipelineColorBlendStateCreateInfo* pColorBlendState
+ const VkPipelineDynamicStateCreateInfo* pDynamicState
VkPipelineCreateFlags flags /// Pipeline creation flags
VkPipelineLayout layout /// Interface layout of the pipeline
VkRenderPass renderPass
@@ -1547,50 +1574,17 @@
VkTexFilter magFilter /// Filter mode for magnification
VkTexFilter minFilter /// Filter mode for minifiation
VkTexMipmapMode mipMode /// Mipmap selection mode
- VkTexAddress addressU
- VkTexAddress addressV
- VkTexAddress addressW
+ VkTexAddressMode addressModeU
+ VkTexAddressMode addressModeV
+ VkTexAddressMode addressModeW
f32 mipLodBias
f32 maxAnisotropy
- platform.VkBool32 compareEnable
+ VkBool32 compareEnable
VkCompareOp compareOp
f32 minLod
f32 maxLod
VkBorderColor borderColor
-}
-
-class VkDynamicViewportStateCreateInfo {
- VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO
- const void* pNext /// Pointer to next structure
- u32 viewportAndScissorCount /// number of entries in pViewports and pScissors
- const VkViewport* pViewports
- const VkRect2D* pScissors
-}
-
-class VkDynamicRasterStateCreateInfo {
- VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO
- const void* pNext /// Pointer to next structure
- f32 depthBias
- f32 depthBiasClamp
- f32 slopeScaledDepthBias
- f32 lineWidth /// optional (GL45) - Width of lines
-}
-
-class VkDynamicColorBlendStateCreateInfo {
- VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO
- const void* pNext /// Pointer to next structure
- f32[4] blendConst
-}
-
-class VkDynamicDepthStencilStateCreateInfo {
- VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO
- const void* pNext /// Pointer to next structure
- f32 minDepthBounds /// optional (depth_bounds_test)
- f32 maxDepthBounds /// optional (depth_bounds_test)
- u32 stencilReadMask
- u32 stencilWriteMask
- u32 stencilFrontRef
- u32 stencilBackRef
+ VkBool32 unnormalizedCoordinates
}
class VkCmdPoolCreateInfo {
@@ -1613,6 +1607,7 @@
const void* pNext /// Pointer to next structure
VkCmdBufferOptimizeFlags flags /// Command buffer optimization flags
VkRenderPass renderPass /// Render pass for secondary command buffers
+ u32 subpass
VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
}
@@ -1622,16 +1617,16 @@
VkRenderPass renderPass
VkFramebuffer framebuffer
VkRect2D renderArea
- u32 attachmentCount
- const VkClearValue* pAttachmentClearValues
+ u32 clearValueCount
+ const VkClearValue* pClearValues
}
@union
/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
class VkClearColorValue {
- f32[4] f32
- s32[4] s32
- u32[4] u32
+ f32[4] float32
+ s32[4] int32
+ u32[4] uint32
}
class VkClearDepthStencilValue {
@@ -1643,7 +1638,7 @@
/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
class VkClearValue {
VkClearColorValue color
- VkClearDepthStencilValue ds
+ VkClearDepthStencilValue depthStencil
}
class VkAttachmentDescription {
@@ -1657,6 +1652,7 @@
VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
VkImageLayout initialLayout
VkImageLayout finalLayout
+ VkAttachmentDescriptionFlags flags
}
class VkAttachmentReference {
@@ -1670,13 +1666,13 @@
VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
VkSubpassDescriptionFlags flags
u32 inputCount
- const VkAttachmentReference* inputAttachments
+ const VkAttachmentReference* pInputAttachments
u32 colorCount
- const VkAttachmentReference* colorAttachments
- const VkAttachmentReference* resolveAttachments
+ const VkAttachmentReference* pColorAttachments
+ const VkAttachmentReference* pResolveAttachments
VkAttachmentReference depthStencilAttachment
u32 preserveCount
- const VkAttachmentReference* preserveAttachments
+ const VkAttachmentReference* pPreserveAttachments
}
class VkSubpassDependency {
@@ -1688,7 +1684,7 @@
VkPipelineStageFlags destStageMask
VkMemoryOutputFlags outputMask
VkMemoryInputFlags inputMask
- platform.VkBool32 byRegion
+ VkBool32 byRegion
}
class VkRenderPassCreateInfo {
@@ -1715,64 +1711,57 @@
}
class VkPhysicalDeviceFeatures {
- platform.VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
- platform.VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
- platform.VkBool32 imageCubeArray /// image views which are arrays of cube maps
- platform.VkBool32 independentBlend /// blending operations are controlled per-attachment
- platform.VkBool32 geometryShader /// geometry stage
- platform.VkBool32 tessellationShader /// tessellation control and evaluation stage
- platform.VkBool32 sampleRateShading /// per-sample shading and interpolation
- platform.VkBool32 dualSourceBlend /// blend operations which take two sources
- platform.VkBool32 logicOp /// logic operations
- platform.VkBool32 instancedDrawIndirect /// multi draw indirect
- platform.VkBool32 depthClip /// depth clipping
- platform.VkBool32 depthBiasClamp /// depth bias clamping
- platform.VkBool32 fillModeNonSolid /// point and wireframe fill modes
- platform.VkBool32 depthBounds /// depth bounds test
- platform.VkBool32 wideLines /// lines with width greater than 1
- platform.VkBool32 largePoints /// points with size greater than 1
- platform.VkBool32 textureCompressionETC2 /// ETC texture compression formats
- platform.VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
- platform.VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
- platform.VkBool32 pipelineStatisticsQuery /// pipeline statistics query
- platform.VkBool32 vertexSideEffects /// storage buffers and images in vertex stage
- platform.VkBool32 tessellationSideEffects /// storage buffers and images in tessellation stage
- platform.VkBool32 geometrySideEffects /// storage buffers and images in geometry stage
- platform.VkBool32 fragmentSideEffects /// storage buffers and images in fragment stage
- platform.VkBool32 shaderTessellationPointSize /// tessellation stage can export point size
- platform.VkBool32 shaderGeometryPointSize /// geometry stage can export point size
- platform.VkBool32 shaderTextureGatherExtended /// texture gather with run-time values and independent offsets
- platform.VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
- platform.VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
- platform.VkBool32 shaderStorageBufferArrayConstantIndexing /// arrays of storage buffers can be accessed with constant indices
- platform.VkBool32 shaderStorageImageArrayConstantIndexing /// arrays of storage images can be accessed with constant indices
- platform.VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
- platform.VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
- platform.VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
- platform.VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
- platform.VkBool32 shaderClipDistance /// clip distance in shaders
- platform.VkBool32 shaderCullDistance /// cull distance in shaders
- platform.VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
- platform.VkBool32 shaderInt64 /// 64-bit integers in shaders
- platform.VkBool32 shaderFloat16 /// 16-bit floats in shaders
- platform.VkBool32 shaderInt16 /// 16-bit integers in shaders
- platform.VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
- platform.VkBool32 shaderResourceMinLOD /// shader can use texture operations that specify minimum resource LOD
- platform.VkBool32 sparse /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
- platform.VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
- platform.VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
- platform.VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
- platform.VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
- platform.VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
- platform.VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
- platform.VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
- platform.VkBool32 sparseResidencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format)
- platform.VkBool32 sparseResidencyStandard2DMSBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format)
- platform.VkBool32 sparseResidencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
- platform.VkBool32 sparseResidencyAlignedMipSize /// Sparse resources support: Images with mip-level dimensions that are NOT a multiple of the block size will be placed in the mip tail
- platform.VkBool32 sparseResidencyNonResident /// Sparse resources support: GPU can safely access non-resident regions of a resource, read values from read-write resources are undefined
- platform.VkBool32 sparseResidencyNonResidentStrict /// Sparse resources support: GPU can safely access non-resident regions of a resource, all reads return as if data is 0, writes are discarded
- platform.VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
+ VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
+ VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
+ VkBool32 imageCubeArray /// image views which are arrays of cube maps
+ VkBool32 independentBlend /// blending operations are controlled per-attachment
+ VkBool32 geometryShader /// geometry stage
+ VkBool32 tessellationShader /// tessellation control and evaluation stage
+ VkBool32 sampleRateShading /// per-sample shading and interpolation
+ VkBool32 dualSourceBlend /// blend operations which take two sources
+ VkBool32 logicOp /// logic operations
+ VkBool32 multiDrawIndirect /// multi draw indirect
+ VkBool32 depthClip /// depth clipping
+ VkBool32 depthBiasClamp /// depth bias clamping
+ VkBool32 fillModeNonSolid /// point and wireframe fill modes
+ VkBool32 depthBounds /// depth bounds test
+ VkBool32 wideLines /// lines with width greater than 1
+ VkBool32 largePoints /// points with size greater than 1
+ VkBool32 textureCompressionETC2 /// ETC texture compression formats
+ VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
+ VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
+ VkBool32 occlusionQueryNonConservative /// non-conservative (exact) occlusion queries
+ VkBool32 pipelineStatisticsQuery /// pipeline statistics query
+ VkBool32 vertexSideEffects /// storage buffers and images in vertex stage
+ VkBool32 tessellationSideEffects /// storage buffers and images in tessellation stage
+ VkBool32 geometrySideEffects /// storage buffers and images in geometry stage
+ VkBool32 fragmentSideEffects /// storage buffers and images in fragment stage
+ VkBool32 shaderTessellationPointSize /// tessellation stage can export point size
+ VkBool32 shaderGeometryPointSize /// geometry stage can export point size
+ VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
+ VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
+ VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
+ VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
+ VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
+ VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
+ VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
+ VkBool32 shaderClipDistance /// clip distance in shaders
+ VkBool32 shaderCullDistance /// cull distance in shaders
+ VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
+ VkBool32 shaderInt64 /// 64-bit integers in shaders
+ VkBool32 shaderInt16 /// 16-bit integers in shaders
+ VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
+ VkBool32 shaderResourceMinLOD /// shader can use texture operations that specify minimum resource LOD
+ VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
+ VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
+ VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
+ VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
+ VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
+ VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
+ VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
+ VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
+ VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
+ VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
}
class VkPhysicalDeviceLimits {
@@ -1782,13 +1771,15 @@
u32 maxImageDimension3D /// max 3D image dimension
u32 maxImageDimensionCube /// max cubemap image dimension
u32 maxImageArrayLayers /// max layers for image arrays
+ VkSampleCountFlags sampleCounts /// sample counts supported for all images supporting rendering and sampling
u32 maxTexelBufferSize /// max texel buffer size (bytes)
u32 maxUniformBufferSize /// max uniform buffer size (bytes)
u32 maxStorageBufferSize /// max storage buffer size (bytes)
u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
/// memory limits
u32 maxMemoryAllocationCount /// max number of device memory allocations supported
- platform.VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
+ VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
+ VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
/// descriptor set limits
u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
u32 maxDescriptorSets /// max number of allocated descriptor sets
@@ -1799,11 +1790,14 @@
u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
+ u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
+ u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
/// vertex stage limits
u32 maxVertexInputAttributes /// max num of vertex input attribute slots
+ u32 maxVertexInputBindings /// max num of vertex input binding slots
u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
u32 maxVertexInputBindingStride /// max vertex input binding stride
u32 maxVertexOutputComponents /// max num of output components written by vertex shader
@@ -1839,13 +1833,12 @@
u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
u32 maxDrawIndirectInstanceCount /// max instance count for indirect draw calls
- platform.VkBool32 primitiveRestartForPatches /// is primitive restart supported for PATCHES
+ VkBool32 primitiveRestartForPatches /// is primitive restart supported for PATCHES
f32 maxSamplerLodBias /// max absolute sampler level of detail bias
f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
u32 maxViewports /// max number of active viewports
- u32 maxDynamicViewportStates /// max number of dynamic viewport state objects
u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
f32[2] viewportBoundsRange /// viewport bounds range (min,max)
u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
@@ -1883,12 +1876,21 @@
u32 maxCullDistances /// max number of cull distances
u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
- f32[2] pointSizeRange /// range (min,max) of supported point sizes
- f32[2] lineWidthRange /// range (min,max) of supported line widths
+ f32[2] pointSizeRange /// range (min,max) of supported point sizes
+ f32[2] lineWidthRange /// range (min,max) of supported line widths
f32 pointSizeGranularity /// granularity of supported point sizes
f32 lineWidthGranularity /// granularity of supported line widths
}
+class VkPhysicalDeviceSparseProperties {
+ VkBool32 residencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format)
+ VkBool32 residencyStandard2DMSBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format)
+ VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
+ VkBool32 residencyAlignedMipSize /// Sparse resources support: Images with mip-level dimensions that are NOT a multiple of the block size will be placed in the mip tail
+ VkBool32 residencyNonResident /// Sparse resources support: GPU can safely access non-resident regions of a resource, read values from read-write resources are undefined
+ VkBool32 residencyNonResidentStrict /// Sparse resources support: GPU can safely access non-resident regions of a resource, all reads return as if data is 0, writes are discarded
+}
+
class VkSemaphoreCreateInfo {
VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
const void* pNext /// Pointer to next structure
@@ -1908,7 +1910,7 @@
const void* pNext /// Pointer to next structure
VkRenderPass renderPass
u32 attachmentCount
- const VkAttachmentBindInfo* pAttachments
+ const VkImageView* pAttachments
u32 width
u32 height
u32 layers
@@ -1981,13 +1983,11 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyInstance(
+cmd void vkDestroyInstance(
VkInstance instance) {
instanceObject := GetInstance(instance)
State.Instances[instance] = null
-
- return ?
}
@threadSafety("system")
@@ -2015,7 +2015,7 @@
cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
VkDevice device,
const char* pName) {
- if device != VK_NULL_HANDLE {
+ if device != NULL_HANDLE {
device := GetDevice(device)
}
@@ -2025,7 +2025,7 @@
cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
VkInstance instance,
const char* pName) {
- if instance != VK_NULL_HANDLE {
+ if instance != NULL_HANDLE {
instanceObject := GetInstance(instance)
}
@@ -2043,27 +2043,25 @@
return ?
}
-cmd VkResult vkGetPhysicalDeviceQueueCount(
+cmd VkResult vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
- u32* pCount) {
+ u32* pCount,
+ VkQueueFamilyProperties* pQueueFamilyProperties) {
physicalDeviceObject := GetPhysicalDevice(physicalDevice)
-
- count := ?
- pCount[0] = count
-
- return ?
-}
-
-cmd VkResult vkGetPhysicalDeviceQueueProperties(
- VkPhysicalDevice physicalDevice,
- u32 count,
- VkPhysicalDeviceQueueProperties* pQueueProperties) {
- physicalDeviceObject := GetPhysicalDevice(physicalDevice)
- queuesProperties := pQueueProperties[0:count]
- for i in (0 .. count) {
- queueProperties := as!VkPhysicalDeviceQueueProperties(?)
- queuesProperties[i] = queueProperties
- }
+ // TODO: Figure out how to express fetch-count-or-properties
+ // This version fails 'apic validate' with 'fence not allowed in
+ // *semantic.Branch'. Other attempts have failed with the same or other
+ // errors.
+ // if pQueueFamilyProperties != null {
+ // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
+ // for i in (0 .. pCount[0]) {
+ // queueProperties := as!VkQueueFamilyProperties(?)
+ // queuesProperties[i] = queueProperties
+ // }
+ // } else {
+ // count := ?
+ // pCount[0] = count
+ // }
return ?
}
@@ -2107,6 +2105,7 @@
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
VkImageFormatProperties* pImageFormatProperties) {
physicalDeviceObject := GetPhysicalDevice(physicalDevice)
@@ -2116,17 +2115,6 @@
return ?
}
-cmd VkResult vkGetPhysicalDeviceLimits(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceLimits* pLimits) {
- physicalDeviceObject := GetPhysicalDevice(physicalDevice)
-
- limits := ?
- pLimits[0] = limits
-
- return ?
-}
-
// Device functions
@@ -2146,19 +2134,17 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyDevice(
+cmd void vkDestroyDevice(
VkDevice device) {
deviceObject := GetDevice(device)
State.Devices[device] = null
-
- return ?
}
// Extension discovery functions
-cmd VkResult vkGetGlobalLayerProperties(
+cmd VkResult vkEnumerateInstanceLayerProperties(
u32* pCount,
VkLayerProperties* pProperties) {
count := as!u32(?)
@@ -2173,7 +2159,7 @@
return ?
}
-cmd VkResult vkGetGlobalExtensionProperties(
+cmd VkResult vkEnumerateInstanceExtensionProperties(
const char* pLayerName,
u32* pCount,
VkExtensionProperties* pProperties) {
@@ -2189,7 +2175,7 @@
return ?
}
-cmd VkResult vkGetPhysicalDeviceLayerProperties(
+cmd VkResult vkEnumerateDeviceLayerProperties(
VkPhysicalDevice physicalDevice,
u32* pCount,
VkLayerProperties* pProperties) {
@@ -2206,7 +2192,7 @@
return ?
}
-cmd VkResult vkGetPhysicalDeviceExtensionProperties(
+cmd VkResult vkEnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
u32* pCount,
@@ -2254,7 +2240,7 @@
VkFence fence) {
queueObject := GetQueue(queue)
- if fence != VK_NULL_HANDLE {
+ if fence != NULL_HANDLE {
fenceObject := GetFence(fence)
assert(fenceObject.device == queueObject.device)
}
@@ -2309,7 +2295,7 @@
}
@threadSafety("system")
-cmd VkResult vkFreeMemory(
+cmd void vkFreeMemory(
VkDevice device,
VkDeviceMemory mem) {
deviceObject := GetDevice(device)
@@ -2322,16 +2308,14 @@
validate("MemoryCheck", len(memObject.boundCommandBuffers) == 0,
"vkFreeMemory: cmdBuffers still bound")
State.DeviceMemories[mem] = null
-
- return ?
}
@threadSafety("app")
cmd VkResult vkMapMemory(
VkDevice device,
VkDeviceMemory mem,
- platform.VkDeviceSize offset,
- platform.VkDeviceSize size,
+ VkDeviceSize offset,
+ VkDeviceSize size,
VkMemoryMapFlags flags,
void** ppData) {
deviceObject := GetDevice(device)
@@ -2345,14 +2329,12 @@
}
@threadSafety("app")
-cmd VkResult vkUnmapMemory(
+cmd void vkUnmapMemory(
VkDevice device,
VkDeviceMemory mem) {
deviceObject := GetDevice(device)
memObject := GetDeviceMemory(mem)
assert(memObject.device == device)
-
- return ?
}
cmd VkResult vkFlushMappedMemoryRanges(
@@ -2395,10 +2377,10 @@
cmd VkResult vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
- platform.VkDeviceSize* pCommittedMemoryInBytes) {
+ VkDeviceSize* pCommittedMemoryInBytes) {
deviceObject := GetDevice(device)
- if memory != VK_NULL_HANDLE {
+ if memory != NULL_HANDLE {
memoryObject := GetDeviceMemory(memory)
assert(memoryObject.device == device)
}
@@ -2424,19 +2406,19 @@
VkDevice device,
VkBuffer buffer,
VkDeviceMemory mem,
- platform.VkDeviceSize memOffset) {
+ VkDeviceSize memOffset) {
deviceObject := GetDevice(device)
bufferObject := GetBuffer(buffer)
assert(bufferObject.device == device)
// Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
- if bufferObject.mem != VK_NULL_HANDLE {
+ if bufferObject.mem != NULL_HANDLE {
memObject := GetDeviceMemory(bufferObject.mem)
memObject.boundObjects[as!u64(buffer)] = null
}
// Bind buffer to given memory object, if not VK_NULL_HANDLE.
- if mem != VK_NULL_HANDLE {
+ if mem != NULL_HANDLE {
memObject := GetDeviceMemory(mem)
assert(memObject.device == device)
memObject.boundObjects[as!u64(buffer)] = memOffset
@@ -2462,19 +2444,19 @@
VkDevice device,
VkImage image,
VkDeviceMemory mem,
- platform.VkDeviceSize memOffset) {
+ VkDeviceSize memOffset) {
deviceObject := GetDevice(device)
imageObject := GetImage(image)
assert(imageObject.device == device)
// Unbind image from previous memory object, if not VK_NULL_HANDLE.
- if imageObject.mem != VK_NULL_HANDLE {
+ if imageObject.mem != NULL_HANDLE {
memObject := GetDeviceMemory(imageObject.mem)
memObject.boundObjects[as!u64(image)] = null
}
// Bind image to given memory object, if not VK_NULL_HANDLE.
- if mem != VK_NULL_HANDLE {
+ if mem != NULL_HANDLE {
memObject := GetDeviceMemory(mem)
assert(memObject.device == device)
memObject.boundObjects[as!u64(image)] = memOffset
@@ -2567,7 +2549,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyFence(
+cmd void vkDestroyFence(
VkDevice device,
VkFence fence) {
deviceObject := GetDevice(device)
@@ -2575,8 +2557,6 @@
assert(fenceObject.device == device)
State.Fences[fence] = null
-
- return ?
}
@threadSafety("system")
@@ -2613,7 +2593,7 @@
VkDevice device,
u32 fenceCount,
const VkFence* pFences,
- platform.VkBool32 waitAll,
+ VkBool32 waitAll,
u64 timeout) { /// timeout in nanoseconds
deviceObject := GetDevice(device)
@@ -2646,7 +2626,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroySemaphore(
+cmd void vkDestroySemaphore(
VkDevice device,
VkSemaphore semaphore) {
deviceObject := GetDevice(device)
@@ -2654,8 +2634,6 @@
assert(semaphoreObject.device == device)
State.Semaphores[semaphore] = null
-
- return ?
}
@threadSafety("app")
@@ -2699,7 +2677,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyEvent(
+cmd void vkDestroyEvent(
VkDevice device,
VkEvent event) {
deviceObject := GetDevice(device)
@@ -2707,8 +2685,6 @@
assert(eventObject.device == device)
State.Events[event] = null
-
- return ?
}
@threadSafety("system")
@@ -2763,7 +2739,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyQueryPool(
+cmd void vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool) {
deviceObject := GetDevice(device)
@@ -2771,8 +2747,6 @@
assert(queryPoolObject.device == device)
State.QueryPools[queryPool] = null
-
- return ?
}
@threadSafety("system")
@@ -2813,7 +2787,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyBuffer(
+cmd void vkDestroyBuffer(
VkDevice device,
VkBuffer buffer) {
deviceObject := GetDevice(device)
@@ -2822,8 +2796,6 @@
assert(bufferObject.mem == 0)
State.Buffers[buffer] = null
-
- return ?
}
@@ -2848,7 +2820,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyBufferView(
+cmd void vkDestroyBufferView(
VkDevice device,
VkBufferView bufferView) {
deviceObject := GetDevice(device)
@@ -2856,8 +2828,6 @@
assert(bufferViewObject.device == device)
State.BufferViews[bufferView] = null
-
- return ?
}
@@ -2879,7 +2849,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyImage(
+cmd void vkDestroyImage(
VkDevice device,
VkImage image) {
deviceObject := GetDevice(device)
@@ -2888,8 +2858,6 @@
assert(imageObject.mem == 0)
State.Images[image] = null
-
- return ?
}
cmd VkResult vkGetImageSubresourceLayout(
@@ -2926,7 +2894,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyImageView(
+cmd void vkDestroyImageView(
VkDevice device,
VkImageView imageView) {
deviceObject := GetDevice(device)
@@ -2934,39 +2902,6 @@
assert(imageViewObject.device == device)
State.ImageViews[imageView] = null
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkCreateAttachmentView(
- VkDevice device,
- const VkAttachmentViewCreateInfo* pCreateInfo,
- VkAttachmentView* pView) {
- assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO)
- deviceObject := GetDevice(device)
-
- imageObject := GetImage(pCreateInfo.image)
- assert(imageObject.device == device)
-
- view := ?
- pView[0] = view
- State.AttachmentViews[view] = new!AttachmentViewObject(device: device, image: pCreateInfo.image)
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkDestroyAttachmentView(
- VkDevice device,
- VkAttachmentView attachmentView) {
- deviceObject := GetDevice(device)
- attachmentViewObject := GetAttachmentView(attachmentView)
- assert(attachmentViewObject.device == device)
-
- State.AttachmentViews[attachmentView] = null
-
- return ?
}
@@ -2986,7 +2921,7 @@
return ?
}
-cmd VkResult vkDestroyShaderModule(
+cmd void vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule) {
deviceObject := GetDevice(device)
@@ -2994,8 +2929,6 @@
assert(shaderModuleObject.device == device)
State.ShaderModules[shaderModule] = null
-
- return ?
}
@threadSafety("system")
@@ -3014,7 +2947,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyShader(
+cmd void vkDestroyShader(
VkDevice device,
VkShader shader) {
deviceObject := GetDevice(device)
@@ -3022,8 +2955,6 @@
assert(shaderObject.device == device)
State.Shaders[shader] = null
-
- return ?
}
@@ -3043,7 +2974,7 @@
return ?
}
-cmd VkResult vkDestroyPipelineCache(
+cmd void vkDestroyPipelineCache(
VkDevice device,
VkPipelineCache pipelineCache) {
deviceObject := GetDevice(device)
@@ -3051,8 +2982,6 @@
assert(pipelineCacheObject.device == device)
State.PipelineCaches[pipelineCache] = null
-
- return ?
}
cmd platform.size_t vkGetPipelineCacheSize(
@@ -3102,7 +3031,7 @@
const VkGraphicsPipelineCreateInfo* pCreateInfos,
VkPipeline* pPipelines) {
deviceObject := GetDevice(device)
- if pipelineCache != VK_NULL_HANDLE {
+ if pipelineCache != NULL_HANDLE {
pipelineCacheObject := GetPipelineCache(pipelineCache)
assert(pipelineCacheObject.device == device)
}
@@ -3125,7 +3054,7 @@
const VkComputePipelineCreateInfo* pCreateInfos,
VkPipeline* pPipelines) {
deviceObject := GetDevice(device)
- if pipelineCache != VK_NULL_HANDLE {
+ if pipelineCache != NULL_HANDLE {
pipelineCacheObject := GetPipelineCache(pipelineCache)
assert(pipelineCacheObject.device == device)
}
@@ -3142,7 +3071,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyPipeline(
+cmd void vkDestroyPipeline(
VkDevice device,
VkPipeline pipeline) {
deviceObject := GetDevice(device)
@@ -3150,8 +3079,6 @@
assert(pipelineObjects.device == device)
State.Pipelines[pipeline] = null
-
- return ?
}
@@ -3173,7 +3100,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyPipelineLayout(
+cmd void vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout) {
deviceObject := GetDevice(device)
@@ -3181,8 +3108,6 @@
assert(pipelineLayoutObjects.device == device)
State.PipelineLayouts[pipelineLayout] = null
-
- return ?
}
@@ -3204,7 +3129,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroySampler(
+cmd void vkDestroySampler(
VkDevice device,
VkSampler sampler) {
deviceObject := GetDevice(device)
@@ -3212,8 +3137,6 @@
assert(samplerObject.device == device)
State.Samplers[sampler] = null
-
- return ?
}
@@ -3235,7 +3158,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyDescriptorSetLayout(
+cmd void vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout) {
deviceObject := GetDevice(device)
@@ -3243,16 +3166,12 @@
assert(descriptorSetLayoutObject.device == device)
State.DescriptorSetLayouts[descriptorSetLayout] = null
-
- return ?
}
@threadSafety("system")
cmd VkResult vkCreateDescriptorPool(
VkDevice device,
- VkDescriptorPoolUsage poolUsage,
- u32 maxSets,
- const VkDescriptorPoolCreateInfo* pCreateInfo,
+ const VkDescriptorPoolCreateInfo* pCreateInfo
VkDescriptorPool* pDescriptorPool) {
assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
deviceObject := GetDevice(device)
@@ -3265,7 +3184,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyDescriptorPool(
+cmd void vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool) {
deviceObject := GetDevice(device)
@@ -3273,8 +3192,6 @@
assert(descriptorPoolObject.device == device)
State.DescriptorPools[descriptorPool] = null
-
- return ?
}
@threadSafety("app")
@@ -3295,8 +3212,7 @@
VkDescriptorSetUsage setUsage,
u32 count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- u32* pCount) {
+ VkDescriptorSet* pDescriptorSets) {
deviceObject := GetDevice(device)
descriptorPoolObject := GetDescriptorPool(descriptorPool)
@@ -3307,10 +3223,8 @@
assert(setLayoutObject.device == device)
}
- setsCount := as!u32(?)
- pCount[0] = setsCount
- descriptorSets := pDescriptorSets[0:setsCount]
- for i in (0 .. setsCount) {
+ descriptorSets := pDescriptorSets[0:count]
+ for i in (0 .. count) {
descriptorSet := ?
descriptorSets[i] = descriptorSet
State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
@@ -3338,7 +3252,7 @@
return ?
}
-cmd VkResult vkUpdateDescriptorSets(
+cmd void vkUpdateDescriptorSets(
VkDevice device,
u32 writeCount,
const VkWriteDescriptorSet* pDescriptorWrites,
@@ -3359,123 +3273,6 @@
descriptorCopyObject := GetDescriptorSet(descriptorCopy.destSet)
assert(descriptorCopyObject.device == device)
}
-
- return ?
-}
-
-
-// State object functions
-
-@threadSafety("system")
-cmd VkResult vkCreateDynamicViewportState(
- VkDevice device,
- const VkDynamicViewportStateCreateInfo* pCreateInfo,
- VkDynamicViewportState* pState) {
- assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO)
- deviceObject := GetDevice(device)
-
- state := ?
- pState[0] = state
- State.DynamicViewportStates[state] = new!DynamicViewportStateObject(device: device)
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkDestroyDynamicViewportState(
- VkDevice device,
- VkDynamicViewportState dynamicViewportState) {
- deviceObject := GetDevice(device)
- dynamicViewportStateObject := GetDynamicViewportState(dynamicViewportState)
- assert(dynamicViewportStateObject.device == device)
-
- State.DynamicViewportStates[dynamicViewportState] = null
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkCreateDynamicRasterState(
- VkDevice device,
- const VkDynamicRasterStateCreateInfo* pCreateInfo,
- VkDynamicRasterState* pState) {
- assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO)
- deviceObject := GetDevice(device)
-
- state := ?
- pState[0] = state
- State.DynamicRasterStates[state] = new!DynamicRasterStateObject(device: device)
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkDestroyDynamicRasterState(
- VkDevice device,
- VkDynamicRasterState dynamicRasterState) {
- deviceObject := GetDevice(device)
- dynamicRasterStateObject := GetDynamicRasterState(dynamicRasterState)
- assert(dynamicRasterStateObject.device == device)
-
- State.DynamicRasterStates[dynamicRasterState] = null
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkCreateDynamicColorBlendState(
- VkDevice device,
- const VkDynamicColorBlendStateCreateInfo* pCreateInfo,
- VkDynamicColorBlendState* pState) {
- assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO)
- deviceObject := GetDevice(device)
-
- state := ?
- pState[0] = state
- State.DynamicColorBlendStates[state] = new!DynamicColorBlendStateObject(device: device)
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkDestroyDynamicColorBlendState(
- VkDevice device,
- VkDynamicColorBlendState dynamicColorBlendState) {
- deviceObject := GetDevice(device)
- dynamicColorBlendStateObject := GetDynamicColorBlendState(dynamicColorBlendState)
- assert(dynamicColorBlendStateObject.device == device)
-
- State.DynamicColorBlendStates[dynamicColorBlendState] = null
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkCreateDynamicDepthStencilState(
- VkDevice device,
- const VkDynamicDepthStencilStateCreateInfo* pCreateInfo,
- VkDynamicDepthStencilState* pState) {
- assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO)
- deviceObject := GetDevice(device)
-
- state := ?
- pState[0] = state
- State.DynamicDepthStencilStates[state] = new!DynamicDepthStencilStateObject(device: device)
-
- return ?
-}
-
-@threadSafety("system")
-cmd VkResult vkDestroyDynamicDepthStencilState(
- VkDevice device,
- VkDynamicDepthStencilState dynamicDepthStencilState) {
- deviceObject := GetDevice(device)
- dynamicDepthStencilStateObject := GetDynamicDepthStencilState(dynamicDepthStencilState)
- assert(dynamicDepthStencilStateObject.device == device)
-
- State.DynamicDepthStencilStates[dynamicDepthStencilState] = null
-
- return ?
}
@@ -3497,7 +3294,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyFramebuffer(
+cmd void vkDestroyFramebuffer(
VkDevice device,
VkFramebuffer framebuffer) {
deviceObject := GetDevice(device)
@@ -3505,8 +3302,6 @@
assert(framebufferObject.device == device)
State.Framebuffers[framebuffer] = null
-
- return ?
}
@@ -3528,7 +3323,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyRenderPass(
+cmd void vkDestroyRenderPass(
VkDevice device,
VkRenderPass renderPass) {
deviceObject := GetDevice(device)
@@ -3536,8 +3331,6 @@
assert(renderPassObject.device == device)
State.RenderPasses[renderPass] = null
-
- return ?
}
cmd VkResult vkGetRenderAreaGranularity(
@@ -3569,7 +3362,7 @@
return ?
}
-cmd VkResult vkDestroyCommandPool(
+cmd void vkDestroyCommandPool(
VkDevice device,
VkCmdPool cmdPool) {
deviceObject := GetDevice(device)
@@ -3577,8 +3370,6 @@
assert(cmdPoolObject.device == device)
State.CmdPools[cmdPool] = null
-
- return ?
}
cmd VkResult vkResetCommandPool(
@@ -3625,7 +3416,7 @@
}
@threadSafety("system")
-cmd VkResult vkDestroyCommandBuffer(
+cmd void vkDestroyCommandBuffer(
VkDevice device,
VkCmdBuffer commandBuffer) {
deviceObject := GetDevice(device)
@@ -3634,8 +3425,6 @@
// TODO: iterate over boundObjects and clear memory bindings
State.CmdBuffers[commandBuffer] = null
-
- return ?
}
@threadSafety("app")
@@ -3689,49 +3478,93 @@
}
@threadSafety("app")
-cmd void vkCmdBindDynamicViewportState(
+cmd void vkCmdSetViewport(
VkCmdBuffer cmdBuffer,
- VkDynamicViewportState dynamicViewportState) {
+ u32 viewportCount,
+ const VkViewport* pViewports) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
- dynamicViewportStateObject := GetDynamicViewportState(dynamicViewportState)
- assert(cmdBufferObject.device == dynamicViewportStateObject.device)
-
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
cmdBufferObject.queueFlags = queueFlags
}
@threadSafety("app")
-cmd void vkCmdBindDynamicRasterState(
+cmd void vkCmdSetScissor(
VkCmdBuffer cmdBuffer,
- VkDynamicRasterState dynamicRasterState) {
+ u32 scissorCount,
+ const VkRect2D* pScissors) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
- dynamicRasterStateObject := GetDynamicRasterState(dynamicRasterState)
- assert(cmdBufferObject.device == dynamicRasterStateObject.device)
-
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
cmdBufferObject.queueFlags = queueFlags
}
@threadSafety("app")
-cmd void vkCmdBindDynamicColorBlendState(
+cmd void vkCmdSetLineWidth(
VkCmdBuffer cmdBuffer,
- VkDynamicColorBlendState dynamicColorBlendState) {
+ f32 lineWidth) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
- dynamicColorBlendStateObject := GetDynamicColorBlendState(dynamicColorBlendState)
- assert(cmdBufferObject.device == dynamicColorBlendStateObject.device)
-
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
cmdBufferObject.queueFlags = queueFlags
}
@threadSafety("app")
-cmd void vkCmdBindDynamicDepthStencilState(
+cmd void vkCmdSetDepthBias(
VkCmdBuffer cmdBuffer,
- VkDynamicDepthStencilState dynamicDepthStencilState) {
+ f32 depthBias,
+ f32 depthBiasClamp,
+ f32 slopeScaledDepthBias) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
- dynamicDepthStencilStateObject := GetDynamicDepthStencilState(dynamicDepthStencilState)
- assert(cmdBufferObject.device == dynamicDepthStencilStateObject.device)
+ queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
+ cmdBufferObject.queueFlags = queueFlags
+}
+@threadSafety("app")
+cmd void vkCmdSetBlendConstants(
+ VkCmdBuffer cmdBuffer,
+ // TODO(jessehall): apic only supports 'const' on pointer types. Using
+ // an annotation as a quick hack to pass this to the template without
+ // having to modify the AST and semantic model.
+ @readonly f32[4] blendConst) {
+ cmdBufferObject := GetCmdBuffer(cmdBuffer)
+ queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
+ cmdBufferObject.queueFlags = queueFlags
+}
+
+@threadSafety("app")
+cmd void vkCmdSetDepthBounds(
+ VkCmdBuffer cmdBuffer,
+ f32 minDepthBounds,
+ f32 maxDepthBounds) {
+ cmdBufferObject := GetCmdBuffer(cmdBuffer)
+ queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
+ cmdBufferObject.queueFlags = queueFlags
+}
+
+@threadSafety("app")
+cmd void vkCmdSetStencilCompareMask(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ u32 stencilCompareMask) {
+ cmdBufferObject := GetCmdBuffer(cmdBuffer)
+ queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
+ cmdBufferObject.queueFlags = queueFlags
+}
+
+@threadSafety("app")
+cmd void vkCmdSetStencilWriteMask(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ u32 stencilWriteMask) {
+ cmdBufferObject := GetCmdBuffer(cmdBuffer)
+ queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
+ cmdBufferObject.queueFlags = queueFlags
+}
+
+@threadSafety("app")
+cmd void vkCmdSetStencilReference(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ u32 stencilReference) {
+ cmdBufferObject := GetCmdBuffer(cmdBuffer)
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
cmdBufferObject.queueFlags = queueFlags
}
@@ -3771,7 +3604,7 @@
cmd void vkCmdBindIndexBuffer(
VkCmdBuffer cmdBuffer,
VkBuffer buffer,
- platform.VkDeviceSize offset,
+ VkDeviceSize offset,
VkIndexType indexType) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
bufferObject := GetBuffer(buffer)
@@ -3789,7 +3622,7 @@
u32 startBinding,
u32 bindingCount,
const VkBuffer* pBuffers,
- const platform.VkDeviceSize* pOffsets) {
+ const VkDeviceSize* pOffsets) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
// TODO: check if not [startBinding:startBinding+bindingCount]
@@ -3811,10 +3644,10 @@
@threadSafety("app")
cmd void vkCmdDraw(
VkCmdBuffer cmdBuffer,
- u32 firstVertex,
u32 vertexCount,
- u32 firstInstance,
- u32 instanceCount) {
+ u32 instanceCount,
+ u32 firstVertex,
+ u32 firstInstance) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
@@ -3824,11 +3657,11 @@
@threadSafety("app")
cmd void vkCmdDrawIndexed(
VkCmdBuffer cmdBuffer,
- u32 firstIndex,
u32 indexCount,
+ u32 instanceCount,
+ u32 firstIndex,
s32 vertexOffset,
- u32 firstInstance,
- u32 instanceCount) {
+ u32 firstInstance) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT
@@ -3839,7 +3672,7 @@
cmd void vkCmdDrawIndirect(
VkCmdBuffer cmdBuffer,
VkBuffer buffer,
- platform.VkDeviceSize offset,
+ VkDeviceSize offset,
u32 count,
u32 stride) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
@@ -3856,7 +3689,7 @@
cmd void vkCmdDrawIndexedIndirect(
VkCmdBuffer cmdBuffer,
VkBuffer buffer,
- platform.VkDeviceSize offset,
+ VkDeviceSize offset,
u32 count,
u32 stride) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
@@ -3885,7 +3718,7 @@
cmd void vkCmdDispatchIndirect(
VkCmdBuffer cmdBuffer,
VkBuffer buffer,
- platform.VkDeviceSize offset) {
+ VkDeviceSize offset) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
bufferObject := GetBuffer(buffer)
assert(cmdBufferObject.device == bufferObject.device)
@@ -4032,8 +3865,8 @@
cmd void vkCmdUpdateBuffer(
VkCmdBuffer cmdBuffer,
VkBuffer destBuffer,
- platform.VkDeviceSize destOffset,
- platform.VkDeviceSize dataSize,
+ VkDeviceSize destOffset,
+ VkDeviceSize dataSize,
const u32* pData) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
destBufferObject := GetBuffer(destBuffer)
@@ -4051,8 +3884,8 @@
cmd void vkCmdFillBuffer(
VkCmdBuffer cmdBuffer,
VkBuffer destBuffer,
- platform.VkDeviceSize destOffset,
- platform.VkDeviceSize fillSize,
+ VkDeviceSize destOffset,
+ VkDeviceSize fillSize,
u32 data) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
destBufferObject := GetBuffer(destBuffer)
@@ -4090,8 +3923,7 @@
VkCmdBuffer cmdBuffer,
VkImage image,
VkImageLayout imageLayout,
- f32 depth,
- u32 stencil,
+ const VkClearDepthStencilValue* pDepthStencil,
u32 rangeCount,
const VkImageSubresourceRange* pRanges) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
@@ -4131,10 +3963,9 @@
@threadSafety("app")
cmd void vkCmdClearDepthStencilAttachment(
VkCmdBuffer cmdBuffer,
- VkImageAspectFlags imageAspectMask,
+ VkImageAspectFlags aspectMask,
VkImageLayout imageLayout,
- f32 depth,
- u32 stencil,
+ const VkClearDepthStencilValue* pDepthStencil,
u32 rectCount,
const VkRect3D* pRects) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
@@ -4238,7 +4069,7 @@
VkCmdBuffer cmdBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags destStageMask,
- platform.VkBool32 byRegion,
+ VkBool32 byRegion,
u32 memBarrierCount,
const void* const* ppMemBarriers) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
@@ -4300,7 +4131,7 @@
VkCmdBuffer cmdBuffer,
VkTimestampType timestampType,
VkBuffer destBuffer,
- platform.VkDeviceSize destOffset) {
+ VkDeviceSize destOffset) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
destBufferObject := GetBuffer(destBuffer)
assert(cmdBufferObject.device == destBufferObject.device)
@@ -4313,8 +4144,8 @@
u32 startQuery,
u32 queryCount,
VkBuffer destBuffer,
- platform.VkDeviceSize destOffset,
- platform.VkDeviceSize destStride,
+ VkDeviceSize destOffset,
+ VkDeviceSize destStride,
VkQueryResultFlags flags) {
cmdBufferObject := GetCmdBuffer(cmdBuffer)
queryPoolObject := GetQueryPool(queryPool)
@@ -4407,7 +4238,6 @@
map!(VkBufferView, ref!BufferViewObject) BufferViews
map!(VkImage, ref!ImageObject) Images
map!(VkImageView, ref!ImageViewObject) ImageViews
- map!(VkAttachmentView, ref!AttachmentViewObject) AttachmentViews
map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
map!(VkShader, ref!ShaderObject) Shaders
map!(VkPipeline, ref!PipelineObject) Pipelines
@@ -4416,10 +4246,6 @@
map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
- map!(VkDynamicViewportState, ref!DynamicViewportStateObject) DynamicViewportStates
- map!(VkDynamicRasterState, ref!DynamicRasterStateObject) DynamicRasterStates
- map!(VkDynamicColorBlendState, ref!DynamicColorBlendStateObject) DynamicColorBlendStates
- map!(VkDynamicDepthStencilState, ref!DynamicDepthStencilStateObject) DynamicDepthStencilStates
map!(VkFence, ref!FenceObject) Fences
map!(VkSemaphore, ref!SemaphoreObject) Semaphores
map!(VkEvent, ref!EventObject) Events
@@ -4454,15 +4280,15 @@
@internal class DeviceMemoryObject {
VkDevice device
- platform.VkDeviceSize allocationSize
- map!(u64, platform.VkDeviceSize) boundObjects
+ VkDeviceSize allocationSize
+ map!(u64, VkDeviceSize ) boundObjects
map!(VkCmdBuffer, VkCmdBuffer) boundCommandBuffers
}
@internal class BufferObject {
VkDevice device
VkDeviceMemory mem
- platform.VkDeviceSize memOffset
+ VkDeviceSize memOffset
}
@internal class BufferViewObject {
@@ -4473,7 +4299,7 @@
@internal class ImageObject {
VkDevice device
VkDeviceMemory mem
- platform.VkDeviceSize memOffset
+ VkDeviceSize memOffset
}
@internal class ImageViewObject {
@@ -4481,11 +4307,6 @@
VkImage image
}
-@internal class AttachmentViewObject {
- VkDevice device
- VkImage image
-}
-
@internal class ShaderObject {
VkDevice device
}
@@ -4518,22 +4339,6 @@
VkDevice device
}
-@internal class DynamicViewportStateObject {
- VkDevice device
-}
-
-@internal class DynamicRasterStateObject {
- VkDevice device
-}
-
-@internal class DynamicColorBlendStateObject {
- VkDevice device
-}
-
-@internal class DynamicDepthStencilStateObject {
- VkDevice device
-}
-
@internal class FenceObject {
VkDevice device
bool signaled
@@ -4617,11 +4422,6 @@
return State.ImageViews[imageView]
}
-macro ref!AttachmentViewObject GetAttachmentView(VkAttachmentView attachmentView) {
- assert(attachmentView in State.AttachmentViews)
- return State.AttachmentViews[attachmentView]
-}
-
macro ref!ShaderObject GetShader(VkShader shader) {
assert(shader in State.Shaders)
return State.Shaders[shader]
@@ -4662,26 +4462,6 @@
return State.DescriptorPools[descriptorPool]
}
-macro ref!DynamicViewportStateObject GetDynamicViewportState(VkDynamicViewportState dynamicViewportState) {
- assert(dynamicViewportState in State.DynamicViewportStates)
- return State.DynamicViewportStates[dynamicViewportState]
-}
-
-macro ref!DynamicRasterStateObject GetDynamicRasterState(VkDynamicRasterState dynamicRasterState) {
- assert(dynamicRasterState in State.DynamicRasterStates)
- return State.DynamicRasterStates[dynamicRasterState]
-}
-
-macro ref!DynamicColorBlendStateObject GetDynamicColorBlendState(VkDynamicColorBlendState dynamicColorBlendState) {
- assert(dynamicColorBlendState in State.DynamicColorBlendStates)
- return State.DynamicColorBlendStates[dynamicColorBlendState]
-}
-
-macro ref!DynamicDepthStencilStateObject GetDynamicDepthStencilState(VkDynamicDepthStencilState dynamicDepthStencilState) {
- assert(dynamicDepthStencilState in State.DynamicDepthStencilStates)
- return State.DynamicDepthStencilStates[dynamicDepthStencilState]
-}
-
macro ref!FenceObject GetFence(VkFence fence) {
assert(fence in State.Fences)
return State.Fences[fence]
diff --git a/vulkan/include/hardware/hwvulkan.h b/vulkan/include/hardware/hwvulkan.h
index 91dd41e..e973f46 100644
--- a/vulkan/include/hardware/hwvulkan.h
+++ b/vulkan/include/hardware/hwvulkan.h
@@ -61,7 +61,8 @@
typedef struct hwvulkan_device_t {
struct hw_device_t common;
- PFN_vkGetGlobalExtensionProperties GetGlobalExtensionProperties;
+ PFN_vkEnumerateInstanceExtensionProperties
+ EnumerateInstanceExtensionProperties;
PFN_vkCreateInstance CreateInstance;
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
} hwvulkan_device_t;
diff --git a/vulkan/include/vulkan/vk_platform.h b/vulkan/include/vulkan/vk_platform.h
index 7ba8d77..969e532 100644
--- a/vulkan/include/vulkan/vk_platform.h
+++ b/vulkan/include/vulkan/vk_platform.h
@@ -67,22 +67,6 @@
#endif
#endif // !defined(VK_NO_STDINT_H)
-typedef uint64_t VkDeviceSize;
-typedef uint32_t VkBool32;
-
-typedef uint32_t VkSampleMask;
-typedef uint32_t VkFlags;
-
-#if (UINTPTR_MAX >= UINT64_MAX)
- #define VK_UINTPTRLEAST64_MAX UINTPTR_MAX
-
- typedef uintptr_t VkUintPtrLeast64;
-#else
- #define VK_UINTPTRLEAST64_MAX UINT64_MAX
-
- typedef uint64_t VkUintPtrLeast64;
-#endif
-
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
diff --git a/vulkan/include/vulkan/vulkan.h b/vulkan/include/vulkan/vulkan.h
index 9877233..03bcefe 100644
--- a/vulkan/include/vulkan/vulkan.h
+++ b/vulkan/include/vulkan/vulkan.h
@@ -41,14 +41,21 @@
((major << 22) | (minor << 12) | patch)
// Vulkan API version supported by this file
-#define VK_API_VERSION VK_MAKE_VERSION(0, 138, 2)
+#define VK_API_VERSION VK_MAKE_VERSION(0, 170, 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;
#if defined(__cplusplus)
- #if (_MSC_VER >= 1800 || __cplusplus >= 201103L)
+ #if ((defined(_MSC_VER) && _MSC_VER >= 1800) || __cplusplus >= 201103L)
// The bool operator only works if there are no implicit conversions from an obj to
// a bool-compatible type, which can then be used to unintentionally violate type safety.
// C++11 and above supports the "explicit" keyword on conversion operators to stop this
@@ -56,13 +63,18 @@
// the object handle as a bool in expressions like:
// if (obj) vkDestroy(obj);
#define VK_NONDISP_HANDLE_OPERATOR_BOOL() explicit operator bool() const { return handle != 0; }
+ #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ explicit obj(uint64_t x) : handle(x) { } \
+ obj(decltype(nullptr)) : handle(0) { }
#else
#define VK_NONDISP_HANDLE_OPERATOR_BOOL()
+ #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+ obj(uint64_t x) : handle(x) { }
#endif
#define VK_DEFINE_NONDISP_HANDLE(obj) \
struct obj { \
obj() : handle(0) { } \
- obj(uint64_t x) : handle(x) { } \
+ VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
obj& operator =(uint64_t x) { handle = x; return *this; } \
bool operator==(const obj& other) const { return handle == other.handle; } \
bool operator!=(const obj& other) const { return handle != other.handle; } \
@@ -76,20 +88,10 @@
-#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_TRUE 1
-#define VK_FALSE 0
-#define VK_NULL_HANDLE 0
-#define VK_MAX_PHYSICAL_DEVICE_NAME 256
-#define VK_UUID_LENGTH 16
-#define VK_MAX_MEMORY_TYPES 32
-#define VK_MAX_MEMORY_HEAPS 16
-#define VK_MAX_EXTENSION_NAME 256
-#define VK_MAX_DESCRIPTION 256
+typedef uint32_t VkBool32;
+typedef uint32_t VkFlags;
+typedef uint64_t VkDeviceSize;
+typedef uint32_t VkSampleMask;
VK_DEFINE_HANDLE(VkInstance)
VK_DEFINE_HANDLE(VkPhysicalDevice)
@@ -105,7 +107,6 @@
VK_DEFINE_NONDISP_HANDLE(VkQueryPool)
VK_DEFINE_NONDISP_HANDLE(VkBufferView)
VK_DEFINE_NONDISP_HANDLE(VkImageView)
-VK_DEFINE_NONDISP_HANDLE(VkAttachmentView)
VK_DEFINE_NONDISP_HANDLE(VkShaderModule)
VK_DEFINE_NONDISP_HANDLE(VkShader)
VK_DEFINE_NONDISP_HANDLE(VkPipelineCache)
@@ -116,13 +117,25 @@
VK_DEFINE_NONDISP_HANDLE(VkSampler)
VK_DEFINE_NONDISP_HANDLE(VkDescriptorPool)
VK_DEFINE_NONDISP_HANDLE(VkDescriptorSet)
-VK_DEFINE_NONDISP_HANDLE(VkDynamicViewportState)
-VK_DEFINE_NONDISP_HANDLE(VkDynamicRasterState)
-VK_DEFINE_NONDISP_HANDLE(VkDynamicColorBlendState)
-VK_DEFINE_NONDISP_HANDLE(VkDynamicDepthStencilState)
VK_DEFINE_NONDISP_HANDLE(VkFramebuffer)
VK_DEFINE_NONDISP_HANDLE(VkCmdPool)
+#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_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
+#define VK_MAX_MEMORY_HEAPS 16
+#define VK_MAX_EXTENSION_NAME 256
+#define VK_MAX_DESCRIPTION 256
+
typedef enum {
VK_SUCCESS = 0,
@@ -132,41 +145,17 @@
VK_EVENT_SET = 4,
VK_EVENT_RESET = 5,
VK_INCOMPLETE = 6,
- VK_ERROR_UNKNOWN = -1,
- VK_ERROR_UNAVAILABLE = -2,
+ VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
VK_ERROR_INITIALIZATION_FAILED = -3,
- VK_ERROR_OUT_OF_HOST_MEMORY = -4,
- VK_ERROR_OUT_OF_DEVICE_MEMORY = -5,
- VK_ERROR_DEVICE_ALREADY_CREATED = -6,
- VK_ERROR_DEVICE_LOST = -7,
- VK_ERROR_INVALID_POINTER = -8,
- VK_ERROR_INVALID_VALUE = -9,
- VK_ERROR_INVALID_HANDLE = -10,
- VK_ERROR_INVALID_ORDINAL = -11,
- VK_ERROR_INVALID_MEMORY_SIZE = -12,
- VK_ERROR_INVALID_EXTENSION = -13,
- VK_ERROR_INVALID_FLAGS = -14,
- VK_ERROR_INVALID_ALIGNMENT = -15,
- VK_ERROR_INVALID_FORMAT = -16,
- VK_ERROR_INVALID_IMAGE = -17,
- VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -18,
- VK_ERROR_INVALID_QUEUE_TYPE = -19,
- VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -20,
- VK_ERROR_BAD_SHADER_CODE = -21,
- VK_ERROR_BAD_PIPELINE_DATA = -22,
- VK_ERROR_NOT_MAPPABLE = -23,
- VK_ERROR_MEMORY_MAP_FAILED = -24,
- VK_ERROR_MEMORY_UNMAP_FAILED = -25,
- VK_ERROR_INCOMPATIBLE_DEVICE = -26,
- VK_ERROR_INCOMPATIBLE_DRIVER = -27,
- VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -28,
- VK_ERROR_BUILDING_COMMAND_BUFFER = -29,
- VK_ERROR_MEMORY_NOT_BOUND = -30,
- VK_ERROR_INCOMPATIBLE_QUEUE = -31,
- VK_ERROR_INVALID_LAYER = -32,
- VK_RESULT_BEGIN_RANGE = VK_ERROR_INVALID_LAYER,
+ VK_ERROR_DEVICE_LOST = -4,
+ VK_ERROR_MEMORY_MAP_FAILED = -5,
+ VK_ERROR_LAYER_NOT_PRESENT = -6,
+ VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+ VK_ERROR_INCOMPATIBLE_DRIVER = -8,
+ VK_RESULT_BEGIN_RANGE = VK_ERROR_INCOMPATIBLE_DRIVER,
VK_RESULT_END_RANGE = VK_INCOMPLETE,
- VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INVALID_LAYER + 1),
+ VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INCOMPATIBLE_DRIVER + 1),
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
} VkResult;
@@ -175,55 +164,52 @@
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;
@@ -330,7 +316,7 @@
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,
@@ -481,13 +467,20 @@
} VkSharingMode;
typedef enum {
- VK_BUFFER_VIEW_TYPE_RAW = 0,
- VK_BUFFER_VIEW_TYPE_FORMATTED = 1,
- VK_BUFFER_VIEW_TYPE_BEGIN_RANGE = VK_BUFFER_VIEW_TYPE_RAW,
- VK_BUFFER_VIEW_TYPE_END_RANGE = VK_BUFFER_VIEW_TYPE_FORMATTED,
- VK_BUFFER_VIEW_TYPE_NUM = (VK_BUFFER_VIEW_TYPE_FORMATTED - VK_BUFFER_VIEW_TYPE_RAW + 1),
- VK_BUFFER_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkBufferViewType;
+ 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_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_MAX_ENUM = 0x7FFFFFFF
+} VkImageLayout;
typedef enum {
VK_IMAGE_VIEW_TYPE_1D = 0,
@@ -678,6 +671,22 @@
} VkBlendOp;
typedef enum {
+ VK_DYNAMIC_STATE_VIEWPORT = 0,
+ VK_DYNAMIC_STATE_SCISSOR = 1,
+ VK_DYNAMIC_STATE_LINE_WIDTH = 2,
+ VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
+ VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
+ VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
+ VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
+ VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
+ 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_MAX_ENUM = 0x7FFFFFFF
+} VkDynamicState;
+
+typedef enum {
VK_TEX_FILTER_NEAREST = 0,
VK_TEX_FILTER_LINEAR = 1,
VK_TEX_FILTER_BEGIN_RANGE = VK_TEX_FILTER_NEAREST,
@@ -697,16 +706,16 @@
} VkTexMipmapMode;
typedef enum {
- VK_TEX_ADDRESS_WRAP = 0,
- VK_TEX_ADDRESS_MIRROR = 1,
- VK_TEX_ADDRESS_CLAMP = 2,
- VK_TEX_ADDRESS_MIRROR_ONCE = 3,
- VK_TEX_ADDRESS_CLAMP_BORDER = 4,
- VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_WRAP,
- VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_CLAMP_BORDER,
- VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_CLAMP_BORDER - VK_TEX_ADDRESS_WRAP + 1),
+ VK_TEX_ADDRESS_MODE_WRAP = 0,
+ VK_TEX_ADDRESS_MODE_MIRROR = 1,
+ VK_TEX_ADDRESS_MODE_CLAMP = 2,
+ VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 3,
+ VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 4,
+ VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_MODE_WRAP,
+ VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_MODE_CLAMP_BORDER,
+ VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_MODE_CLAMP_BORDER - VK_TEX_ADDRESS_MODE_WRAP + 1),
VK_TEX_ADDRESS_MAX_ENUM = 0x7FFFFFFF
-} VkTexAddress;
+} VkTexAddressMode;
typedef enum {
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
@@ -758,21 +767,6 @@
} VkDescriptorSetUsage;
typedef enum {
- 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_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_MAX_ENUM = 0x7FFFFFFF
-} VkImageLayout;
-
-typedef enum {
VK_ATTACHMENT_LOAD_OP_LOAD = 0,
VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
@@ -848,24 +842,44 @@
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_CONVERSION_BIT = 0x00000400,
+ VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400,
+ VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800,
} VkFormatFeatureFlagBits;
typedef VkFlags VkFormatFeatureFlags;
typedef enum {
- VK_IMAGE_USAGE_GENERAL = 0,
VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001,
VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002,
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;
typedef VkFlags VkImageUsageFlags;
typedef enum {
+ VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
+ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
+ VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
+ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
+ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
+} VkImageCreateFlagBits;
+typedef VkFlags VkImageCreateFlags;
+
+typedef enum {
+ VK_SAMPLE_COUNT_1_BIT = 0x00000001,
+ VK_SAMPLE_COUNT_2_BIT = 0x00000002,
+ VK_SAMPLE_COUNT_4_BIT = 0x00000004,
+ VK_SAMPLE_COUNT_8_BIT = 0x00000008,
+ VK_SAMPLE_COUNT_16_BIT = 0x00000010,
+ VK_SAMPLE_COUNT_32_BIT = 0x00000020,
+ VK_SAMPLE_COUNT_64_BIT = 0x00000040,
+} VkSampleCountFlagBits;
+typedef VkFlags VkSampleCountFlags;
+
+typedef enum {
VK_QUEUE_GRAPHICS_BIT = 0x00000001,
VK_QUEUE_COMPUTE_BIT = 0x00000002,
VK_QUEUE_DMA_BIT = 0x00000004,
@@ -885,14 +899,9 @@
typedef VkFlags VkMemoryPropertyFlags;
typedef enum {
- VK_MEMORY_HEAP_HOST_LOCAL = 0x00000001,
+ VK_MEMORY_HEAP_HOST_LOCAL_BIT = 0x00000001,
} VkMemoryHeapFlagBits;
typedef VkFlags VkMemoryHeapFlags;
-
-typedef enum {
- VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001,
-} VkDeviceCreateFlagBits;
-typedef VkFlags VkDeviceCreateFlags;
typedef VkFlags VkMemoryMapFlags;
typedef enum {
@@ -939,7 +948,6 @@
typedef VkFlags VkQueryResultFlags;
typedef enum {
- VK_BUFFER_USAGE_GENERAL = 0,
VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001,
VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002,
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
@@ -953,27 +961,25 @@
typedef VkFlags VkBufferUsageFlags;
typedef enum {
- VK_BUFFER_CREATE_SPARSE_BIT = 0x00000001,
+ VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
} VkBufferCreateFlagBits;
typedef VkFlags VkBufferCreateFlags;
typedef enum {
- VK_IMAGE_CREATE_SPARSE_BIT = 0x00000001,
- VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
- VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
- VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000008,
- VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000010,
- VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000020,
-} VkImageCreateFlagBits;
-typedef VkFlags VkImageCreateFlags;
+ VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
+ VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
+ VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
+ VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
+} VkImageAspectFlagBits;
+typedef VkFlags VkImageAspectFlags;
typedef enum {
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
-} VkAttachmentViewCreateFlagBits;
-typedef VkFlags VkAttachmentViewCreateFlags;
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
+} VkImageViewCreateFlagBits;
+typedef VkFlags VkImageViewCreateFlags;
typedef VkFlags VkShaderModuleCreateFlags;
typedef VkFlags VkShaderCreateFlags;
@@ -1004,6 +1010,11 @@
typedef VkFlags VkShaderStageFlags;
typedef enum {
+ VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
+} VkAttachmentDescriptionFlagBits;
+typedef VkFlags VkAttachmentDescriptionFlags;
+
+typedef enum {
VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT = 0x00000001,
} VkSubpassDescriptionFlagBits;
typedef VkFlags VkSubpassDescriptionFlags;
@@ -1022,10 +1033,9 @@
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800,
VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000,
- VK_PIPELINE_STAGE_TRANSITION_BIT = 0x00002000,
- VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
+ VK_PIPELINE_STAGE_HOST_BIT = 0x00002000,
VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF,
- VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00003FFF,
+ VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF,
} VkPipelineStageFlagBits;
typedef VkFlags VkPipelineStageFlags;
@@ -1059,7 +1069,7 @@
typedef VkFlags VkCmdPoolCreateFlags;
typedef enum {
- VK_CMD_POOL_RESET_RELEASE_RESOURCES = 0x00000001,
+ VK_CMD_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
} VkCmdPoolResetFlagBits;
typedef VkFlags VkCmdPoolResetFlags;
typedef VkFlags VkCmdBufferCreateFlags;
@@ -1074,33 +1084,22 @@
typedef VkFlags VkCmdBufferOptimizeFlags;
typedef enum {
- VK_CMD_BUFFER_RESET_RELEASE_RESOURCES = 0x00000001,
+ VK_CMD_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
} VkCmdBufferResetFlagBits;
typedef VkFlags VkCmdBufferResetFlags;
typedef enum {
- VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
- VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
- VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
- VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
-} VkImageAspectFlagBits;
-typedef VkFlags VkImageAspectFlags;
+ VK_STENCIL_FACE_NONE = 0,
+ VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
+ VK_STENCIL_FACE_BACK_BIT = 0x00000002,
+} VkStencilFaceFlagBits;
+typedef VkFlags VkStencilFaceFlags;
typedef enum {
VK_QUERY_CONTROL_CONSERVATIVE_BIT = 0x00000001,
} VkQueryControlFlagBits;
typedef VkFlags VkQueryControlFlags;
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- const char* pAppName;
- uint32_t appVersion;
- const char* pEngineName;
- uint32_t engineVersion;
- uint32_t apiVersion;
-} VkApplicationInfo;
-
typedef void* (VKAPI *PFN_vkAllocFunction)(
void* pUserData,
size_t size,
@@ -1111,6 +1110,18 @@
void* pUserData,
void* pMem);
+typedef void (VKAPI *PFN_vkVoidFunction)(void);
+
+typedef struct {
+ VkStructureType sType;
+ const void* pNext;
+ const char* pAppName;
+ uint32_t appVersion;
+ const char* pEngineName;
+ uint32_t engineVersion;
+ uint32_t apiVersion;
+} VkApplicationInfo;
+
typedef struct {
void* pUserData;
PFN_vkAllocFunction pfnAlloc;
@@ -1138,7 +1149,7 @@
VkBool32 sampleRateShading;
VkBool32 dualSourceBlend;
VkBool32 logicOp;
- VkBool32 instancedDrawIndirect;
+ VkBool32 multiDrawIndirect;
VkBool32 depthClip;
VkBool32 depthBiasClamp;
VkBool32 fillModeNonSolid;
@@ -1148,6 +1159,7 @@
VkBool32 textureCompressionETC2;
VkBool32 textureCompressionASTC_LDR;
VkBool32 textureCompressionBC;
+ VkBool32 occlusionQueryNonConservative;
VkBool32 pipelineStatisticsQuery;
VkBool32 vertexSideEffects;
VkBool32 tessellationSideEffects;
@@ -1155,11 +1167,9 @@
VkBool32 fragmentSideEffects;
VkBool32 shaderTessellationPointSize;
VkBool32 shaderGeometryPointSize;
- VkBool32 shaderTextureGatherExtended;
+ VkBool32 shaderImageGatherExtended;
VkBool32 shaderStorageImageExtendedFormats;
VkBool32 shaderStorageImageMultisample;
- VkBool32 shaderStorageBufferArrayConstantIndexing;
- VkBool32 shaderStorageImageArrayConstantIndexing;
VkBool32 shaderUniformBufferArrayDynamicIndexing;
VkBool32 shaderSampledImageArrayDynamicIndexing;
VkBool32 shaderStorageBufferArrayDynamicIndexing;
@@ -1168,11 +1178,11 @@
VkBool32 shaderCullDistance;
VkBool32 shaderFloat64;
VkBool32 shaderInt64;
- VkBool32 shaderFloat16;
VkBool32 shaderInt16;
VkBool32 shaderResourceResidency;
VkBool32 shaderResourceMinLOD;
- VkBool32 sparse;
+ VkBool32 alphaToOne;
+ VkBool32 sparseBinding;
VkBool32 sparseResidencyBuffer;
VkBool32 sparseResidencyImage2D;
VkBool32 sparseResidencyImage3D;
@@ -1180,23 +1190,27 @@
VkBool32 sparseResidency4Samples;
VkBool32 sparseResidency8Samples;
VkBool32 sparseResidency16Samples;
- VkBool32 sparseResidencyStandard2DBlockShape;
- VkBool32 sparseResidencyStandard2DMSBlockShape;
- VkBool32 sparseResidencyStandard3DBlockShape;
- VkBool32 sparseResidencyAlignedMipSize;
- VkBool32 sparseResidencyNonResident;
- VkBool32 sparseResidencyNonResidentStrict;
VkBool32 sparseResidencyAliased;
} VkPhysicalDeviceFeatures;
typedef struct {
VkFormatFeatureFlags linearTilingFeatures;
VkFormatFeatureFlags optimalTilingFeatures;
+ VkFormatFeatureFlags bufferFeatures;
} VkFormatProperties;
typedef struct {
- uint64_t maxResourceSize;
- uint32_t maxSamples;
+ int32_t width;
+ int32_t height;
+ int32_t depth;
+} VkExtent3D;
+
+typedef struct {
+ VkExtent3D maxExtent;
+ uint32_t maxMipLevels;
+ uint32_t maxArraySize;
+ VkSampleCountFlags sampleCounts;
+ VkDeviceSize maxResourceSize;
} VkImageFormatProperties;
typedef struct {
@@ -1205,12 +1219,14 @@
uint32_t maxImageDimension3D;
uint32_t maxImageDimensionCube;
uint32_t maxImageArrayLayers;
+ VkSampleCountFlags sampleCounts;
uint32_t maxTexelBufferSize;
uint32_t maxUniformBufferSize;
uint32_t maxStorageBufferSize;
uint32_t maxPushConstantsSize;
uint32_t maxMemoryAllocationCount;
VkDeviceSize bufferImageGranularity;
+ VkDeviceSize sparseAddressSpaceSize;
uint32_t maxBoundDescriptorSets;
uint32_t maxDescriptorSets;
uint32_t maxPerStageDescriptorSamplers;
@@ -1220,10 +1236,13 @@
uint32_t maxPerStageDescriptorStorageImages;
uint32_t maxDescriptorSetSamplers;
uint32_t maxDescriptorSetUniformBuffers;
+ uint32_t maxDescriptorSetUniformBuffersDynamic;
uint32_t maxDescriptorSetStorageBuffers;
+ uint32_t maxDescriptorSetStorageBuffersDynamic;
uint32_t maxDescriptorSetSampledImages;
uint32_t maxDescriptorSetStorageImages;
uint32_t maxVertexInputAttributes;
+ uint32_t maxVertexInputBindings;
uint32_t maxVertexInputAttributeOffset;
uint32_t maxVertexInputBindingStride;
uint32_t maxVertexOutputComponents;
@@ -1257,7 +1276,6 @@
float maxSamplerLodBias;
float maxSamplerAnisotropy;
uint32_t maxViewports;
- uint32_t maxDynamicViewportStates;
uint32_t maxViewportDimensions[2];
float viewportBoundsRange[2];
uint32_t viewportSubPixelBits;
@@ -1295,6 +1313,15 @@
} VkPhysicalDeviceLimits;
typedef struct {
+ VkBool32 residencyStandard2DBlockShape;
+ VkBool32 residencyStandard2DMSBlockShape;
+ VkBool32 residencyStandard3DBlockShape;
+ VkBool32 residencyAlignedMipSize;
+ VkBool32 residencyNonResident;
+ VkBool32 residencyNonResidentStrict;
+} VkPhysicalDeviceSparseProperties;
+
+typedef struct {
uint32_t apiVersion;
uint32_t driverVersion;
uint32_t vendorId;
@@ -1302,13 +1329,15 @@
VkPhysicalDeviceType deviceType;
char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
uint8_t pipelineCacheUUID[VK_UUID_LENGTH];
+ VkPhysicalDeviceLimits limits;
+ VkPhysicalDeviceSparseProperties sparseProperties;
} VkPhysicalDeviceProperties;
typedef struct {
VkQueueFlags queueFlags;
uint32_t queueCount;
VkBool32 supportsTimestamps;
-} VkPhysicalDeviceQueueProperties;
+} VkQueueFamilyProperties;
typedef struct {
VkMemoryPropertyFlags propertyFlags;
@@ -1327,8 +1356,9 @@
VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
} VkPhysicalDeviceMemoryProperties;
-typedef void (VKAPI *PFN_vkVoidFunction)(void);
typedef struct {
+ VkStructureType sType;
+ const void* pNext;
uint32_t queueFamilyIndex;
uint32_t queueCount;
} VkDeviceQueueCreateInfo;
@@ -1343,7 +1373,6 @@
uint32_t extensionCount;
const char*const* ppEnabledExtensionNames;
const VkPhysicalDeviceFeatures* pEnabledFeatures;
- VkDeviceCreateFlags flags;
} VkDeviceCreateInfo;
typedef struct {
@@ -1380,12 +1409,6 @@
} VkMemoryRequirements;
typedef struct {
- int32_t width;
- int32_t height;
- int32_t depth;
-} VkExtent3D;
-
-typedef struct {
VkImageAspect aspect;
VkExtent3D imageGranularity;
VkSparseImageFormatFlags flags;
@@ -1410,7 +1433,7 @@
typedef struct {
VkImageAspect aspect;
uint32_t mipLevel;
- uint32_t arraySlice;
+ uint32_t arrayLayer;
} VkImageSubresource;
typedef struct {
@@ -1469,7 +1492,6 @@
VkStructureType sType;
const void* pNext;
VkBuffer buffer;
- VkBufferViewType viewType;
VkFormat format;
VkDeviceSize offset;
VkDeviceSize range;
@@ -1490,6 +1512,7 @@
VkSharingMode sharingMode;
uint32_t queueFamilyCount;
const uint32_t* pQueueFamilyIndices;
+ VkImageLayout initialLayout;
} VkImageCreateInfo;
typedef struct {
@@ -1507,10 +1530,10 @@
} VkChannelMapping;
typedef struct {
- VkImageAspect aspect;
+ VkImageAspectFlags aspectMask;
uint32_t baseMipLevel;
uint32_t mipLevels;
- uint32_t baseArraySlice;
+ uint32_t baseArrayLayer;
uint32_t arraySize;
} VkImageSubresourceRange;
@@ -1522,22 +1545,12 @@
VkFormat format;
VkChannelMapping channels;
VkImageSubresourceRange subresourceRange;
+ VkImageViewCreateFlags flags;
} VkImageViewCreateInfo;
typedef struct {
VkStructureType sType;
const void* pNext;
- VkImage image;
- VkFormat format;
- uint32_t mipLevel;
- uint32_t baseArraySlice;
- uint32_t arraySize;
- VkAttachmentViewCreateFlags flags;
-} VkAttachmentViewCreateInfo;
-
-typedef struct {
- VkStructureType sType;
- const void* pNext;
size_t codeSize;
const void* pCode;
VkShaderModuleCreateFlags flags;
@@ -1549,6 +1562,7 @@
VkShaderModule module;
const char* pName;
VkShaderCreateFlags flags;
+ VkShaderStage stage;
} VkShaderCreateInfo;
typedef struct {
@@ -1616,9 +1630,36 @@
} VkPipelineTessellationStateCreateInfo;
typedef struct {
+ float originX;
+ float originY;
+ float width;
+ float height;
+ float minDepth;
+ float maxDepth;
+} VkViewport;
+
+typedef struct {
+ int32_t x;
+ int32_t y;
+} VkOffset2D;
+
+typedef struct {
+ int32_t width;
+ int32_t height;
+} VkExtent2D;
+
+typedef struct {
+ VkOffset2D offset;
+ VkExtent2D extent;
+} VkRect2D;
+
+typedef struct {
VkStructureType sType;
const void* pNext;
uint32_t viewportCount;
+ const VkViewport* pViewports;
+ uint32_t scissorCount;
+ const VkRect2D* pScissors;
} VkPipelineViewportStateCreateInfo;
typedef struct {
@@ -1629,6 +1670,11 @@
VkFillMode fillMode;
VkCullMode cullMode;
VkFrontFace frontFace;
+ VkBool32 depthBiasEnable;
+ float depthBias;
+ float depthBiasClamp;
+ float slopeScaledDepthBias;
+ float lineWidth;
} VkPipelineRasterStateCreateInfo;
typedef struct {
@@ -1637,7 +1683,7 @@
uint32_t rasterSamples;
VkBool32 sampleShadingEnable;
float minSampleShading;
- VkSampleMask sampleMask;
+ const VkSampleMask* pSampleMask;
} VkPipelineMultisampleStateCreateInfo;
typedef struct {
@@ -1645,6 +1691,9 @@
VkStencilOp stencilPassOp;
VkStencilOp stencilDepthFailOp;
VkCompareOp stencilCompareOp;
+ uint32_t stencilCompareMask;
+ uint32_t stencilWriteMask;
+ uint32_t stencilReference;
} VkStencilOpState;
typedef struct {
@@ -1653,10 +1702,12 @@
VkBool32 depthTestEnable;
VkBool32 depthWriteEnable;
VkCompareOp depthCompareOp;
- VkBool32 depthBoundsEnable;
+ VkBool32 depthBoundsTestEnable;
VkBool32 stencilTestEnable;
VkStencilOpState front;
VkStencilOpState back;
+ float minDepthBounds;
+ float maxDepthBounds;
} VkPipelineDepthStencilStateCreateInfo;
typedef struct {
@@ -1674,15 +1725,24 @@
VkStructureType sType;
const void* pNext;
VkBool32 alphaToCoverageEnable;
+ VkBool32 alphaToOneEnable;
VkBool32 logicOpEnable;
VkLogicOp logicOp;
uint32_t attachmentCount;
const VkPipelineColorBlendAttachmentState* pAttachments;
+ float blendConst[4];
} VkPipelineColorBlendStateCreateInfo;
typedef struct {
VkStructureType sType;
const void* pNext;
+ uint32_t dynamicStateCount;
+ const VkDynamicState* pDynamicStates;
+} VkPipelineDynamicStateCreateInfo;
+
+typedef struct {
+ VkStructureType sType;
+ const void* pNext;
uint32_t stageCount;
const VkPipelineShaderStageCreateInfo* pStages;
const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
@@ -1693,6 +1753,7 @@
const VkPipelineMultisampleStateCreateInfo* pMultisampleState;
const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState;
const VkPipelineColorBlendStateCreateInfo* pColorBlendState;
+ const VkPipelineDynamicStateCreateInfo* pDynamicState;
VkPipelineCreateFlags flags;
VkPipelineLayout layout;
VkRenderPass renderPass;
@@ -1704,7 +1765,7 @@
typedef struct {
VkStructureType sType;
const void* pNext;
- VkPipelineShaderStageCreateInfo cs;
+ VkPipelineShaderStageCreateInfo stage;
VkPipelineCreateFlags flags;
VkPipelineLayout layout;
VkPipeline basePipelineHandle;
@@ -1732,9 +1793,9 @@
VkTexFilter magFilter;
VkTexFilter minFilter;
VkTexMipmapMode mipMode;
- VkTexAddress addressU;
- VkTexAddress addressV;
- VkTexAddress addressW;
+ VkTexAddressMode addressModeU;
+ VkTexAddressMode addressModeV;
+ VkTexAddressMode addressModeW;
float mipLodBias;
float maxAnisotropy;
VkBool32 compareEnable;
@@ -1742,6 +1803,7 @@
float minLod;
float maxLod;
VkBorderColor borderColor;
+ VkBool32 unnormalizedCoordinates;
} VkSamplerCreateInfo;
typedef struct {
@@ -1766,16 +1828,24 @@
typedef struct {
VkStructureType sType;
const void* pNext;
+ VkDescriptorPoolUsage poolUsage;
+ uint32_t maxSets;
uint32_t count;
const VkDescriptorTypeCount* pTypeCount;
} VkDescriptorPoolCreateInfo;
typedef struct {
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize range;
+} VkDescriptorBufferInfo;
+
+typedef struct {
VkBufferView bufferView;
VkSampler sampler;
VkImageView imageView;
- VkAttachmentView attachmentView;
VkImageLayout imageLayout;
+ VkDescriptorBufferInfo bufferInfo;
} VkDescriptorInfo;
typedef struct {
@@ -1802,74 +1872,11 @@
} VkCopyDescriptorSet;
typedef struct {
- float originX;
- float originY;
- float width;
- float height;
- float minDepth;
- float maxDepth;
-} VkViewport;
-
-typedef struct {
- int32_t x;
- int32_t y;
-} VkOffset2D;
-
-typedef struct {
- int32_t width;
- int32_t height;
-} VkExtent2D;
-
-typedef struct {
- VkOffset2D offset;
- VkExtent2D extent;
-} VkRect2D;
-
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- uint32_t viewportAndScissorCount;
- const VkViewport* pViewports;
- const VkRect2D* pScissors;
-} VkDynamicViewportStateCreateInfo;
-
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- float depthBias;
- float depthBiasClamp;
- float slopeScaledDepthBias;
- float lineWidth;
-} VkDynamicRasterStateCreateInfo;
-
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- float blendConst[4];
-} VkDynamicColorBlendStateCreateInfo;
-
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- float minDepthBounds;
- float maxDepthBounds;
- uint32_t stencilReadMask;
- uint32_t stencilWriteMask;
- uint32_t stencilFrontRef;
- uint32_t stencilBackRef;
-} VkDynamicDepthStencilStateCreateInfo;
-
-typedef struct {
- VkAttachmentView view;
- VkImageLayout layout;
-} VkAttachmentBindInfo;
-
-typedef struct {
VkStructureType sType;
const void* pNext;
VkRenderPass renderPass;
uint32_t attachmentCount;
- const VkAttachmentBindInfo* pAttachments;
+ const VkImageView* pAttachments;
uint32_t width;
uint32_t height;
uint32_t layers;
@@ -1886,6 +1893,7 @@
VkAttachmentStoreOp stencilStoreOp;
VkImageLayout initialLayout;
VkImageLayout finalLayout;
+ VkAttachmentDescriptionFlags flags;
} VkAttachmentDescription;
typedef struct {
@@ -1899,13 +1907,13 @@
VkPipelineBindPoint pipelineBindPoint;
VkSubpassDescriptionFlags flags;
uint32_t inputCount;
- const VkAttachmentReference* inputAttachments;
+ const VkAttachmentReference* pInputAttachments;
uint32_t colorCount;
- const VkAttachmentReference* colorAttachments;
- const VkAttachmentReference* resolveAttachments;
+ const VkAttachmentReference* pColorAttachments;
+ const VkAttachmentReference* pResolveAttachments;
VkAttachmentReference depthStencilAttachment;
uint32_t preserveCount;
- const VkAttachmentReference* preserveAttachments;
+ const VkAttachmentReference* pPreserveAttachments;
} VkSubpassDescription;
typedef struct {
@@ -1951,6 +1959,7 @@
const void* pNext;
VkCmdBufferOptimizeFlags flags;
VkRenderPass renderPass;
+ uint32_t subpass;
VkFramebuffer framebuffer;
} VkCmdBufferBeginInfo;
@@ -1961,18 +1970,25 @@
} VkBufferCopy;
typedef struct {
- VkImageSubresource srcSubresource;
+ VkImageAspect aspect;
+ uint32_t mipLevel;
+ uint32_t arrayLayer;
+ uint32_t arraySize;
+} VkImageSubresourceCopy;
+
+typedef struct {
+ VkImageSubresourceCopy srcSubresource;
VkOffset3D srcOffset;
- VkImageSubresource destSubresource;
+ VkImageSubresourceCopy destSubresource;
VkOffset3D destOffset;
VkExtent3D extent;
} VkImageCopy;
typedef struct {
- VkImageSubresource srcSubresource;
+ VkImageSubresourceCopy srcSubresource;
VkOffset3D srcOffset;
VkExtent3D srcExtent;
- VkImageSubresource destSubresource;
+ VkImageSubresourceCopy destSubresource;
VkOffset3D destOffset;
VkExtent3D destExtent;
} VkImageBlit;
@@ -1981,38 +1997,38 @@
VkDeviceSize bufferOffset;
uint32_t bufferRowLength;
uint32_t bufferImageHeight;
- VkImageSubresource imageSubresource;
+ VkImageSubresourceCopy imageSubresource;
VkOffset3D imageOffset;
VkExtent3D imageExtent;
} VkBufferImageCopy;
typedef union {
- float f32[4];
- int32_t s32[4];
- uint32_t u32[4];
+ float float32[4];
+ int32_t int32[4];
+ uint32_t uint32[4];
} VkClearColorValue;
typedef struct {
+ float depth;
+ uint32_t stencil;
+} VkClearDepthStencilValue;
+
+typedef struct {
VkOffset3D offset;
VkExtent3D extent;
} VkRect3D;
typedef struct {
- VkImageSubresource srcSubresource;
+ VkImageSubresourceCopy srcSubresource;
VkOffset3D srcOffset;
- VkImageSubresource destSubresource;
+ VkImageSubresourceCopy destSubresource;
VkOffset3D destOffset;
VkExtent3D extent;
} VkImageResolve;
-typedef struct {
- float depth;
- uint32_t stencil;
-} VkClearDepthStencilValue;
-
typedef union {
VkClearColorValue color;
- VkClearDepthStencilValue ds;
+ VkClearDepthStencilValue depthStencil;
} VkClearValue;
typedef struct {
@@ -2021,8 +2037,8 @@
VkRenderPass renderPass;
VkFramebuffer framebuffer;
VkRect2D renderArea;
- uint32_t attachmentCount;
- const VkClearValue* pAttachmentClearValues;
+ uint32_t clearValueCount;
+ const VkClearValue* pClearValues;
} VkRenderPassBeginInfo;
typedef struct {
@@ -2080,32 +2096,30 @@
typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
-typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
+typedef void (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
+typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
+typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName);
typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName);
typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
-typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
-typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
-typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties);
+typedef void (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
+typedef VkResult (VKAPI *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
+typedef VkResult (VKAPI *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
+typedef VkResult (VKAPI *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
+typedef VkResult (VKAPI *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties);
typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
-typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
+typedef void (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
-typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
+typedef void (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
typedef VkResult (VKAPI *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes);
@@ -2119,88 +2133,83 @@
typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageOpaqueMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo);
typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo);
typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
-typedef VkResult (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence);
+typedef void (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence);
typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
-typedef VkResult (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore);
+typedef void (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore);
typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
-typedef VkResult (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event);
+typedef void (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
-typedef VkResult (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool);
+typedef void (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool);
typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
-typedef VkResult (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer);
+typedef void (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer);
typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
-typedef VkResult (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView);
+typedef void (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView);
typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
-typedef VkResult (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image);
+typedef void (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image);
typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
-typedef VkResult (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView);
-typedef VkResult (VKAPI *PFN_vkCreateAttachmentView)(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView);
-typedef VkResult (VKAPI *PFN_vkDestroyAttachmentView)(VkDevice device, VkAttachmentView attachmentView);
+typedef void (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView);
typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
-typedef VkResult (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule);
+typedef void (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule);
typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
-typedef VkResult (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader);
+typedef void (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader);
typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache);
-typedef VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache);
+typedef void (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache);
typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache);
typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData);
typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
-typedef VkResult (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline);
+typedef void (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline);
typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout);
-typedef VkResult (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout);
+typedef void (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout);
typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
-typedef VkResult (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler);
+typedef void (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler);
typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
-typedef VkResult (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout);
-typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
-typedef VkResult (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
+typedef void (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout);
+typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
+typedef void (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
-typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
+typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets);
typedef VkResult (VKAPI *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
-typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
-typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState);
-typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState);
-typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState);
-typedef VkResult (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDynamicRasterState dynamicRasterState);
-typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState);
-typedef VkResult (VKAPI *PFN_vkDestroyDynamicColorBlendState)(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState);
-typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState);
-typedef VkResult (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState);
+typedef void (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
-typedef VkResult (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer);
+typedef void (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer);
typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
-typedef VkResult (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass);
+typedef void (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass);
typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
typedef VkResult (VKAPI *PFN_vkCreateCommandPool)(VkDevice device, const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool);
-typedef VkResult (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool);
+typedef void (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool);
typedef VkResult (VKAPI *PFN_vkResetCommandPool)(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags);
typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
-typedef VkResult (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer);
+typedef void (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer);
typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags);
typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
-typedef void (VKAPI *PFN_vkCmdBindDynamicViewportState)(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState);
-typedef void (VKAPI *PFN_vkCmdBindDynamicRasterState)(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState);
-typedef void (VKAPI *PFN_vkCmdBindDynamicColorBlendState)(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState);
-typedef void (VKAPI *PFN_vkCmdBindDynamicDepthStencilState)(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState);
+typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports);
+typedef void (VKAPI *PFN_vkCmdSetScissor)(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
+typedef void (VKAPI *PFN_vkCmdSetLineWidth)(VkCmdBuffer cmdBuffer, float lineWidth);
+typedef void (VKAPI *PFN_vkCmdSetDepthBias)(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
+typedef void (VKAPI *PFN_vkCmdSetBlendConstants)(VkCmdBuffer cmdBuffer, const float blendConst[4]);
+typedef void (VKAPI *PFN_vkCmdSetDepthBounds)(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds);
+typedef void (VKAPI *PFN_vkCmdSetStencilCompareMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask);
+typedef void (VKAPI *PFN_vkCmdSetStencilWriteMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask);
+typedef void (VKAPI *PFN_vkCmdSetStencilReference)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference);
typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
-typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
-typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
+typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
+typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
@@ -2213,9 +2222,9 @@
typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
-typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects);
+typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects);
typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
@@ -2237,7 +2246,7 @@
const VkInstanceCreateInfo* pCreateInfo,
VkInstance* pInstance);
-VkResult VKAPI vkDestroyInstance(
+void VKAPI vkDestroyInstance(
VkInstance instance);
VkResult VKAPI vkEnumeratePhysicalDevices(
@@ -2260,24 +2269,17 @@
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
VkImageFormatProperties* pImageFormatProperties);
-VkResult VKAPI vkGetPhysicalDeviceLimits(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceLimits* pLimits);
-
VkResult VKAPI vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties);
-VkResult VKAPI vkGetPhysicalDeviceQueueCount(
+VkResult VKAPI vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
- uint32_t* pCount);
-
-VkResult VKAPI vkGetPhysicalDeviceQueueProperties(
- VkPhysicalDevice physicalDevice,
- uint32_t count,
- VkPhysicalDeviceQueueProperties* pQueueProperties);
+ uint32_t* pCount,
+ VkQueueFamilyProperties* pQueueFamilyProperties);
VkResult VKAPI vkGetPhysicalDeviceMemoryProperties(
VkPhysicalDevice physicalDevice,
@@ -2296,25 +2298,25 @@
const VkDeviceCreateInfo* pCreateInfo,
VkDevice* pDevice);
-VkResult VKAPI vkDestroyDevice(
+void VKAPI vkDestroyDevice(
VkDevice device);
-VkResult VKAPI vkGetGlobalExtensionProperties(
+VkResult VKAPI vkEnumerateInstanceExtensionProperties(
const char* pLayerName,
uint32_t* pCount,
VkExtensionProperties* pProperties);
-VkResult VKAPI vkGetPhysicalDeviceExtensionProperties(
+VkResult VKAPI vkEnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pCount,
VkExtensionProperties* pProperties);
-VkResult VKAPI vkGetGlobalLayerProperties(
+VkResult VKAPI vkEnumerateInstanceLayerProperties(
uint32_t* pCount,
VkLayerProperties* pProperties);
-VkResult VKAPI vkGetPhysicalDeviceLayerProperties(
+VkResult VKAPI vkEnumerateDeviceLayerProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pCount,
VkLayerProperties* pProperties);
@@ -2342,7 +2344,7 @@
const VkMemoryAllocInfo* pAllocInfo,
VkDeviceMemory* pMem);
-VkResult VKAPI vkFreeMemory(
+void VKAPI vkFreeMemory(
VkDevice device,
VkDeviceMemory mem);
@@ -2354,7 +2356,7 @@
VkMemoryMapFlags flags,
void** ppData);
-VkResult VKAPI vkUnmapMemory(
+void VKAPI vkUnmapMemory(
VkDevice device,
VkDeviceMemory mem);
@@ -2434,7 +2436,7 @@
const VkFenceCreateInfo* pCreateInfo,
VkFence* pFence);
-VkResult VKAPI vkDestroyFence(
+void VKAPI vkDestroyFence(
VkDevice device,
VkFence fence);
@@ -2459,7 +2461,7 @@
const VkSemaphoreCreateInfo* pCreateInfo,
VkSemaphore* pSemaphore);
-VkResult VKAPI vkDestroySemaphore(
+void VKAPI vkDestroySemaphore(
VkDevice device,
VkSemaphore semaphore);
@@ -2476,7 +2478,7 @@
const VkEventCreateInfo* pCreateInfo,
VkEvent* pEvent);
-VkResult VKAPI vkDestroyEvent(
+void VKAPI vkDestroyEvent(
VkDevice device,
VkEvent event);
@@ -2497,7 +2499,7 @@
const VkQueryPoolCreateInfo* pCreateInfo,
VkQueryPool* pQueryPool);
-VkResult VKAPI vkDestroyQueryPool(
+void VKAPI vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool);
@@ -2515,7 +2517,7 @@
const VkBufferCreateInfo* pCreateInfo,
VkBuffer* pBuffer);
-VkResult VKAPI vkDestroyBuffer(
+void VKAPI vkDestroyBuffer(
VkDevice device,
VkBuffer buffer);
@@ -2524,7 +2526,7 @@
const VkBufferViewCreateInfo* pCreateInfo,
VkBufferView* pView);
-VkResult VKAPI vkDestroyBufferView(
+void VKAPI vkDestroyBufferView(
VkDevice device,
VkBufferView bufferView);
@@ -2533,7 +2535,7 @@
const VkImageCreateInfo* pCreateInfo,
VkImage* pImage);
-VkResult VKAPI vkDestroyImage(
+void VKAPI vkDestroyImage(
VkDevice device,
VkImage image);
@@ -2548,25 +2550,16 @@
const VkImageViewCreateInfo* pCreateInfo,
VkImageView* pView);
-VkResult VKAPI vkDestroyImageView(
+void VKAPI vkDestroyImageView(
VkDevice device,
VkImageView imageView);
-VkResult VKAPI vkCreateAttachmentView(
- VkDevice device,
- const VkAttachmentViewCreateInfo* pCreateInfo,
- VkAttachmentView* pView);
-
-VkResult VKAPI vkDestroyAttachmentView(
- VkDevice device,
- VkAttachmentView attachmentView);
-
VkResult VKAPI vkCreateShaderModule(
VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
VkShaderModule* pShaderModule);
-VkResult VKAPI vkDestroyShaderModule(
+void VKAPI vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule);
@@ -2575,7 +2568,7 @@
const VkShaderCreateInfo* pCreateInfo,
VkShader* pShader);
-VkResult VKAPI vkDestroyShader(
+void VKAPI vkDestroyShader(
VkDevice device,
VkShader shader);
@@ -2584,7 +2577,7 @@
const VkPipelineCacheCreateInfo* pCreateInfo,
VkPipelineCache* pPipelineCache);
-VkResult VKAPI vkDestroyPipelineCache(
+void VKAPI vkDestroyPipelineCache(
VkDevice device,
VkPipelineCache pipelineCache);
@@ -2617,7 +2610,7 @@
const VkComputePipelineCreateInfo* pCreateInfos,
VkPipeline* pPipelines);
-VkResult VKAPI vkDestroyPipeline(
+void VKAPI vkDestroyPipeline(
VkDevice device,
VkPipeline pipeline);
@@ -2626,7 +2619,7 @@
const VkPipelineLayoutCreateInfo* pCreateInfo,
VkPipelineLayout* pPipelineLayout);
-VkResult VKAPI vkDestroyPipelineLayout(
+void VKAPI vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout);
@@ -2635,7 +2628,7 @@
const VkSamplerCreateInfo* pCreateInfo,
VkSampler* pSampler);
-VkResult VKAPI vkDestroySampler(
+void VKAPI vkDestroySampler(
VkDevice device,
VkSampler sampler);
@@ -2644,18 +2637,16 @@
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
VkDescriptorSetLayout* pSetLayout);
-VkResult VKAPI vkDestroyDescriptorSetLayout(
+void VKAPI vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout);
VkResult VKAPI vkCreateDescriptorPool(
VkDevice device,
- VkDescriptorPoolUsage poolUsage,
- uint32_t maxSets,
const VkDescriptorPoolCreateInfo* pCreateInfo,
VkDescriptorPool* pDescriptorPool);
-VkResult VKAPI vkDestroyDescriptorPool(
+void VKAPI vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool);
@@ -2669,8 +2660,7 @@
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount);
+ VkDescriptorSet* pDescriptorSets);
VkResult VKAPI vkFreeDescriptorSets(
VkDevice device,
@@ -2678,55 +2668,19 @@
uint32_t count,
const VkDescriptorSet* pDescriptorSets);
-VkResult VKAPI vkUpdateDescriptorSets(
+void VKAPI vkUpdateDescriptorSets(
VkDevice device,
uint32_t writeCount,
const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t copyCount,
const VkCopyDescriptorSet* pDescriptorCopies);
-VkResult VKAPI vkCreateDynamicViewportState(
- VkDevice device,
- const VkDynamicViewportStateCreateInfo* pCreateInfo,
- VkDynamicViewportState* pState);
-
-VkResult VKAPI vkDestroyDynamicViewportState(
- VkDevice device,
- VkDynamicViewportState dynamicViewportState);
-
-VkResult VKAPI vkCreateDynamicRasterState(
- VkDevice device,
- const VkDynamicRasterStateCreateInfo* pCreateInfo,
- VkDynamicRasterState* pState);
-
-VkResult VKAPI vkDestroyDynamicRasterState(
- VkDevice device,
- VkDynamicRasterState dynamicRasterState);
-
-VkResult VKAPI vkCreateDynamicColorBlendState(
- VkDevice device,
- const VkDynamicColorBlendStateCreateInfo* pCreateInfo,
- VkDynamicColorBlendState* pState);
-
-VkResult VKAPI vkDestroyDynamicColorBlendState(
- VkDevice device,
- VkDynamicColorBlendState dynamicColorBlendState);
-
-VkResult VKAPI vkCreateDynamicDepthStencilState(
- VkDevice device,
- const VkDynamicDepthStencilStateCreateInfo* pCreateInfo,
- VkDynamicDepthStencilState* pState);
-
-VkResult VKAPI vkDestroyDynamicDepthStencilState(
- VkDevice device,
- VkDynamicDepthStencilState dynamicDepthStencilState);
-
VkResult VKAPI vkCreateFramebuffer(
VkDevice device,
const VkFramebufferCreateInfo* pCreateInfo,
VkFramebuffer* pFramebuffer);
-VkResult VKAPI vkDestroyFramebuffer(
+void VKAPI vkDestroyFramebuffer(
VkDevice device,
VkFramebuffer framebuffer);
@@ -2735,7 +2689,7 @@
const VkRenderPassCreateInfo* pCreateInfo,
VkRenderPass* pRenderPass);
-VkResult VKAPI vkDestroyRenderPass(
+void VKAPI vkDestroyRenderPass(
VkDevice device,
VkRenderPass renderPass);
@@ -2749,7 +2703,7 @@
const VkCmdPoolCreateInfo* pCreateInfo,
VkCmdPool* pCmdPool);
-VkResult VKAPI vkDestroyCommandPool(
+void VKAPI vkDestroyCommandPool(
VkDevice device,
VkCmdPool cmdPool);
@@ -2763,7 +2717,7 @@
const VkCmdBufferCreateInfo* pCreateInfo,
VkCmdBuffer* pCmdBuffer);
-VkResult VKAPI vkDestroyCommandBuffer(
+void VKAPI vkDestroyCommandBuffer(
VkDevice device,
VkCmdBuffer commandBuffer);
@@ -2783,21 +2737,49 @@
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline);
-void VKAPI vkCmdBindDynamicViewportState(
+void VKAPI vkCmdSetViewport(
VkCmdBuffer cmdBuffer,
- VkDynamicViewportState dynamicViewportState);
+ uint32_t viewportCount,
+ const VkViewport* pViewports);
-void VKAPI vkCmdBindDynamicRasterState(
+void VKAPI vkCmdSetScissor(
VkCmdBuffer cmdBuffer,
- VkDynamicRasterState dynamicRasterState);
+ uint32_t scissorCount,
+ const VkRect2D* pScissors);
-void VKAPI vkCmdBindDynamicColorBlendState(
+void VKAPI vkCmdSetLineWidth(
VkCmdBuffer cmdBuffer,
- VkDynamicColorBlendState dynamicColorBlendState);
+ float lineWidth);
-void VKAPI vkCmdBindDynamicDepthStencilState(
+void VKAPI vkCmdSetDepthBias(
VkCmdBuffer cmdBuffer,
- VkDynamicDepthStencilState dynamicDepthStencilState);
+ float depthBias,
+ float depthBiasClamp,
+ float slopeScaledDepthBias);
+
+void VKAPI vkCmdSetBlendConstants(
+ VkCmdBuffer cmdBuffer,
+ const float blendConst[4]);
+
+void VKAPI vkCmdSetDepthBounds(
+ VkCmdBuffer cmdBuffer,
+ float minDepthBounds,
+ float maxDepthBounds);
+
+void VKAPI vkCmdSetStencilCompareMask(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t stencilCompareMask);
+
+void VKAPI vkCmdSetStencilWriteMask(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t stencilWriteMask);
+
+void VKAPI vkCmdSetStencilReference(
+ VkCmdBuffer cmdBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t stencilReference);
void VKAPI vkCmdBindDescriptorSets(
VkCmdBuffer cmdBuffer,
@@ -2824,18 +2806,18 @@
void VKAPI vkCmdDraw(
VkCmdBuffer cmdBuffer,
- uint32_t firstVertex,
uint32_t vertexCount,
- uint32_t firstInstance,
- uint32_t instanceCount);
+ uint32_t instanceCount,
+ uint32_t firstVertex,
+ uint32_t firstInstance);
void VKAPI vkCmdDrawIndexed(
VkCmdBuffer cmdBuffer,
- uint32_t firstIndex,
uint32_t indexCount,
+ uint32_t instanceCount,
+ uint32_t firstIndex,
int32_t vertexOffset,
- uint32_t firstInstance,
- uint32_t instanceCount);
+ uint32_t firstInstance);
void VKAPI vkCmdDrawIndirect(
VkCmdBuffer cmdBuffer,
@@ -2930,8 +2912,7 @@
VkCmdBuffer cmdBuffer,
VkImage image,
VkImageLayout imageLayout,
- float depth,
- uint32_t stencil,
+ const VkClearDepthStencilValue* pDepthStencil,
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges);
@@ -2945,10 +2926,9 @@
void VKAPI vkCmdClearDepthStencilAttachment(
VkCmdBuffer cmdBuffer,
- VkImageAspectFlags imageAspectMask,
+ VkImageAspectFlags aspectMask,
VkImageLayout imageLayout,
- float depth,
- uint32_t stencil,
+ const VkClearDepthStencilValue* pDepthStencil,
uint32_t rectCount,
const VkRect3D* pRects);
diff --git a/vulkan/libvulkan/entry.cpp b/vulkan/libvulkan/entry.cpp
index cd5dd99..2f7583d 100644
--- a/vulkan/libvulkan/entry.cpp
+++ b/vulkan/libvulkan/entry.cpp
@@ -47,8 +47,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyInstance(VkInstance instance) {
- return GetVtbl(instance).DestroyInstance(instance);
+void vkDestroyInstance(VkInstance instance) {
+ GetVtbl(instance).DestroyInstance(instance);
}
__attribute__((visibility("default")))
@@ -72,13 +72,8 @@
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceQueueCount(physicalDevice, pCount);
-}
-
-__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceQueueProperties(physicalDevice, count, pQueueProperties);
+VkResult vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties) {
+ return GetVtbl(physicalDevice).GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pCount, pQueueFamilyProperties);
}
__attribute__((visibility("default")))
@@ -97,13 +92,8 @@
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, pImageFormatProperties);
-}
-
-__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceLimits(physicalDevice, pLimits);
+VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
+ return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
}
__attribute__((visibility("default")))
@@ -112,28 +102,28 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyDevice(VkDevice device) {
- return vulkan::DestroyDevice(device);
+void vkDestroyDevice(VkDevice device) {
+ vulkan::DestroyDevice(device);
}
__attribute__((visibility("default")))
-VkResult vkGetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
- return vulkan::GetGlobalLayerProperties(pCount, pProperties);
+VkResult vkEnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
+ return vulkan::EnumerateInstanceLayerProperties(pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetGlobalExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
- return vulkan::GetGlobalExtensionProperties(pLayerName, pCount, pProperties);
+VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
+ return vulkan::EnumerateInstanceExtensionProperties(pLayerName, pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceLayerProperties(physicalDevice, pCount, pProperties);
+VkResult vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
+ return GetVtbl(physicalDevice).EnumerateDeviceLayerProperties(physicalDevice, pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties);
+VkResult vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
+ return GetVtbl(physicalDevice).EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties);
}
__attribute__((visibility("default")))
@@ -162,8 +152,8 @@
}
__attribute__((visibility("default")))
-VkResult vkFreeMemory(VkDevice device, VkDeviceMemory mem) {
- return GetVtbl(device).FreeMemory(device, mem);
+void vkFreeMemory(VkDevice device, VkDeviceMemory mem) {
+ GetVtbl(device).FreeMemory(device, mem);
}
__attribute__((visibility("default")))
@@ -172,8 +162,8 @@
}
__attribute__((visibility("default")))
-VkResult vkUnmapMemory(VkDevice device, VkDeviceMemory mem) {
- return GetVtbl(device).UnmapMemory(device, mem);
+void vkUnmapMemory(VkDevice device, VkDeviceMemory mem) {
+ GetVtbl(device).UnmapMemory(device, mem);
}
__attribute__((visibility("default")))
@@ -242,8 +232,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyFence(VkDevice device, VkFence fence) {
- return GetVtbl(device).DestroyFence(device, fence);
+void vkDestroyFence(VkDevice device, VkFence fence) {
+ GetVtbl(device).DestroyFence(device, fence);
}
__attribute__((visibility("default")))
@@ -267,8 +257,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) {
- return GetVtbl(device).DestroySemaphore(device, semaphore);
+void vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) {
+ GetVtbl(device).DestroySemaphore(device, semaphore);
}
__attribute__((visibility("default")))
@@ -287,8 +277,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyEvent(VkDevice device, VkEvent event) {
- return GetVtbl(device).DestroyEvent(device, event);
+void vkDestroyEvent(VkDevice device, VkEvent event) {
+ GetVtbl(device).DestroyEvent(device, event);
}
__attribute__((visibility("default")))
@@ -312,8 +302,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) {
- return GetVtbl(device).DestroyQueryPool(device, queryPool);
+void vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) {
+ GetVtbl(device).DestroyQueryPool(device, queryPool);
}
__attribute__((visibility("default")))
@@ -327,8 +317,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyBuffer(VkDevice device, VkBuffer buffer) {
- return GetVtbl(device).DestroyBuffer(device, buffer);
+void vkDestroyBuffer(VkDevice device, VkBuffer buffer) {
+ GetVtbl(device).DestroyBuffer(device, buffer);
}
__attribute__((visibility("default")))
@@ -337,8 +327,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyBufferView(VkDevice device, VkBufferView bufferView) {
- return GetVtbl(device).DestroyBufferView(device, bufferView);
+void vkDestroyBufferView(VkDevice device, VkBufferView bufferView) {
+ GetVtbl(device).DestroyBufferView(device, bufferView);
}
__attribute__((visibility("default")))
@@ -347,8 +337,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyImage(VkDevice device, VkImage image) {
- return GetVtbl(device).DestroyImage(device, image);
+void vkDestroyImage(VkDevice device, VkImage image) {
+ GetVtbl(device).DestroyImage(device, image);
}
__attribute__((visibility("default")))
@@ -362,18 +352,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyImageView(VkDevice device, VkImageView imageView) {
- return GetVtbl(device).DestroyImageView(device, imageView);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView) {
- return GetVtbl(device).CreateAttachmentView(device, pCreateInfo, pView);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) {
- return GetVtbl(device).DestroyAttachmentView(device, attachmentView);
+void vkDestroyImageView(VkDevice device, VkImageView imageView) {
+ GetVtbl(device).DestroyImageView(device, imageView);
}
__attribute__((visibility("default")))
@@ -382,8 +362,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) {
- return GetVtbl(device).DestroyShaderModule(device, shaderModule);
+void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) {
+ GetVtbl(device).DestroyShaderModule(device, shaderModule);
}
__attribute__((visibility("default")))
@@ -392,8 +372,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyShader(VkDevice device, VkShader shader) {
- return GetVtbl(device).DestroyShader(device, shader);
+void vkDestroyShader(VkDevice device, VkShader shader) {
+ GetVtbl(device).DestroyShader(device, shader);
}
__attribute__((visibility("default")))
@@ -402,8 +382,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) {
- return GetVtbl(device).DestroyPipelineCache(device, pipelineCache);
+void vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) {
+ GetVtbl(device).DestroyPipelineCache(device, pipelineCache);
}
__attribute__((visibility("default")))
@@ -432,8 +412,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipeline(VkDevice device, VkPipeline pipeline) {
- return GetVtbl(device).DestroyPipeline(device, pipeline);
+void vkDestroyPipeline(VkDevice device, VkPipeline pipeline) {
+ GetVtbl(device).DestroyPipeline(device, pipeline);
}
__attribute__((visibility("default")))
@@ -442,8 +422,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) {
- return GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout);
+void vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) {
+ GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout);
}
__attribute__((visibility("default")))
@@ -452,8 +432,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroySampler(VkDevice device, VkSampler sampler) {
- return GetVtbl(device).DestroySampler(device, sampler);
+void vkDestroySampler(VkDevice device, VkSampler sampler) {
+ GetVtbl(device).DestroySampler(device, sampler);
}
__attribute__((visibility("default")))
@@ -462,18 +442,18 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) {
- return GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout);
+void vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) {
+ GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout);
}
__attribute__((visibility("default")))
-VkResult vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) {
- return GetVtbl(device).CreateDescriptorPool(device, poolUsage, maxSets, pCreateInfo, pDescriptorPool);
+VkResult vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) {
+ return GetVtbl(device).CreateDescriptorPool(device, pCreateInfo, pDescriptorPool);
}
__attribute__((visibility("default")))
-VkResult vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) {
- return GetVtbl(device).DestroyDescriptorPool(device, descriptorPool);
+void vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) {
+ GetVtbl(device).DestroyDescriptorPool(device, descriptorPool);
}
__attribute__((visibility("default")))
@@ -482,8 +462,8 @@
}
__attribute__((visibility("default")))
-VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount) {
- return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
+VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets) {
+ return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
}
__attribute__((visibility("default")))
@@ -492,48 +472,8 @@
}
__attribute__((visibility("default")))
-VkResult vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) {
- return GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState) {
- return GetVtbl(device).CreateDynamicViewportState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) {
- return GetVtbl(device).DestroyDynamicViewportState(device, dynamicViewportState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState) {
- return GetVtbl(device).CreateDynamicRasterState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) {
- return GetVtbl(device).DestroyDynamicRasterState(device, dynamicRasterState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState) {
- return GetVtbl(device).CreateDynamicColorBlendState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) {
- return GetVtbl(device).DestroyDynamicColorBlendState(device, dynamicColorBlendState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState) {
- return GetVtbl(device).CreateDynamicDepthStencilState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) {
- return GetVtbl(device).DestroyDynamicDepthStencilState(device, dynamicDepthStencilState);
+void vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) {
+ GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies);
}
__attribute__((visibility("default")))
@@ -542,8 +482,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) {
- return GetVtbl(device).DestroyFramebuffer(device, framebuffer);
+void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) {
+ GetVtbl(device).DestroyFramebuffer(device, framebuffer);
}
__attribute__((visibility("default")))
@@ -552,8 +492,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) {
- return GetVtbl(device).DestroyRenderPass(device, renderPass);
+void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) {
+ GetVtbl(device).DestroyRenderPass(device, renderPass);
}
__attribute__((visibility("default")))
@@ -567,8 +507,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) {
- return GetVtbl(device).DestroyCommandPool(device, cmdPool);
+void vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) {
+ GetVtbl(device).DestroyCommandPool(device, cmdPool);
}
__attribute__((visibility("default")))
@@ -582,8 +522,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) {
- return GetVtbl(device).DestroyCommandBuffer(device, commandBuffer);
+void vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) {
+ GetVtbl(device).DestroyCommandBuffer(device, commandBuffer);
}
__attribute__((visibility("default")))
@@ -607,23 +547,48 @@
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) {
- GetVtbl(cmdBuffer).CmdBindDynamicViewportState(cmdBuffer, dynamicViewportState);
+void vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports) {
+ GetVtbl(cmdBuffer).CmdSetViewport(cmdBuffer, viewportCount, pViewports);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) {
- GetVtbl(cmdBuffer).CmdBindDynamicRasterState(cmdBuffer, dynamicRasterState);
+void vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors) {
+ GetVtbl(cmdBuffer).CmdSetScissor(cmdBuffer, scissorCount, pScissors);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) {
- GetVtbl(cmdBuffer).CmdBindDynamicColorBlendState(cmdBuffer, dynamicColorBlendState);
+void vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth) {
+ GetVtbl(cmdBuffer).CmdSetLineWidth(cmdBuffer, lineWidth);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) {
- GetVtbl(cmdBuffer).CmdBindDynamicDepthStencilState(cmdBuffer, dynamicDepthStencilState);
+void vkCmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) {
+ GetVtbl(cmdBuffer).CmdSetDepthBias(cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]) {
+ GetVtbl(cmdBuffer).CmdSetBlendConstants(cmdBuffer, blendConst);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) {
+ GetVtbl(cmdBuffer).CmdSetDepthBounds(cmdBuffer, minDepthBounds, maxDepthBounds);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask) {
+ GetVtbl(cmdBuffer).CmdSetStencilCompareMask(cmdBuffer, faceMask, stencilCompareMask);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask) {
+ GetVtbl(cmdBuffer).CmdSetStencilWriteMask(cmdBuffer, faceMask, stencilWriteMask);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference) {
+ GetVtbl(cmdBuffer).CmdSetStencilReference(cmdBuffer, faceMask, stencilReference);
}
__attribute__((visibility("default")))
@@ -642,13 +607,13 @@
}
__attribute__((visibility("default")))
-void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) {
- GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
+void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) {
+ GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
}
__attribute__((visibility("default")))
-void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) {
- GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
+void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) {
+ GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
}
__attribute__((visibility("default")))
@@ -712,8 +677,8 @@
}
__attribute__((visibility("default")))
-void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
- GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges);
+void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
+ GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges);
}
__attribute__((visibility("default")))
@@ -722,8 +687,8 @@
}
__attribute__((visibility("default")))
-void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) {
- GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, imageAspectMask, imageLayout, depth, stencil, rectCount, pRects);
+void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) {
+ GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, aspectMask, imageLayout, pDepthStencil, rectCount, pRects);
}
__attribute__((visibility("default")))
diff --git a/vulkan/libvulkan/get_proc_addr.cpp b/vulkan/libvulkan/get_proc_addr.cpp
index ceb76b9..5247950 100644
--- a/vulkan/libvulkan/get_proc_addr.cpp
+++ b/vulkan/libvulkan/get_proc_addr.cpp
@@ -51,18 +51,16 @@
// clang-format off
{"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDevice)},
{"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyInstance)},
+ {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceExtensionProperties)},
+ {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceLayerProperties)},
{"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(vkEnumeratePhysicalDevices)},
{"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetInstanceProcAddr)},
- {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceExtensionProperties)},
{"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFeatures)},
{"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFormatProperties)},
{"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceImageFormatProperties)},
- {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLayerProperties)},
- {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLimits)},
{"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceMemoryProperties)},
{"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceProperties)},
- {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueCount)},
- {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueProperties)},
+ {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueFamilyProperties)},
{"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSparseImageFormatProperties)},
// clang-format on
};
@@ -77,10 +75,6 @@
{"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginQuery)},
{"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginRenderPass)},
{"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDescriptorSets)},
- {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicColorBlendState)},
- {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicDepthStencilState)},
- {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicRasterState)},
- {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicViewportState)},
{"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindIndexBuffer)},
{"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindPipeline)},
{"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindVertexBuffers)},
@@ -110,11 +104,19 @@
{"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetEvent)},
{"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetQueryPool)},
{"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResolveImage)},
+ {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetBlendConstants)},
+ {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBias)},
+ {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBounds)},
{"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetEvent)},
+ {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetLineWidth)},
+ {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetScissor)},
+ {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilCompareMask)},
+ {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilReference)},
+ {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilWriteMask)},
+ {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetViewport)},
{"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdUpdateBuffer)},
{"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWaitEvents)},
{"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWriteTimestamp)},
- {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateAttachmentView)},
{"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBuffer)},
{"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBufferView)},
{"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandBuffer)},
@@ -122,10 +124,6 @@
{"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateComputePipelines)},
{"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorPool)},
{"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorSetLayout)},
- {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicColorBlendState)},
- {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicDepthStencilState)},
- {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicRasterState)},
- {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicViewportState)},
{"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCreateEvent)},
{"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFence)},
{"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFramebuffer)},
@@ -140,7 +138,6 @@
{"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSemaphore)},
{"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShader)},
{"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShaderModule)},
- {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyAttachmentView)},
{"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBuffer)},
{"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBufferView)},
{"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandBuffer)},
@@ -148,10 +145,6 @@
{"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorPool)},
{"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorSetLayout)},
{"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDevice)},
- {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicColorBlendState)},
- {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicDepthStencilState)},
- {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicRasterState)},
- {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicViewportState)},
{"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyEvent)},
{"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFence)},
{"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFramebuffer)},
@@ -210,18 +203,16 @@
// clang-format off
{"vkCreateDevice", offsetof(InstanceVtbl, CreateDevice)},
{"vkDestroyInstance", offsetof(InstanceVtbl, DestroyInstance)},
+ {"vkEnumerateDeviceExtensionProperties", offsetof(InstanceVtbl, EnumerateDeviceExtensionProperties)},
+ {"vkEnumerateDeviceLayerProperties", offsetof(InstanceVtbl, EnumerateDeviceLayerProperties)},
{"vkEnumeratePhysicalDevices", offsetof(InstanceVtbl, EnumeratePhysicalDevices)},
{"vkGetInstanceProcAddr", offsetof(InstanceVtbl, GetInstanceProcAddr)},
- {"vkGetPhysicalDeviceExtensionProperties", offsetof(InstanceVtbl, GetPhysicalDeviceExtensionProperties)},
{"vkGetPhysicalDeviceFeatures", offsetof(InstanceVtbl, GetPhysicalDeviceFeatures)},
{"vkGetPhysicalDeviceFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceFormatProperties)},
{"vkGetPhysicalDeviceImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceImageFormatProperties)},
- {"vkGetPhysicalDeviceLayerProperties", offsetof(InstanceVtbl, GetPhysicalDeviceLayerProperties)},
- {"vkGetPhysicalDeviceLimits", offsetof(InstanceVtbl, GetPhysicalDeviceLimits)},
{"vkGetPhysicalDeviceMemoryProperties", offsetof(InstanceVtbl, GetPhysicalDeviceMemoryProperties)},
{"vkGetPhysicalDeviceProperties", offsetof(InstanceVtbl, GetPhysicalDeviceProperties)},
- {"vkGetPhysicalDeviceQueueCount", offsetof(InstanceVtbl, GetPhysicalDeviceQueueCount)},
- {"vkGetPhysicalDeviceQueueProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueProperties)},
+ {"vkGetPhysicalDeviceQueueFamilyProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueFamilyProperties)},
{"vkGetPhysicalDeviceSparseImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceSparseImageFormatProperties)},
// clang-format on
};
@@ -236,10 +227,6 @@
{"vkCmdBeginQuery", offsetof(DeviceVtbl, CmdBeginQuery)},
{"vkCmdBeginRenderPass", offsetof(DeviceVtbl, CmdBeginRenderPass)},
{"vkCmdBindDescriptorSets", offsetof(DeviceVtbl, CmdBindDescriptorSets)},
- {"vkCmdBindDynamicColorBlendState", offsetof(DeviceVtbl, CmdBindDynamicColorBlendState)},
- {"vkCmdBindDynamicDepthStencilState", offsetof(DeviceVtbl, CmdBindDynamicDepthStencilState)},
- {"vkCmdBindDynamicRasterState", offsetof(DeviceVtbl, CmdBindDynamicRasterState)},
- {"vkCmdBindDynamicViewportState", offsetof(DeviceVtbl, CmdBindDynamicViewportState)},
{"vkCmdBindIndexBuffer", offsetof(DeviceVtbl, CmdBindIndexBuffer)},
{"vkCmdBindPipeline", offsetof(DeviceVtbl, CmdBindPipeline)},
{"vkCmdBindVertexBuffers", offsetof(DeviceVtbl, CmdBindVertexBuffers)},
@@ -269,11 +256,19 @@
{"vkCmdResetEvent", offsetof(DeviceVtbl, CmdResetEvent)},
{"vkCmdResetQueryPool", offsetof(DeviceVtbl, CmdResetQueryPool)},
{"vkCmdResolveImage", offsetof(DeviceVtbl, CmdResolveImage)},
+ {"vkCmdSetBlendConstants", offsetof(DeviceVtbl, CmdSetBlendConstants)},
+ {"vkCmdSetDepthBias", offsetof(DeviceVtbl, CmdSetDepthBias)},
+ {"vkCmdSetDepthBounds", offsetof(DeviceVtbl, CmdSetDepthBounds)},
{"vkCmdSetEvent", offsetof(DeviceVtbl, CmdSetEvent)},
+ {"vkCmdSetLineWidth", offsetof(DeviceVtbl, CmdSetLineWidth)},
+ {"vkCmdSetScissor", offsetof(DeviceVtbl, CmdSetScissor)},
+ {"vkCmdSetStencilCompareMask", offsetof(DeviceVtbl, CmdSetStencilCompareMask)},
+ {"vkCmdSetStencilReference", offsetof(DeviceVtbl, CmdSetStencilReference)},
+ {"vkCmdSetStencilWriteMask", offsetof(DeviceVtbl, CmdSetStencilWriteMask)},
+ {"vkCmdSetViewport", offsetof(DeviceVtbl, CmdSetViewport)},
{"vkCmdUpdateBuffer", offsetof(DeviceVtbl, CmdUpdateBuffer)},
{"vkCmdWaitEvents", offsetof(DeviceVtbl, CmdWaitEvents)},
{"vkCmdWriteTimestamp", offsetof(DeviceVtbl, CmdWriteTimestamp)},
- {"vkCreateAttachmentView", offsetof(DeviceVtbl, CreateAttachmentView)},
{"vkCreateBuffer", offsetof(DeviceVtbl, CreateBuffer)},
{"vkCreateBufferView", offsetof(DeviceVtbl, CreateBufferView)},
{"vkCreateCommandBuffer", offsetof(DeviceVtbl, CreateCommandBuffer)},
@@ -281,10 +276,6 @@
{"vkCreateComputePipelines", offsetof(DeviceVtbl, CreateComputePipelines)},
{"vkCreateDescriptorPool", offsetof(DeviceVtbl, CreateDescriptorPool)},
{"vkCreateDescriptorSetLayout", offsetof(DeviceVtbl, CreateDescriptorSetLayout)},
- {"vkCreateDynamicColorBlendState", offsetof(DeviceVtbl, CreateDynamicColorBlendState)},
- {"vkCreateDynamicDepthStencilState", offsetof(DeviceVtbl, CreateDynamicDepthStencilState)},
- {"vkCreateDynamicRasterState", offsetof(DeviceVtbl, CreateDynamicRasterState)},
- {"vkCreateDynamicViewportState", offsetof(DeviceVtbl, CreateDynamicViewportState)},
{"vkCreateEvent", offsetof(DeviceVtbl, CreateEvent)},
{"vkCreateFence", offsetof(DeviceVtbl, CreateFence)},
{"vkCreateFramebuffer", offsetof(DeviceVtbl, CreateFramebuffer)},
@@ -299,7 +290,6 @@
{"vkCreateSemaphore", offsetof(DeviceVtbl, CreateSemaphore)},
{"vkCreateShader", offsetof(DeviceVtbl, CreateShader)},
{"vkCreateShaderModule", offsetof(DeviceVtbl, CreateShaderModule)},
- {"vkDestroyAttachmentView", offsetof(DeviceVtbl, DestroyAttachmentView)},
{"vkDestroyBuffer", offsetof(DeviceVtbl, DestroyBuffer)},
{"vkDestroyBufferView", offsetof(DeviceVtbl, DestroyBufferView)},
{"vkDestroyCommandBuffer", offsetof(DeviceVtbl, DestroyCommandBuffer)},
@@ -307,10 +297,6 @@
{"vkDestroyDescriptorPool", offsetof(DeviceVtbl, DestroyDescriptorPool)},
{"vkDestroyDescriptorSetLayout", offsetof(DeviceVtbl, DestroyDescriptorSetLayout)},
{"vkDestroyDevice", offsetof(DeviceVtbl, DestroyDevice)},
- {"vkDestroyDynamicColorBlendState", offsetof(DeviceVtbl, DestroyDynamicColorBlendState)},
- {"vkDestroyDynamicDepthStencilState", offsetof(DeviceVtbl, DestroyDynamicDepthStencilState)},
- {"vkDestroyDynamicRasterState", offsetof(DeviceVtbl, DestroyDynamicRasterState)},
- {"vkDestroyDynamicViewportState", offsetof(DeviceVtbl, DestroyDynamicViewportState)},
{"vkDestroyEvent", offsetof(DeviceVtbl, DestroyEvent)},
{"vkDestroyFence", offsetof(DeviceVtbl, DestroyFence)},
{"vkDestroyFramebuffer", offsetof(DeviceVtbl, DestroyFramebuffer)},
@@ -453,7 +439,6 @@
const_cast<unsigned char*>(base) + entry->offset);
}
-// TODO: remove need for instance_next
bool LoadInstanceVtbl(VkInstance instance,
VkInstance instance_next,
PFN_vkGetInstanceProcAddr get_proc_addr,
@@ -484,14 +469,9 @@
ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceProperties");
success = false;
}
- vtbl.GetPhysicalDeviceQueueCount = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueCount>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueCount"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueCount)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueCount");
- success = false;
- }
- vtbl.GetPhysicalDeviceQueueProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueProperties");
+ vtbl.GetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueFamilyProperties"));
+ if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueFamilyProperties)) {
+ ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueFamilyProperties");
success = false;
}
vtbl.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties"));
@@ -514,24 +494,19 @@
ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceImageFormatProperties");
success = false;
}
- vtbl.GetPhysicalDeviceLimits = reinterpret_cast<PFN_vkGetPhysicalDeviceLimits>(get_proc_addr(instance, "vkGetPhysicalDeviceLimits"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceLimits)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLimits");
- success = false;
- }
vtbl.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice"));
if (UNLIKELY(!vtbl.CreateDevice)) {
ALOGE("missing instance proc: %s", "vkCreateDevice");
success = false;
}
- vtbl.GetPhysicalDeviceLayerProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceLayerProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceLayerProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceLayerProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLayerProperties");
+ vtbl.EnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(get_proc_addr(instance, "vkEnumerateDeviceLayerProperties"));
+ if (UNLIKELY(!vtbl.EnumerateDeviceLayerProperties)) {
+ ALOGE("missing instance proc: %s", "vkEnumerateDeviceLayerProperties");
success = false;
}
- vtbl.GetPhysicalDeviceExtensionProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExtensionProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceExtensionProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceExtensionProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceExtensionProperties");
+ vtbl.EnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(get_proc_addr(instance, "vkEnumerateDeviceExtensionProperties"));
+ if (UNLIKELY(!vtbl.EnumerateDeviceExtensionProperties)) {
+ ALOGE("missing instance proc: %s", "vkEnumerateDeviceExtensionProperties");
success = false;
}
vtbl.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"));
@@ -784,16 +759,6 @@
ALOGE("missing device proc: %s", "vkDestroyImageView");
success = false;
}
- vtbl.CreateAttachmentView = reinterpret_cast<PFN_vkCreateAttachmentView>(get_proc_addr(device, "vkCreateAttachmentView"));
- if (UNLIKELY(!vtbl.CreateAttachmentView)) {
- ALOGE("missing device proc: %s", "vkCreateAttachmentView");
- success = false;
- }
- vtbl.DestroyAttachmentView = reinterpret_cast<PFN_vkDestroyAttachmentView>(get_proc_addr(device, "vkDestroyAttachmentView"));
- if (UNLIKELY(!vtbl.DestroyAttachmentView)) {
- ALOGE("missing device proc: %s", "vkDestroyAttachmentView");
- success = false;
- }
vtbl.CreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(get_proc_addr(device, "vkCreateShaderModule"));
if (UNLIKELY(!vtbl.CreateShaderModule)) {
ALOGE("missing device proc: %s", "vkCreateShaderModule");
@@ -914,46 +879,6 @@
ALOGE("missing device proc: %s", "vkUpdateDescriptorSets");
success = false;
}
- vtbl.CreateDynamicViewportState = reinterpret_cast<PFN_vkCreateDynamicViewportState>(get_proc_addr(device, "vkCreateDynamicViewportState"));
- if (UNLIKELY(!vtbl.CreateDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicViewportState");
- success = false;
- }
- vtbl.DestroyDynamicViewportState = reinterpret_cast<PFN_vkDestroyDynamicViewportState>(get_proc_addr(device, "vkDestroyDynamicViewportState"));
- if (UNLIKELY(!vtbl.DestroyDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicViewportState");
- success = false;
- }
- vtbl.CreateDynamicRasterState = reinterpret_cast<PFN_vkCreateDynamicRasterState>(get_proc_addr(device, "vkCreateDynamicRasterState"));
- if (UNLIKELY(!vtbl.CreateDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicRasterState");
- success = false;
- }
- vtbl.DestroyDynamicRasterState = reinterpret_cast<PFN_vkDestroyDynamicRasterState>(get_proc_addr(device, "vkDestroyDynamicRasterState"));
- if (UNLIKELY(!vtbl.DestroyDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicRasterState");
- success = false;
- }
- vtbl.CreateDynamicColorBlendState = reinterpret_cast<PFN_vkCreateDynamicColorBlendState>(get_proc_addr(device, "vkCreateDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.CreateDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicColorBlendState");
- success = false;
- }
- vtbl.DestroyDynamicColorBlendState = reinterpret_cast<PFN_vkDestroyDynamicColorBlendState>(get_proc_addr(device, "vkDestroyDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.DestroyDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicColorBlendState");
- success = false;
- }
- vtbl.CreateDynamicDepthStencilState = reinterpret_cast<PFN_vkCreateDynamicDepthStencilState>(get_proc_addr(device, "vkCreateDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.CreateDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicDepthStencilState");
- success = false;
- }
- vtbl.DestroyDynamicDepthStencilState = reinterpret_cast<PFN_vkDestroyDynamicDepthStencilState>(get_proc_addr(device, "vkDestroyDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.DestroyDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicDepthStencilState");
- success = false;
- }
vtbl.CreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(get_proc_addr(device, "vkCreateFramebuffer"));
if (UNLIKELY(!vtbl.CreateFramebuffer)) {
ALOGE("missing device proc: %s", "vkCreateFramebuffer");
@@ -1024,24 +949,49 @@
ALOGE("missing device proc: %s", "vkCmdBindPipeline");
success = false;
}
- vtbl.CmdBindDynamicViewportState = reinterpret_cast<PFN_vkCmdBindDynamicViewportState>(get_proc_addr(device, "vkCmdBindDynamicViewportState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicViewportState");
+ vtbl.CmdSetViewport = reinterpret_cast<PFN_vkCmdSetViewport>(get_proc_addr(device, "vkCmdSetViewport"));
+ if (UNLIKELY(!vtbl.CmdSetViewport)) {
+ ALOGE("missing device proc: %s", "vkCmdSetViewport");
success = false;
}
- vtbl.CmdBindDynamicRasterState = reinterpret_cast<PFN_vkCmdBindDynamicRasterState>(get_proc_addr(device, "vkCmdBindDynamicRasterState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicRasterState");
+ vtbl.CmdSetScissor = reinterpret_cast<PFN_vkCmdSetScissor>(get_proc_addr(device, "vkCmdSetScissor"));
+ if (UNLIKELY(!vtbl.CmdSetScissor)) {
+ ALOGE("missing device proc: %s", "vkCmdSetScissor");
success = false;
}
- vtbl.CmdBindDynamicColorBlendState = reinterpret_cast<PFN_vkCmdBindDynamicColorBlendState>(get_proc_addr(device, "vkCmdBindDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicColorBlendState");
+ vtbl.CmdSetLineWidth = reinterpret_cast<PFN_vkCmdSetLineWidth>(get_proc_addr(device, "vkCmdSetLineWidth"));
+ if (UNLIKELY(!vtbl.CmdSetLineWidth)) {
+ ALOGE("missing device proc: %s", "vkCmdSetLineWidth");
success = false;
}
- vtbl.CmdBindDynamicDepthStencilState = reinterpret_cast<PFN_vkCmdBindDynamicDepthStencilState>(get_proc_addr(device, "vkCmdBindDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicDepthStencilState");
+ vtbl.CmdSetDepthBias = reinterpret_cast<PFN_vkCmdSetDepthBias>(get_proc_addr(device, "vkCmdSetDepthBias"));
+ if (UNLIKELY(!vtbl.CmdSetDepthBias)) {
+ ALOGE("missing device proc: %s", "vkCmdSetDepthBias");
+ success = false;
+ }
+ vtbl.CmdSetBlendConstants = reinterpret_cast<PFN_vkCmdSetBlendConstants>(get_proc_addr(device, "vkCmdSetBlendConstants"));
+ if (UNLIKELY(!vtbl.CmdSetBlendConstants)) {
+ ALOGE("missing device proc: %s", "vkCmdSetBlendConstants");
+ success = false;
+ }
+ vtbl.CmdSetDepthBounds = reinterpret_cast<PFN_vkCmdSetDepthBounds>(get_proc_addr(device, "vkCmdSetDepthBounds"));
+ if (UNLIKELY(!vtbl.CmdSetDepthBounds)) {
+ ALOGE("missing device proc: %s", "vkCmdSetDepthBounds");
+ success = false;
+ }
+ vtbl.CmdSetStencilCompareMask = reinterpret_cast<PFN_vkCmdSetStencilCompareMask>(get_proc_addr(device, "vkCmdSetStencilCompareMask"));
+ if (UNLIKELY(!vtbl.CmdSetStencilCompareMask)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilCompareMask");
+ success = false;
+ }
+ vtbl.CmdSetStencilWriteMask = reinterpret_cast<PFN_vkCmdSetStencilWriteMask>(get_proc_addr(device, "vkCmdSetStencilWriteMask"));
+ if (UNLIKELY(!vtbl.CmdSetStencilWriteMask)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilWriteMask");
+ success = false;
+ }
+ vtbl.CmdSetStencilReference = reinterpret_cast<PFN_vkCmdSetStencilReference>(get_proc_addr(device, "vkCmdSetStencilReference"));
+ if (UNLIKELY(!vtbl.CmdSetStencilReference)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilReference");
success = false;
}
vtbl.CmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(get_proc_addr(device, "vkCmdBindDescriptorSets"));
diff --git a/vulkan/libvulkan/loader.cpp b/vulkan/libvulkan/loader.cpp
index be39b24..16bc8b8 100644
--- a/vulkan/libvulkan/loader.cpp
+++ b/vulkan/libvulkan/loader.cpp
@@ -277,12 +277,12 @@
}
// Get Layers in so
- PFN_vkGetGlobalLayerProperties get_layer_properties =
- reinterpret_cast<PFN_vkGetGlobalLayerProperties>(
- dlsym(layer_handle, "vkGetGlobalLayerProperties"));
+ PFN_vkEnumerateInstanceLayerProperties get_layer_properties =
+ reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>(
+ dlsym(layer_handle, "vkEnumerateInstanceLayerProperties"));
if (!get_layer_properties) {
ALOGE(
- "%s failed to find vkGetGlobalLayerProperties with "
+ "%s failed to find vkEnumerateInstanceLayerProperties with "
"error %s; Skipping",
entry->d_name, dlerror());
dlclose(layer_handle);
@@ -507,7 +507,7 @@
// "Bottom" functions. These are called at the end of the instance dispatch
// chain.
-VkResult DestroyInstanceBottom(VkInstance instance) {
+void DestroyInstanceBottom(VkInstance instance) {
// These checks allow us to call DestroyInstanceBottom from any error path
// in CreateInstanceBottom, before the driver instance is fully initialized.
if (instance->drv.vtbl.instance != VK_NULL_HANDLE &&
@@ -528,7 +528,6 @@
const VkAllocCallbacks* alloc = instance->alloc;
instance->~VkInstance_T();
alloc->pfnFree(alloc->pUserData, instance);
- return VK_SUCCESS;
}
VkResult CreateInstanceBottom(const VkInstanceCreateInfo* create_info,
@@ -640,16 +639,11 @@
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
VkImageFormatProperties* properties) {
return GetVtbl(pdev)
->instance->drv.vtbl.GetPhysicalDeviceImageFormatProperties(
- pdev, format, type, tiling, usage, properties);
-}
-
-VkResult GetPhysicalDeviceLimitsBottom(VkPhysicalDevice pdev,
- VkPhysicalDeviceLimits* limits) {
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceLimits(pdev, limits);
+ pdev, format, type, tiling, usage, flags, properties);
}
VkResult GetPhysicalDevicePropertiesBottom(
@@ -659,18 +653,13 @@
->instance->drv.vtbl.GetPhysicalDeviceProperties(pdev, properties);
}
-VkResult GetPhysicalDeviceQueueCountBottom(VkPhysicalDevice pdev,
- uint32_t* count) {
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceQueueCount(pdev, count);
-}
-
-VkResult GetPhysicalDeviceQueuePropertiesBottom(
+VkResult GetPhysicalDeviceQueueFamilyPropertiesBottom(
VkPhysicalDevice pdev,
- uint32_t count,
- VkPhysicalDeviceQueueProperties* properties) {
- return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceQueueProperties(
- pdev, count, properties);
+ uint32_t* pCount,
+ VkQueueFamilyProperties* properties) {
+ return GetVtbl(pdev)
+ ->instance->drv.vtbl.GetPhysicalDeviceQueueFamilyProperties(
+ pdev, pCount, properties);
}
VkResult GetPhysicalDeviceMemoryPropertiesBottom(
@@ -775,21 +764,20 @@
return VK_SUCCESS;
}
-VkResult GetPhysicalDeviceExtensionPropertiesBottom(
+VkResult EnumerateDeviceExtensionPropertiesBottom(
VkPhysicalDevice pdev,
const char* layer_name,
uint32_t* properties_count,
VkExtensionProperties* properties) {
// TODO: what are we supposed to do with layer_name here?
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceExtensionProperties(
- pdev, layer_name, properties_count, properties);
+ return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceExtensionProperties(
+ pdev, layer_name, properties_count, properties);
}
-VkResult GetPhysicalDeviceLayerPropertiesBottom(VkPhysicalDevice pdev,
- uint32_t* properties_count,
- VkLayerProperties* properties) {
- return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceLayerProperties(
+VkResult EnumerateDeviceLayerPropertiesBottom(VkPhysicalDevice pdev,
+ uint32_t* properties_count,
+ VkLayerProperties* properties) {
+ return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceLayerProperties(
pdev, properties_count, properties);
}
@@ -820,14 +808,12 @@
.GetPhysicalDeviceFeatures = GetPhysicalDeviceFeaturesBottom,
.GetPhysicalDeviceFormatProperties = GetPhysicalDeviceFormatPropertiesBottom,
.GetPhysicalDeviceImageFormatProperties = GetPhysicalDeviceImageFormatPropertiesBottom,
- .GetPhysicalDeviceLimits = GetPhysicalDeviceLimitsBottom,
.GetPhysicalDeviceProperties = GetPhysicalDevicePropertiesBottom,
- .GetPhysicalDeviceQueueCount = GetPhysicalDeviceQueueCountBottom,
- .GetPhysicalDeviceQueueProperties = GetPhysicalDeviceQueuePropertiesBottom,
+ .GetPhysicalDeviceQueueFamilyProperties = GetPhysicalDeviceQueueFamilyPropertiesBottom,
.GetPhysicalDeviceMemoryProperties = GetPhysicalDeviceMemoryPropertiesBottom,
.CreateDevice = CreateDeviceBottom,
- .GetPhysicalDeviceExtensionProperties = GetPhysicalDeviceExtensionPropertiesBottom,
- .GetPhysicalDeviceLayerProperties = GetPhysicalDeviceLayerPropertiesBottom,
+ .EnumerateDeviceExtensionProperties = EnumerateDeviceExtensionPropertiesBottom,
+ .EnumerateDeviceLayerProperties = EnumerateDeviceLayerPropertiesBottom,
.GetPhysicalDeviceSparseImageFormatProperties = GetPhysicalDeviceSparseImageFormatPropertiesBottom,
.GetPhysicalDeviceSurfaceSupportKHR = GetPhysicalDeviceSurfaceSupportKHR,
// clang-format on
@@ -858,30 +844,27 @@
namespace vulkan {
-VkResult GetGlobalExtensionProperties(const char* /*layer_name*/,
- uint32_t* count,
- VkExtensionProperties* /*properties*/) {
- if (!count)
- return VK_ERROR_INVALID_POINTER;
+VkResult EnumerateInstanceExtensionProperties(
+ const char* /*layer_name*/,
+ uint32_t* count,
+ VkExtensionProperties* /*properties*/) {
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
// TODO: not yet implemented
- ALOGW("vkGetGlobalExtensionProperties not implemented");
+ ALOGW("vkEnumerateInstanceExtensionProperties not implemented");
*count = 0;
return VK_SUCCESS;
}
-VkResult GetGlobalLayerProperties(uint32_t* count,
- VkLayerProperties* /*properties*/) {
- if (!count)
- return VK_ERROR_INVALID_POINTER;
+VkResult EnumerateInstanceLayerProperties(uint32_t* count,
+ VkLayerProperties* /*properties*/) {
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
// TODO: not yet implemented
- ALOGW("vkGetGlobalLayerProperties not implemented");
+ ALOGW("vkEnumerateInstanceLayerProperties not implemented");
*count = 0;
return VK_SUCCESS;
@@ -892,7 +875,7 @@
VkResult result;
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
VkInstanceCreateInfo local_create_info = *create_info;
if (!local_create_info.pAllocCb)
diff --git a/vulkan/libvulkan/loader.h b/vulkan/libvulkan/loader.h
index 5933eb2..ef3d1f1 100644
--- a/vulkan/libvulkan/loader.h
+++ b/vulkan/libvulkan/loader.h
@@ -43,14 +43,12 @@
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties;
- PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits;
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
- PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount;
- PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties;
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
PFN_vkCreateDevice CreateDevice;
- PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
- PFN_vkGetPhysicalDeviceLayerProperties GetPhysicalDeviceLayerProperties;
+ PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
+ PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties;
// Layers and loader only, not implemented by drivers
@@ -101,8 +99,6 @@
PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout;
PFN_vkCreateImageView CreateImageView;
PFN_vkDestroyImageView DestroyImageView;
- PFN_vkCreateAttachmentView CreateAttachmentView;
- PFN_vkDestroyAttachmentView DestroyAttachmentView;
PFN_vkCreateShaderModule CreateShaderModule;
PFN_vkDestroyShaderModule DestroyShaderModule;
PFN_vkCreateShader CreateShader;
@@ -127,14 +123,6 @@
PFN_vkAllocDescriptorSets AllocDescriptorSets;
PFN_vkFreeDescriptorSets FreeDescriptorSets;
PFN_vkUpdateDescriptorSets UpdateDescriptorSets;
- PFN_vkCreateDynamicViewportState CreateDynamicViewportState;
- PFN_vkDestroyDynamicViewportState DestroyDynamicViewportState;
- PFN_vkCreateDynamicRasterState CreateDynamicRasterState;
- PFN_vkDestroyDynamicRasterState DestroyDynamicRasterState;
- PFN_vkCreateDynamicColorBlendState CreateDynamicColorBlendState;
- PFN_vkDestroyDynamicColorBlendState DestroyDynamicColorBlendState;
- PFN_vkCreateDynamicDepthStencilState CreateDynamicDepthStencilState;
- PFN_vkDestroyDynamicDepthStencilState DestroyDynamicDepthStencilState;
PFN_vkCreateFramebuffer CreateFramebuffer;
PFN_vkDestroyFramebuffer DestroyFramebuffer;
PFN_vkCreateRenderPass CreateRenderPass;
@@ -158,10 +146,15 @@
PFN_vkEndCommandBuffer EndCommandBuffer;
PFN_vkResetCommandBuffer ResetCommandBuffer;
PFN_vkCmdBindPipeline CmdBindPipeline;
- PFN_vkCmdBindDynamicViewportState CmdBindDynamicViewportState;
- PFN_vkCmdBindDynamicRasterState CmdBindDynamicRasterState;
- PFN_vkCmdBindDynamicColorBlendState CmdBindDynamicColorBlendState;
- PFN_vkCmdBindDynamicDepthStencilState CmdBindDynamicDepthStencilState;
+ PFN_vkCmdSetViewport CmdSetViewport;
+ PFN_vkCmdSetScissor CmdSetScissor;
+ PFN_vkCmdSetLineWidth CmdSetLineWidth;
+ PFN_vkCmdSetDepthBias CmdSetDepthBias;
+ PFN_vkCmdSetBlendConstants CmdSetBlendConstants;
+ PFN_vkCmdSetDepthBounds CmdSetDepthBounds;
+ PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask;
+ PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask;
+ PFN_vkCmdSetStencilReference CmdSetStencilReference;
PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets;
PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
@@ -216,11 +209,12 @@
// -----------------------------------------------------------------------------
// loader.cpp
-VkResult GetGlobalExtensionProperties(const char* layer_name,
- uint32_t* count,
- VkExtensionProperties* properties);
-VkResult GetGlobalLayerProperties(uint32_t* count,
- VkLayerProperties* properties);
+VkResult EnumerateInstanceExtensionProperties(
+ const char* layer_name,
+ uint32_t* count,
+ VkExtensionProperties* properties);
+VkResult EnumerateInstanceLayerProperties(uint32_t* count,
+ VkLayerProperties* properties);
VkResult CreateInstance(const VkInstanceCreateInfo* create_info,
VkInstance* instance);
PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name);
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index af3d585..6320192 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -27,6 +27,11 @@
using namespace vulkan;
+// TODO(jessehall): Currently we don't have a good error code for when a native
+// window operation fails. Just returning INITIALIZATION_FAILED for now. Later
+// versions (post SDK 0.9) of the API/extension have a better error code.
+// When updating to that version, audit all error returns.
+
namespace {
// ----------------------------------------------------------------------------
@@ -118,8 +123,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wsign-conversion"
- if (surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR)
- return VK_ERROR_INVALID_VALUE;
+ ALOGE_IF(
+ surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR,
+ "vkGetPhysicalDeviceSurfaceSupportKHR: pSurfaceDescription->sType=%#x "
+ "not supported",
+ surface_desc->sType);
#pragma clang diagnostic pop
const VkSurfaceDescriptionWindowKHR* window_desc =
@@ -170,7 +178,7 @@
} else if (err != 0) {
// TODO(jessehall): Improve error reporting. Can we enumerate possible
// errors and translate them to valid Vulkan result codes?
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
int width, height;
@@ -180,7 +188,7 @@
strerror(-err), err);
if (disconnect)
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
err = window->query(window, NATIVE_WINDOW_DEFAULT_HEIGHT, &height);
if (err != 0) {
@@ -188,7 +196,7 @@
strerror(-err), err);
if (disconnect)
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
if (disconnect)
@@ -311,7 +319,7 @@
// errors and translate them to valid Vulkan result codes?
ALOGE("native_window_api_connect() failed: %s (%d)", strerror(-err),
err);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
err = native_window_set_buffers_dimensions(window.get(),
@@ -324,7 +332,7 @@
create_info->imageExtent.width, create_info->imageExtent.height,
strerror(-err), err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t min_undequeued_buffers;
@@ -335,7 +343,7 @@
// errors and translate them to valid Vulkan result codes?
ALOGE("window->query failed: %s (%d)", strerror(-err), err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t num_images =
(create_info->minImageCount - 1) + min_undequeued_buffers;
@@ -346,7 +354,7 @@
ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
// TODO(jessehall): Do we need to call modify native_window_set_usage()
@@ -401,7 +409,7 @@
// TODO(jessehall): Improve error reporting. Can we enumerate
// possible errors and translate them to valid Vulkan result codes?
ALOGE("dequeueBuffer[%u] failed: %s (%d)", i, strerror(-err), err);
- result = VK_ERROR_UNKNOWN;
+ result = VK_ERROR_INITIALIZATION_FAILED;
break;
}
img.buffer = InitSharedPtr(device, buffer);
@@ -517,7 +525,7 @@
// TODO(jessehall): Improve error reporting. Can we enumerate possible
// errors and translate them to valid Vulkan result codes?
ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), err);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t idx;
@@ -582,20 +590,10 @@
Swapchain& swapchain =
*SwapchainFromHandle(present_info->swapchains[sc]);
uint32_t image_idx = present_info->imageIndices[sc];
+ Swapchain::Image& img = swapchain.images[image_idx];
VkResult result;
int err;
- if (image_idx >= swapchain.num_images ||
- !swapchain.images[image_idx].dequeued) {
- ALOGE(
- "invalid image index or image not acquired: swapchain=%u "
- "index=%u",
- sc, image_idx);
- final_result = VK_ERROR_INVALID_VALUE;
- continue;
- }
- Swapchain::Image& img = swapchain.images[image_idx];
-
int fence = -1;
result = driver_vtbl.QueueSignalNativeFenceANDROID(queue, &fence);
if (result != VK_SUCCESS) {
@@ -616,7 +614,7 @@
// I guess?
ALOGE("queueBuffer failed: %s (%d)", strerror(-err), err);
if (final_result == VK_SUCCESS)
- final_result = VK_ERROR_UNKNOWN;
+ final_result = VK_ERROR_INITIALIZATION_FAILED;
continue;
}
diff --git a/vulkan/nulldrv/null_driver.cpp b/vulkan/nulldrv/null_driver.cpp
index 8f65156..a7b66dd 100644
--- a/vulkan/nulldrv/null_driver.cpp
+++ b/vulkan/nulldrv/null_driver.cpp
@@ -66,16 +66,11 @@
// constants but also want implicit conversions to integral types.
namespace HandleType {
enum Enum {
- kAttachmentView,
kBufferView,
kCmdPool,
kDescriptorPool,
kDescriptorSet,
kDescriptorSetLayout,
- kDynamicColorBlendState,
- kDynamicDepthStencilState,
- kDynamicRasterState,
- kDynamicViewportState,
kEvent,
kFence,
kFramebuffer,
@@ -170,7 +165,8 @@
.module = &HAL_MODULE_INFO_SYM.common,
.close = CloseDevice,
},
- .GetGlobalExtensionProperties = GetGlobalExtensionProperties,
+ .EnumerateInstanceExtensionProperties =
+ EnumerateInstanceExtensionProperties,
.CreateInstance = CreateInstance,
.GetInstanceProcAddr = GetInstanceProcAddr};
@@ -221,9 +217,9 @@
// -----------------------------------------------------------------------------
// Global
-VkResult GetGlobalExtensionProperties(const char*,
- uint32_t* count,
- VkExtensionProperties*) {
+VkResult EnumerateInstanceExtensionProperties(const char*,
+ uint32_t* count,
+ VkExtensionProperties*) {
*count = 0;
return VK_SUCCESS;
}
@@ -271,8 +267,8 @@
VkPhysicalDeviceProperties* properties) {
properties->apiVersion = VK_API_VERSION;
properties->driverVersion = VK_MAKE_VERSION(0, 0, 1);
- properties->vendorId = 0xC0DE;
- properties->deviceId = 0xCAFE;
+ properties->vendorId = 0;
+ properties->deviceId = 0;
properties->deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER;
strcpy(properties->deviceName, "Android Vulkan Null Driver");
memset(properties->pipelineCacheUUID, 0,
@@ -280,6 +276,22 @@
return VK_SUCCESS;
}
+VkResult GetPhysicalDeviceQueueFamilyProperties(
+ VkPhysicalDevice,
+ uint32_t* count,
+ VkQueueFamilyProperties* properties) {
+ if (properties) {
+ if (*count < 1)
+ return VK_INCOMPLETE;
+ properties->queueFlags =
+ VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_DMA_BIT;
+ properties->queueCount = 1;
+ properties->supportsTimestamps = VK_FALSE;
+ }
+ *count = 1;
+ return VK_SUCCESS;
+}
+
VkResult GetPhysicalDeviceMemoryProperties(
VkPhysicalDevice,
VkPhysicalDeviceMemoryProperties* properties) {
@@ -289,7 +301,7 @@
properties->memoryTypes[0].heapIndex = 0;
properties->memoryHeapCount = 1;
properties->memoryHeaps[0].size = kMaxDeviceMemory;
- properties->memoryHeaps[0].flags = VK_MEMORY_HEAP_HOST_LOCAL;
+ properties->memoryHeaps[0].flags = VK_MEMORY_HEAP_HOST_LOCAL_BIT;
return VK_SUCCESS;
}
@@ -470,7 +482,7 @@
ALOGE("CreateImage: not yet implemented: type=%d format=%d mips=%u",
create_info->imageType, create_info->format,
create_info->mipLevels);
- return VK_ERROR_UNAVAILABLE;
+ return VK_UNSUPPORTED;
}
VkDeviceSize size =
@@ -512,13 +524,6 @@
// -----------------------------------------------------------------------------
// No-op types
-VkResult CreateAttachmentView(VkDevice device,
- const VkAttachmentViewCreateInfo*,
- VkAttachmentView* view) {
- *view = AllocHandle(device, HandleType::kAttachmentView);
- return VK_SUCCESS;
-}
-
VkResult CreateBufferView(VkDevice device,
const VkBufferViewCreateInfo*,
VkBufferView* view) {
@@ -534,8 +539,6 @@
}
VkResult CreateDescriptorPool(VkDevice device,
- VkDescriptorPoolUsage,
- uint32_t,
const VkDescriptorPoolCreateInfo*,
VkDescriptorPool* pool) {
*pool = AllocHandle(device, HandleType::kDescriptorPool);
@@ -562,35 +565,6 @@
return VK_SUCCESS;
}
-VkResult CreateDynamicColorBlendState(VkDevice device,
- const VkDynamicColorBlendStateCreateInfo*,
- VkDynamicColorBlendState* state) {
- *state = AllocHandle(device, HandleType::kDynamicColorBlendState);
- return VK_SUCCESS;
-}
-
-VkResult CreateDynamicDepthStencilState(
- VkDevice device,
- const VkDynamicDepthStencilStateCreateInfo*,
- VkDynamicDepthStencilState* state) {
- *state = AllocHandle(device, HandleType::kDynamicDepthStencilState);
- return VK_SUCCESS;
-}
-
-VkResult CreateDynamicRasterState(VkDevice device,
- const VkDynamicRasterStateCreateInfo*,
- VkDynamicRasterState* state) {
- *state = AllocHandle(device, HandleType::kDynamicRasterState);
- return VK_SUCCESS;
-}
-
-VkResult CreateDynamicViewportState(VkDevice device,
- const VkDynamicViewportStateCreateInfo*,
- VkDynamicViewportState* state) {
- *state = AllocHandle(device, HandleType::kDynamicViewportState);
- return VK_SUCCESS;
-}
-
VkResult CreateEvent(VkDevice device,
const VkEventCreateInfo*,
VkEvent* event) {
@@ -712,16 +686,6 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
-VkResult GetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) {
- ALOGV("TODO: vk%s", __FUNCTION__);
- return VK_SUCCESS;
-}
-
-VkResult GetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) {
- ALOGV("TODO: vk%s", __FUNCTION__);
- return VK_SUCCESS;
-}
-
VkResult GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) {
ALOGV("TODO: vk%s", __FUNCTION__);
return VK_SUCCESS;
@@ -742,17 +706,17 @@
return VK_SUCCESS;
}
-VkResult GetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
+VkResult EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
ALOGV("TODO: vk%s", __FUNCTION__);
return VK_SUCCESS;
}
-VkResult GetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
+VkResult EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
ALOGV("TODO: vk%s", __FUNCTION__);
return VK_SUCCESS;
}
-VkResult GetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
+VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
ALOGV("TODO: vk%s", __FUNCTION__);
return VK_SUCCESS;
}
@@ -894,10 +858,6 @@
return VK_SUCCESS;
}
-VkResult DestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) {
- return VK_SUCCESS;
-}
-
VkResult DestroyShaderModule(VkDevice device, VkShaderModule shaderModule) {
return VK_SUCCESS;
}
@@ -960,22 +920,6 @@
return VK_SUCCESS;
}
-VkResult DestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) {
- return VK_SUCCESS;
-}
-
-VkResult DestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) {
- return VK_SUCCESS;
-}
-
-VkResult DestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) {
- return VK_SUCCESS;
-}
-
-VkResult DestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) {
- return VK_SUCCESS;
-}
-
VkResult DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) {
return VK_SUCCESS;
}
@@ -1014,16 +958,31 @@
void CmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) {
}
-void CmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) {
+void CmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports) {
}
-void CmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) {
+void CmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors) {
}
-void CmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) {
+void CmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth) {
}
-void CmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) {
+void CmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) {
+}
+
+void CmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]) {
+}
+
+void CmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) {
+}
+
+void CmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask) {
+}
+
+void CmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask) {
+}
+
+void CmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference) {
}
void CmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) {
@@ -1077,13 +1036,13 @@
void CmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
}
-void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
+void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
}
void CmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects) {
}
-void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) {
+void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) {
}
void CmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) {
diff --git a/vulkan/nulldrv/null_driver.h b/vulkan/nulldrv/null_driver.h
index 6bfbda5..9c26f0e 100644
--- a/vulkan/nulldrv/null_driver.h
+++ b/vulkan/nulldrv/null_driver.h
@@ -31,8 +31,7 @@
VkResult EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName);
VkResult GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
-VkResult GetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount);
-VkResult GetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
+VkResult GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties);
VkResult GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName);
VkResult GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
@@ -41,10 +40,10 @@
VkResult GetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
VkResult CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
VkResult DestroyDevice(VkDevice device);
-VkResult GetGlobalExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
-VkResult GetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties);
-VkResult GetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties);
-VkResult GetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
+VkResult EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
+VkResult EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties);
+VkResult EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties);
+VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
VkResult GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
VkResult QueueSubmit(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
VkResult QueueWaitIdle(VkQueue queue);
@@ -91,8 +90,6 @@
VkResult GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
VkResult CreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
VkResult DestroyImageView(VkDevice device, VkImageView imageView);
-VkResult CreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView);
-VkResult DestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView);
VkResult CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
VkResult DestroyShaderModule(VkDevice device, VkShaderModule shaderModule);
VkResult CreateShader(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
@@ -111,20 +108,12 @@
VkResult DestroySampler(VkDevice device, VkSampler sampler);
VkResult CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
VkResult DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout);
-VkResult CreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
+VkResult CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
VkResult DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool);
VkResult ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool);
VkResult AllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
VkResult UpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
-VkResult CreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState);
-VkResult DestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState);
-VkResult CreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState);
-VkResult DestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState);
-VkResult CreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState);
-VkResult DestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState);
-VkResult CreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState);
-VkResult DestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState);
VkResult CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
VkResult DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer);
VkResult CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
@@ -139,10 +128,15 @@
VkResult EndCommandBuffer(VkCmdBuffer cmdBuffer);
VkResult ResetCommandBuffer(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags);
void CmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
-void CmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState);
-void CmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState);
-void CmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState);
-void CmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState);
+void CmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports);
+void CmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
+void CmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth);
+void CmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
+void CmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]);
+void CmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds);
+void CmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask);
+void CmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask);
+void CmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference);
void CmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
void CmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
void CmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
@@ -160,9 +154,9 @@
void CmdUpdateBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
void CmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
void CmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
void CmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
-void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects);
+void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects);
void CmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
void CmdSetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void CmdResetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
diff --git a/vulkan/nulldrv/null_driver_gen.cpp b/vulkan/nulldrv/null_driver_gen.cpp
index 56ee49a..879ad32 100644
--- a/vulkan/nulldrv/null_driver_gen.cpp
+++ b/vulkan/nulldrv/null_driver_gen.cpp
@@ -46,18 +46,16 @@
// clang-format off
{"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(CreateDevice)},
{"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(DestroyInstance)},
+ {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(EnumerateDeviceExtensionProperties)},
+ {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(EnumerateDeviceLayerProperties)},
{"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices)},
{"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr)},
- {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceExtensionProperties)},
{"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceFeatures)},
{"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceFormatProperties)},
{"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceImageFormatProperties)},
- {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceLayerProperties)},
- {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceLimits)},
{"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceMemoryProperties)},
{"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceProperties)},
- {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueCount)},
- {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueProperties)},
+ {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueFamilyProperties)},
{"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSparseImageFormatProperties)},
// clang-format on
};
@@ -72,10 +70,6 @@
{"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(CmdBeginQuery)},
{"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(CmdBeginRenderPass)},
{"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDescriptorSets)},
- {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicColorBlendState)},
- {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicDepthStencilState)},
- {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicRasterState)},
- {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicViewportState)},
{"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(CmdBindIndexBuffer)},
{"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(CmdBindPipeline)},
{"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(CmdBindVertexBuffers)},
@@ -105,11 +99,19 @@
{"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(CmdResetEvent)},
{"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(CmdResetQueryPool)},
{"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(CmdResolveImage)},
+ {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(CmdSetBlendConstants)},
+ {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(CmdSetDepthBias)},
+ {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(CmdSetDepthBounds)},
{"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(CmdSetEvent)},
+ {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(CmdSetLineWidth)},
+ {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(CmdSetScissor)},
+ {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilCompareMask)},
+ {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilReference)},
+ {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilWriteMask)},
+ {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(CmdSetViewport)},
{"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(CmdUpdateBuffer)},
{"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(CmdWaitEvents)},
{"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(CmdWriteTimestamp)},
- {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(CreateAttachmentView)},
{"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateBuffer)},
{"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(CreateBufferView)},
{"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateCommandBuffer)},
@@ -117,10 +119,6 @@
{"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateComputePipelines)},
{"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(CreateDescriptorPool)},
{"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(CreateDescriptorSetLayout)},
- {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicColorBlendState)},
- {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicDepthStencilState)},
- {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicRasterState)},
- {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicViewportState)},
{"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(CreateEvent)},
{"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(CreateFence)},
{"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateFramebuffer)},
@@ -135,7 +133,6 @@
{"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(CreateSemaphore)},
{"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(CreateShader)},
{"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(CreateShaderModule)},
- {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(DestroyAttachmentView)},
{"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyBuffer)},
{"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(DestroyBufferView)},
{"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyCommandBuffer)},
@@ -143,10 +140,6 @@
{"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(DestroyDescriptorPool)},
{"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(DestroyDescriptorSetLayout)},
{"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice)},
- {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicColorBlendState)},
- {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicDepthStencilState)},
- {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicRasterState)},
- {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicViewportState)},
{"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(DestroyEvent)},
{"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(DestroyFence)},
{"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyFramebuffer)},
diff --git a/vulkan/tools/Android.mk b/vulkan/tools/Android.mk
index 9ea5f14..31d6089 100644
--- a/vulkan/tools/Android.mk
+++ b/vulkan/tools/Android.mk
@@ -17,6 +17,7 @@
LOCAL_CLANG := true
LOCAL_CFLAGS := -std=c99 -fvisibility=hidden -fstrict-aliasing
+LOCAL_CFLAGS += -DLOG_TAG=\"vkinfo\"
LOCAL_CFLAGS += -Weverything -Werror -Wno-padded -Wno-undef -Wno-switch-enum
LOCAL_CPPFLAGS := -std=c++1y \
-Wno-c++98-compat-pedantic \
diff --git a/vulkan/tools/vkinfo.cpp b/vulkan/tools/vkinfo.cpp
index e1eb129..583e607 100644
--- a/vulkan/tools/vkinfo.cpp
+++ b/vulkan/tools/vkinfo.cpp
@@ -38,38 +38,14 @@
case VK_EVENT_SET: result_str = "VK_EVENT_SET"; break;
case VK_EVENT_RESET: result_str = "VK_EVENT_RESET"; break;
case VK_INCOMPLETE: result_str = "VK_INCOMPLETE"; break;
- case VK_ERROR_UNKNOWN: result_str = "VK_ERROR_UNKNOWN"; break;
- case VK_ERROR_UNAVAILABLE: result_str = "VK_ERROR_UNAVAILABLE"; break;
- case VK_ERROR_INITIALIZATION_FAILED: result_str = "VK_ERROR_INITIALIZATION_FAILED"; break;
case VK_ERROR_OUT_OF_HOST_MEMORY: result_str = "VK_ERROR_OUT_OF_HOST_MEMORY"; break;
case VK_ERROR_OUT_OF_DEVICE_MEMORY: result_str = "VK_ERROR_OUT_OF_DEVICE_MEMORY"; break;
- case VK_ERROR_DEVICE_ALREADY_CREATED: result_str = "VK_ERROR_DEVICE_ALREADY_CREATED"; break;
+ case VK_ERROR_INITIALIZATION_FAILED: result_str = "VK_ERROR_INITIALIZATION_FAILED"; break;
case VK_ERROR_DEVICE_LOST: result_str = "VK_ERROR_DEVICE_LOST"; break;
- case VK_ERROR_INVALID_POINTER: result_str = "VK_ERROR_INVALID_POINTER"; break;
- case VK_ERROR_INVALID_VALUE: result_str = "VK_ERROR_INVALID_VALUE"; break;
- case VK_ERROR_INVALID_HANDLE: result_str = "VK_ERROR_INVALID_HANDLE"; break;
- case VK_ERROR_INVALID_ORDINAL: result_str = "VK_ERROR_INVALID_ORDINAL"; break;
- case VK_ERROR_INVALID_MEMORY_SIZE: result_str = "VK_ERROR_INVALID_MEMORY_SIZE"; break;
- case VK_ERROR_INVALID_EXTENSION: result_str = "VK_ERROR_INVALID_EXTENSION"; break;
- case VK_ERROR_INVALID_FLAGS: result_str = "VK_ERROR_INVALID_FLAGS"; break;
- case VK_ERROR_INVALID_ALIGNMENT: result_str = "VK_ERROR_INVALID_ALIGNMENT"; break;
- case VK_ERROR_INVALID_FORMAT: result_str = "VK_ERROR_INVALID_FORMAT"; break;
- case VK_ERROR_INVALID_IMAGE: result_str = "VK_ERROR_INVALID_IMAGE"; break;
- case VK_ERROR_INVALID_DESCRIPTOR_SET_DATA: result_str = "VK_ERROR_INVALID_DESCRIPTOR_SET_DATA"; break;
- case VK_ERROR_INVALID_QUEUE_TYPE: result_str = "VK_ERROR_INVALID_QUEUE_TYPE"; break;
- case VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION: result_str = "VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION"; break;
- case VK_ERROR_BAD_SHADER_CODE: result_str = "VK_ERROR_BAD_SHADER_CODE"; break;
- case VK_ERROR_BAD_PIPELINE_DATA: result_str = "VK_ERROR_BAD_PIPELINE_DATA"; break;
- case VK_ERROR_NOT_MAPPABLE: result_str = "VK_ERROR_NOT_MAPPABLE"; break;
case VK_ERROR_MEMORY_MAP_FAILED: result_str = "VK_ERROR_MEMORY_MAP_FAILED"; break;
- case VK_ERROR_MEMORY_UNMAP_FAILED: result_str = "VK_ERROR_MEMORY_UNMAP_FAILED"; break;
- case VK_ERROR_INCOMPATIBLE_DEVICE: result_str = "VK_ERROR_INCOMPATIBLE_DEVICE"; break;
+ case VK_ERROR_LAYER_NOT_PRESENT: result_str = "VK_ERROR_LAYER_NOT_PRESENT"; break;
+ case VK_ERROR_EXTENSION_NOT_PRESENT: result_str = "VK_ERROR_EXTENSION_NOT_PRESENT"; break;
case VK_ERROR_INCOMPATIBLE_DRIVER: result_str = "VK_ERROR_INCOMPATIBLE_DRIVER"; break;
- case VK_ERROR_INCOMPLETE_COMMAND_BUFFER: result_str = "VK_ERROR_INCOMPLETE_COMMAND_BUFFER"; break;
- case VK_ERROR_BUILDING_COMMAND_BUFFER: result_str = "VK_ERROR_BUILDING_COMMAND_BUFFER"; break;
- case VK_ERROR_MEMORY_NOT_BOUND: result_str = "VK_ERROR_MEMORY_NOT_BOUND"; break;
- case VK_ERROR_INCOMPATIBLE_QUEUE: result_str = "VK_ERROR_INCOMPATIBLE_QUEUE"; break;
- case VK_ERROR_INVALID_LAYER: result_str = "VK_ERROR_INVALID_LAYER"; break;
default: result_str = "<unknown VkResult>"; break;
// clang-format on
}
@@ -94,6 +70,21 @@
}
}
+const char* VkQueueFlagBitStr(VkQueueFlagBits bit) {
+ switch (bit) {
+ case VK_QUEUE_GRAPHICS_BIT:
+ return "GRAPHICS";
+ case VK_QUEUE_COMPUTE_BIT:
+ return "COMPUTE";
+ case VK_QUEUE_DMA_BIT:
+ return "DMA";
+ case VK_QUEUE_SPARSE_MEMMGR_BIT:
+ return "SPARSE";
+ case VK_QUEUE_EXTENDED_BIT:
+ return "EXT";
+ }
+}
+
void DumpPhysicalDevice(uint32_t idx, VkPhysicalDevice pdev) {
VkResult result;
std::ostringstream strbuf;
@@ -113,8 +104,8 @@
if (result != VK_SUCCESS)
die("vkGetPhysicalDeviceMemoryProperties", result);
for (uint32_t heap = 0; heap < mem_props.memoryHeapCount; heap++) {
- if ((mem_props.memoryHeaps[heap].flags & VK_MEMORY_HEAP_HOST_LOCAL) !=
- 0)
+ if ((mem_props.memoryHeaps[heap].flags &
+ VK_MEMORY_HEAP_HOST_LOCAL_BIT) != 0)
strbuf << "HOST_LOCAL";
printf(" Heap %u: 0x%" PRIx64 " %s\n", heap,
mem_props.memoryHeaps[heap].size, strbuf.str().c_str());
@@ -137,10 +128,37 @@
strbuf << " WRITE_COMBINED";
if ((flags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) != 0)
strbuf << " LAZILY_ALLOCATED";
- printf(" Type %u: %s\n", type, strbuf.str().c_str());
+ printf(" Type %u: %s\n", type, strbuf.str().c_str());
strbuf.str(std::string());
}
}
+
+ uint32_t num_queue_families;
+ result = vkGetPhysicalDeviceQueueFamilyProperties(pdev, &num_queue_families,
+ nullptr);
+ if (result != VK_SUCCESS)
+ die("vkGetPhysicalDeviceQueueFamilyProperties (count)", result);
+ std::vector<VkQueueFamilyProperties> queue_family_properties(
+ num_queue_families);
+ result = vkGetPhysicalDeviceQueueFamilyProperties(
+ pdev, &num_queue_families, queue_family_properties.data());
+ if (result != VK_SUCCESS)
+ die("vkGetPhysicalDeviceQueueFamilyProperties (values)", result);
+ for (uint32_t family = 0; family < num_queue_families; family++) {
+ const VkQueueFamilyProperties& qprops = queue_family_properties[family];
+ const char* sep = "";
+ int bit, queue_flags = static_cast<int>(qprops.queueFlags);
+ while ((bit = __builtin_ffs(queue_flags)) != 0) {
+ VkQueueFlagBits flag = VkQueueFlagBits(1 << (bit - 1));
+ strbuf << sep << VkQueueFlagBitStr(flag);
+ queue_flags &= ~flag;
+ sep = "+";
+ }
+ printf(" Queue Family %u: %2ux %s timestamps:%s\n", family,
+ qprops.queueCount, strbuf.str().c_str(),
+ qprops.supportsTimestamps ? "YES" : "NO");
+ strbuf.str(std::string());
+ }
}
} // namespace
@@ -184,9 +202,7 @@
for (uint32_t i = 0; i < physical_devices.size(); i++)
DumpPhysicalDevice(i, physical_devices[i]);
- result = vkDestroyInstance(instance);
- if (result != VK_SUCCESS)
- die("vkDestroyInstance", result);
+ vkDestroyInstance(instance);
return 0;
}