diff --git a/doc/notes/3.1.2.md b/doc/notes/3.1.2.md index 39c91653c9..7465bc19eb 100644 --- a/doc/notes/3.1.2.md +++ b/doc/notes/3.1.2.md @@ -61,6 +61,7 @@ This build includes the following changes: - Vulkan: Function addresses are now retrieved only once, using the optimal method for each function type. * This avoids warnings on pedantic validation layers. - Fixed callback invocation bugs on 32-bit architectures. +- Fixed various javadoc formatting issues (#308) ### Breaking Changes diff --git a/modules/generator/src/main/kotlin/org/lwjgl/generator/JavaDoc.kt b/modules/generator/src/main/kotlin/org/lwjgl/generator/JavaDoc.kt index fb60d63f83..7c82eb0bba 100644 --- a/modules/generator/src/main/kotlin/org/lwjgl/generator/JavaDoc.kt +++ b/modules/generator/src/main/kotlin/org/lwjgl/generator/JavaDoc.kt @@ -7,7 +7,7 @@ package org.lwjgl.generator import java.lang.Math.* private val REDUNDANT_WHITESPACE = "^[ \\t]+$".toRegex(RegexOption.MULTILINE) -private val BLOCK_NODE = "(?:div|h[1-6]|pre|table|thead|tfoot|tbody|td|tr|ul|li|ol|dl|dt|dd)" // TODO: add more here if necessary +private val BLOCK_NODE = "(?:div|h[1-6]|code|table|thead|tfoot|tbody|td|tr|ul|li|ol|dl|dt|dd)" // TODO: add more here if necessary private val FRAGMENT = "(?$BLOCK_NODE(?:\\s[^>]+)?>|^)([\\s\\S]*?)(?=?$BLOCK_NODE(?:\\s[^>]+)?>|$)".toRegex() private val CHILD_NODE = "<(?:tr|thead|tfoot|tbody|li|dt|dd)>".toRegex() private val PARAGRAPH_PATTERN = "\\n\\n(?:\\n?[ \\t]*[\\S][^\\n]*)+".toRegex(RegexOption.MULTILINE) @@ -314,12 +314,12 @@ private val CODE_BLOCK_ESCAPE_PATTERN = "^".toRegex(RegexOption.MULTILINE) // li private val CODE_BLOCK_TAB_PATTERN = "\t".toRegex() // tabs /** Useful for pre-formatted code blocks. */ -fun codeBlock(code: String) = """
+fun codeBlock(code: String) = """
${code
.replace(CODE_BLOCK_TRIM_PATTERN, "") // ...trim
.replace(CODE_BLOCK_ESCAPE_PATTERN, "\uFFFF") // ...escape
.replace(CODE_BLOCK_TAB_PATTERN, " ") // ...replace with 4 spaces for consistent formatting.
-}
"""
+}"""
fun note(content: String) = "typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
+
+typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
uint64_t object,
@@ -109,7 +110,7 @@ val PFN_vkDebugReportCallbackEXT = "PFN_vkDebugReportCallbackEXT".callback(
int32_t messageCode,
const char* pLayerPrefix,
const char* pMessage,
- void* pUserData);
+ void* pUserData);
typedef enum VkDebugReportObjectTypeEXT {
+
+typedef enum VkDebugReportObjectTypeEXT {
VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
@@ -153,7 +155,7 @@ val PFN_vkDebugReportCallbackEXT = "PFN_vkDebugReportCallbackEXT".callback(
VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
-} VkDebugReportObjectTypeEXT;
+} VkDebugReportObjectTypeEXT;
typedef enum VkSwapchainCreateFlagBitsKHR {
+
+typedef enum VkSwapchainCreateFlagBitsKHR {
VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
-} VkSwapchainCreateFlagBitsKHR;
+} VkSwapchainCreateFlagBitsKHR;
== Description
@@ -606,13 +609,14 @@ val VkDebugReportCallbackCreateInfoEXT = struct(VULKAN_PACKAGE, "VkDebugReportCa
VkStructureType.member("sType", "the type of this structure.")
nullable..const..opaque_p.member("pNext", "{@code NULL} or a pointer to an extension-specific structure.")
VkDebugReportFlagsEXT.member("flags", """indicate which event(s) will cause this callback to be called. Flags are interpreted as bitmasks and multiple may be set. Bits which can be set include:
-typedef enum VkDebugReportFlagBitsEXT {
+
+typedef enum VkDebugReportFlagBitsEXT {
VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
-} VkDebugReportFlagBitsEXT;
+} VkDebugReportFlagBitsEXT;
typedef enum VkMemoryAllocateFlagBitsKHX {
+
+typedef enum VkMemoryAllocateFlagBitsKHX {
VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
-} VkMemoryAllocateFlagBitsKHX;
+} VkMemoryAllocateFlagBitsKHX;
i
is non-zero if physical device i
has a presentation engine, and where bit j
is set in element i
if physical device i
can present swapchain images from physical device j
. If element i
is non-zero, then bit i
must be set.", size = "VK_MAX_DEVICE_GROUP_SIZE_KHX")
VkDeviceGroupPresentModeFlagsKHX.member("modes", """a bitmask indicating which device group presentation modes are supported. The bits returned in {@code modes} are:
-typedef enum VkDeviceGroupPresentModeFlagBitsKHX {
+
+typedef enum VkDeviceGroupPresentModeFlagBitsKHX {
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
-} VkDeviceGroupPresentModeFlagBitsKHX;
+} VkDeviceGroupPresentModeFlagBitsKHX;
typedef enum VkValidationCheckEXT {
+
+typedef enum VkValidationCheckEXT {
VK_VALIDATION_CHECK_ALL_EXT = 0,
-} VkValidationCheckEXT;
+} VkValidationCheckEXT;
typedef enum VkExternalMemoryHandleTypeFlagBitsKHX {
+
+typedef enum VkExternalMemoryHandleTypeFlagBitsKHX {
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
@@ -1799,7 +1807,7 @@ val VkPhysicalDeviceExternalImageFormatInfoKHX = struct(VULKAN_PACKAGE, "VkPhysi
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
-} VkExternalMemoryHandleTypeFlagBitsKHX;
+} VkExternalMemoryHandleTypeFlagBitsKHX;
typedef enum VkExternalSemaphoreHandleTypeFlagBitsKHX {
+
+typedef enum VkExternalSemaphoreHandleTypeFlagBitsKHX {
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010,
-} VkExternalSemaphoreHandleTypeFlagBitsKHX;
+} VkExternalSemaphoreHandleTypeFlagBitsKHX;
typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX {
+
+typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX {
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
-} VkIndirectCommandsLayoutUsageFlagBitsNVX;
+} VkIndirectCommandsLayoutUsageFlagBitsNVX;
void cmdProcessAllSequences(cmd, objectTable, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferoffset)
-{
+
+void cmdProcessAllSequences(cmd, objectTable, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferoffset)
+{
for (s = 0; s < sequencesCount; s++)
{
sequence = s;
@@ -2653,7 +2664,7 @@ val VkIndirectCommandsLayoutCreateInfoNVX = struct(VULKAN_PACKAGE, "VkIndirectCo
cmdProcessSequence( cmd, objectTable, indirectCommandsLayout, pIndirectCommandsTokens, sequence );
}
-}
+}
typedef enum VkObjectEntryTypeNVX {
+
+typedef enum VkObjectEntryTypeNVX {
VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
-} VkObjectEntryTypeNVX;
+} VkObjectEntryTypeNVX;
typedef enum VkObjectEntryUsageFlagBitsNVX {
+
+typedef enum VkObjectEntryUsageFlagBitsNVX {
VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
-} VkObjectEntryUsageFlagBitsNVX;
+} VkObjectEntryUsageFlagBitsNVX;
typedef enum VkDisplayPowerStateEXT {
+
+typedef enum VkDisplayPowerStateEXT {
VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
VK_DISPLAY_POWER_STATE_ON_EXT = 2,
-} VkDisplayPowerStateEXT;
+} VkDisplayPowerStateEXT;
typedef enum VkDisplayEventTypeEXT {
+
+typedef enum VkDisplayEventTypeEXT {
VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
-} VkDisplayEventTypeEXT;
+} VkDisplayEventTypeEXT;
typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
+
+typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
void* pUserData,
size_t size,
size_t alignment,
- VkSystemAllocationScope allocationScope);
+ VkSystemAllocationScope allocationScope);
typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
+
+typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
void* pUserData,
void* pOriginal,
size_t size,
size_t alignment,
- VkSystemAllocationScope allocationScope);
+ VkSystemAllocationScope allocationScope);
min(original size, new size) - 1
must be preserved in the returned allocation. If {@code size} is larger than the old size, the contents of the additional space are undefined. If satisfying these requirements involves creating a new allocation, then the old allocation should be freed.
@@ -260,9 +262,10 @@ val PFN_vkFreeFunction = "PFN_vkFreeFunction".callback(
typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
+
+typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
void* pUserData,
- void* pMemory);
+ void* pMemory);
typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
+
+typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
void* pUserData,
size_t size,
VkInternalAllocationType allocationType,
- VkSystemAllocationScope allocationScope);
+ VkSystemAllocationScope allocationScope);
typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
+
+typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
void* pUserData,
size_t size,
VkInternalAllocationType allocationType,
- VkSystemAllocationScope allocationScope);
+ VkSystemAllocationScope allocationScope);
@@ -671,7 +676,8 @@ val VkFormatProperties = struct(VULKAN_PACKAGE, "VkFormatProperties", mutable =
typedef enum VkFormatFeatureFlagBits {
+
+typedef enum VkFormatFeatureFlagBits {
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
@@ -688,7 +694,7 @@ val VkFormatProperties = struct(VULKAN_PACKAGE, "VkFormatProperties", mutable =
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
-} VkFormatFeatureFlagBits;
+} VkFormatFeatureFlagBits;
The {@code linearTilingFeatures} and {@code optimalTilingFeatures} members of the ##VkFormatProperties structure describe what features are supported by #IMAGE_TILING_LINEAR and #IMAGE_TILING_OPTIMAL images, respectively.
@@ -805,7 +811,8 @@ val VkPhysicalDeviceLimits = struct(VULKAN_PACKAGE, "VkPhysicalDeviceLimits", mu
typedef enum VkSampleCountFlagBits {
+
+typedef enum VkSampleCountFlagBits {
VK_SAMPLE_COUNT_1_BIT = 0x00000001,
VK_SAMPLE_COUNT_2_BIT = 0x00000002,
VK_SAMPLE_COUNT_4_BIT = 0x00000004,
@@ -813,7 +820,7 @@ val VkPhysicalDeviceLimits = struct(VULKAN_PACKAGE, "VkPhysicalDeviceLimits", mu
VK_SAMPLE_COUNT_16_BIT = 0x00000010,
VK_SAMPLE_COUNT_32_BIT = 0x00000020,
VK_SAMPLE_COUNT_64_BIT = 0x00000040,
-} VkSampleCountFlagBits;
+} VkSampleCountFlagBits;
The sample count limits defined above represent the minimum supported sample counts for each image type. Individual images may support additional sample counts, which are queried using #GetPhysicalDeviceImageFormatProperties() as described in Supported Sample Counts.typedef enum VkQueueFlagBits {
+
+typedef enum VkQueueFlagBits {
VK_QUEUE_GRAPHICS_BIT = 0x00000001,
VK_QUEUE_COMPUTE_BIT = 0x00000002,
VK_QUEUE_TRANSFER_BIT = 0x00000004,
VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
-} VkQueueFlagBits;
+} VkQueueFlagBits;
typedef enum VkMemoryPropertyFlagBits {
+
+typedef enum VkMemoryPropertyFlagBits {
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
-} VkMemoryPropertyFlagBits;
+} VkMemoryPropertyFlagBits;
typedef enum VkMemoryHeapFlagBits {
+
+typedef enum VkMemoryHeapFlagBits {
VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
-} VkMemoryHeapFlagBits;
+} VkMemoryHeapFlagBits;
(X {leq} Y) {land} {lnot} (Y {leq} X)
according to the preorder. Note that the list of all allowed memory property flag combinations above satisfies this preorder, but other orders would as well. The goal of this ordering is to enable applications to use a simple search loop in selecting the proper memory type, along the lines of:
- // Find a memory type in "memoryTypeBits" that includes all of "properties"
-int32_t FindProperties(uint32_t memoryTypeBits, VkMemoryPropertyFlags properties)
-{
+
+// Find a memory type in "memoryTypeBits" that includes all of "properties"
+int32_t FindProperties(uint32_t memoryTypeBits, VkMemoryPropertyFlags properties)
+{
for (int32_t i = 0; i < memoryTypeCount; ++i)
{
if ((memoryTypeBits & (1 << i)) &&
@@ -1137,15 +1148,15 @@ int32_t FindProperties(uint32_t memoryTypeBits, VkMemoryPropertyFlags properties
return i;
}
return -1;
-}
+}
-// Try to find an optimal memory type, or if it does not exist
-// find any compatible memory type
-VkMemoryRequirements memoryRequirements;
-vkGetImageMemoryRequirements(device, image, &memoryRequirements);
-int32_t memoryType = FindProperties(memoryRequirements.memoryTypeBits, optimalProperties);
-if (memoryType == -1)
- memoryType = FindProperties(memoryRequirements.memoryTypeBits, requiredProperties);
+// Try to find an optimal memory type, or if it does not exist
+// find any compatible memory type
+VkMemoryRequirements memoryRequirements;
+vkGetImageMemoryRequirements(device, image, &memoryRequirements);
+int32_t memoryType = FindProperties(memoryRequirements.memoryTypeBits, optimalProperties);
+if (memoryType == -1)
+ memoryType = FindProperties(memoryRequirements.memoryTypeBits, requiredProperties);
The loop will find the first supported memory type that has all bits requested in {@code properties} set. If there is no exact match, it will find a closest match (i.e. a memory type with the fewest additional bits set), which has some additional bits set but which are not detrimental to the behaviors requested by {@code properties}. The application can first search for the optimal properties, e.g. a memory type that is device-local or supports coherent cached accesses, as appropriate for the intended usage, and if such a memory type is not present can fallback to searching for a less optimal but guaranteed set of properties such as "0" or "host-visible and coherent".
@@ -1400,11 +1411,12 @@ val VkSparseImageFormatProperties = struct(VULKAN_PACKAGE, "VkSparseImageFormatP
VkImageAspectFlags.member("aspectMask", "a bitmask of {@code VkImageAspectFlagBits} specifying which aspects of the image the properties apply to.")
VkExtent3D.member("imageGranularity", "the width, height, and depth of the sparse image block in texels or compressed texel blocks.")
VkSparseImageFormatFlags.member("flags", """a bitmask specifying additional information about the sparse resource. Bits which can be set include:
-typedef enum VkSparseImageFormatFlagBits {
+
+typedef enum VkSparseImageFormatFlagBits {
VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
-} VkSparseImageFormatFlagBits;
+} VkSparseImageFormatFlagBits;
typedef enum VkSparseMemoryBindFlagBits {
+
+typedef enum VkSparseMemoryBindFlagBits {
VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
-} VkSparseMemoryBindFlagBits;
+} VkSparseMemoryBindFlagBits;
typedef enum VkFenceCreateFlagBits {
+
+typedef enum VkFenceCreateFlagBits {
VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
-} VkFenceCreateFlagBits;
+} VkFenceCreateFlagBits;
If {@code flags} contains #FENCE_CREATE_SIGNALED_BIT then the fence object is created in the signaled state; otherwise it is created in the unsignaled state.""")
}
@@ -1762,11 +1776,12 @@ val VkQueryPoolCreateInfo = struct(VULKAN_PACKAGE, "VkQueryPoolCreateInfo") {
nullable..const..opaque_p.member("pNext", "{@code NULL} or a pointer to an extension-specific structure.")
VkQueryPoolCreateFlags.member("flags", "reserved for future use.")
VkQueryType.member("queryType", """the type of queries managed by the pool, and must be one of the values
-typedef enum VkQueryType {
+
+typedef enum VkQueryType {
VK_QUERY_TYPE_OCCLUSION = 0,
VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
VK_QUERY_TYPE_TIMESTAMP = 2,
-} VkQueryType;
""")
+} VkQueryType;""")
uint32_t.member("queryCount", "the number of queries managed by the pool.")
VkQueryPipelineStatisticFlags.member("pipelineStatistics", "a bitmask indicating which counters will be returned in queries on the new pool, as described below in the “Pipeline Statistics Queries” section. {@code pipelineStatistics} is ignored if {@code queryType} is not #QUERY_TYPE_PIPELINE_STATISTICS.")
}
@@ -1779,7 +1794,8 @@ val VkBufferCreateInfo = struct(VULKAN_PACKAGE, "VkBufferCreateInfo") {
typedef enum VkBufferUsageFlagBits {
+
+typedef enum VkBufferUsageFlagBits {
VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
@@ -1789,7 +1805,7 @@ val VkBufferCreateInfo = struct(VULKAN_PACKAGE, "VkBufferCreateInfo") {
VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
-} VkBufferUsageFlagBits;
+} VkBufferUsageFlagBits;
typedef enum VkBufferCreateFlagBits {
+
+typedef enum VkBufferCreateFlagBits {
VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
-} VkBufferCreateFlagBits;
+} VkBufferCreateFlagBits;
These bits have the following meanings:
@@ -2032,13 +2049,15 @@ val VkSubresourceLayout = struct(VULKAN_PACKAGE, "VkSubresourceLayout", mutable
// (x,y,z,layer) are in texel coordinates
-address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*elementSize + offset
+
+// (x,y,z,layer) are in texel coordinates
+address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*elementSize + offset
For compressed formats, the {@code rowPitch} is the number of bytes between compressed texel blocks in adjacent rows. {@code arrayPitch} is the number of bytes between compressed texel blocks in adjacent array layers. {@code depthPitch} is the number of bytes between compressed texel blocks in adjacent slices of a 3D image.
- // (x,y,z,layer) are in compressed texel block coordinates
-address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*compressedTexelBlockByteSize + offset;
+
+// (x,y,z,layer) are in compressed texel block coordinates
+address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*compressedTexelBlockByteSize + offset;
{@code arrayPitch} is undefined for images that were not created as arrays. {@code depthPitch} is defined only for 3D images.
@@ -2063,7 +2082,8 @@ val VkComponentMapping = struct(VULKAN_PACKAGE, "VkComponentMapping") {
typedef enum VkComponentSwizzle {
+
+typedef enum VkComponentSwizzle {
VK_COMPONENT_SWIZZLE_IDENTITY = 0,
VK_COMPONENT_SWIZZLE_ZERO = 1,
VK_COMPONENT_SWIZZLE_ONE = 2,
@@ -2071,7 +2091,7 @@ val VkComponentMapping = struct(VULKAN_PACKAGE, "VkComponentMapping") {
VK_COMPONENT_SWIZZLE_G = 4,
VK_COMPONENT_SWIZZLE_B = 5,
VK_COMPONENT_SWIZZLE_A = 6,
-} VkComponentSwizzle;
+} VkComponentSwizzle;
typedef enum VkImageAspectFlagBits {
+
+typedef enum VkImageAspectFlagBits {
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;
+} VkImageAspectFlagBits;
The mask must be only #IMAGE_ASPECT_COLOR_BIT, #IMAGE_ASPECT_DEPTH_BIT or #IMAGE_ASPECT_STENCIL_BIT if {@code format} is a color, depth-only or stencil-only format, respectively. If using a depth/stencil format with both depth and stencil components, {@code aspectMask} must include at least one of #IMAGE_ASPECT_DEPTH_BIT and #IMAGE_ASPECT_STENCIL_BIT, and can include both.
@@ -2261,7 +2282,7 @@ val VkShaderModuleCreateInfo = struct(VULKAN_PACKAGE, "VkShaderModuleCreateInfo"
codeSize / 4
{@code uint32_t} values codeSize / 4
{@code uint32_t} valuestypedef enum VkShaderStageFlagBits {
+
+typedef enum VkShaderStageFlagBits {
VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
@@ -2410,7 +2432,7 @@ val VkPipelineShaderStageCreateInfo = struct(VULKAN_PACKAGE, "VkPipelineShaderSt
VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
-} VkShaderStageFlagBits;
""")
+} VkShaderStageFlagBits;""")
VkShaderModule.member("module", "a {@code VkShaderModule} object that contains the shader for this stage.")
const..charUTF8_p.member("pName", "a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage.")
nullable..const..VkSpecializationInfo.p.member("pSpecializationInfo", "a pointer to ##VkSpecializationInfo, as described in Specialization Constants, and can be {@code NULL}.")
@@ -2439,10 +2461,11 @@ val VkVertexInputBindingDescription = struct(VULKAN_PACKAGE, "VkVertexInputBindi
uint32_t.member("binding", "the binding number that this structure describes.")
uint32_t.member("stride", "the distance in bytes between two consecutive elements within the buffer.")
VkVertexInputRate.member("inputRate", """specifies whether vertex attribute addressing is a function of the vertex index or of the instance index. Possible values include:
-typedef enum VkVertexInputRate {
+
+typedef enum VkVertexInputRate {
VK_VERTEX_INPUT_RATE_VERTEX = 0,
VK_VERTEX_INPUT_RATE_INSTANCE = 1,
-} VkVertexInputRate;
+} VkVertexInputRate;
zf
may be represented using either a fixed-point or floating-point representation. However, a floating-point representation must be used if the depth/stencil attachment has a floating-point depth component. If an m
-bit fixed-point representation is used, we assume that it represents each value k / (2m - 1)
, where k {elem} { 0, 1, ..., 2m-1 }
, as k
(e.g. 1.0 is represented in binary as a string of all ones).
+ The framebuffer depth coordinate zf
may be represented using either a fixed-point or floating-point representation. However, a floating-point representation must be used if the depth/stencil attachment has a floating-point depth component. If an m
-bit fixed-point representation is used, we assume that it represents each value
+k / (2m - 1)
, where k {elem} { 0, 1, ..., 2m-1 }
, as k
(e.g. 1.0 is represented in binary as a string of all ones).
The viewport parameters shown in the above equations are found from these values as
@@ -2756,7 +2780,7 @@ val VkPipelineMultisampleStateCreateInfo = struct(VULKAN_PACKAGE, "VkPipelineMul
ceil(rasterizationSamples / 32)
{@code VkSampleMask} values ceil(rasterizationSamples / 32)
{@code VkSampleMask} valuestypedef enum VkPipelineCreateFlagBits {
+
+typedef enum VkPipelineCreateFlagBits {
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
-} VkPipelineCreateFlagBits;
+} VkPipelineCreateFlagBits;
typedef enum VkSamplerAddressMode {
+
+typedef enum VkSamplerAddressMode {
VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
-} VkSamplerAddressMode;
+} VkSamplerAddressMode;
These values control the behavior of sampling with coordinates outside the range [0,1]
for the respective u, v, or w coordinate as defined in the Wrapping Operation section.
@@ -3251,17 +3277,19 @@ val VkSamplerCreateInfo = struct(VULKAN_PACKAGE, "VkSamplerCreateInfo") {
nullable..const..opaque_p.member("pNext", "{@code NULL} or a pointer to an extension-specific structure.")
VkSamplerCreateFlags.member("flags", "reserved for future use.")
VkFilter.member("magFilter", """the magnification filter to apply to lookups, and is of type:
-typedef enum VkFilter {
+
+typedef enum VkFilter {
VK_FILTER_NEAREST = 0,
VK_FILTER_LINEAR = 1,
VK_FILTER_CUBIC_IMG = 1000015000,
-} VkFilter;
""")
+} VkFilter;""")
VkFilter.member("minFilter", "the minification filter to apply to lookups, and is of type {@code VkFilter}.")
VkSamplerMipmapMode.member("mipmapMode", """the mipmap filter to apply to lookups as described in the Texel Filtering section, and is of type:
-typedef enum VkSamplerMipmapMode {
+
+typedef enum VkSamplerMipmapMode {
VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
VK_SAMPLER_MIPMAP_MODE_LINEAR = 1,
-} VkSamplerMipmapMode;
""")
+} VkSamplerMipmapMode;""")
VkSamplerAddressMode.member("addressModeU", "the addressing mode for outside [0..1] range for U coordinate. See {@code VkSamplerAddressMode}.")
VkSamplerAddressMode.member("addressModeV", "the addressing mode for outside [0..1] range for V coordinate. See {@code VkSamplerAddressMode}.")
VkSamplerAddressMode.member("addressModeW", "the addressing mode for outside [0..1] range for W coordinate. See {@code VkSamplerAddressMode}.")
@@ -3276,14 +3304,15 @@ val VkSamplerCreateInfo = struct(VULKAN_PACKAGE, "VkSamplerCreateInfo") {
float.member("minLod", "{@code minLod} and {@code maxLod} are the values used to clamp the computed level-of-detail value, as described in the Level-of-Detail Operation section. {@code maxLod} must be greater than or equal to {@code minLod}.")
float.member("maxLod", "see {@code minLod}")
VkBorderColor.member("borderColor", """the predefined border color to use, as described in the Texel Replacement section, and is of type:
-typedef enum VkBorderColor {
+
+typedef enum VkBorderColor {
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
-} VkBorderColor;
""")
+} VkBorderColor;""")
VkBool32.member("unnormalizedCoordinates", """controls whether to use unnormalized or normalized texel coordinates to address texels of the image. When set to #TRUE, the range of the image coordinates used to lookup the texel is in the range of zero to the image dimensions for x, y and z. When set to #FALSE the range of image coordinates is zero to one. When {@code unnormalizedCoordinates} is #TRUE, samplers have the following requirements:
typedef enum VkDescriptorSetLayoutCreateFlagBits {
+
+typedef enum VkDescriptorSetLayoutCreateFlagBits {
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
-} VkDescriptorSetLayoutCreateFlagBits;
+} VkDescriptorSetLayoutCreateFlagBits;
If {@code flags} contains #DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then descriptor sets must not be allocated using this layout, and descriptors are instead pushed via #CmdPushDescriptorSetKHR().""")
AutoSize("pBindings", optional = true)..uint32_t.member("bindingCount", "the number of elements in {@code pBindings}.")
@@ -3436,9 +3466,10 @@ val VkDescriptorPoolCreateInfo = struct(VULKAN_PACKAGE, "VkDescriptorPoolCreateI
VkStructureType.member("sType", "the type of this structure.")
nullable..const..opaque_p.member("pNext", "{@code NULL} or a pointer to an extension-specific structure.")
VkDescriptorPoolCreateFlags.member("flags", """specifies certain supported operations on the pool. Bits which can be set include:
-typedef enum VkDescriptorPoolCreateFlagBits {
+
+typedef enum VkDescriptorPoolCreateFlagBits {
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
-} VkDescriptorPoolCreateFlagBits;
+} VkDescriptorPoolCreateFlagBits;
If {@code flags} includes #DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, then descriptor sets can return their individual allocations to the pool, i.e. all of #AllocateDescriptorSets(), #FreeDescriptorSets(), and #ResetDescriptorPool() are allowed. Otherwise, descriptor sets allocated from the pool must not be individually freed back to the pool, i.e. only #AllocateDescriptorSets() and #ResetDescriptorPool() are allowed.""")
uint32_t.member("maxSets", "the maximum number of descriptor sets that can be allocated from the pool.")
@@ -3735,17 +3766,19 @@ val VkAttachmentDescription = struct(VULKAN_PACKAGE, "VkAttachmentDescription")
"""
VkAttachmentDescriptionFlags.member("flags", """a bitmask describing additional properties of the attachment. Bits which can be set include:
-typedef enum VkAttachmentDescriptionFlagBits {
+
+typedef enum VkAttachmentDescriptionFlagBits {
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
-} VkAttachmentDescriptionFlagBits;
""")
+} VkAttachmentDescriptionFlagBits;""")
VkFormat.member("format", "a {@code VkFormat} value specifying the format of the image that will be used for the attachment.")
VkSampleCountFlagBits.member("samples", "the number of samples of the image as defined in {@code VkSampleCountFlagBits}.")
VkAttachmentLoadOp.member("loadOp", """specifies how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used:
-typedef enum VkAttachmentLoadOp {
+
+typedef enum VkAttachmentLoadOp {
VK_ATTACHMENT_LOAD_OP_LOAD = 0,
VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
-} VkAttachmentLoadOp;
+} VkAttachmentLoadOp;
typedef enum VkAttachmentStoreOp {
+
+typedef enum VkAttachmentStoreOp {
VK_ATTACHMENT_STORE_OP_STORE = 0,
VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
-} VkAttachmentStoreOp;
+} VkAttachmentStoreOp;
typedef enum VkSubpassDescriptionFlagBits {
+
+typedef enum VkSubpassDescriptionFlagBits {
VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
-} VkSubpassDescriptionFlagBits;
+} VkSubpassDescriptionFlagBits;
typedef enum VkCommandPoolCreateFlagBits {
+
+typedef enum VkCommandPoolCreateFlagBits {
VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
-} VkCommandPoolCreateFlagBits;
+} VkCommandPoolCreateFlagBits;
typedef enum VkCommandBufferLevel {
+
+typedef enum VkCommandBufferLevel {
VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
-} VkCommandBufferLevel;
""")
+} VkCommandBufferLevel;""")
uint32_t.member("commandBufferCount", "the number of command buffers to allocate from the pool.")
}
@@ -4094,11 +4131,12 @@ val VkCommandBufferBeginInfo = struct(VULKAN_PACKAGE, "VkCommandBufferBeginInfo"
VkStructureType.member("sType", "the type of this structure.")
nullable..const..opaque_p.member("pNext", "{@code NULL} or a pointer to an extension-specific structure.")
VkCommandBufferUsageFlags.member("flags", """a bitmask indicating usage behavior for the command buffer. Bits which can be set include:
-typedef enum VkCommandBufferUsageFlagBits {
+
+typedef enum VkCommandBufferUsageFlagBits {
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
-} VkCommandBufferUsageFlagBits;
+} VkCommandBufferUsageFlagBits;
void vkCmdDrawIndirectCountAMD(
+
+void vkCmdDrawIndirectCountAMD(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
- uint32_t stride);
+ uint32_t stride);
void vkCmdDrawIndexedIndirectCountAMD(
+
+void vkCmdDrawIndexedIndirectCountAMD(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
- uint32_t stride);
+ uint32_t stride);
VkResult vkAcquireXlibDisplayEXT(
+
+VkResult vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
- VkDisplayKHR display);
+ VkDisplayKHR display);
VkResult vkGetRandROutputDisplayEXT(
+
+VkResult vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
RROutput rrOutput,
- VkDisplayKHR* pDisplay);
+ VkDisplayKHR* pDisplay);
extern VkDevice device;
+
+ extern VkDevice device;
extern VkImage image;
// Must call extension functions through a function pointer:
@@ -38,13 +39,14 @@ val EXT_debug_marker = "EXTDebugMarker".nativeClassVK("EXT_debug_marker", type =
// A subsequent error might print:
// Image 'Brick Diffuse Texture' (0xc0dec0dedeadbeef) is used in a
- // command buffer with no memory bound to it.
+ // command buffer with no memory bound to it.
Example 2
Annotating regions of a workload with naming information so that offline analysis tools can display a more usable visualisation of the commands submitted.
- extern VkDevice device;
+
+ extern VkDevice device;
extern VkCommandBuffer commandBuffer;
// Must call extension functions through a function pointer:
@@ -100,7 +102,7 @@ val EXT_debug_marker = "EXTDebugMarker".nativeClassVK("EXT_debug_marker", type =
vkCmdDrawIndexed(commandBuffer, 500, 1, 2000, 0, 0);
}
// End the house annotation started above
- pfnCmdDebugMarkerEndEXT(commandBuffer);
+ pfnCmdDebugMarkerEndEXT(commandBuffer);
VkResult vkDebugMarkerSetObjectTagEXT(
+
+VkResult vkDebugMarkerSetObjectTagEXT(
VkDevice device,
- VkDebugMarkerObjectTagInfoEXT* pTagInfo);
+ VkDebugMarkerObjectTagInfoEXT* pTagInfo);
VkResult vkDebugMarkerSetObjectNameEXT(
+
+VkResult vkDebugMarkerSetObjectNameEXT(
VkDevice device,
- VkDebugMarkerObjectNameInfoEXT* pNameInfo);
+ VkDebugMarkerObjectNameInfoEXT* pNameInfo);
void vkCmdDebugMarkerBeginEXT(
+
+void vkCmdDebugMarkerBeginEXT(
VkCommandBuffer commandBuffer,
- VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+ VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
void vkCmdDebugMarkerEndEXT(
- VkCommandBuffer commandBuffer);
+
+void vkCmdDebugMarkerEndEXT(
+ VkCommandBuffer commandBuffer);
void vkCmdDebugMarkerInsertEXT(
+
+void vkCmdDebugMarkerInsertEXT(
VkCommandBuffer commandBuffer,
- VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+ VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
VkResult res;
+
+ VkResult res;
VkDebugReportCallbackEXT cb1, cb2, cb3;
VkDebugReportCallbackCreateInfoEXT callback1 = {
@@ -58,7 +59,7 @@ val EXT_debug_report = "EXTDebugReport".nativeClassVK("EXT_debug_report", type =
// remove callbacks when cleaning up
vkDestroyDebugReportCallbackEXT(instance, cb1);
vkDestroyDebugReportCallbackEXT(instance, cb2);
- vkDestroyDebugReportCallbackEXT(instance, cb3);
+ vkDestroyDebugReportCallbackEXT(instance, cb3);
VkResult vkCreateDebugReportCallbackEXT(
+
+VkResult vkCreateDebugReportCallbackEXT(
VkInstance instance,
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDebugReportCallbackEXT* pCallback);
+ VkDebugReportCallbackEXT* pCallback);
void vkDestroyDebugReportCallbackEXT(
+
+void vkDestroyDebugReportCallbackEXT(
VkInstance instance,
VkDebugReportCallbackEXT callback,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
void vkDebugReportMessageEXT(
+
+void vkDebugReportMessageEXT(
VkInstance instance,
VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
@@ -333,7 +337,7 @@ val EXT_debug_report = "EXTDebugReport".nativeClassVK("EXT_debug_report", type =
size_t location,
int32_t messageCode,
const char* pLayerPrefix,
- const char* pMessage);
+ const char* pMessage);
VkResult vkReleaseDisplayEXT(
+
+VkResult vkReleaseDisplayEXT(
VkPhysicalDevice physicalDevice,
- VkDisplayKHR display);
+ VkDisplayKHR display);
void vkCmdSetDiscardRectangleEXT(
+
+void vkCmdSetDiscardRectangleEXT(
VkCommandBuffer commandBuffer,
uint32_t firstDiscardRectangle,
uint32_t discardRectangleCount,
- const VkRect2D* pDiscardRectangles);
+ const VkRect2D* pDiscardRectangles);
i
of {@code pDiscardRectangles} replace the current state for the discard rectangle index firstDiscardRectangle {plus} i
, for i
in [0, discardRectangleCount)
.
diff --git a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/EXT_display_control.kt b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/EXT_display_control.kt
index a0d6469752..9a27772396 100644
--- a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/EXT_display_control.kt
+++ b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/EXT_display_control.kt
@@ -147,10 +147,11 @@ val EXT_display_control = "EXTDisplayControl".nativeClassVK("EXT_display_control
VkResult vkDisplayPowerControlEXT(
+
+VkResult vkDisplayPowerControlEXT(
VkDevice device,
VkDisplayKHR display,
- const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
+ const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
VkResult vkRegisterDeviceEventEXT(
+
+VkResult vkRegisterDeviceEventEXT(
VkDevice device,
const VkDeviceEventInfoEXT* pDeviceEventInfo,
const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
+ VkFence* pFence);
VkResult vkRegisterDisplayEventEXT(
+
+VkResult vkRegisterDisplayEventEXT(
VkDevice device,
VkDisplayKHR display,
const VkDisplayEventInfoEXT* pDisplayEventInfo,
const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
+ VkFence* pFence);
VkResult vkGetSwapchainCounterEXT(
+
+VkResult vkGetSwapchainCounterEXT(
VkDevice device,
VkSwapchainKHR swapchain,
VkSurfaceCounterFlagBitsEXT counter,
- uint64_t* pCounterValue);
+ uint64_t* pCounterValue);
VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
+
+VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
- VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
+ VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
void vkSetHdrMetadataEXT(
+
+void vkSetHdrMetadataEXT(
VkDevice device,
uint32_t swapchainCount,
const VkSwapchainKHR* pSwapchains,
- const VkHdrMetadataEXT* pMetadata);
+ const VkHdrMetadataEXT* pMetadata);
if (condition) {
+
+if (condition) {
result = do_fast_path();
-} else {
+} else {
result = do_general_path();
-}
+}
where {@code condition} diverges between invocations, an implementation might first execute {@code do_fast_path}() for the invocations where {@code condition} is true and leave the other invocations dormant. Once {@code do_fast_path}() returns, it might call {@code do_general_path}() for invocations where {@code condition} is false and leave the other invocations dormant. In this case, the shader executes both the fast and the general path and might be better off just using the general path for all invocations.
This extension provides the ability to avoid divergent execution by evaluating a condition across an entire subgroup using code like:
- if (allInvocationsARB(condition)) {
+
+if (allInvocationsARB(condition)) {
result = do_fast_path();
-} else {
+} else {
result = do_general_path();
-}
+}
The built-in function {@code allInvocationsARB}() will return the same value for all invocations in the group, so the group will either execute {@code do_fast_path}() or {@code do_general_path}(), but never both. For example, shader code might want to evaluate a complex function iteratively by starting with an approximation of the result and then refining the approximation. Some input values may require a small number of iterations to generate an accurate result ({@code do_fast_path}) while others require a larger number ({@code do_general_path}). In another example, shader code might want to evaluate a complex function ({@code do_general_path}) that can be greatly simplified when assuming a specific value for one of its inputs ({@code do_fast_path}).
diff --git a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/GOOGLE_display_timing.kt b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/GOOGLE_display_timing.kt
index b5ad893866..3f0eff570b 100644
--- a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/GOOGLE_display_timing.kt
+++ b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/GOOGLE_display_timing.kt
@@ -86,10 +86,11 @@ val GOOGLE_display_timing = "GOOGLEDisplayTiming".nativeClassVK("GOOGLE_display_
VkResult vkGetRefreshCycleDurationGOOGLE(
+
+VkResult vkGetRefreshCycleDurationGOOGLE(
VkDevice device,
VkSwapchainKHR swapchain,
- VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
+ VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
VkResult vkGetPastPresentationTimingGOOGLE(
+
+VkResult vkGetPastPresentationTimingGOOGLE(
VkDevice device,
VkSwapchainKHR swapchain,
uint32_t* pPresentationTimingCount,
- VkPastPresentationTimingGOOGLE* pPresentationTimings);
+ VkPastPresentationTimingGOOGLE* pPresentationTimings);
VkSamplerCreateInfo createInfo =
+
+ VkSamplerCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO // sType
// Other members set to application-desired values
@@ -29,7 +30,7 @@ val IMG_filter_cubic = "IMGFilterCubic".nativeClassVK("IMG_filter_cubic", type =
VkResult result = vkCreateSampler(
device,
&createInfo,
- &sampler);
+ &sampler);
// TODO: Write some sample code here.
+
+ // TODO: Write some sample code here.
VkResult vkCreateDescriptorUpdateTemplateKHR(
+
+VkResult vkCreateDescriptorUpdateTemplateKHR(
VkDevice device,
const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
+ VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
void vkDestroyDescriptorUpdateTemplateKHR(
+
+void vkDestroyDescriptorUpdateTemplateKHR(
VkDevice device,
VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
void vkUpdateDescriptorSetWithTemplateKHR(
+
+void vkUpdateDescriptorSetWithTemplateKHR(
VkDevice device,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const void* pData);
+ const void* pData);
struct AppBufferView {
+
+struct AppBufferView {
VkBufferView bufferView;
uint32_t applicationRelatedInformation;
-};
+};
-struct AppDataStructure
-{
+struct AppDataStructure
+{
VkDescriptorImageInfo imageInfo; // a single image info
VkDescriptorBufferInfo bufferInfoArray[3]; // 3 buffer infos in an array
AppBufferView bufferView[2]; // An application defined structure containing a bufferView
// ... some more application related data
-};
+};
-const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
-{
+const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
+{
// binding to a single image descriptor
{
0, // binding
@@ -268,11 +273,11 @@ const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
offsetof(AppDataStructure, bufferView), // offset
sizeof(AppBufferView) // stride, bufferViews do not have to be compact
},
-};
+};
-// create an descriptor update template for descriptor set updates
-const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
-{
+// create an descriptor update template for descriptor set updates
+const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
+{
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR, // sType
NULL, // pNext
0, // flags
@@ -283,21 +288,21 @@ const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
0, // pipelineBindPoint, ignored by given templateType
0, // pipelineLayout, ignored by given templateType
0, // set, ignored by given templateType
-};
+};
-VkDescriptorUpdateTemplateKHR myDescriptorUpdateTemplate;
-myResult = vkCreatePipelineLayout(
+VkDescriptorUpdateTemplateKHR myDescriptorUpdateTemplate;
+myResult = vkCreatePipelineLayout(
myDevice,
&createInfo,
NULL,
&myDescriptorUpdateTemplate);
-}
+}
-AppDataStructure appData;
+AppDataStructure appData;
-// fill appData here or cache it in your engine
-vkUpdateDescriptorSetWithTemplateKHR(myDevice, myDescriptorSet, myDescriptorUpdateTemplate, &appData);
+// fill appData here or cache it in your engine
+vkUpdateDescriptorSetWithTemplateKHR(myDevice, myDescriptorSet, myDescriptorUpdateTemplate, &appData);
""",
VkDevice.IN("device", "the logical device that updates the descriptor sets."),
@@ -314,12 +319,13 @@ vkUpdateDescriptorSetWithTemplateKHR(myDevice, myDescriptorSet, myDescriptorUpda
void vkCmdPushDescriptorSetWithTemplateKHR(
+
+void vkCmdPushDescriptorSetWithTemplateKHR(
VkCommandBuffer commandBuffer,
VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
VkPipelineLayout layout,
uint32_t set,
- const void* pData);
+ const void* pData);
struct AppBufferView {
+
+struct AppBufferView {
VkBufferView bufferView;
uint32_t applicationRelatedInformation;
-};
+};
-struct AppDataStructure
-{
+struct AppDataStructure
+{
VkDescriptorImageInfo imageInfo; // a single image info
// ... some more application related data
-};
+};
-const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
-{
+const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
+{
// binding to a single image descriptor
{
0, // binding
@@ -372,11 +379,11 @@ const VkDescriptorUpdateTemplateEntryKHR descriptorUpdateTemplateEntries[] =
0 // stride is not required if descriptorCount is 1.
}
-};
+};
-// create an descriptor update template for descriptor set updates
-const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
-{
+// create an descriptor update template for descriptor set updates
+const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
+{
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR, // sType
NULL, // pNext
0, // flags
@@ -387,19 +394,19 @@ const VkDescriptorUpdateTemplateCreateInfoKHR createInfo =
VK_PIPELINE_BIND_POINT_GRAPHICS, // pipelineBindPoint
myPipelineLayout, // pipelineLayout
0, // set
-};
+};
-VkDescriptorUpdateTemplateKHR myDescriptorUpdateTemplate;
-myResult = vkCreatePipelineLayout(
+VkDescriptorUpdateTemplateKHR myDescriptorUpdateTemplate;
+myResult = vkCreatePipelineLayout(
myDevice,
&createInfo,
NULL,
&myDescriptorUpdateTemplate);
-}
+}
-AppDataStructure appData;
-// fill appData here or cache it in your engine
-vkCmdPushDescriptorSetWithTemplateKHR(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, 0,&appData);
+AppDataStructure appData;
+// fill appData here or cache it in your engine
+vkCmdPushDescriptorSetWithTemplateKHR(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, 0,&appData);
""",
VkCommandBuffer.IN("commandBuffer", "the command buffer that the descriptors will be recorded in."),
diff --git a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/KHR_display.kt b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/KHR_display.kt
index c63bf72f78..fd2a52a0fe 100644
--- a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/KHR_display.kt
+++ b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/KHR_display.kt
@@ -120,10 +120,11 @@ val KHR_display = "KHRDisplay".nativeClassVK("KHR_display", type = "instance", p
VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
+
+VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
- VkDisplayPropertiesKHR* pProperties);
+ VkDisplayPropertiesKHR* pProperties);
VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
+
+VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
- VkDisplayPlanePropertiesKHR* pProperties);
+ VkDisplayPlanePropertiesKHR* pProperties);
VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
+
+VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
VkPhysicalDevice physicalDevice,
uint32_t planeIndex,
uint32_t* pDisplayCount,
- VkDisplayKHR* pDisplays);
+ VkDisplayKHR* pDisplays);
VkResult vkGetDisplayModePropertiesKHR(
+
+VkResult vkGetDisplayModePropertiesKHR(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display,
uint32_t* pPropertyCount,
- VkDisplayModePropertiesKHR* pProperties);
+ VkDisplayModePropertiesKHR* pProperties);
VkResult vkCreateDisplayModeKHR(
+
+VkResult vkCreateDisplayModeKHR(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display,
const VkDisplayModeCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDisplayModeKHR* pMode);
+ VkDisplayModeKHR* pMode);
VkResult vkGetDisplayPlaneCapabilitiesKHR(
+
+VkResult vkGetDisplayPlaneCapabilitiesKHR(
VkPhysicalDevice physicalDevice,
VkDisplayModeKHR mode,
uint32_t planeIndex,
- VkDisplayPlaneCapabilitiesKHR* pCapabilities);
+ VkDisplayPlaneCapabilitiesKHR* pCapabilities);
VkResult vkCreateDisplayPlaneSurfaceKHR(
+
+VkResult vkCreateDisplayPlaneSurfaceKHR(
VkInstance instance,
const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+ VkSurfaceKHR* pSurface);
VkResult vkCreateSharedSwapchainsKHR(
+
+VkResult vkCreateSharedSwapchainsKHR(
VkDevice device,
uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
- VkSwapchainKHR* pSwapchains);
+ VkSwapchainKHR* pSwapchains);
// Get features with a hypothetical future extension.
+
+ // Get features with a hypothetical future extension.
VkHypotheticalExtensionFeaturesKHR hypotheticalFeatures =
{
VK_STRUCTURE_TYPE_HYPOTHETICAL_FEATURES_KHR, // sType
@@ -59,7 +60,7 @@ val KHR_get_physical_device_properties2 = "KHRGetPhysicalDeviceProperties2".nati
}
VkDevice device;
- vkCreateDevice(physicalDevice, &deviceCreateInfo, NULL, &device);
+ vkCreateDevice(physicalDevice, &deviceCreateInfo, NULL, &device);
void vkGetPhysicalDeviceFeatures2KHR(
+
+void vkGetPhysicalDeviceFeatures2KHR(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures2KHR* pFeatures);
+ VkPhysicalDeviceFeatures2KHR* pFeatures);
void vkGetPhysicalDeviceProperties2KHR(
+
+void vkGetPhysicalDeviceProperties2KHR(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties2KHR* pProperties);
+ VkPhysicalDeviceProperties2KHR* pProperties);
void vkGetPhysicalDeviceFormatProperties2KHR(
+
+void vkGetPhysicalDeviceFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
VkFormat format,
- VkFormatProperties2KHR* pFormatProperties);
+ VkFormatProperties2KHR* pFormatProperties);
VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
+
+VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
- VkImageFormatProperties2KHR* pImageFormatProperties);
+ VkImageFormatProperties2KHR* pImageFormatProperties);
void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
+
+void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
- VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
+ VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
void vkGetPhysicalDeviceMemoryProperties2KHR(
+
+void vkGetPhysicalDeviceMemoryProperties2KHR(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
+ VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
+
+void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
uint32_t* pPropertyCount,
- VkSparseImageFormatProperties2KHR* pProperties);
+ VkSparseImageFormatProperties2KHR* pProperties);
VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
+
+VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
- VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
+ VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
+
+VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
uint32_t* pSurfaceFormatCount,
- VkSurfaceFormat2KHR* pSurfaceFormats);
+ VkSurfaceFormat2KHR* pSurfaceFormats);
void vkTrimCommandPoolKHR(
+
+void vkTrimCommandPoolKHR(
VkDevice device,
VkCommandPool commandPool,
- VkCommandPoolTrimFlagsKHR flags);
+ VkCommandPoolTrimFlagsKHR flags);
void vkCmdPushDescriptorSetKHR(
+
+void vkCmdPushDescriptorSetKHR(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
uint32_t set,
uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet* pDescriptorWrites);
+ const VkWriteDescriptorSet* pDescriptorWrites);
VkSamplerCreateInfo createInfo =
+
+ VkSamplerCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO // sType
// Other members set to application-desired values
@@ -32,7 +33,7 @@ val KHR_sampler_mirror_clamp_to_edge = "KHRSamplerMirrorClampToEdge".nativeClass
VkResult result = vkCreateSampler(
device,
&createInfo,
- &sampler);
+ &sampler);
VkResult vkGetSwapchainStatusKHR(
+
+VkResult vkGetSwapchainStatusKHR(
VkDevice device,
- VkSwapchainKHR swapchain);
+ VkSwapchainKHR swapchain);
E
- corresponding electrical signal (value stored in memory)
E = 1.055 × L1/2.4 - 0.055 for 0.0031308 ≤ L ≤ 1
- 12.92 × L for 0 ≤ L < 0.0031308
+
+E = 1.055 × L1/2.4 - 0.055 for 0.0031308 ≤ L ≤ 1
+ 12.92 × L for 0 ≤ L < 0.0031308
E = (a × L + b)2.4 for 0.039 ≤ L ≤ 1
- b × L for 0 ≤ L < 0.039
+
+E = (a × L + b)2.4 for 0.039 ≤ L ≤ 1
+ b × L for 0 ≤ L < 0.039
- a = 0.948
+ b = 0.052
+ c = 0.077
+
+
+a = 0.948
+
+b = 0.052
+
+c = 0.077
+
E = 1.055 × L1/2.4 - 0.055 for 0.0030186 ≤ L ≤ 1
- 12.92 × L for 0 ≤ L < 0.0030186
+
+E = 1.055 × L1/2.4 - 0.055 for 0.0030186 ≤ L ≤ 1
+ 12.92 × L for 0 ≤ L < 0.0030186
1.055 × L1/2.4 - 0.055 for 0.0031308 ≤ L ≤ 7.5913
-E = 12.92 × L for 0 ≤ L < 0.0031308
- -f(-L) for L < 0
+
+ 1.055 × L1/2.4 - 0.055 for 0.0031308 ≤ L ≤ 7.5913
+E = 12.92 × L for 0 ≤ L < 0.0031308
+ -f(-L) for L < 0
L
- luminance of image is within [-0.6038, 7.5913]
.
E
can be negative and/or > 1. That is how extended sRGB specifies colors outside the standard sRGB gamut. This means extended sRGB needs a floating point pixel format to cover the intended color range.
E = α × L^0.45 - (1 - α) for β ≤ L ≤ 1
- 4.5 × L for 0 ≤ L < β
+
+E = α × L^0.45 - (1 - α) for β ≤ L ≤ 1
+ 4.5 × L for 0 ≤ L < β
- α = 1.099 and β = 0.018 for 10-bits and less per sample system (the values given in Rec.709)
+ α = 1.0993 and β = 0.0181 for 12-bits per sample system
+
+α = 1.099 and β = 0.018 for 10-bits and less per sample system (the values given in Rec.709)
+
+α = 1.0993 and β = 0.0181 for 12-bits per sample system
E = ((c_1 + c_2 × L^m_1) / (1 + c_3 × L^m_1))^m_2
+
+E = ((c_1 + c_2 × L^m_1) / (1 + c_3 × L^m_1))^m_2
where:
- m1 = 2610 / 4096 × 1/4 = 0.1593017578125
+ m2 = 2523 / 4096 × 128 = 78.84375
+ c1 = 3424 / 4096 = 0.8359375 = c3 - c2 + 1
+ c2 = 2413 / 4096 × 32 = 18.8515625
+ c3 = 2392 / 4096 × 32 = 18.6875
+
+
+m1 = 2610 / 4096 × 1/4 = 0.1593017578125
+
+m2 = 2523 / 4096 × 128 = 78.84375
+
+c1 = 3424 / 4096 = 0.8359375 = c3 - c2 + 1
+
+c2 = 2413 / 4096 × 32 = 18.8515625
+
+c3 = 2392 / 4096 × 32 = 18.6875
+
E = r × sqrt(L) for 0 ≤ L ≤ 1
- a × ln(L - b) + c for 1 < L
+
+E = r × sqrt(L) for 0 ≤ L ≤ 1
+ a × ln(L - b) + c for 1 < L
- L - is the signal normalized by the reference white level
+ r - is the reference white level and has a signal value of 0.5
+ a = 0.17883277 and b = 0.28466892, and c = 0.55991073
+
+L - is the signal normalized by the reference white level
+
+r - is the reference white level and has a signal value of 0.5
+
+a = 0.17883277 and b = 0.28466892, and c = 0.55991073
E = L^1 / 2.19921875
+
+E = L^1 / 2.19921875
E = L^1 / 2.6
+
+E = L^1 / 2.6
An implementation supporting this extension indicates support for these color spaces via ##VkSurfaceFormatKHR structures returned from #GetPhysicalDeviceSurfaceFormatsKHR().
@@ -323,10 +345,11 @@ E = 12.92 × L for 0 ≤ L < 0.0031308
void vkDestroySurfaceKHR(
+
+void vkDestroySurfaceKHR(
VkInstance instance,
VkSurfaceKHR surface,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
+
+VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
VkSurfaceKHR surface,
- VkBool32* pSupported);
+ VkBool32* pSupported);
VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
+
+VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
- VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
+ VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
+
+VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pSurfaceFormatCount,
- VkSurfaceFormatKHR* pSurfaceFormats);
+ VkSurfaceFormatKHR* pSurfaceFormats);
VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
+
+VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pPresentModeCount,
- VkPresentModeKHR* pPresentModes);
+ VkPresentModeKHR* pPresentModes);
VkResult vkCreateSwapchainKHR(
+
+VkResult vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSwapchainKHR* pSwapchain);
+ VkSwapchainKHR* pSwapchain);
void vkDestroySwapchainKHR(
+
+void vkDestroySwapchainKHR(
VkDevice device,
VkSwapchainKHR swapchain,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkGetSwapchainImagesKHR(
+
+VkResult vkGetSwapchainImagesKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint32_t* pSwapchainImageCount,
- VkImage* pSwapchainImages);
+ VkImage* pSwapchainImages);
VkResult vkAcquireNextImageKHR(
+
+VkResult vkAcquireNextImageKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
VkFence fence,
- uint32_t* pImageIndex);
+ uint32_t* pImageIndex);
VkResult vkQueuePresentKHR(
+
+VkResult vkQueuePresentKHR(
VkQueue queue,
- const VkPresentInfoKHR* pPresentInfo);
+ const VkPresentInfoKHR* pPresentInfo);
VkResult vkCreateWin32SurfaceKHR(
+
+VkResult vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+ VkSurfaceKHR* pSurface);
VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR(
+
+VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR(
VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex);
+ uint32_t queueFamilyIndex);
VkResult vkCreateXlibSurfaceKHR(
+
+VkResult vkCreateXlibSurfaceKHR(
VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+ VkSurfaceKHR* pSurface);
VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
+
+VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
Display* dpy,
- VisualID visualID);
+ VisualID visualID);
void vkGetDeviceGroupPeerMemoryFeaturesKHX(
+
+void vkGetDeviceGroupPeerMemoryFeaturesKHX(
VkDevice device,
uint32_t heapIndex,
uint32_t localDeviceIndex,
uint32_t remoteDeviceIndex,
- VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures);
+ VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures);
typedef enum VkPeerMemoryFeatureFlagBitsKHX {
+
+typedef enum VkPeerMemoryFeatureFlagBitsKHX {
VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
-} VkPeerMemoryFeatureFlagBitsKHX;
+} VkPeerMemoryFeatureFlagBitsKHX;
VkResult vkBindBufferMemory2KHX(
+
+VkResult vkBindBufferMemory2KHX(
VkDevice device,
uint32_t bindInfoCount,
- const VkBindBufferMemoryInfoKHX* pBindInfos);
+ const VkBindBufferMemoryInfoKHX* pBindInfos);
VkResult vkBindImageMemory2KHX(
+
+VkResult vkBindImageMemory2KHX(
VkDevice device,
uint32_t bindInfoCount,
- const VkBindImageMemoryInfoKHX* pBindInfos);
+ const VkBindImageMemoryInfoKHX* pBindInfos);
void vkCmdSetDeviceMaskKHX(
+
+void vkCmdSetDeviceMaskKHX(
VkCommandBuffer commandBuffer,
- uint32_t deviceMask);
+ uint32_t deviceMask);
VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
+
+VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
VkDevice device,
- VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities);
+ VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities);
VkResult vkGetDeviceGroupSurfacePresentModesKHX(
+
+VkResult vkGetDeviceGroupSurfacePresentModesKHX(
VkDevice device,
VkSurfaceKHR surface,
- VkDeviceGroupPresentModeFlagsKHX* pModes);
+ VkDeviceGroupPresentModeFlagsKHX* pModes);
VkResult vkAcquireNextImage2KHX(
+
+VkResult vkAcquireNextImage2KHX(
VkDevice device,
const VkAcquireNextImageInfoKHX* pAcquireInfo,
- uint32_t* pImageIndex);
+ uint32_t* pImageIndex);
void vkCmdDispatchBaseKHX(
+
+void vkCmdDispatchBaseKHX(
VkCommandBuffer commandBuffer,
uint32_t baseGroupX,
uint32_t baseGroupY,
uint32_t baseGroupZ,
uint32_t groupCountX,
uint32_t groupCountY,
- uint32_t groupCountZ);
+ uint32_t groupCountZ);
groupCountX {times} groupCountY {times} groupCountZ
local workgroups is assembled, with {@code WorkgroupId} values ranging from [baseGroup, baseGroup {plus} groupCount)
in each component. #CmdDispatch() is equivalent to vkCmdDispatchBaseKHX(0,0,0,groupCountX,groupCountY,groupCountZ).
@@ -589,11 +598,12 @@ val KHX_device_group = "KHXDeviceGroup".nativeClassVK("KHX_device_group", type =
To query a set of rectangles used in presentation on the physical device, call:
- VkResult vkGetPhysicalDevicePresentRectanglesKHX(
+
+VkResult vkGetPhysicalDevicePresentRectanglesKHX(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pRectCount,
- VkRect2D* pRects);
+ VkRect2D* pRects);
VkDeviceCreateInfo devCreateInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO };
+
+ VkDeviceCreateInfo devCreateInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO };
// (not shown) fill out devCreateInfo as usual.
uint32_t deviceGroupCount = 0;
VkPhysicalDeviceGroupPropertiesKHX *props = NULL;
@@ -40,7 +41,7 @@ val KHX_device_group_creation = "KHXDeviceGroupCreation".nativeClassVK("KHX_devi
}
vkCreateDevice(props[0].physicalDevices[0], &devCreateInfo, NULL, &g_vkDevice);
- free(props);
+ free(props);
VkResult vkEnumeratePhysicalDeviceGroupsKHX(
+
+VkResult vkEnumeratePhysicalDeviceGroupsKHX(
VkInstance instance,
uint32_t* pPhysicalDeviceGroupCount,
- VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties);
+ VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties);
void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
+
+void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
- VkExternalBufferPropertiesKHX* pExternalBufferProperties);
+ VkExternalBufferPropertiesKHX* pExternalBufferProperties);
VkResult vkGetMemoryFdKHX(
+
+VkResult vkGetMemoryFdKHX(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
- int* pFd);
+ int* pFd);
VkResult vkGetMemoryFdPropertiesKHX(
+
+VkResult vkGetMemoryFdPropertiesKHX(
VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
int fd,
- VkMemoryFdPropertiesKHX* pMemoryFdProperties);
+ VkMemoryFdPropertiesKHX* pMemoryFdProperties);
VkResult vkGetMemoryWin32HandleKHX(
+
+VkResult vkGetMemoryWin32HandleKHX(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
- HANDLE* pHandle);
+ HANDLE* pHandle);
VkResult vkGetMemoryWin32HandlePropertiesKHX(
+
+VkResult vkGetMemoryWin32HandlePropertiesKHX(
VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
HANDLE handle,
- VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties);
+ VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties);
void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
+
+void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
- VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties);
+ VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties);
VkResult vkImportSemaphoreFdKHX(
+
+VkResult vkImportSemaphoreFdKHX(
VkDevice device,
- const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo);
+ const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo);
VkResult vkGetSemaphoreFdKHX(
+
+VkResult vkGetSemaphoreFdKHX(
VkDevice device,
VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
- int* pFd);
+ int* pFd);
VkResult vkImportSemaphoreWin32HandleKHX(
+
+VkResult vkImportSemaphoreWin32HandleKHX(
VkDevice device,
- const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo);
+ const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo);
VkResult vkGetSemaphoreWin32HandleKHX(
+
+VkResult vkGetSemaphoreWin32HandleKHX(
VkDevice device,
VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
- HANDLE* pHandle);
+ HANDLE* pHandle);
VkResult vkCreateIOSSurfaceMVK(
+
+VkResult vkCreateIOSSurfaceMVK(
VkInstance instance,
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+ VkSurfaceKHR* pSurface);
VkResult vkCreateMacOSSurfaceMVK(
+
+VkResult vkCreateMacOSSurfaceMVK(
VkInstance instance,
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+ VkSurfaceKHR* pSurface);
// setup secondary command buffer
+
+ // setup secondary command buffer
vkBeginCommandBuffer(generatedCmdBuffer, &beginInfo);
... setup its state as usual
@@ -104,7 +105,7 @@ val NVX_device_generated_commands = "NVXDeviceGeneratedCommands".nativeClassVK("
// memoryBarrierCount1,
// pMemoryBarriers&memoryBarrier,
...)
- vkCmdExecuteCommands(mainCmd, 1, &generatedCmdBuffer);
+ vkCmdExecuteCommands(mainCmd, 1, &generatedCmdBuffer);
void vkCmdProcessCommandsNVX(
+
+void vkCmdProcessCommandsNVX(
VkCommandBuffer commandBuffer,
- const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
+ const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
void vkCmdReserveSpaceForCommandsNVX(
+
+void vkCmdReserveSpaceForCommandsNVX(
VkCommandBuffer commandBuffer,
- const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
+ const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
VkResult vkCreateIndirectCommandsLayoutNVX(
+
+VkResult vkCreateIndirectCommandsLayoutNVX(
VkDevice device,
const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
+ VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
void vkDestroyIndirectCommandsLayoutNVX(
+
+void vkDestroyIndirectCommandsLayoutNVX(
VkDevice device,
VkIndirectCommandsLayoutNVX indirectCommandsLayout,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateObjectTableNVX(
+
+VkResult vkCreateObjectTableNVX(
VkDevice device,
const VkObjectTableCreateInfoNVX* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkObjectTableNVX* pObjectTable);
+ VkObjectTableNVX* pObjectTable);
void vkDestroyObjectTableNVX(
+
+void vkDestroyObjectTableNVX(
VkDevice device,
VkObjectTableNVX objectTable,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkRegisterObjectsNVX(
+
+VkResult vkRegisterObjectsNVX(
VkDevice device,
VkObjectTableNVX objectTable,
uint32_t objectCount,
const VkObjectTableEntryNVX* const* ppObjectTableEntries,
- const uint32_t* pObjectIndices);
+ const uint32_t* pObjectIndices);
VkResult vkUnregisterObjectsNVX(
+
+VkResult vkUnregisterObjectsNVX(
VkDevice device,
VkObjectTableNVX objectTable,
uint32_t objectCount,
const VkObjectEntryTypeNVX* pObjectEntryTypes,
- const uint32_t* pObjectIndices);
+ const uint32_t* pObjectIndices);
void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
+
+void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
VkPhysicalDevice physicalDevice,
VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
- VkDeviceGeneratedCommandsLimitsNVX* pLimits);
+ VkDeviceGeneratedCommandsLimitsNVX* pLimits);
\#version 450 core
+
+\#version 450 core
-\#extension GL_KHX_multiview : enable
-\#extension GL_NVX_multiview_per_view_attributes : enable
+\#extension GL_KHX_multiview : enable
+\#extension GL_NVX_multiview_per_view_attributes : enable
-layout(location = 0) in vec4 position;
-layout(set = 0, binding = 0) uniform Block { mat4 mvpPerView[2]; } buf;
+layout(location = 0) in vec4 position;
+layout(set = 0, binding = 0) uniform Block { mat4 mvpPerView[2]; } buf;
-void main()
-{
+void main()
+{
// Output both per-view positions and gl_Position as a function
// of gl_ViewIndex
gl_PositionPerViewNV[0] = buf.mvpPerView[0] * position;
gl_PositionPerViewNV[1] = buf.mvpPerView[1] * position;
gl_Position = buf.mvpPerView[gl_ViewIndex] * position;
-}
+}
VkViewport viewports[4];
-VkRect2D scissors[4];
-VkViewportWScalingNV scalings[4];
+
+VkViewport viewports[4];
+VkRect2D scissors[4];
+VkViewportWScalingNV scalings[4];
-for (int i = 0; i < 4; i++) {
+for (int i = 0; i < 4; i++) {
int x = (i & 2) ? 0 : currentWindowWidth / 2;
int y = (i & 1) ? 0 : currentWindowHeight / 2;
@@ -43,45 +44,46 @@ for (int i = 0; i < 4; i++) {
const float factor = 0.15;
scalings[i].xcoeff = ((i & 2) ? -1.0 : 1.0) * factor;
scalings[i].ycoeff = ((i & 1) ? -1.0 : 1.0) * factor;
-}
+}
-VkPipelineViewportWScalingStateCreateInfoNV vpWScalingStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV };
+VkPipelineViewportWScalingStateCreateInfoNV vpWScalingStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV };
-vpWScalingStateInfo.viewportWScalingEnable = VK_TRUE;
-vpWScalingStateInfo.viewportCount = 4;
-vpWScalingStateInfo.pViewportWScalings = &scalings[0];
+vpWScalingStateInfo.viewportWScalingEnable = VK_TRUE;
+vpWScalingStateInfo.viewportCount = 4;
+vpWScalingStateInfo.pViewportWScalings = &scalings[0];
-VkPipelineViewportStateCreateInfo vpStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
-vpStateInfo.viewportCount = 4;
-vpStateInfo.pViewports = &viewports[0];
-vpStateInfo.scissorCount = 4;
-vpStateInfo.pScissors = &scissors[0];
-vpStateInfo.pNext = &vpWScalingStateInfo;
+VkPipelineViewportStateCreateInfo vpStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
+vpStateInfo.viewportCount = 4;
+vpStateInfo.pViewports = &viewports[0];
+vpStateInfo.scissorCount = 4;
+vpStateInfo.pScissors = &scissors[0];
+vpStateInfo.pNext = &vpWScalingStateInfo;
Example shader to read from a w-scaled texture:
- // Vertex Shader
-// Draw a triangle that covers the whole screen
-const vec4 positions[3] = vec4[3](vec4(-1, -1, 0, 1),
+
+// Vertex Shader
+// Draw a triangle that covers the whole screen
+const vec4 positions[3] = vec4[3](vec4(-1, -1, 0, 1),
vec4( 3, -1, 0, 1),
vec4(-1, 3, 0, 1));
-out vec2 uv;
-void main()
-{
+out vec2 uv;
+void main()
+{
vec4 pos = positions[ gl_VertexID ];
gl_Position = pos;
uv = pos.xy;
-}
+}
-// Fragment Shader
-uniform sampler2D tex;
-uniform float xcoeff;
-uniform float ycoeff;
-out vec4 Color;
-in vec2 uv;
+// Fragment Shader
+uniform sampler2D tex;
+uniform float xcoeff;
+uniform float ycoeff;
+out vec4 Color;
+in vec2 uv;
-void main()
-{
+void main()
+{
// Handle uv as if upper right quadrant
vec2 uvabs = abs(uv);
@@ -96,7 +98,7 @@ void main()
P *= sign(uv);
Color = texture(tex, P * 0.5 + 0.5);
-}
+}
void vkCmdSetViewportWScalingNV(
+
+void vkCmdSetViewportWScalingNV(
VkCommandBuffer commandBuffer,
uint32_t firstViewport,
uint32_t viewportCount,
- const VkViewportWScalingNV* pViewportWScalings);
+ const VkViewportWScalingNV* pViewportWScalings);
i
of {@code pViewportScalings} replace the current state for the viewport index firstViewport {plus} i
, for i
in [0, viewportCount)
.
diff --git a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/NV_dedicated_allocation.kt b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/NV_dedicated_allocation.kt
index ddc0dcdf26..21d6e68a97 100644
--- a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/NV_dedicated_allocation.kt
+++ b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/NV_dedicated_allocation.kt
@@ -16,7 +16,8 @@ val NV_dedicated_allocation = "NVDedicatedAllocation".nativeClassVK("NV_dedicate
This extension adds a few small structures to resource creation and memory allocation: a new structure that flags whether am image/buffer will have a dedicated allocation, and a structure indicating the image or buffer that an allocation will be bound to.
// Create an image with
+
+ // Create an image with
// VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation
// set to VK_TRUE
@@ -79,7 +80,7 @@ val NV_dedicated_allocation = "NVDedicatedAllocation".nativeClassVK("NV_dedicate
device,
image,
memory,
- 0);
+ 0);
// TODO: Write some sample code here.
+
+ // TODO: Write some sample code here.
VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+
+VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
@@ -120,7 +121,7 @@ val NV_external_memory_capabilities = "NVExternalMemoryCapabilities".nativeClass
VkImageUsageFlags usage,
VkImageCreateFlags flags,
VkExternalMemoryHandleTypeFlagsNV externalHandleType,
- VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
+ VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
//
+
+ //
// Create an exportable memory object and export an external
// handle from it.
//
@@ -145,7 +146,7 @@ val NV_external_memory_win32 = "NVExternalMemoryWin32".nativeClassVK("NV_externa
}
// Get the external memory opaque FD handle
- vkGetMemoryWin32HandleNV(device, memory, &memoryHnd);
+ vkGetMemoryWin32HandleNV(device, memory, &memoryHnd);
VkResult vkGetMemoryWin32HandleNV(
+
+VkResult vkGetMemoryWin32HandleNV(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType,
- HANDLE* pHandle);
+ HANDLE* pHandle);
layout(triangles) in;
-layout(triangle_strip) out;
-layout(max_vertices=3) out;
+
+layout(triangles) in;
+layout(triangle_strip) out;
+layout(max_vertices=3) out;
-in Inputs {
+in Inputs {
vec2 texcoord;
vec4 baseColor;
-} v_in[];
-out Outputs {
+} v_in[];
+out Outputs {
vec2 texcoord;
vec4 baseColor;
-};
+};
-void main()
-{
+void main()
+{
int layer = compute_layer();
for (int i = 0; i < 3; i++) {
gl_Position = gl_in[i].gl_Position;
@@ -49,36 +50,37 @@ void main()
gl_Layer = layer;
EmitVertex();
}
-}
+}
In this shader, the inputs "gl_Position", "Inputs.texcoord", and "Inputs.baseColor" are simply copied from the input vertex to the corresponding output vertex. The only "interesting" work done by the geometry shader is computing and emitting a gl_Layer value for the primitive.
The following geometry shader, using this extension, is equivalent:
- \#extension GL_NV_geometry_shader_passthrough : require
+
+\#extension GL_NV_geometry_shader_passthrough : require
-layout(triangles) in;
-// No output primitive layout qualifiers required.
+layout(triangles) in;
+// No output primitive layout qualifiers required.
-// Redeclare gl_PerVertex to pass through "gl_Position".
-layout(passthrough) in gl_PerVertex {
+// Redeclare gl_PerVertex to pass through "gl_Position".
+layout(passthrough) in gl_PerVertex {
vec4 gl_Position;
-} gl_in[];
+} gl_in[];
-// Declare "Inputs" with "passthrough" to automatically copy members.
-layout(passthrough) in Inputs {
+// Declare "Inputs" with "passthrough" to automatically copy members.
+layout(passthrough) in Inputs {
vec2 texcoord;
vec4 baseColor;
-} v_in[];
+} v_in[];
-// No output block declaration required.
+// No output block declaration required.
-void main()
-{
+void main()
+{
// The shader simply computes and writes gl_Layer. We don't
// loop over three vertices or call EmitVertex().
gl_Layer = compute_layer();
-}
+}
char const vss[] =
+
+ char const vss[] =
"\#version 450 core\n"
"layout(location = 0) in vec2 aVertex;\n"
"layout(location = 1) in vec4 aColor;\n"
@@ -33,7 +34,7 @@ val NV_glsl_shader = "NVGLSLShader".nativeClassVK("NV_glsl_shader", type = "devi
vertexShaderInfo.codeSize = sizeof vss;
vertexShaderInfo.pCode = vss;
VkShaderModule vertexShader;
- vkCreateShaderModule(device, &vertexShaderInfo, 0, &vertexShader);
+ vkCreateShaderModule(device, &vertexShaderInfo, 0, &vertexShader);
//
+
+ //
// Import a memory object from Direct3D 11, and synchronize
// access to it in Vulkan using keyed mutex objects.
//
@@ -141,7 +142,7 @@ val NV_win32_keyed_mutex = "NVWin32KeyedMutex".nativeClassVK("NV_win32_keyed_mut
VkSubmitInfo submit_info = { VK_STRUCTURE_TYPE_SUBMIT_INFO, &keyedMutex };
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers = &cmd_buf;
- vkQueueSubmit(queue, 1, &submit_info, VK_NULL_HANDLE);
+ vkQueueSubmit(queue, 1, &submit_info, VK_NULL_HANDLE);
VkResult vkCreateInstance(
+
+VkResult vkCreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkInstance* pInstance);
+ VkInstance* pInstance);
void vkDestroyInstance(
+
+void vkDestroyInstance(
VkInstance instance,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkEnumeratePhysicalDevices(
+
+VkResult vkEnumeratePhysicalDevices(
VkInstance instance,
uint32_t* pPhysicalDeviceCount,
- VkPhysicalDevice* pPhysicalDevices);
+ VkPhysicalDevice* pPhysicalDevices);
void vkGetPhysicalDeviceFeatures(
+
+void vkGetPhysicalDeviceFeatures(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures* pFeatures);
+ VkPhysicalDeviceFeatures* pFeatures);
void vkGetPhysicalDeviceFormatProperties(
+
+void vkGetPhysicalDeviceFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
- VkFormatProperties* pFormatProperties);
+ VkFormatProperties* pFormatProperties);
VkResult vkGetPhysicalDeviceImageFormatProperties(
+
+VkResult vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
VkImageCreateFlags flags,
- VkImageFormatProperties* pImageFormatProperties);
+ VkImageFormatProperties* pImageFormatProperties);
void vkGetPhysicalDeviceProperties(
+
+void vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties* pProperties);
+ VkPhysicalDeviceProperties* pProperties);
void vkGetPhysicalDeviceQueueFamilyProperties(
+
+void vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
- VkQueueFamilyProperties* pQueueFamilyProperties);
+ VkQueueFamilyProperties* pQueueFamilyProperties);
void vkGetPhysicalDeviceMemoryProperties(
+
+void vkGetPhysicalDeviceMemoryProperties(
VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties* pMemoryProperties);
+ VkPhysicalDeviceMemoryProperties* pMemoryProperties);
PFN_vkVoidFunction vkGetInstanceProcAddr(
+
+PFN_vkVoidFunction vkGetInstanceProcAddr(
VkInstance instance,
- const char* pName);
+ const char* pName);
PFN_vkVoidFunction vkGetDeviceProcAddr(
+
+PFN_vkVoidFunction vkGetDeviceProcAddr(
VkDevice device,
- const char* pName);
+ const char* pName);
VkResult vkCreateDevice(
+
+VkResult vkCreateDevice(
VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDevice* pDevice);
+ VkDevice* pDevice);
void vkDestroyDevice(
+
+void vkDestroyDevice(
VkDevice device,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkEnumerateInstanceExtensionProperties(
+
+VkResult vkEnumerateInstanceExtensionProperties(
const char* pLayerName,
uint32_t* pPropertyCount,
- VkExtensionProperties* pProperties);
+ VkExtensionProperties* pProperties);
VkResult vkEnumerateDeviceExtensionProperties(
+
+VkResult vkEnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
- VkExtensionProperties* pProperties);
+ VkExtensionProperties* pProperties);
VkResult vkEnumerateInstanceLayerProperties(
+
+VkResult vkEnumerateInstanceLayerProperties(
uint32_t* pPropertyCount,
- VkLayerProperties* pProperties);
+ VkLayerProperties* pProperties);
VkResult vkEnumerateDeviceLayerProperties(
+
+VkResult vkEnumerateDeviceLayerProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
- VkLayerProperties* pProperties);
+ VkLayerProperties* pProperties);
void vkGetDeviceQueue(
+
+void vkGetDeviceQueue(
VkDevice device,
uint32_t queueFamilyIndex,
uint32_t queueIndex,
- VkQueue* pQueue);
+ VkQueue* pQueue);
VkResult vkQueueSubmit(
+
+VkResult vkQueueSubmit(
VkQueue queue,
uint32_t submitCount,
const VkSubmitInfo* pSubmits,
- VkFence fence);
+ VkFence fence);
VkResult vkQueueWaitIdle(
- VkQueue queue);
+
+VkResult vkQueueWaitIdle(
+ VkQueue queue);
VkResult vkDeviceWaitIdle(
- VkDevice device);
+
+VkResult vkDeviceWaitIdle(
+ VkDevice device);
VkResult vkAllocateMemory(
+
+VkResult vkAllocateMemory(
VkDevice device,
const VkMemoryAllocateInfo* pAllocateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDeviceMemory* pMemory);
+ VkDeviceMemory* pMemory);
void vkFreeMemory(
+
+void vkFreeMemory(
VkDevice device,
VkDeviceMemory memory,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkMapMemory(
+
+VkResult vkMapMemory(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize offset,
VkDeviceSize size,
VkMemoryMapFlags flags,
- void** ppData);
+ void** ppData);
void vkUnmapMemory(
+
+void vkUnmapMemory(
VkDevice device,
- VkDeviceMemory memory);
+ VkDeviceMemory memory);
VkResult vkFlushMappedMemoryRanges(
+
+VkResult vkFlushMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
- const VkMappedMemoryRange* pMemoryRanges);
+ const VkMappedMemoryRange* pMemoryRanges);
VkResult vkInvalidateMappedMemoryRanges(
+
+VkResult vkInvalidateMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
- const VkMappedMemoryRange* pMemoryRanges);
+ const VkMappedMemoryRange* pMemoryRanges);
void vkGetDeviceMemoryCommitment(
+
+void vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
- VkDeviceSize* pCommittedMemoryInBytes);
+ VkDeviceSize* pCommittedMemoryInBytes);
VkResult vkBindBufferMemory(
+
+VkResult vkBindBufferMemory(
VkDevice device,
VkBuffer buffer,
VkDeviceMemory memory,
- VkDeviceSize memoryOffset);
+ VkDeviceSize memoryOffset);
VkResult vkBindImageMemory(
+
+VkResult vkBindImageMemory(
VkDevice device,
VkImage image,
VkDeviceMemory memory,
- VkDeviceSize memoryOffset);
+ VkDeviceSize memoryOffset);
void vkGetBufferMemoryRequirements(
+
+void vkGetBufferMemoryRequirements(
VkDevice device,
VkBuffer buffer,
- VkMemoryRequirements* pMemoryRequirements);
+ VkMemoryRequirements* pMemoryRequirements);
void vkGetImageMemoryRequirements(
+
+void vkGetImageMemoryRequirements(
VkDevice device,
VkImage image,
- VkMemoryRequirements* pMemoryRequirements);
+ VkMemoryRequirements* pMemoryRequirements);
void vkGetImageSparseMemoryRequirements(
+
+void vkGetImageSparseMemoryRequirements(
VkDevice device,
VkImage image,
uint32_t* pSparseMemoryRequirementCount,
- VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
+ VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
void vkGetPhysicalDeviceSparseImageFormatProperties(
+
+void vkGetPhysicalDeviceSparseImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
@@ -4185,7 +4219,7 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
VkImageUsageFlags usage,
VkImageTiling tiling,
uint32_t* pPropertyCount,
- VkSparseImageFormatProperties* pProperties);
+ VkSparseImageFormatProperties* pProperties);
VkResult vkQueueBindSparse(
+
+VkResult vkQueueBindSparse(
VkQueue queue,
uint32_t bindInfoCount,
const VkBindSparseInfo* pBindInfo,
- VkFence fence);
+ VkFence fence);
VkResult vkCreateFence(
+
+VkResult vkCreateFence(
VkDevice device,
const VkFenceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
+ VkFence* pFence);
void vkDestroyFence(
+
+void vkDestroyFence(
VkDevice device,
VkFence fence,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkResetFences(
+
+VkResult vkResetFences(
VkDevice device,
uint32_t fenceCount,
- const VkFence* pFences);
+ const VkFence* pFences);
VkResult vkGetFenceStatus(
+
+VkResult vkGetFenceStatus(
VkDevice device,
- VkFence fence);
+ VkFence fence);
VkResult vkWaitForFences(
+
+VkResult vkWaitForFences(
VkDevice device,
uint32_t fenceCount,
const VkFence* pFences,
VkBool32 waitAll,
- uint64_t timeout);
+ uint64_t timeout);
VkResult vkCreateSemaphore(
+
+VkResult vkCreateSemaphore(
VkDevice device,
const VkSemaphoreCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSemaphore* pSemaphore);
+ VkSemaphore* pSemaphore);
void vkDestroySemaphore(
+
+void vkDestroySemaphore(
VkDevice device,
VkSemaphore semaphore,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateEvent(
+
+VkResult vkCreateEvent(
VkDevice device,
const VkEventCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkEvent* pEvent);
+ VkEvent* pEvent);
void vkDestroyEvent(
+
+void vkDestroyEvent(
VkDevice device,
VkEvent event,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkGetEventStatus(
+
+VkResult vkGetEventStatus(
VkDevice device,
- VkEvent event);
+ VkEvent event);
VkResult vkSetEvent(
+
+VkResult vkSetEvent(
VkDevice device,
- VkEvent event);
+ VkEvent event);
VkResult vkResetEvent(
+
+VkResult vkResetEvent(
VkDevice device,
- VkEvent event);
+ VkEvent event);
VkResult vkCreateQueryPool(
+
+VkResult vkCreateQueryPool(
VkDevice device,
const VkQueryPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkQueryPool* pQueryPool);
+ VkQueryPool* pQueryPool);
void vkDestroyQueryPool(
+
+void vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkGetQueryPoolResults(
+
+VkResult vkGetQueryPoolResults(
VkDevice device,
VkQueryPool queryPool,
uint32_t firstQuery,
@@ -5023,7 +5073,7 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
size_t dataSize,
void* pData,
VkDeviceSize stride,
- VkQueryResultFlags flags);
+ VkQueryResultFlags flags);
typedef enum VkQueryResultFlagBits {
+
+typedef enum VkQueryResultFlagBits {
VK_QUERY_RESULT_64_BIT = 0x00000001,
VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,
-} VkQueryResultFlagBits;
+} VkQueryResultFlagBits;
VkResult vkCreateBuffer(
+
+VkResult vkCreateBuffer(
VkDevice device,
const VkBufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkBuffer* pBuffer);
+ VkBuffer* pBuffer);
void vkDestroyBuffer(
+
+void vkDestroyBuffer(
VkDevice device,
VkBuffer buffer,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateBufferView(
+
+VkResult vkCreateBufferView(
VkDevice device,
const VkBufferViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkBufferView* pView);
+ VkBufferView* pView);
void vkDestroyBufferView(
+
+void vkDestroyBufferView(
VkDevice device,
VkBufferView bufferView,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateImage(
+
+VkResult vkCreateImage(
VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkImage* pImage);
+ VkImage* pImage);
void vkDestroyImage(
+
+void vkDestroyImage(
VkDevice device,
VkImage image,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
void vkGetImageSubresourceLayout(
+
+void vkGetImageSubresourceLayout(
VkDevice device,
VkImage image,
const VkImageSubresource* pSubresource,
- VkSubresourceLayout* pLayout);
+ VkSubresourceLayout* pLayout);
VkResult vkCreateImageView(
+
+VkResult vkCreateImageView(
VkDevice device,
const VkImageViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkImageView* pView);
+ VkImageView* pView);
void vkDestroyImageView(
+
+void vkDestroyImageView(
VkDevice device,
VkImageView imageView,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateShaderModule(
+
+VkResult vkCreateShaderModule(
VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkShaderModule* pShaderModule);
+ VkShaderModule* pShaderModule);
void vkDestroyShaderModule(
+
+void vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreatePipelineCache(
+
+VkResult vkCreatePipelineCache(
VkDevice device,
const VkPipelineCacheCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkPipelineCache* pPipelineCache);
+ VkPipelineCache* pPipelineCache);
void vkDestroyPipelineCache(
+
+void vkDestroyPipelineCache(
VkDevice device,
VkPipelineCache pipelineCache,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkGetPipelineCacheData(
+
+VkResult vkGetPipelineCacheData(
VkDevice device,
VkPipelineCache pipelineCache,
size_t* pDataSize,
- void* pData);
+ void* pData);
typedef enum VkPipelineCacheHeaderVersion {
+
+typedef enum VkPipelineCacheHeaderVersion {
VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
-} VkPipelineCacheHeaderVersion;
+} VkPipelineCacheHeaderVersion;
A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header.
@@ -5815,11 +5881,12 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
VkResult vkMergePipelineCaches(
+
+VkResult vkMergePipelineCaches(
VkDevice device,
VkPipelineCache dstCache,
uint32_t srcCacheCount,
- const VkPipelineCache* pSrcCaches);
+ const VkPipelineCache* pSrcCaches);
VkResult vkCreateGraphicsPipelines(
+
+VkResult vkCreateGraphicsPipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
- VkPipeline* pPipelines);
+ VkPipeline* pPipelines);
VkResult vkCreateComputePipelines(
+
+VkResult vkCreateComputePipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkComputePipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
- VkPipeline* pPipelines);
+ VkPipeline* pPipelines);
void vkDestroyPipeline(
+
+void vkDestroyPipeline(
VkDevice device,
VkPipeline pipeline,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreatePipelineLayout(
+
+VkResult vkCreatePipelineLayout(
VkDevice device,
const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkPipelineLayout* pPipelineLayout);
+ VkPipelineLayout* pPipelineLayout);
void vkDestroyPipelineLayout(
+
+void vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateSampler(
+
+VkResult vkCreateSampler(
VkDevice device,
const VkSamplerCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkSampler* pSampler);
+ VkSampler* pSampler);
void vkDestroySampler(
+
+void vkDestroySampler(
VkDevice device,
VkSampler sampler,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateDescriptorSetLayout(
+
+VkResult vkCreateDescriptorSetLayout(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDescriptorSetLayout* pSetLayout);
+ VkDescriptorSetLayout* pSetLayout);
void vkDestroyDescriptorSetLayout(
+
+void vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateDescriptorPool(
+
+VkResult vkCreateDescriptorPool(
VkDevice device,
const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkDescriptorPool* pDescriptorPool);
+ VkDescriptorPool* pDescriptorPool);
void vkDestroyDescriptorPool(
+
+void vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkResetDescriptorPool(
+
+VkResult vkResetDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
- VkDescriptorPoolResetFlags flags);
+ VkDescriptorPoolResetFlags flags);
VkResult vkAllocateDescriptorSets(
+
+VkResult vkAllocateDescriptorSets(
VkDevice device,
const VkDescriptorSetAllocateInfo* pAllocateInfo,
- VkDescriptorSet* pDescriptorSets);
+ VkDescriptorSet* pDescriptorSets);
VkResult vkFreeDescriptorSets(
+
+VkResult vkFreeDescriptorSets(
VkDevice device,
VkDescriptorPool descriptorPool,
uint32_t descriptorSetCount,
- const VkDescriptorSet* pDescriptorSets);
+ const VkDescriptorSet* pDescriptorSets);
void vkUpdateDescriptorSets(
+
+void vkUpdateDescriptorSets(
VkDevice device,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t descriptorCopyCount,
- const VkCopyDescriptorSet* pDescriptorCopies);
+ const VkCopyDescriptorSet* pDescriptorCopies);
VkResult vkCreateFramebuffer(
+
+VkResult vkCreateFramebuffer(
VkDevice device,
const VkFramebufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkFramebuffer* pFramebuffer);
+ VkFramebuffer* pFramebuffer);
void vkDestroyFramebuffer(
+
+void vkDestroyFramebuffer(
VkDevice device,
VkFramebuffer framebuffer,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkCreateRenderPass(
+
+VkResult vkCreateRenderPass(
VkDevice device,
const VkRenderPassCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkRenderPass* pRenderPass);
+ VkRenderPass* pRenderPass);
void vkDestroyRenderPass(
+
+void vkDestroyRenderPass(
VkDevice device,
VkRenderPass renderPass,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
void vkGetRenderAreaGranularity(
+
+void vkGetRenderAreaGranularity(
VkDevice device,
VkRenderPass renderPass,
- VkExtent2D* pGranularity);
+ VkExtent2D* pGranularity);
VkResult vkCreateCommandPool(
+
+VkResult vkCreateCommandPool(
VkDevice device,
const VkCommandPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
- VkCommandPool* pCommandPool);
+ VkCommandPool* pCommandPool);
void vkDestroyCommandPool(
+
+void vkDestroyCommandPool(
VkDevice device,
VkCommandPool commandPool,
- const VkAllocationCallbacks* pAllocator);
+ const VkAllocationCallbacks* pAllocator);
VkResult vkResetCommandPool(
+
+VkResult vkResetCommandPool(
VkDevice device,
VkCommandPool commandPool,
- VkCommandPoolResetFlags flags);
+ VkCommandPoolResetFlags flags);
typedef enum VkCommandPoolResetFlagBits {
+
+typedef enum VkCommandPoolResetFlagBits {
VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
-} VkCommandPoolResetFlagBits;
+} VkCommandPoolResetFlagBits;
If {@code flags} includes #COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, resetting a command pool recycles all of the resources from the command pool back to the system.""")
)
@@ -7022,10 +7113,11 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
VkResult vkAllocateCommandBuffers(
+
+VkResult vkAllocateCommandBuffers(
VkDevice device,
const VkCommandBufferAllocateInfo* pAllocateInfo,
- VkCommandBuffer* pCommandBuffers);
+ VkCommandBuffer* pCommandBuffers);
void vkFreeCommandBuffers(
+
+void vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
- const VkCommandBuffer* pCommandBuffers);
+ const VkCommandBuffer* pCommandBuffers);
VkResult vkBeginCommandBuffer(
+
+VkResult vkBeginCommandBuffer(
VkCommandBuffer commandBuffer,
- const VkCommandBufferBeginInfo* pBeginInfo);
+ const VkCommandBufferBeginInfo* pBeginInfo);
VkResult vkEndCommandBuffer(
- VkCommandBuffer commandBuffer);
+
+VkResult vkEndCommandBuffer(
+ VkCommandBuffer commandBuffer);
VkResult vkResetCommandBuffer(
+
+VkResult vkResetCommandBuffer(
VkCommandBuffer commandBuffer,
- VkCommandBufferResetFlags flags);
+ VkCommandBufferResetFlags flags);
typedef enum VkCommandBufferResetFlagBits {
+
+typedef enum VkCommandBufferResetFlagBits {
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
-} VkCommandBufferResetFlagBits;
+} VkCommandBufferResetFlagBits;
If {@code flags} includes #COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT, then most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands. {@code commandBuffer} is moved to the initial state.""")
)
@@ -7283,10 +7380,11 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
void vkCmdBindPipeline(
+
+void vkCmdBindPipeline(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
- VkPipeline pipeline);
+ VkPipeline pipeline);
typedef enum VkPipelineBindPoint {
+
+typedef enum VkPipelineBindPoint {
VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
VK_PIPELINE_BIND_POINT_COMPUTE = 1,
-} VkPipelineBindPoint;
+} VkPipelineBindPoint;
specifying whether {@code pipeline} will be bound as a compute (#PIPELINE_BIND_POINT_COMPUTE) or graphics (#PIPELINE_BIND_POINT_GRAPHICS) pipeline. There are separate bind points for each of graphics and compute, so binding one does not disturb the other."""),
VkPipeline.IN("pipeline", "the pipeline to be bound.")
@@ -7342,11 +7441,12 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
void vkCmdSetViewport(
+
+void vkCmdSetViewport(
VkCommandBuffer commandBuffer,
uint32_t firstViewport,
uint32_t viewportCount,
- const VkViewport* pViewports);
+ const VkViewport* pViewports);
i
of {@code pViewports} replace the current state for the viewport index firstViewport {plus} i
, for i
in [0, viewportCount)
.
@@ -7399,11 +7499,12 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
(xf,yf)
lie within the scissor rectangle corresponding to the viewport index (see Controlling the Viewport) used by the primitive that generated the fragment. If the pipeline state object is created without #DYNAMIC_STATE_SCISSOR enabled then the scissor rectangles are set by the ##VkPipelineViewportStateCreateInfo state of the pipeline state object. Otherwise, to dynamically set the scissor rectangles call:
- void vkCmdSetScissor(
+
+void vkCmdSetScissor(
VkCommandBuffer commandBuffer,
uint32_t firstScissor,
uint32_t scissorCount,
- const VkRect2D* pScissors);
+ const VkRect2D* pScissors);
i
of {@code pScissors} replace the current state for the scissor index firstScissor + i
, for i
in [0, scissorCount)
.
@@ -7461,9 +7562,10 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
void vkCmdSetLineWidth(
+
+void vkCmdSetLineWidth(
VkCommandBuffer commandBuffer,
- float lineWidth);
+ float lineWidth);
void vkCmdSetDepthBias(
+
+void vkCmdSetDepthBias(
VkCommandBuffer commandBuffer,
float depthBiasConstantFactor,
float depthBiasClamp,
- float depthBiasSlopeFactor);
+ float depthBiasSlopeFactor);
m
of a triangle is
- m = sqrt((∂zf / ∂xf)2 + (∂zf / ∂yf)2)
+
+ m = sqrt((∂zf / ∂xf)2 + (∂zf / ∂yf)2)
where (xf, yf, zf)
is a point on the triangle. m
may be approximated as
- m = max(abs(∂zf / ∂xf), abs(∂zf / ∂yf))
+
+ m = max(abs(∂zf / ∂xf), abs(∂zf / ∂yf))
The minimum resolvable difference r
is an implementation-dependent parameter that depends on the depth buffer representation. It is the smallest difference in framebuffer coordinate z
values that is guaranteed to remain distinct throughout polygon rasterization and in the depth buffer. All pairs of fragments generated by the rasterization of two polygons with otherwise identical vertices, but zf
values that differ by r
, will have distinct depth values.
@@ -7534,9 +7639,10 @@ val VK10 = "VK10".nativeClass(VULKAN_PACKAGE, "VK10", prefix = "VK", binding = V
The bias value o
for a polygon is
- m × depthBiasSlopeFactor + r × depthBiasConstantFactor depthBiasClamp = 0 or NaN
-o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp > 0
- max(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp < 0
+
+ m × depthBiasSlopeFactor + r × depthBiasConstantFactor depthBiasClamp = 0 or NaN
+o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp > 0
+ max(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp < 0
m
is computed as described above. If the depth buffer uses a fixed-point representation, m
is a function of depth values in the range [0,1]
, and o
is applied to depth values in the same range.
@@ -7582,9 +7688,10 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdSetBlendConstants(
+
+void vkCmdSetBlendConstants(
VkCommandBuffer commandBuffer,
- const float blendConstants[4]);
+ const float blendConstants[4]);
za
in the depth attachment at location (xf,yf)
(for the appropriate sample) and a range of values. The test is enabled or disabled by the {@code depthBoundsTestEnable} member of ##VkPipelineDepthStencilStateCreateInfo: If the pipeline state object is created without the #DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled then the range of values used in the depth bounds test are defined by the {@code minDepthBounds} and {@code maxDepthBounds} members of the ##VkPipelineDepthStencilStateCreateInfo structure. Otherwise, to dynamically set the depth bounds range values call:
- void vkCmdSetDepthBounds(
+
+void vkCmdSetDepthBounds(
VkCommandBuffer commandBuffer,
float minDepthBounds,
- float maxDepthBounds);
+ float maxDepthBounds);
void vkCmdSetStencilCompareMask(
+
+void vkCmdSetStencilCompareMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
- uint32_t compareMask);
+ uint32_t compareMask);
typedef enum VkStencilFaceFlagBits {
+
+typedef enum VkStencilFaceFlagBits {
VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
VK_STENCIL_FACE_BACK_BIT = 0x00000002,
VK_STENCIL_FRONT_AND_BACK = 0x00000003,
-} VkStencilFaceFlagBits;
+} VkStencilFaceFlagBits;
void vkCmdSetStencilWriteMask(
+
+void vkCmdSetStencilWriteMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
- uint32_t writeMask);
+ uint32_t writeMask);
void vkCmdSetStencilReference(
+
+void vkCmdSetStencilReference(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
- uint32_t reference);
+ uint32_t reference);
void vkCmdBindDescriptorSets(
+
+void vkCmdBindDescriptorSets(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
@@ -7822,7 +7935,7 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets,
uint32_t dynamicOffsetCount,
- const uint32_t* pDynamicOffsets);
+ const uint32_t* pDynamicOffsets);
void vkCmdBindIndexBuffer(
+
+void vkCmdBindIndexBuffer(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
- VkIndexType indexType);
+ VkIndexType indexType);
typedef enum VkIndexType {
+
+typedef enum VkIndexType {
VK_INDEX_TYPE_UINT16 = 0,
VK_INDEX_TYPE_UINT32 = 1,
-} VkIndexType;
""")
+} VkIndexType;""")
)
void(
@@ -7947,12 +8062,13 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdBindVertexBuffers(
+
+void vkCmdBindVertexBuffers(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
- const VkDeviceSize* pOffsets);
+ const VkDeviceSize* pOffsets);
i
of {@code pBuffers} and {@code pOffsets} replace the current state for the vertex input binding firstBinding + i
, for i
in [0, bindingCount)
. The vertex input binding is updated to start at the offset indicated by {@code pOffsets}[i] from the start of the buffer {@code pBuffers}[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent draw commands.
@@ -8005,12 +8121,13 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdDraw(
+
+void vkCmdDraw(
VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
- uint32_t firstInstance);
+ uint32_t firstInstance);
void vkCmdDrawIndexed(
+
+void vkCmdDrawIndexed(
VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t firstIndex,
int32_t vertexOffset,
- uint32_t firstInstance);
+ uint32_t firstInstance);
void vkCmdDrawIndirect(
+
+void vkCmdDrawIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t drawCount,
- uint32_t stride);
+ uint32_t stride);
void vkCmdDrawIndexedIndirect(
+
+void vkCmdDrawIndexedIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t drawCount,
- uint32_t stride);
+ uint32_t stride);
void vkCmdDispatch(
+
+void vkCmdDispatch(
VkCommandBuffer commandBuffer,
uint32_t groupCountX,
uint32_t groupCountY,
- uint32_t groupCountZ);
+ uint32_t groupCountZ);
groupCountX {times} groupCountY {times} groupCountZ
local workgroups is assembled.
@@ -8369,10 +8490,11 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdDispatchIndirect(
+
+void vkCmdDispatchIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
- VkDeviceSize offset);
+ VkDeviceSize offset);
void vkCmdCopyBuffer(
+
+void vkCmdCopyBuffer(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer dstBuffer,
uint32_t regionCount,
- const VkBufferCopy* pRegions);
+ const VkBufferCopy* pRegions);
void vkCmdCopyImage(
+
+void vkCmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
- const VkImageCopy* pRegions);
+ const VkImageCopy* pRegions);
void vkCmdBlitImage(
+
+void vkCmdBlitImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@@ -8614,7 +8739,7 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageBlit* pRegions,
- VkFilter filter);
+ VkFilter filter);
void vkCmdCopyBufferToImage(
+
+void vkCmdCopyBufferToImage(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
- const VkBufferImageCopy* pRegions);
+ const VkBufferImageCopy* pRegions);
void vkCmdCopyImageToBuffer(
+
+void vkCmdCopyImageToBuffer(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer dstBuffer,
uint32_t regionCount,
- const VkBufferImageCopy* pRegions);
+ const VkBufferImageCopy* pRegions);
void vkCmdUpdateBuffer(
+
+void vkCmdUpdateBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize dataSize,
- const void* pData);
+ const void* pData);
void vkCmdFillBuffer(
+
+void vkCmdFillBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize size,
- uint32_t data);
+ uint32_t data);
void vkCmdClearColorImage(
+
+void vkCmdClearColorImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
uint32_t rangeCount,
- const VkImageSubresourceRange* pRanges);
+ const VkImageSubresourceRange* pRanges);
void vkCmdClearDepthStencilImage(
+
+void vkCmdClearDepthStencilImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
uint32_t rangeCount,
- const VkImageSubresourceRange* pRanges);
+ const VkImageSubresourceRange* pRanges);
void vkCmdClearAttachments(
+
+void vkCmdClearAttachments(
VkCommandBuffer commandBuffer,
uint32_t attachmentCount,
const VkClearAttachment* pAttachments,
uint32_t rectCount,
- const VkClearRect* pRects);
+ const VkClearRect* pRects);
void vkCmdResolveImage(
+
+void vkCmdResolveImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
- const VkImageResolve* pRegions);
+ const VkImageResolve* pRegions);
void vkCmdSetEvent(
+
+void vkCmdSetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
- VkPipelineStageFlags stageMask);
+ VkPipelineStageFlags stageMask);
void vkCmdResetEvent(
+
+void vkCmdResetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
- VkPipelineStageFlags stageMask);
+ VkPipelineStageFlags stageMask);
void vkCmdWaitEvents(
+
+void vkCmdWaitEvents(
VkCommandBuffer commandBuffer,
uint32_t eventCount,
const VkEvent* pEvents,
@@ -9450,7 +9586,7 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
uint32_t bufferMemoryBarrierCount,
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
uint32_t imageMemoryBarrierCount,
- const VkImageMemoryBarrier* pImageMemoryBarriers);
+ const VkImageMemoryBarrier* pImageMemoryBarriers);
void vkCmdPipelineBarrier(
+
+void vkCmdPipelineBarrier(
VkCommandBuffer commandBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
@@ -9549,7 +9686,7 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
uint32_t bufferMemoryBarrierCount,
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
uint32_t imageMemoryBarrierCount,
- const VkImageMemoryBarrier* pImageMemoryBarriers);
+ const VkImageMemoryBarrier* pImageMemoryBarriers);
typedef enum VkDependencyFlagBits {
+
+typedef enum VkDependencyFlagBits {
VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
-} VkDependencyFlagBits;
+} VkDependencyFlagBits;
void vkCmdBeginQuery(
+
+void vkCmdBeginQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query,
- VkQueryControlFlags flags);
+ VkQueryControlFlags flags);
typedef enum VkQueryControlFlagBits {
+
+typedef enum VkQueryControlFlagBits {
VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
-} VkQueryControlFlagBits;
""")
+} VkQueryControlFlagBits;""")
)
void(
@@ -9717,10 +9857,11 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdEndQuery(
+
+void vkCmdEndQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
- uint32_t query);
+ uint32_t query);
void vkCmdResetQueryPool(
+
+void vkCmdResetQueryPool(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
- uint32_t queryCount);
+ uint32_t queryCount);
[firstQuery, firstQuery + queryCount - 1]
to unavailable.
@@ -9822,11 +9964,12 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdWriteTimestamp(
+
+void vkCmdWriteTimestamp(
VkCommandBuffer commandBuffer,
VkPipelineStageFlagBits pipelineStage,
VkQueryPool queryPool,
- uint32_t query);
+ uint32_t query);
void vkCmdCopyQueryPoolResults(
+
+void vkCmdCopyQueryPoolResults(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
@@ -9901,7 +10045,7 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize stride,
- VkQueryResultFlags flags);
+ VkQueryResultFlags flags);
void vkCmdPushConstants(
+
+void vkCmdPushConstants(
VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
uint32_t offset,
uint32_t size,
- const void* pValues);
+ const void* pValues);
void vkCmdBeginRenderPass(
+
+void vkCmdBeginRenderPass(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- VkSubpassContents contents);
+ VkSubpassContents contents);
typedef enum VkSubpassContents {
+
+typedef enum VkSubpassContents {
VK_SUBPASS_CONTENTS_INLINE = 0,
VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
-} VkSubpassContents;
+} VkSubpassContents;
If {@code contents} is #SUBPASS_CONTENTS_INLINE, the contents of the subpass will be recorded inline in the primary command buffer, and secondary command buffers must not be executed within the subpass. If {@code contents} is #SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, the contents are recorded in secondary command buffers that will be called from the primary command buffer, and #CmdExecuteCommands() is the only valid command on the command buffer until #CmdNextSubpass() or #CmdEndRenderPass().""")
)
@@ -10102,9 +10249,10 @@ o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, dept
void vkCmdNextSubpass(
+
+void vkCmdNextSubpass(
VkCommandBuffer commandBuffer,
- VkSubpassContents contents);
+ VkSubpassContents contents);
void vkCmdEndRenderPass(
- VkCommandBuffer commandBuffer);
+
+void vkCmdEndRenderPass(
+ VkCommandBuffer commandBuffer);
void vkCmdExecuteCommands(
+
+void vkCmdExecuteCommands(
VkCommandBuffer commandBuffer,
uint32_t commandBufferCount,
- const VkCommandBuffer* pCommandBuffers);
+ const VkCommandBuffer* pCommandBuffers);