org.lwjgl.vulkan.NVDeviceGeneratedCommands Maven / Gradle / Ivy
Show all versions of lwjgl-vulkan Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* This extension allows the device to generate a number of critical graphics commands for command buffers.
*
* When rendering a large number of objects, the device can be leveraged to implement a number of critical functions, like updating matrices, or implementing occlusion culling, frustum culling, front to back sorting, etc. Implementing those on the device does not require any special extension, since an application is free to define its own data structures, and just process them using shaders.
*
* However, if the application desires to quickly kick off the rendering of the final stream of objects, then unextended Vulkan forces the application to read back the processed stream and issue graphics command from the host. For very large scenes, the synchronization overhead and cost to generate the command buffer can become the bottleneck. This extension allows an application to generate a device side stream of state changes and commands, and convert it efficiently into a command buffer without having to read it back to the host.
*
* Furthermore, it allows incremental changes to such command buffers by manipulating only partial sections of a command stream — for example pipeline bindings. Unextended Vulkan requires re-creation of entire command buffers in such a scenario, or updates synchronized on the host.
*
* The intended usage for this extension is for the application to:
*
*
* - create {@code VkBuffer} objects and retrieve physical addresses from them via {@link EXTBufferDeviceAddress#vkGetBufferDeviceAddressEXT GetBufferDeviceAddressEXT}
* - create a graphics pipeline using {@link VkGraphicsPipelineShaderGroupsCreateInfoNV} for the ability to change shaders on the device.
* - create a {@code VkIndirectCommandsLayoutNV}, which lists the {@code VkIndirectCommandsTokenTypeNV} it wants to dynamically execute as an atomic command sequence. This step likely involves some internal device code compilation, since the intent is for the GPU to generate the command buffer in the pipeline.
* - fill the input stream buffers with the data for each of the inputs it needs. Each input is an array that will be filled with token-dependent data.
* - set up a preprocess {@code VkBuffer} that uses memory according to the information retrieved via {@link #vkGetGeneratedCommandsMemoryRequirementsNV GetGeneratedCommandsMemoryRequirementsNV}.
* - optionally preprocess the generated content using {@link #vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV}, for example on an asynchronous compute queue, or for the purpose of re-using the data in multiple executions.
* - call {@link #vkCmdExecuteGeneratedCommandsNV CmdExecuteGeneratedCommandsNV} to create and execute the actual device commands for all sequences based on the inputs provided.
*
*
* For each draw in a sequence, the following can be specified:
*
*
* - a different shader group
* - a number of vertex buffer bindings
* - a different index buffer, with an optional dynamic offset and index type
* - a number of different push constants
* - a flag that encodes the primitive winding
*
*
* While the GPU can be faster than a CPU to generate the commands, it will not happen asynchronously to the device, therefore the primary use-case is generating “{@code less}” total work (occlusion culling, classification to use specialized shaders, etc.).
*
* Example Code
*
* Open-Source samples illustrating the usage of the extension can be found at the following location (may not yet exist at time of writing):
*
* https://github.com/nvpro-samples/vk_device_generated_cmds
*
* VK_NV_device_generated_commands
*
*
* - Name String
* - {@code VK_NV_device_generated_commands}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 278
* - Revision
* - 3
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.1
* - Requires {@link KHRBufferDeviceAddress VK_KHR_buffer_device_address}
*
* - Contact
*
* - Christoph Kubisch pixeljetstream
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2020-02-20
* - Interactions and External Dependencies
*
* - This extension requires Vulkan 1.1
* - This extension requires {@code VK_EXT_buffer_device_address} or {@code VK_KHR_buffer_device_address} or Vulkan 1.2 for the ability to bind vertex and index buffers on the device.
* - This extension interacts with {@code VK_NV_mesh_shader}. If the latter extension is not supported, remove the command token to initiate mesh tasks drawing in this extension.
*
* - Contributors
*
* - Christoph Kubisch, NVIDIA
* - Pierre Boudier, NVIDIA
* - Jeff Bolz, NVIDIA
* - Eric Werness, NVIDIA
* - Yuriy O’Donnell, Epic Games
* - Baldur Karlsson, Valve
* - Mathias Schott, NVIDIA
* - Tyson Smith, NVIDIA
* - Ingo Esser, NVIDIA
*
*
*/
public class NVDeviceGeneratedCommands {
/** The extension specification version. */
public static final int VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3;
/** The extension name. */
public static final String VK_NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV}
* - {@link #VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV}
* - {@link #VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV}
* - {@link #VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV}
* - {@link #VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV}
* - {@link #VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV}
* - {@link #VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV}
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV}
*
*/
public static final int
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000,
VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001,
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002,
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003,
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004,
VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV = 1000277005,
VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007;
/** Extends {@code VkPipelineCreateFlagBits}. */
public static final int VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x40000;
/** Extends {@code VkPipelineStageFlagBits}. */
public static final int VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV = 0x20000;
/**
* Extends {@code VkAccessFlagBits}.
*
* Enum values:
*
*
* - {@link #VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV ACCESS_COMMAND_PREPROCESS_READ_BIT_NV}
* - {@link #VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV}
*
*/
public static final int
VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = 0x20000,
VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x40000;
/** Extends {@code VkObjectType}. */
public static final int VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000;
/**
* VkIndirectStateFlagBitsNV - Bitmask specifiying state that can be altered on the device
*
* Description
*
*
* - {@link #VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV} allows to toggle the {@code VkFrontFace} rasterization state for subsequent draw operations.
*
*/
public static final int VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 0x1;
/**
* VkIndirectCommandsTokenTypeNV - Enum specifying token commands
*
* Description
*
* Supported indirect command tokens
*
*
* Token type Equivalent command
*
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV} {@link #vkCmdBindPipelineShaderGroupNV CmdBindPipelineShaderGroupNV}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV} -
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV} {@link VK10#vkCmdBindIndexBuffer CmdBindIndexBuffer}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV} {@link VK10#vkCmdBindVertexBuffers CmdBindVertexBuffers}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV} {@link VK10#vkCmdPushConstants CmdPushConstants}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV} {@link VK10#vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV} {@link VK10#vkCmdDrawIndirect CmdDrawIndirect}
* {@link #VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV} {@link NVMeshShader#vkCmdDrawMeshTasksIndirectNV CmdDrawMeshTasksIndirectNV}
*
*
*
* See Also
*
* {@link VkIndirectCommandsLayoutTokenNV}
*/
public static final int
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7;
/**
* VkIndirectCommandsLayoutUsageFlagBitsNV - Bitmask specifying allowed usage of an indirect commands layout
*
* Description
*
*
* - {@link #VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV} specifies that the layout is always used with the manual preprocessing step through calling {@link #vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV} and executed by {@link #vkCmdExecuteGeneratedCommandsNV CmdExecuteGeneratedCommandsNV} with {@code isPreprocessed} set to {@link VK10#VK_TRUE TRUE}.
* - {@link #VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV} specifies that the input data for the sequences is not implicitly indexed from 0..sequencesUsed but a user provided {@code VkBuffer} encoding the index is provided.
* - {@link #VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV} specifies that the processing of sequences can happen at an implementation-dependent order, which is not: guaranteed to be coherent using the same input data.
*
*/
public static final int
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 0x1,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 0x2,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 0x4;
protected NVDeviceGeneratedCommands() {
throw new UnsupportedOperationException();
}
// --- [ vkGetGeneratedCommandsMemoryRequirementsNV ] ---
/** Unsafe version of: {@link #vkGetGeneratedCommandsMemoryRequirementsNV GetGeneratedCommandsMemoryRequirementsNV} */
public static void nvkGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, long pInfo, long pMemoryRequirements) {
long __functionAddress = device.getCapabilities().vkGetGeneratedCommandsMemoryRequirementsNV;
if (CHECKS) {
check(__functionAddress);
}
callPPPV(device.address(), pInfo, pMemoryRequirements, __functionAddress);
}
/**
* Retrieve the buffer allocation requirements for generated commands.
*
* C Specification
*
* The generation of commands on the device requires a {@code preprocess} buffer. To retrieve the memory size and alignment requirements of a particular execution state call:
*
*
* void vkGetGeneratedCommandsMemoryRequirementsNV(
* VkDevice device,
* const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo,
* VkMemoryRequirements2* pMemoryRequirements);
*
* Valid Usage
*
*
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pInfo} must be a valid pointer to a valid {@link VkGeneratedCommandsMemoryRequirementsInfoNV} structure
* - {@code pMemoryRequirements} must be a valid pointer to a {@link VkMemoryRequirements2} structure
*
*
* See Also
*
* {@link VkGeneratedCommandsMemoryRequirementsInfoNV}, {@link VkMemoryRequirements2}
*
* @param device the logical device that owns the buffer.
* @param pInfo a pointer to a {@link VkGeneratedCommandsMemoryRequirementsInfoNV} structure containing parameters required for the memory requirements query.
* @param pMemoryRequirements a pointer to a {@link VkMemoryRequirements2} structure in which the memory requirements of the buffer object are returned.
*/
public static void vkGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, @NativeType("VkGeneratedCommandsMemoryRequirementsInfoNV const *") VkGeneratedCommandsMemoryRequirementsInfoNV pInfo, @NativeType("VkMemoryRequirements2 *") VkMemoryRequirements2 pMemoryRequirements) {
nvkGetGeneratedCommandsMemoryRequirementsNV(device, pInfo.address(), pMemoryRequirements.address());
}
// --- [ vkCmdPreprocessGeneratedCommandsNV ] ---
/** Unsafe version of: {@link #vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV} */
public static void nvkCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, long pGeneratedCommandsInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdPreprocessGeneratedCommandsNV;
if (CHECKS) {
check(__functionAddress);
VkGeneratedCommandsInfoNV.validate(pGeneratedCommandsInfo);
}
callPPV(commandBuffer.address(), pGeneratedCommandsInfo, __functionAddress);
}
/**
* Performs preprocessing for generated commands.
*
* C Specification
*
* Commands can be preprocessed prior execution using the following command:
*
*
* void vkCmdPreprocessGeneratedCommandsNV(
* VkCommandBuffer commandBuffer,
* const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo);
*
* Valid Usage
*
*
* - {@code commandBuffer} must not be a protected command buffer
* - {@code pGeneratedCommandsInfo}`s {@code indirectCommandsLayout} must have been created with the {@link #VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV} bit set
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code pGeneratedCommandsInfo} must be a valid pointer to a valid {@link VkGeneratedCommandsInfoNV} structure
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
* - This command must only be called outside of a render pass instance
*
*
* Host Synchronization
*
*
* - Host access to {@code commandBuffer} must be externally synchronized
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types
* Primary Secondary Outside Graphics Compute
*
*
* See Also
*
* {@link VkGeneratedCommandsInfoNV}
*
* @param commandBuffer the command buffer which does the preprocessing.
* @param pGeneratedCommandsInfo a pointer to a {@link VkGeneratedCommandsInfoNV} structure containing parameters affecting the preprocessing step.
*/
public static void vkCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, @NativeType("VkGeneratedCommandsInfoNV const *") VkGeneratedCommandsInfoNV pGeneratedCommandsInfo) {
nvkCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo.address());
}
// --- [ vkCmdExecuteGeneratedCommandsNV ] ---
/** Unsafe version of: {@link #vkCmdExecuteGeneratedCommandsNV CmdExecuteGeneratedCommandsNV} */
public static void nvkCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, int isPreprocessed, long pGeneratedCommandsInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdExecuteGeneratedCommandsNV;
if (CHECKS) {
check(__functionAddress);
VkGeneratedCommandsInfoNV.validate(pGeneratedCommandsInfo);
}
callPPV(commandBuffer.address(), isPreprocessed, pGeneratedCommandsInfo, __functionAddress);
}
/**
* Generate and execute commands on the device.
*
* C Specification
*
* The actual generation of commands as well as their execution on the device is handled as single action with:
*
*
* void vkCmdExecuteGeneratedCommandsNV(
* VkCommandBuffer commandBuffer,
* VkBool32 isPreprocessed,
* const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo);
*
* Valid Usage
*
*
* - If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link VK10#VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link VK10#VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link VK10#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
* - If a {@code VkSampler} created with {@code mipmapMode} equal to {@link VK10#VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link VK10#VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link VK10#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
* - If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link VK10#VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
* - If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
* - Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
* - Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
* - Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link VK10#VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
* - Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
* - Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
* - For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
* - If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
* - Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
* - A valid pipeline must be bound to the pipeline bind point used by this command
* - If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
* - There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
* - If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link VK10#VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link VK10#VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link VK10#VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link VK10#VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link VK10#VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
* - If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
* - If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
* - If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
* - If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
* - If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
* - If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
* - If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
* - If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
* - If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
* - If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
* - If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
* - If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link VK10#VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
* - If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link VK10#VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
* - The current render pass must be compatible with the {@code renderPass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link VK10#VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
* - The subpass index of the current render pass must be equal to the {@code subpass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link VK10#VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
* - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
* - Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
* - If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to {@link VkPhysicalDeviceMultiviewProperties}{@code ::maxMultiviewInstanceIndex}
* - If the bound graphics pipeline was created with {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} set to {@link VK10#VK_TRUE TRUE} and the current subpass has a depth/stencil attachment, then that attachment must have been created with the {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} bit set
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::scissorCount} of the pipeline
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::viewportCount} of the pipeline
* - If the bound graphics pipeline state was created with both the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic states enabled then both {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} and {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportSwizzleStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportSwizzleStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}{@code ::exclusiveScissorCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} dynamic state enabled then {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} must have been called in the current command buffer prior to this drawing command, and the {@code primitiveTopology} parameter of {@code vkCmdSetPrimitiveTopologyEXT} must be of the same topology class as the pipeline {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::topology} state
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} must have been called in the current command buffer prior to this drawing command
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} must have been called in the current command buffer prior to this drawing command
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} must have been called in the current command buffer prior to this drawing command
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} must have been called in the current command buffer prior to this drawing command and the {@code logicOp} must be a valid {@code VkLogicOp} value
* - If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} must have been called in the current command buffer prior to this drawing command
* - If the {@code primitiveFragmentShadingRateWithMultipleViewports} limit is not supported, the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the {@code PrimitiveShadingRateKHR} built-in, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must be 1
* - If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain {@link VK10#VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT}, then the {@code blendEnable} member of the corresponding element of the {@code pAttachments} member of {@code pColorBlendState} must be {@link VK10#VK_FALSE FALSE}
* - If rasterization is not disabled in the bound graphics pipeline, and neither the {@link AMDMixedAttachmentSamples VK_AMD_mixed_attachment_samples} nor the {@link NVFramebufferMixedSamples VK_NV_framebuffer_mixed_samples} extensions are enabled, then {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} must be the same as the current subpass color and/or depth/stencil attachments
* - If the bound graphics pipeline was created with both the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic states enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
* - If the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, but not the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must have been called in the current command buffer prior to this draw command, and the {@code pStrides} parameter of {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must not be {@code NULL}
* - If the bound graphics pipeline state was created with the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK10#VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK10#VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, this command must not write any values to the depth attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::viewMask} equal to {@link VkRenderingInfoKHR}{@code ::viewMask}
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} equal to {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount}
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link VK10#VK_NULL_HANDLE NULL_HANDLE} must have been created with a {@code VkFormat} equal to the corresponding element of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} used to create the currently bound graphics pipeline
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}{@code ::imageView} was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}{@code ::imageView} was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT}
* - If the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link VK10#VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the corresponding element of the {@code pColorAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
* - If the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link VK10#VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
* - If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline must have been created with a {@link VkGraphicsPipelineCreateInfo}{@code ::renderPass} equal to {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
*
*
*
* - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or {@link VK10#VK_NULL_HANDLE NULL_HANDLE} buffers bound
* - If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
* - For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
* - {@code commandBuffer} must not be a protected command buffer
* - If {@code isPreprocessed} is {@link VK10#VK_TRUE TRUE} then {@link #vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV} must have already been executed on the device, using the same {@code pGeneratedCommandsInfo} content as well as the content of the input buffers it references (all except {@link VkGeneratedCommandsInfoNV}{@code ::preprocessBuffer}). Furthermore {@code pGeneratedCommandsInfo}`s {@code indirectCommandsLayout} must have been created with the {@link #VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV} bit set
* - {@link VkGeneratedCommandsInfoNV}{@code ::pipeline} must match the current bound pipeline at {@link VkGeneratedCommandsInfoNV}{@code ::pipelineBindPoint}
* - Transform feedback must not be active
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code pGeneratedCommandsInfo} must be a valid pointer to a valid {@link VkGeneratedCommandsInfoNV} structure
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
* - This command must only be called inside of a render pass instance
*
*
* Host Synchronization
*
*
* - Host access to {@code commandBuffer} must be externally synchronized
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types
* Primary Secondary Inside Graphics Compute
*
*
* See Also
*
* {@link VkGeneratedCommandsInfoNV}
*
* @param commandBuffer the command buffer into which the command is recorded.
* @param isPreprocessed represents whether the input data has already been preprocessed on the device. If it is {@link VK10#VK_FALSE FALSE} this command will implicitly trigger the preprocessing step, otherwise not.
* @param pGeneratedCommandsInfo a pointer to a {@link VkGeneratedCommandsInfoNV} structure containing parameters affecting the generation of commands.
*/
public static void vkCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, @NativeType("VkBool32") boolean isPreprocessed, @NativeType("VkGeneratedCommandsInfoNV const *") VkGeneratedCommandsInfoNV pGeneratedCommandsInfo) {
nvkCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed ? 1 : 0, pGeneratedCommandsInfo.address());
}
// --- [ vkCmdBindPipelineShaderGroupNV ] ---
/**
* Bind a pipeline object.
*
* C Specification
*
* For pipelines that were created with the support of multiple shader groups (see Graphics Pipeline Shader Groups), the regular {@code vkCmdBindPipeline} command will bind Shader Group 0. To explicitly bind a shader group use:
*
*
* void vkCmdBindPipelineShaderGroupNV(
* VkCommandBuffer commandBuffer,
* VkPipelineBindPoint pipelineBindPoint,
* VkPipeline pipeline,
* uint32_t groupIndex);
*
* Valid Usage
*
*
* - {@code groupIndex} must be 0 or less than the effective {@link VkGraphicsPipelineShaderGroupsCreateInfoNV}{@code ::groupCount} including the referenced pipelines
* - The {@code pipelineBindPoint} must be {@link VK10#VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
* - The same restrictions as {@link VK10#vkCmdBindPipeline CmdBindPipeline} apply as if the bound pipeline was created only with the Shader Group from the {@code groupIndex} information
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code pipelineBindPoint} must be a valid {@code VkPipelineBindPoint} value
* - {@code pipeline} must be a valid {@code VkPipeline} handle
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
* - Both of {@code commandBuffer}, and {@code pipeline} must have been created, allocated, or retrieved from the same {@code VkDevice}
*
*
* Host Synchronization
*
*
* - Host access to {@code commandBuffer} must be externally synchronized
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types
* Primary Secondary Both Graphics Compute
*
*
* @param commandBuffer the command buffer that the pipeline will be bound to.
* @param pipelineBindPoint a {@code VkPipelineBindPoint} value specifying the bind point to which the pipeline will be bound.
* @param pipeline the pipeline to be bound.
* @param groupIndex the shader group to be bound.
*/
public static void vkCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, @NativeType("VkPipelineBindPoint") int pipelineBindPoint, @NativeType("VkPipeline") long pipeline, @NativeType("uint32_t") int groupIndex) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdBindPipelineShaderGroupNV;
if (CHECKS) {
check(__functionAddress);
}
callPJV(commandBuffer.address(), pipelineBindPoint, pipeline, groupIndex, __functionAddress);
}
// --- [ vkCreateIndirectCommandsLayoutNV ] ---
/** Unsafe version of: {@link #vkCreateIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV} */
public static int nvkCreateIndirectCommandsLayoutNV(VkDevice device, long pCreateInfo, long pAllocator, long pIndirectCommandsLayout) {
long __functionAddress = device.getCapabilities().vkCreateIndirectCommandsLayoutNV;
if (CHECKS) {
check(__functionAddress);
VkIndirectCommandsLayoutCreateInfoNV.validate(pCreateInfo);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(device.address(), pCreateInfo, pAllocator, pIndirectCommandsLayout, __functionAddress);
}
/**
* Create an indirect command layout object.
*
* C Specification
*
* Indirect command layouts are created by:
*
*
* VkResult vkCreateIndirectCommandsLayoutNV(
* VkDevice device,
* const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo,
* const VkAllocationCallbacks* pAllocator,
* VkIndirectCommandsLayoutNV* pIndirectCommandsLayout);
*
* Valid Usage
*
*
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pCreateInfo} must be a valid pointer to a valid {@link VkIndirectCommandsLayoutCreateInfoNV} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pIndirectCommandsLayout} must be a valid pointer to a {@code VkIndirectCommandsLayoutNV} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
* - {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkIndirectCommandsLayoutCreateInfoNV}
*
* @param device the logical device that creates the indirect command layout.
* @param pCreateInfo a pointer to a {@link VkIndirectCommandsLayoutCreateInfoNV} structure containing parameters affecting creation of the indirect command layout.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
* @param pIndirectCommandsLayout a pointer to a {@code VkIndirectCommandsLayoutNV} handle in which the resulting indirect command layout is returned.
*/
@NativeType("VkResult")
public static int vkCreateIndirectCommandsLayoutNV(VkDevice device, @NativeType("VkIndirectCommandsLayoutCreateInfoNV const *") VkIndirectCommandsLayoutCreateInfoNV pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkIndirectCommandsLayoutNV *") LongBuffer pIndirectCommandsLayout) {
if (CHECKS) {
check(pIndirectCommandsLayout, 1);
}
return nvkCreateIndirectCommandsLayoutNV(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pIndirectCommandsLayout));
}
// --- [ vkDestroyIndirectCommandsLayoutNV ] ---
/** Unsafe version of: {@link #vkDestroyIndirectCommandsLayoutNV DestroyIndirectCommandsLayoutNV} */
public static void nvkDestroyIndirectCommandsLayoutNV(VkDevice device, long indirectCommandsLayout, long pAllocator) {
long __functionAddress = device.getCapabilities().vkDestroyIndirectCommandsLayoutNV;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
callPJPV(device.address(), indirectCommandsLayout, pAllocator, __functionAddress);
}
/**
* Destroy an indirect commands layout.
*
* C Specification
*
* Indirect command layouts are destroyed by:
*
*
* void vkDestroyIndirectCommandsLayoutNV(
* VkDevice device,
* VkIndirectCommandsLayoutNV indirectCommandsLayout,
* const VkAllocationCallbacks* pAllocator);
*
* Valid Usage
*
*
* - All submitted commands that refer to {@code indirectCommandsLayout} must have completed execution
* - If {@link VkAllocationCallbacks} were provided when {@code indirectCommandsLayout} was created, a compatible set of callbacks must be provided here
* - If no {@link VkAllocationCallbacks} were provided when {@code indirectCommandsLayout} was created, {@code pAllocator} must be {@code NULL}
* - The {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}{@code ::deviceGeneratedCommands} feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - If {@code indirectCommandsLayout} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code indirectCommandsLayout} must be a valid {@code VkIndirectCommandsLayoutNV} handle
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - If {@code indirectCommandsLayout} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
*
*
* Host Synchronization
*
*
* - Host access to {@code indirectCommandsLayout} must be externally synchronized
*
*
* See Also
*
* {@link VkAllocationCallbacks}
*
* @param device the logical device that destroys the layout.
* @param indirectCommandsLayout the layout to destroy.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
*/
public static void vkDestroyIndirectCommandsLayoutNV(VkDevice device, @NativeType("VkIndirectCommandsLayoutNV") long indirectCommandsLayout, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) {
nvkDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, memAddressSafe(pAllocator));
}
/** Array version of: {@link #vkCreateIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV} */
@NativeType("VkResult")
public static int vkCreateIndirectCommandsLayoutNV(VkDevice device, @NativeType("VkIndirectCommandsLayoutCreateInfoNV const *") VkIndirectCommandsLayoutCreateInfoNV pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkIndirectCommandsLayoutNV *") long[] pIndirectCommandsLayout) {
long __functionAddress = device.getCapabilities().vkCreateIndirectCommandsLayoutNV;
if (CHECKS) {
check(__functionAddress);
check(pIndirectCommandsLayout, 1);
VkIndirectCommandsLayoutCreateInfoNV.validate(pCreateInfo.address());
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pIndirectCommandsLayout, __functionAddress);
}
}