Class EXTShaderObject
VkShaderEXT object type which represents a single compiled shader stage. Shader objects provide a more flexible alternative to VkPipeline objects, which may be helpful in certain use cases.
Examples
Example 1
Create linked pair of vertex and fragment shaders.
// Logical device created with the shaderObject feature enabled
VkDevice device;
// SPIR-V shader code for a vertex shader, along with its size in bytes
void* pVertexSpirv;
size_t vertexSpirvSize;
// SPIR-V shader code for a fragment shader, along with its size in bytes
void* pFragmentSpirv;
size_t fragmentSpirvSize;
// Descriptor set layout compatible with the shaders
VkDescriptorSetLayout descriptorSetLayout;
VkShaderCreateInfoEXT shaderCreateInfos[2] =
{
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = VK_SHADER_CREATE_LINK_STAGE_BIT_EXT,
.stage = VK_SHADER_STAGE_VERTEX_BIT,
.nextStage = VK_SHADER_STAGE_FRAGMENT_BIT,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = vertexSpirvSize,
.pCode = pVertexSpirv,
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
},
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = VK_SHADER_CREATE_LINK_STAGE_BIT_EXT,
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
.nextStage = 0,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = fragmentSpirvSize,
.pCode = pFragmentSpirv,
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
}
};
VkResult result;
VkShaderEXT shaders[2];
result = vkCreateShadersEXT(device, 2, &shaderCreateInfos, NULL, shaders);
if (result != VK_SUCCESS)
{
// Handle error
}
Later, during command buffer recording, bind the linked shaders and draw.
// Command buffer in the recording state
VkCommandBuffer commandBuffer;
// Vertex and fragment shader objects created above
VkShaderEXT shaders[2];
// Assume vertex buffers, descriptor sets, etc. have been bound, and existing
// state setting commands have been called to set all required state
const VkShaderStageFlagBits stages[2] =
{
VK_SHADER_STAGE_VERTEX_BIT,
VK_SHADER_STAGE_FRAGMENT_BIT
};
// Bind linked shaders
vkCmdBindShadersEXT(commandBuffer, 2, stages, shaders);
// Equivalent to the previous line. Linked shaders can be bound one at a time,
// in any order:
// vkCmdBindShadersEXT(commandBuffer, 1, &stages[1], &shaders[1]);
// vkCmdBindShadersEXT(commandBuffer, 1, &stages[0], &shaders[0]);
// The above is sufficient to draw if the device was created with the
// tessellationShader and geometryShader features disabled. Otherwise, since
// those stages should not execute, vkCmdBindShadersEXT() must be called at
// least once with each of their stages in pStages before drawing:
const VkShaderStageFlagBits unusedStages[3] =
{
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
VK_SHADER_STAGE_GEOMETRY_BIT
};
// NULL pShaders is equivalent to an array of stageCount VK_NULL_HANDLE values,
// meaning no shaders are bound to those stages, and that any previously bound
// shaders are unbound
vkCmdBindShadersEXT(commandBuffer, 3, unusedStages, NULL);
// Graphics shader objects may only be used to draw inside dynamic render pass
// instances begun with vkCmdBeginRendering(), assume one has already been begun
// Draw a triangle
vkCmdDraw(commandBuffer, 3, 1, 0, 0);
Example 2
Create unlinked vertex, geometry, and fragment shaders.
// Logical device created with the shaderObject feature enabled
VkDevice device;
// SPIR-V shader code for vertex shaders, along with their sizes in bytes
void* pVertexSpirv[2];
size_t vertexSpirvSize[2];
// SPIR-V shader code for a geometry shader, along with its size in bytes
void pGeometrySpirv;
size_t geometrySpirvSize;
// SPIR-V shader code for fragment shaders, along with their sizes in bytes
void* pFragmentSpirv[2];
size_t fragmentSpirvSize[2];
// Descriptor set layout compatible with the shaders
VkDescriptorSetLayout descriptorSetLayout;
VkShaderCreateInfoEXT shaderCreateInfos[5] =
{
// Stage order does not matter
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.stage = VK_SHADER_STAGE_GEOMETRY_BIT,
.nextStage = VK_SHADER_STAGE_FRAGMENT_BIT,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = pGeometrySpirv,
.pCode = geometrySpirvSize,
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
},
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.stage = VK_SHADER_STAGE_VERTEX_BIT,
.nextStage = VK_SHADER_STAGE_GEOMETRY_BIT,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = vertexSpirvSize[0],
.pCode = pVertexSpirv[0],
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
},
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
.nextStage = 0,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = fragmentSpirvSize[0],
.pCode = pFragmentSpirv[0],
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
},
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
.nextStage = 0,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = fragmentSpirvSize[1],
.pCode = pFragmentSpirv[1],
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
},
{
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.stage = VK_SHADER_STAGE_VERTEX_BIT,
// Suppose we want this vertex shader to be able to be followed by
// either a geometry shader or fragment shader:
.nextStage = VK_SHADER_STAGE_GEOMETRY_BIT | VK_SHADER_STAGE_FRAGMENT_BIT,
.codeType = VK_SHADER_CODE_TYPE_SPIRV_EXT,
.codeSize = vertexSpirvSize[1],
.pCode = pVertexSpirv[1],
.pName = "main",
.setLayoutCount = 1,
.pSetLayouts = &descriptorSetLayout;
.pushConstantRangeCount = 0,
.pPushConstantRanges = NULL,
.pSpecializationInfo = NULL
}
};
VkResult result;
VkShaderEXT shaders[5];
result = vkCreateShadersEXT(device, 5, &shaderCreateInfos, NULL, shaders);
if (result != VK_SUCCESS)
{
// Handle error
}
Later, during command buffer recording, bind the linked shaders in different combinations and draw.
// Command buffer in the recording state
VkCommandBuffer commandBuffer;
// Vertex, geometry, and fragment shader objects created above
VkShaderEXT shaders[5];
// Assume vertex buffers, descriptor sets, etc. have been bound, and existing
// state setting commands have been called to set all required state
const VkShaderStageFlagBits stages[3] =
{
// Any order is allowed
VK_SHADER_STAGE_FRAGMENT_BIT,
VK_SHADER_STAGE_VERTEX_BIT,
VK_SHADER_STAGE_GEOMETRY_BIT,
};
VkShaderEXT bindShaders[3] =
{
shaders[2], // FS
shaders[1], // VS
shaders[0] // GS
};
// Bind unlinked shaders
vkCmdBindShadersEXT(commandBuffer, 3, stages, bindShaders);
// Assume the tessellationShader feature is disabled, so vkCmdBindShadersEXT()
// need not have been called with either tessellation stage
// Graphics shader objects may only be used to draw inside dynamic render pass
// instances begun with vkCmdBeginRendering(), assume one has already been begun
// Draw a triangle
vkCmdDraw(commandBuffer, 3, 1, 0, 0);
// Bind a different unlinked fragment shader
const VkShaderStageFlagBits fragmentStage = VK_SHADER_STAGE_FRAGMENT_BIT;
vkCmdBindShadersEXT(commandBuffer, 1, &fragmentStage, &shaders[3]);
// Draw another triangle
vkCmdDraw(commandBuffer, 3, 1, 0, 0);
// Bind a different unlinked vertex shader
const VkShaderStageFlagBits vertexStage = VK_SHADER_STAGE_VERTEX_BIT;
vkCmdBindShadersEXT(commandBuffer, 1, &vertexStage, &shaders[4]);
// Draw another triangle
vkCmdDraw(commandBuffer, 3, 1, 0, 0);
- Name String
VK_EXT_shader_object- Extension Type
- Device extension
- Registered Extension Number
- 483
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2or Version 1.1 andVK_KHR_dynamic_renderingor Version 1.3- API Interactions
- Interacts with VK_VERSION_1_1
- Interacts with VK_VERSION_1_3
- Interacts with VK_EXT_blend_operation_advanced
- Interacts with VK_EXT_conservative_rasterization
- Interacts with VK_EXT_depth_clamp_control
- Interacts with VK_EXT_depth_clip_control
- Interacts with VK_EXT_depth_clip_enable
- Interacts with VK_EXT_fragment_density_map
- Interacts with VK_EXT_line_rasterization
- Interacts with VK_EXT_mesh_shader
- Interacts with VK_EXT_provoking_vertex
- Interacts with VK_EXT_sample_locations
- Interacts with VK_EXT_subgroup_size_control
- Interacts with VK_EXT_transform_feedback
- Interacts with VK_KHR_device_group
- Interacts with VK_KHR_fragment_shading_rate
- Interacts with VK_NV_clip_space_w_scaling
- Interacts with VK_NV_coverage_reduction_mode
- Interacts with VK_NV_fragment_coverage_to_color
- Interacts with VK_NV_framebuffer_mixed_samples
- Interacts with VK_NV_mesh_shader
- Interacts with VK_NV_representative_fragment_test
- Interacts with VK_NV_shading_rate_image
- Interacts with VK_NV_viewport_swizzle
- Contact
- Daniel Story daniel-story
- Extension Proposal
- VK_EXT_shader_object
Other Extension Metadata
- Last Modified Date
- 2023-03-30
- Interactions and External Dependencies
- Interacts with
VK_EXT_extended_dynamic_state - Interacts with
VK_EXT_extended_dynamic_state2 - Interacts with
VK_EXT_extended_dynamic_state3 - Interacts with
VK_EXT_vertex_input_dynamic_state
- Interacts with
- IP Status
- No known IP claims.
- Contributors
- Piers Daniell, NVIDIA
- Sandy Jamieson, Nintendo
- Žiga Markuš, LunarG
- Tobias Hector, AMD
- Alex Walters, Imagination
- Shahbaz Youssefi, Google
- Ralph Potter, Samsung
- Jan-Harald Fredriksen, ARM
- Connor Abott, Valve
- Arseny Kapoulkine, Roblox
- Patrick Doane, Activision
- Jeff Leger, Qualcomm
- Stu Smith, AMD
- Chris Glover, Google
- Ricardo Garcia, Igalia
- Faith Ekstrand, Collabora
- Timur Kristóf, Valve
- Constantine Shablya, Collabora
- Daniel Koch, NVIDIA
- Alyssa Rosenzweig, Collabora
- Mike Blumenkrantz, Valve
- Samuel Pitoiset, Valve
- Qun Lin, AMD
- Spencer Fricke, LunarG
- Soroush Faghihi Kashani, Imagination
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intVkDepthClampModeEXT - Modes that determine the depth clamp rangestatic final intVkDepthClampModeEXT - Modes that determine the depth clamp rangestatic final intExtendsVkResult.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkResult.static final intExtendsVkObjectType.static final intVkShaderCodeTypeEXT - Indicate a shader code typestatic final intVkShaderCodeTypeEXT - Indicate a shader code typestatic final intExtendsVkShaderCreateFlagBitsEXT.static final intExtendsVkShaderCreateFlagBitsEXT.static final intExtendsVkShaderCreateFlagBitsEXT.static final intExtendsVkShaderCreateFlagBitsEXT.static final intVkShaderCreateFlagBitsEXT - Bitmask controlling how a shader object is createdstatic final intExtendsVkShaderCreateFlagBitsEXT.static final intExtendsVkShaderCreateFlagBitsEXT.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int stageCount, long pStages, long pShaders) Unsafe version of:CmdBindShadersEXTstatic voidnvkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets, long pSizes, long pStrides) Unsafe version of:CmdBindVertexBuffers2EXTstatic voidnvkCmdSetColorBlendAdvancedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendAdvanced) Unsafe version of:CmdSetColorBlendAdvancedEXTstatic voidnvkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendEnables) Unsafe version of:CmdSetColorBlendEnableEXTstatic voidnvkCmdSetColorBlendEquationEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendEquations) Unsafe version of:CmdSetColorBlendEquationEXTstatic voidnvkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorWriteMasks) Unsafe version of:CmdSetColorWriteMaskEXTstatic voidnvkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageModulationTableCount, long pCoverageModulationTable) Unsafe version of:CmdSetCoverageModulationTableNVstatic voidnvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, long pDepthClampRange) Unsafe version of:CmdSetDepthClampRangeEXTstatic voidnvkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, long pSampleMask) Unsafe version of:CmdSetSampleMaskEXTstatic voidnvkCmdSetScissorWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int scissorCount, long pScissors) Unsafe version of:CmdSetScissorWithCountEXTstatic voidnvkCmdSetVertexInputEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int vertexBindingDescriptionCount, long pVertexBindingDescriptions, int vertexAttributeDescriptionCount, long pVertexAttributeDescriptions) Unsafe version of:CmdSetVertexInputEXTstatic voidnvkCmdSetViewportSwizzleNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pViewportSwizzles) Unsafe version of:CmdSetViewportSwizzleNVstatic voidnvkCmdSetViewportWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int viewportCount, long pViewports) Unsafe version of:CmdSetViewportWithCountEXTstatic intnvkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, int createInfoCount, long pCreateInfos, long pAllocator, long pShaders) Unsafe version of:CreateShadersEXTstatic voidnvkDestroyShaderEXT(org.lwjgl.vulkan.VkDevice device, long shader, long pAllocator) Unsafe version of:DestroyShaderEXTstatic intnvkGetShaderBinaryDataEXT(org.lwjgl.vulkan.VkDevice device, long shader, long pDataSize, long pData) Unsafe version of:GetShaderBinaryDataEXTstatic voidvkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int[] pStages, long[] pShaders) Array version of:CmdBindShadersEXTstatic voidvkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, IntBuffer pStages, LongBuffer pShaders) Bind shader objects to a command buffer.static voidvkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, long @Nullable [] pSizes, long @Nullable [] pStrides) Array version of:CmdBindVertexBuffers2EXTstatic voidvkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, LongBuffer pBuffers, LongBuffer pOffsets, @Nullable LongBuffer pSizes, @Nullable LongBuffer pStrides) static voidvkCmdSetAlphaToCoverageEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean alphaToCoverageEnable) Specify the alpha to coverage enable state dynamically for a command buffer.static voidvkCmdSetAlphaToOneEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean alphaToOneEnable) Specify the alpha to one enable state dynamically for a command buffer.static voidvkCmdSetColorBlendAdvancedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, VkColorBlendAdvancedEXT.Buffer pColorBlendAdvanced) Specify the advanced color blend state dynamically for a command buffer.static voidvkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorBlendEnables) Array version of:CmdSetColorBlendEnableEXTstatic voidvkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, IntBuffer pColorBlendEnables) Specify theblendEnablefor each attachment dynamically for a command buffer.static voidvkCmdSetColorBlendEquationEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, VkColorBlendEquationEXT.Buffer pColorBlendEquations) Specify the blend factors and operations dynamically for a command buffer.static voidvkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorWriteMasks) Array version of:CmdSetColorWriteMaskEXTstatic voidvkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, IntBuffer pColorWriteMasks) Specify the color write masks for each attachment dynamically for a command buffer.static voidvkCmdSetConservativeRasterizationModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int conservativeRasterizationMode) Specify the conservative rasterization mode dynamically for a command buffer.static voidvkCmdSetCoverageModulationModeNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageModulationMode) Specify the coverage modulation mode dynamically for a command buffer.static voidvkCmdSetCoverageModulationTableEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean coverageModulationTableEnable) Specify the coverage modulation table enable state dynamically for a command buffer.static voidvkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, float[] pCoverageModulationTable) Array version of:CmdSetCoverageModulationTableNVstatic voidvkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, FloatBuffer pCoverageModulationTable) Specify the coverage modulation table dynamically for a command buffer.static voidvkCmdSetCoverageReductionModeNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageReductionMode) Specify the coverage reduction mode dynamically for a command buffer.static voidvkCmdSetCoverageToColorEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean coverageToColorEnable) Specify the coverage to color enable state dynamically for a command buffer.static voidvkCmdSetCoverageToColorLocationNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageToColorLocation) Specify the coverage to color location dynamically for a command buffer.static voidvkCmdSetCullModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int cullMode) SeeCmdSetCullMode.static voidvkCmdSetDepthBiasEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthBiasEnable) static voidvkCmdSetDepthBoundsTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthBoundsTestEnable) static voidvkCmdSetDepthClampEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthClampEnable) Specify dynamically whether depth clamping is enabled in the command buffer.static voidvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, @Nullable VkDepthClampRangeEXT pDepthClampRange) Set the viewport depth clamp range dynamically for a command buffer.static voidvkCmdSetDepthClipEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthClipEnable) Specify dynamically whether depth clipping is enabled in the command buffer.static voidvkCmdSetDepthClipNegativeOneToOneEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean negativeOneToOne) Specify the negative one to one depth clip mode dynamically for a command buffer.static voidvkCmdSetDepthCompareOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthCompareOp) SeeCmdSetDepthCompareOp.static voidvkCmdSetDepthTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthTestEnable) static voidvkCmdSetDepthWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthWriteEnable) static voidvkCmdSetExtraPrimitiveOverestimationSizeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer.static voidvkCmdSetFrontFaceEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int frontFace) SeeCmdSetFrontFace.static voidvkCmdSetLineRasterizationModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int lineRasterizationMode) Specify the line rasterization mode dynamically for a command buffer.static voidvkCmdSetLineStippleEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean stippledLineEnable) Specify the line stipple enable dynamically for a command buffer.static voidvkCmdSetLogicOpEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean logicOpEnable) Specify dynamically whether logical operations are enabled for a command buffer.static voidvkCmdSetLogicOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int logicOp) Select which logical operation to apply for blend state dynamically for a command buffer.static voidvkCmdSetPatchControlPointsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int patchControlPoints) Specify the number of control points per patch dynamically for a command buffer.static voidvkCmdSetPolygonModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int polygonMode) Specify polygon mode dynamically for a command buffer.static voidvkCmdSetPrimitiveRestartEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean primitiveRestartEnable) static voidvkCmdSetPrimitiveTopologyEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int primitiveTopology) static voidvkCmdSetProvokingVertexModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int provokingVertexMode) Specify the provoking vertex mode dynamically for a command buffer.static voidvkCmdSetRasterizationSamplesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int rasterizationSamples) Specify the rasterization samples dynamically for a command buffer.static voidvkCmdSetRasterizationStreamEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int rasterizationStream) Specify the rasterization stream dynamically for a command buffer.static voidvkCmdSetRasterizerDiscardEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean rasterizerDiscardEnable) static voidvkCmdSetRepresentativeFragmentTestEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean representativeFragmentTestEnable) Specify the representative fragment test enable dynamically for a command buffer.static voidvkCmdSetSampleLocationsEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean sampleLocationsEnable) Specify the samples locations enable state dynamically for a command buffer.static voidvkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, int[] pSampleMask) Array version of:CmdSetSampleMaskEXTstatic voidvkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, IntBuffer pSampleMask) Specify the sample mask dynamically for a command buffer.static voidvkCmdSetScissorWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkRect2D.Buffer pScissors) static voidvkCmdSetShadingRateImageEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean shadingRateImageEnable) Specify the shading rate image enable state dynamically for a command buffer.static voidvkCmdSetStencilOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int faceMask, int failOp, int passOp, int depthFailOp, int compareOp) SeeCmdSetStencilOp.static voidvkCmdSetStencilTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean stencilTestEnable) static voidvkCmdSetTessellationDomainOriginEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int domainOrigin) Specify the origin of the tessellation domain space dynamically for a command buffer.static voidvkCmdSetVertexInputEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, @Nullable VkVertexInputBindingDescription2EXT.Buffer pVertexBindingDescriptions, @Nullable VkVertexInputAttributeDescription2EXT.Buffer pVertexAttributeDescriptions) Set the vertex input state dynamically for a command buffer.static voidvkCmdSetViewportSwizzleNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstViewport, VkViewportSwizzleNV.Buffer pViewportSwizzles) Specify the viewport swizzle state dynamically for a command buffer.static voidvkCmdSetViewportWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkViewport.Buffer pViewports) static voidvkCmdSetViewportWScalingEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean viewportWScalingEnable) Specify the viewport W scaling enable state dynamically for a command buffer.static intvkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, VkShaderCreateInfoEXT.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pShaders) Array version of:CreateShadersEXTstatic intvkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, VkShaderCreateInfoEXT.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pShaders) Create one or more new shaders.static voidvkDestroyShaderEXT(org.lwjgl.vulkan.VkDevice device, long shader, @Nullable VkAllocationCallbacks pAllocator) Destroy a shader object.static intvkGetShaderBinaryDataEXT(org.lwjgl.vulkan.VkDevice device, long shader, org.lwjgl.PointerBuffer pDataSize, @Nullable ByteBuffer pData) Get the binary shader code from a shader object.
-
Field Details
-
VK_EXT_SHADER_OBJECT_SPEC_VERSION
public static final int VK_EXT_SHADER_OBJECT_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_EXT_SHADER_OBJECT_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT
public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT
public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXTSTRUCTURE_TYPE_SHADER_CREATE_INFO_EXTSTRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTSTRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
- See Also:
-
VK_OBJECT_TYPE_SHADER_EXT
public static final int VK_OBJECT_TYPE_SHADER_EXTExtendsVkObjectType.- See Also:
-
VK_INCOMPATIBLE_SHADER_BINARY_EXT
public static final int VK_INCOMPATIBLE_SHADER_BINARY_EXT- See Also:
-
VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT
public static final int VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT- See Also:
-
VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
public static final int VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.Enum values:
- See Also:
-
VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
public static final int VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.Enum values:
- See Also:
-
VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT
public static final int VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.- See Also:
-
VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT
public static final int VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.- See Also:
-
VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT
public static final int VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.- See Also:
-
VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
public static final int VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXTExtendsVkShaderCreateFlagBitsEXT.- See Also:
-
VK_SHADER_CREATE_LINK_STAGE_BIT_EXT
public static final int VK_SHADER_CREATE_LINK_STAGE_BIT_EXTVkShaderCreateFlagBitsEXT - Bitmask controlling how a shader object is createdDescription
SHADER_CREATE_LINK_STAGE_BIT_EXTspecifies that a shader is linked to all other shaders created in the sameCreateShadersEXTcall whoseVkShaderCreateInfoEXTstructures'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT.SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTspecifies that theSubgroupSizemay vary in a task, mesh, or compute shader.SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTspecifies that the subgroup sizes must be launched with all invocations active in a task, mesh, or compute shader.SHADER_CREATE_NO_TASK_SHADER_BIT_EXTspecifies that a mesh shader must only be used without a task shader. Otherwise, the mesh shader must only be used with a task shader.SHADER_CREATE_DISPATCH_BASE_BIT_EXTspecifies that a compute shader can be used withCmdDispatchBasewith a non-zero base workgroup.SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXTspecifies that a fragment shader can be used with a fragment shading rate attachment.SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXTspecifies that a fragment shader can be used with a fragment density map attachment.SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXTspecifies that the shader can be used in combination with Device-Generated Commands.
- See Also:
-
VK_SHADER_CODE_TYPE_BINARY_EXT
public static final int VK_SHADER_CODE_TYPE_BINARY_EXTVkShaderCodeTypeEXT - Indicate a shader code typeDescription
SHADER_CODE_TYPE_BINARY_EXTspecifies shader code in an opaque, implementation-defined binary format specific to the physical device.SHADER_CODE_TYPE_SPIRV_EXTspecifies shader code in SPIR-V format.
See Also
- See Also:
-
VK_SHADER_CODE_TYPE_SPIRV_EXT
public static final int VK_SHADER_CODE_TYPE_SPIRV_EXTVkShaderCodeTypeEXT - Indicate a shader code typeDescription
SHADER_CODE_TYPE_BINARY_EXTspecifies shader code in an opaque, implementation-defined binary format specific to the physical device.SHADER_CODE_TYPE_SPIRV_EXTspecifies shader code in SPIR-V format.
See Also
- See Also:
-
VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT
public static final int VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXTVkDepthClampModeEXT - Modes that determine the depth clamp rangeDescription
DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXTspecifies that the depth clamp range follows the viewport depth range. The depth clamp range of each viewport will implicitly be set tozmin = min(n,f)andzmax = max(n,f), wherenandfare theminDepthandmaxDepthdepth range values of the viewport.DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXTspecifies that a single user-defined depth clamp range will be used for all viewports. The user-defined depth clamp range is defined by theminDepthClampandmaxDepthClampmembers ofVkDepthClampRangeEXT.
See Also
VkPipelineViewportDepthClampControlCreateInfoEXT,CmdSetDepthClampRangeEXT- See Also:
-
VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT
public static final int VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXTVkDepthClampModeEXT - Modes that determine the depth clamp rangeDescription
DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXTspecifies that the depth clamp range follows the viewport depth range. The depth clamp range of each viewport will implicitly be set tozmin = min(n,f)andzmax = max(n,f), wherenandfare theminDepthandmaxDepthdepth range values of the viewport.DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXTspecifies that a single user-defined depth clamp range will be used for all viewports. The user-defined depth clamp range is defined by theminDepthClampandmaxDepthClampmembers ofVkDepthClampRangeEXT.
See Also
VkPipelineViewportDepthClampControlCreateInfoEXT,CmdSetDepthClampRangeEXT- See Also:
-
-
Method Details
-
nvkCreateShadersEXT
public static int nvkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, int createInfoCount, long pCreateInfos, long pAllocator, long pShaders) Unsafe version of:CreateShadersEXT- Parameters:
createInfoCount- the length of thepCreateInfosandpShadersarrays.
-
vkCreateShadersEXT
public static int vkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, VkShaderCreateInfoEXT.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pShaders) Create one or more new shaders.C Specification
To create one or more shader objects, call:
VkResult vkCreateShadersEXT( VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders);Description
When this function returns, whether or not it succeeds, it is guaranteed that every element of
pShaderswill have been overwritten by eitherNULL_HANDLEor a validVkShaderEXThandle.This means that whenever shader creation fails, the application can determine which shader the returned error pertains to by locating the first
NULL_HANDLEelement inpShaders. It also means that an application can reliably clean up from a failed call by iterating over thepShadersarray and destroying every element that is notNULL_HANDLE.Valid Usage
- If the
stagemember of any element ofpCreateInfosisSHADER_STAGE_COMPUTE_BIT,devicemust support at least one queue family with theQUEUE_COMPUTE_BITcapability - If the
stagemember of any element ofpCreateInfosisSHADER_STAGE_TASK_BIT_EXT,SHADER_STAGE_MESH_BIT_EXT,SHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BIT,SHADER_STAGE_GEOMETRY_BIT, orSHADER_STAGE_FRAGMENT_BIT,devicemust support at least one queue family with theQUEUE_GRAPHICS_BITcapability - The
shaderObjectfeature must be enabled - If the
flagsmember of any element ofpCreateInfosincludesSHADER_CREATE_LINK_STAGE_BIT_EXT, theflagsmember of all other elements ofpCreateInfoswhosestageisSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BIT,SHADER_STAGE_GEOMETRY_BIT, orSHADER_STAGE_FRAGMENT_BITmust also includeSHADER_CREATE_LINK_STAGE_BIT_EXT - If the
flagsmember of any element ofpCreateInfosincludesSHADER_CREATE_LINK_STAGE_BIT_EXT, theflagsmember of all other elements ofpCreateInfoswhosestageisSHADER_STAGE_TASK_BIT_EXTorSHADER_STAGE_MESH_BIT_EXTmust also includeSHADER_CREATE_LINK_STAGE_BIT_EXT - If the
flagsmember of any element ofpCreateInfoswhosestageisSHADER_STAGE_TASK_BIT_EXTorSHADER_STAGE_MESH_BIT_EXTincludesSHADER_CREATE_LINK_STAGE_BIT_EXT, there must be no member ofpCreateInfoswhosestageisSHADER_STAGE_VERTEX_BITand whoseflagsmember includesSHADER_CREATE_LINK_STAGE_BIT_EXT - If there is any element of
pCreateInfoswhosestageisSHADER_STAGE_MESH_BIT_EXTand whoseflagsmember includes bothSHADER_CREATE_LINK_STAGE_BIT_EXTandSHADER_CREATE_NO_TASK_SHADER_BIT_EXT, there must be no element ofpCreateInfoswhosestageisSHADER_STAGE_TASK_BIT_EXTand whoseflagsmember includesSHADER_CREATE_LINK_STAGE_BIT_EXT - For each element of
pCreateInfoswhoseflagsmember includesSHADER_CREATE_LINK_STAGE_BIT_EXT, if there is any other element ofpCreateInfoswhosestageis logically later than thestageof the former and whoseflagsmember also includesSHADER_CREATE_LINK_STAGE_BIT_EXT, thenextStageof the former must be equal to thestageof the element with the logically earlieststagefollowing thestageof the former whoseflagsmember also includesSHADER_CREATE_LINK_STAGE_BIT_EXT - The
stagemember of each element ofpCreateInfoswhoseflagsmember includesSHADER_CREATE_LINK_STAGE_BIT_EXTmust be unique - The
codeTypemember of all elements ofpCreateInfoswhoseflagsmember includesSHADER_CREATE_LINK_STAGE_BIT_EXTmust be the same - If
pCreateInfoscontains elements with bothSHADER_STAGE_TESSELLATION_CONTROL_BITandSHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT, both elements'codeTypeisSHADER_CODE_TYPE_SPIRV_EXT, and theSHADER_STAGE_TESSELLATION_CONTROL_BITstage’spCodecontains anOpExecutionModeinstruction specifying the type of subdivision, it must match the subdivision type specified in theSHADER_STAGE_TESSELLATION_EVALUATION_BITstage - If
pCreateInfoscontains elements with bothSHADER_STAGE_TESSELLATION_CONTROL_BITandSHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT, both elements'codeTypeisSHADER_CODE_TYPE_SPIRV_EXT, and theSHADER_STAGE_TESSELLATION_CONTROL_BITstage’spCodecontains anOpExecutionModeinstruction specifying the orientation of triangles, it must match the triangle orientation specified in theSHADER_STAGE_TESSELLATION_EVALUATION_BITstage - If
pCreateInfoscontains elements with bothSHADER_STAGE_TESSELLATION_CONTROL_BITandSHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT, both elements'codeTypeisSHADER_CODE_TYPE_SPIRV_EXT, and theSHADER_STAGE_TESSELLATION_CONTROL_BITstage’spCodecontains anOpExecutionModeinstruction specifyingPointMode, theSHADER_STAGE_TESSELLATION_EVALUATION_BITstage must also contain anOpExecutionModeinstruction specifyingPointMode - If
pCreateInfoscontains elements with bothSHADER_STAGE_TESSELLATION_CONTROL_BITandSHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT, both elements'codeTypeisSHADER_CODE_TYPE_SPIRV_EXT, and theSHADER_STAGE_TESSELLATION_CONTROL_BITstage’spCodecontains anOpExecutionModeinstruction specifying the spacing of segments on the edges of tessellated primitives, it must match the segment spacing specified in theSHADER_STAGE_TESSELLATION_EVALUATION_BITstage - If
pCreateInfoscontains elements with bothSHADER_STAGE_TESSELLATION_CONTROL_BITandSHADER_STAGE_TESSELLATION_EVALUATION_BIT, both elements'flagsincludeSHADER_CREATE_LINK_STAGE_BIT_EXT, both elements'codeTypeisSHADER_CODE_TYPE_SPIRV_EXT, and theSHADER_STAGE_TESSELLATION_CONTROL_BITstage’spCodecontains anOpExecutionModeinstruction specifying the output patch size, it must match the output patch size specified in theSHADER_STAGE_TESSELLATION_EVALUATION_BITstage - If
pCreateInfoscontains aSHADER_STAGE_MESH_BIT_EXTwithcodeTypeofSHADER_CODE_TYPE_SPIRV_EXTandSHADER_CREATE_NO_TASK_SHADER_BIT_EXTis not set, then the mesh shader’s entry point must not declare a variable with aDrawIndexBuiltIndecoration
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidVkShaderCreateInfoEXTstructures- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pShadersmust be a valid pointer to an array ofcreateInfoCountVkShaderEXThandlescreateInfoCountmust be greater than 0
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the shader objects.pCreateInfos- a pointer to an array ofVkShaderCreateInfoEXTstructures.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pShaders- a pointer to an array ofVkShaderEXThandles in which the resulting shader objects are returned.
- If the
-
nvkDestroyShaderEXT
public static void nvkDestroyShaderEXT(org.lwjgl.vulkan.VkDevice device, long shader, long pAllocator) Unsafe version of:DestroyShaderEXT -
vkDestroyShaderEXT
public static void vkDestroyShaderEXT(org.lwjgl.vulkan.VkDevice device, long shader, @Nullable VkAllocationCallbacks pAllocator) Destroy a shader object.C Specification
To destroy a shader object, call:
void vkDestroyShaderEXT( VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator);Description
Destroying a shader object used by one or more command buffers in the recording or executable state causes those command buffers to move into the invalid state.
Valid Usage
- The
shaderObjectfeature must be enabled - All submitted commands that refer to
shadermust have completed execution - If
VkAllocationCallbackswere provided whenshaderwas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenshaderwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle- If
shaderis notNULL_HANDLE,shadermust be a validVkShaderEXThandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
shaderis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
shadermust be externally synchronized
See Also
- Parameters:
device- the logical device that destroys the shader object.shader- the handle of the shader object to destroy.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.
- The
-
nvkGetShaderBinaryDataEXT
public static int nvkGetShaderBinaryDataEXT(org.lwjgl.vulkan.VkDevice device, long shader, long pDataSize, long pData) Unsafe version of:GetShaderBinaryDataEXT- Parameters:
pDataSize- a pointer to asize_tvalue related to the size of the binary shader code, as described below.
-
vkGetShaderBinaryDataEXT
public static int vkGetShaderBinaryDataEXT(org.lwjgl.vulkan.VkDevice device, long shader, org.lwjgl.PointerBuffer pDataSize, @Nullable ByteBuffer pData) Get the binary shader code from a shader object.C Specification
Binary shader code can be retrieved from a shader object using the command:
VkResult vkGetShaderBinaryDataEXT( VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData);Description
If
pDataisNULL, then the size of the binary shader code of the shader object, in bytes, is returned inpDataSize. Otherwise,pDataSizemust point to a variable set by the application to the size of the buffer, in bytes, pointed to bypData, and on return the variable is overwritten with the amount of data actually written topData. IfpDataSizeis less than the size of the binary shader code, nothing is written topData, andINCOMPLETEwill be returned instead ofSUCCESS.Note
The behavior of this command when
pDataSizeis too small differs from how some other getter-type commands work in Vulkan. Because shader binary data is only usable in its entirety, it would never be useful for the implementation to return partial data. Because of this, nothing is written topDataunlesspDataSizeis large enough to fit the data in its entirety.Binary shader code retrieved using
vkGetShaderBinaryDataEXTcan be passed to a subsequent call toCreateShadersEXTon a compatible physical device by specifyingSHADER_CODE_TYPE_BINARY_EXTin thecodeTypemember ofVkShaderCreateInfoEXT.The shader code returned by repeated calls to this function with the same
VkShaderEXTis guaranteed to be invariant for the lifetime of theVkShaderEXTobject.Valid Usage
- The
shaderObjectfeature must be enabled - If
pDatais notNULL, it must be aligned to 16 bytes
Valid Usage (Implicit)
devicemust be a validVkDevicehandleshadermust be a validVkShaderEXThandlepDataSizemust be a valid pointer to asize_tvalue- If the value referenced by
pDataSizeis not 0, andpDatais notNULL,pDatamust be a valid pointer to an array ofpDataSizebytes shadermust have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the logical device that shader object was created from.shader- the shader object to retrieve binary shader code from.pDataSize- a pointer to asize_tvalue related to the size of the binary shader code, as described below.pData- eitherNULLor a pointer to a buffer.
- The
-
nvkCmdBindShadersEXT
public static void nvkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int stageCount, long pStages, long pShaders) Unsafe version of:CmdBindShadersEXT- Parameters:
stageCount- the length of thepStagesandpShadersarrays.
-
vkCmdBindShadersEXT
public static void vkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, IntBuffer pStages, LongBuffer pShaders) Bind shader objects to a command buffer.C Specification
Once shader objects have been created, they can be bound to the command buffer using the command:
void vkCmdBindShadersEXT( VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders);Description
When binding linked shaders, an application may bind them in any combination of one or more calls to
vkCmdBindShadersEXT(i.e., shaders that were created linked together do not need to be bound in the samevkCmdBindShadersEXTcall).Any shader object bound to a particular stage may be unbound by setting its value in
pShaderstoNULL_HANDLE. IfpShadersisNULL,vkCmdBindShadersEXTbehaves as ifpShaderswas an array ofstageCountNULL_HANDLEvalues (i.e., any shaders bound to the stages specified inpStagesare unbound).Valid Usage
- The
shaderObjectfeature must be enabled - Every element of
pStagesmust be unique pStagesmust not containSHADER_STAGE_ALL_GRAPHICSorSHADER_STAGE_ALLpStagesmust not containSHADER_STAGE_RAYGEN_BIT_KHR,SHADER_STAGE_ANY_HIT_BIT_KHR,SHADER_STAGE_CLOSEST_HIT_BIT_KHR,SHADER_STAGE_MISS_BIT_KHR,SHADER_STAGE_INTERSECTION_BIT_KHR, orSHADER_STAGE_CALLABLE_BIT_KHRpStagesmust not containSHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEIpStagesmust not containSHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI- For each element of
pStages, ifpShadersis notNULL, and the element of thepShadersarray with the same index is notNULL_HANDLE, it must have been created with astageequal to the corresponding element ofpStages - If
pStagescontains bothSHADER_STAGE_TASK_BIT_EXTandSHADER_STAGE_VERTEX_BIT, andpShadersis notNULL, and the same index inpShadersasSHADER_STAGE_TASK_BIT_EXTinpStagesis notNULL_HANDLE, the same index inpShadersasSHADER_STAGE_VERTEX_BITinpStagesmust beNULL_HANDLE - If
pStagescontains bothSHADER_STAGE_MESH_BIT_EXTandSHADER_STAGE_VERTEX_BIT, andpShadersis notNULL, and the same index inpShadersasSHADER_STAGE_MESH_BIT_EXTinpStagesis notNULL_HANDLE, the same index inpShadersasSHADER_STAGE_VERTEX_BITinpStagesmust beNULL_HANDLE - If the
tessellationShaderfeature is not enabled, andpStagescontainsSHADER_STAGE_TESSELLATION_CONTROL_BITorSHADER_STAGE_TESSELLATION_EVALUATION_BIT, andpShadersis notNULL, the same index or indices inpShadersmust beNULL_HANDLE - If the
geometryShaderfeature is not enabled, andpStagescontainsSHADER_STAGE_GEOMETRY_BIT, andpShadersis notNULL, the same index inpShadersmust beNULL_HANDLE - If the
taskShaderfeature is not enabled, andpStagescontainsSHADER_STAGE_TASK_BIT_EXT, andpShadersis notNULL, the same index inpShadersmust beNULL_HANDLE - If the
meshShaderfeature is not enabled, andpStagescontainsSHADER_STAGE_MESH_BIT_EXT, andpShadersis notNULL, the same index inpShadersmust beNULL_HANDLE - If
pStagescontainsSHADER_STAGE_COMPUTE_BIT, theVkCommandPoolthatcommandBufferwas allocated from must support compute operations - If
pStagescontainsSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BIT,SHADER_STAGE_GEOMETRY_BIT, orSHADER_STAGE_FRAGMENT_BIT, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If
pStagescontainsSHADER_STAGE_MESH_BIT_EXTorSHADER_STAGE_TASK_BIT_EXT, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepStagesmust be a valid pointer to an array ofstageCountvalidVkShaderStageFlagBitsvalues- If
pShadersis notNULL,pShadersmust be a valid pointer to an array ofstageCountvalid orNULL_HANDLEVkShaderEXThandles commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a video coding scope
stageCountmust be greater than 0- Both of
commandBuffer, and the elements ofpShadersthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics Compute State - Parameters:
commandBuffer- the command buffer that the shader object will be bound to.pStages- a pointer to an array ofVkShaderStageFlagBitsvalues specifying one stage per array index that is affected by the corresponding value in thepShadersarray.pShaders- a pointer to an array ofVkShaderEXThandles and/orNULL_HANDLEvalues describing the shader binding operations to be performed on each stage inpStages.
- The
-
vkCmdSetCullModeEXT
public static void vkCmdSetCullModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int cullMode) SeeCmdSetCullMode.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.cullMode- specifies the cull mode property to use for drawing.
-
vkCmdSetFrontFaceEXT
public static void vkCmdSetFrontFaceEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int frontFace) SeeCmdSetFrontFace.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.frontFace- aVkFrontFacevalue specifying the front-facing triangle orientation to be used for culling.
-
vkCmdSetPrimitiveTopologyEXT
public static void vkCmdSetPrimitiveTopologyEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int primitiveTopology) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.primitiveTopology- specifies the primitive topology to use for drawing.
-
nvkCmdSetViewportWithCountEXT
public static void nvkCmdSetViewportWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int viewportCount, long pViewports) Unsafe version of:CmdSetViewportWithCountEXT- Parameters:
viewportCount- specifies the viewport count.
-
vkCmdSetViewportWithCountEXT
public static void vkCmdSetViewportWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkViewport.Buffer pViewports) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pViewports- specifies the viewports to use for drawing.
-
nvkCmdSetScissorWithCountEXT
public static void nvkCmdSetScissorWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int scissorCount, long pScissors) Unsafe version of:CmdSetScissorWithCountEXT- Parameters:
scissorCount- specifies the scissor count.
-
vkCmdSetScissorWithCountEXT
public static void vkCmdSetScissorWithCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkRect2D.Buffer pScissors) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pScissors- specifies the scissors to use for drawing.
-
nvkCmdBindVertexBuffers2EXT
public static void nvkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets, long pSizes, long pStrides) Unsafe version of:CmdBindVertexBuffers2EXT- Parameters:
bindingCount- the number of vertex input bindings whose state is updated by the command.
-
vkCmdBindVertexBuffers2EXT
public static void vkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, LongBuffer pBuffers, LongBuffer pOffsets, @Nullable LongBuffer pSizes, @Nullable LongBuffer pStrides) - Parameters:
commandBuffer- the command buffer into which the command is recorded.firstBinding- the index of the first vertex input binding whose state is updated by the command.pBuffers- a pointer to an array of buffer handles.pOffsets- a pointer to an array of buffer offsets.pSizes-NULLor a pointer to an array of the size in bytes of vertex data bound frompBuffers.pStrides-NULLor a pointer to an array of buffer strides.
-
vkCmdSetDepthTestEnableEXT
public static void vkCmdSetDepthTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthTestEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthTestEnable- specifies if the depth test is enabled.
-
vkCmdSetDepthWriteEnableEXT
public static void vkCmdSetDepthWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthWriteEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthWriteEnable- specifies if depth writes are enabled.
-
vkCmdSetDepthCompareOpEXT
public static void vkCmdSetDepthCompareOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthCompareOp) SeeCmdSetDepthCompareOp.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthCompareOp- aVkCompareOpvalue specifying the comparison operator used for the Depth Comparison step of the depth test.
-
vkCmdSetDepthBoundsTestEnableEXT
public static void vkCmdSetDepthBoundsTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthBoundsTestEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthBoundsTestEnable- specifies if the depth bounds test is enabled.
-
vkCmdSetStencilTestEnableEXT
public static void vkCmdSetStencilTestEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean stencilTestEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.stencilTestEnable- specifies if the stencil test is enabled.
-
vkCmdSetStencilOpEXT
public static void vkCmdSetStencilOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int faceMask, int failOp, int passOp, int depthFailOp, int compareOp) SeeCmdSetStencilOp.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.faceMask- a bitmask ofVkStencilFaceFlagBitsspecifying the set of stencil state for which to update the stencil operation.failOp- aVkStencilOpvalue specifying the action performed on samples that fail the stencil test.passOp- aVkStencilOpvalue specifying the action performed on samples that pass both the depth and stencil tests.depthFailOp- aVkStencilOpvalue specifying the action performed on samples that pass the stencil test and fail the depth test.compareOp- aVkCompareOpvalue specifying the comparison operator used in the stencil test.
-
nvkCmdSetVertexInputEXT
public static void nvkCmdSetVertexInputEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int vertexBindingDescriptionCount, long pVertexBindingDescriptions, int vertexAttributeDescriptionCount, long pVertexAttributeDescriptions) Unsafe version of:CmdSetVertexInputEXT- Parameters:
vertexBindingDescriptionCount- the number of vertex binding descriptions provided inpVertexBindingDescriptions.vertexAttributeDescriptionCount- the number of vertex attribute descriptions provided inpVertexAttributeDescriptions.
-
vkCmdSetVertexInputEXT
public static void vkCmdSetVertexInputEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, @Nullable VkVertexInputBindingDescription2EXT.Buffer pVertexBindingDescriptions, @Nullable VkVertexInputAttributeDescription2EXT.Buffer pVertexAttributeDescriptions) Set the vertex input state dynamically for a command buffer.C Specification
To dynamically set the vertex input attribute and vertex input binding descriptions, call:
void vkCmdSetVertexInputEXT( VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);Description
This command sets the vertex input attribute and vertex input binding descriptions state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_VERTEX_INPUT_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkGraphicsPipelineCreateInfo::pVertexInputStatevalues used to create the currently active pipeline.If drawing using shader objects, or if the bound pipeline state object was also created with the
DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDEdynamic state enabled, thenCmdBindVertexBuffers2can be used instead ofvkCmdSetVertexInputEXTto dynamically set the stride.The vertex attribute description for any location in the range
[0,not specified in theVkPhysicalDeviceLimits::maxVertexInputAttributes)pVertexAttributeDescriptionsarray becomes undefined.Valid Usage
- Either the
vertexInputDynamicStatefeature or theshaderObjectfeature or both must be enabled vertexBindingDescriptionCountmust be less than or equal toVkPhysicalDeviceLimits::maxVertexInputBindingsvertexAttributeDescriptionCountmust be less than or equal toVkPhysicalDeviceLimits::maxVertexInputAttributes- For every
bindingspecified by each element ofpVertexAttributeDescriptions, aVkVertexInputBindingDescription2EXTmust exist inpVertexBindingDescriptionswith the same value ofbinding - All elements of
pVertexBindingDescriptionsmust describe distinct binding numbers - All elements of
pVertexAttributeDescriptionsmust describe distinct attribute locations
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle- If
vertexBindingDescriptionCountis not 0,pVertexBindingDescriptionsmust be a valid pointer to an array ofvertexBindingDescriptionCountvalidVkVertexInputBindingDescription2EXTstructures - If
vertexAttributeDescriptionCountis not 0,pVertexAttributeDescriptionsmust be a valid pointer to an array ofvertexAttributeDescriptionCountvalidVkVertexInputAttributeDescription2EXTstructures commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
VkVertexInputAttributeDescription2EXT,VkVertexInputBindingDescription2EXT- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pVertexBindingDescriptions- a pointer to an array ofVkVertexInputBindingDescription2EXTstructures.pVertexAttributeDescriptions- a pointer to an array ofVkVertexInputAttributeDescription2EXTstructures.
- Either the
-
vkCmdSetPatchControlPointsEXT
public static void vkCmdSetPatchControlPointsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int patchControlPoints) Specify the number of control points per patch dynamically for a command buffer.C Specification
To dynamically set the number of control points per patch, call:
void vkCmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints);Description
This command sets the number of control points per patch for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineTessellationStateCreateInfo::patchControlPointsvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState2PatchControlPointsfeature is enabled - The
shaderObjectfeature is enabled
- The
patchControlPointsmust be greater than zero and less than or equal toVkPhysicalDeviceLimits::maxTessellationPatchSize
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.patchControlPoints- specifies the number of control points per patch.
- At least one of the following must be true:
-
vkCmdSetRasterizerDiscardEnableEXT
public static void vkCmdSetRasterizerDiscardEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean rasterizerDiscardEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.rasterizerDiscardEnable- controls whether primitives are discarded immediately before the rasterization stage.
-
vkCmdSetDepthBiasEnableEXT
public static void vkCmdSetDepthBiasEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthBiasEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthBiasEnable- controls whether to bias fragment depth values.
-
vkCmdSetLogicOpEXT
public static void vkCmdSetLogicOpEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int logicOp) Select which logical operation to apply for blend state dynamically for a command buffer.C Specification
To dynamically set the logical operation to apply for blend state, call:
void vkCmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp);Description
This command sets the logical operation for blend state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_LOGIC_OP_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendStateCreateInfo::logicOpvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState2LogicOpfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlelogicOpmust be a validVkLogicOpvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.logicOp- specifies the logical operation to apply for blend state.
- At least one of the following must be true:
-
vkCmdSetPrimitiveRestartEnableEXT
public static void vkCmdSetPrimitiveRestartEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean primitiveRestartEnable) - Parameters:
commandBuffer- the command buffer into which the command will be recorded.primitiveRestartEnable- controls whether a special vertex index value is treated as restarting the assembly of primitives. It behaves in the same way asVkPipelineInputAssemblyStateCreateInfo::primitiveRestartEnable
-
vkCmdSetTessellationDomainOriginEXT
public static void vkCmdSetTessellationDomainOriginEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int domainOrigin) Specify the origin of the tessellation domain space dynamically for a command buffer.C Specification
To dynamically set the origin of the tessellation domain space, call:
void vkCmdSetTessellationDomainOriginEXT( VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin);Description
This command sets the origin of the tessellation domain space for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineTessellationDomainOriginStateCreateInfo::domainOriginvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3TessellationDomainOriginfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandledomainOriginmust be a validVkTessellationDomainOriginvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.domainOrigin- specifies the origin of the tessellation domain space.
- At least one of the following must be true:
-
vkCmdSetDepthClampEnableEXT
public static void vkCmdSetDepthClampEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthClampEnable) Specify dynamically whether depth clamping is enabled in the command buffer.C Specification
To dynamically set enable or disable depth clamping, call:
void vkCmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable);Description
This command sets whether depth clamping is enabled or disabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationStateCreateInfo::depthClampEnablevalue used to create the currently active pipeline.If the depth clamping state is changed dynamically, and the pipeline was not created with
DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXTenabled, then depth clipping is enabled when depth clamping is disabled and vice versa.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3DepthClampEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
- If the
depthClampfeature is not enabled,depthClampEnablemust beFALSE
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthClampEnable- specifies whether depth clamping is enabled.
- At least one of the following must be true:
-
vkCmdSetPolygonModeEXT
public static void vkCmdSetPolygonModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int polygonMode) Specify polygon mode dynamically for a command buffer.C Specification
To dynamically set the polygon mode, call:
void vkCmdSetPolygonModeEXT( VkCommandBuffer commandBuffer, VkPolygonMode polygonMode);Description
This command sets the polygon mode for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_POLYGON_MODE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationStateCreateInfo::polygonModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3PolygonModefeature is enabled - The
shaderObjectfeature is enabled
- The
- If the
fillModeNonSolidfeature is not enabled,polygonModemust bePOLYGON_MODE_FILLorPOLYGON_MODE_FILL_RECTANGLE_NV - If the
VK_NV_fill_rectangleextension is not enabled,polygonModemust not bePOLYGON_MODE_FILL_RECTANGLE_NV
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepolygonModemust be a validVkPolygonModevaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.polygonMode- specifies polygon mode.
- At least one of the following must be true:
-
vkCmdSetRasterizationSamplesEXT
public static void vkCmdSetRasterizationSamplesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int rasterizationSamples) Specify the rasterization samples dynamically for a command buffer.C Specification
To dynamically set the
rasterizationSamples, call:void vkCmdSetRasterizationSamplesEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples);Description
This command sets the
rasterizationSamplesfor subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineMultisampleStateCreateInfo::rasterizationSamplesvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3RasterizationSamplesfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlerasterizationSamplesmust be a validVkSampleCountFlagBitsvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.rasterizationSamples- specifiesrasterizationSamples.
- At least one of the following must be true:
-
nvkCmdSetSampleMaskEXT
public static void nvkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, long pSampleMask) Unsafe version of:CmdSetSampleMaskEXT -
vkCmdSetSampleMaskEXT
public static void vkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, IntBuffer pSampleMask) Specify the sample mask dynamically for a command buffer.C Specification
To dynamically set the sample mask, call:
void vkCmdSetSampleMaskEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask);Description
This command sets the sample mask for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_SAMPLE_MASK_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineMultisampleStateCreateInfo::pSampleMaskvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3SampleMaskfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlesamplesmust be a validVkSampleCountFlagBitsvaluepSampleMaskmust be a valid pointer to an array ofceil(samples / 32)VkSampleMaskvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.samples- specifies the number of sample bits in thepSampleMask.pSampleMask- a pointer to an array ofVkSampleMaskvalues, where the array size is based on thesamplesparameter.
- At least one of the following must be true:
-
vkCmdSetAlphaToCoverageEnableEXT
public static void vkCmdSetAlphaToCoverageEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean alphaToCoverageEnable) Specify the alpha to coverage enable state dynamically for a command buffer.C Specification
To dynamically set the
alphaToCoverageEnablestate, call:void vkCmdSetAlphaToCoverageEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable);Description
This command sets the
alphaToCoverageEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineMultisampleStateCreateInfo::alphaToCoverageEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3AlphaToCoverageEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.alphaToCoverageEnable- specifies thealphaToCoverageEnablestate.
- At least one of the following must be true:
-
vkCmdSetAlphaToOneEnableEXT
public static void vkCmdSetAlphaToOneEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean alphaToOneEnable) Specify the alpha to one enable state dynamically for a command buffer.C Specification
To dynamically set the
alphaToOneEnablestate, call:void vkCmdSetAlphaToOneEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable);Description
This command sets the
alphaToOneEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineMultisampleStateCreateInfo::alphaToOneEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3AlphaToOneEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
- If the
alphaToOnefeature is not enabled,alphaToOneEnablemust beFALSE
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.alphaToOneEnable- specifies thealphaToOneEnablestate.
- At least one of the following must be true:
-
vkCmdSetLogicOpEnableEXT
public static void vkCmdSetLogicOpEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean logicOpEnable) Specify dynamically whether logical operations are enabled for a command buffer.C Specification
To dynamically set whether logical operations are enabled, call:
void vkCmdSetLogicOpEnableEXT( VkCommandBuffer commandBuffer, VkBool32 logicOpEnable);Description
This command sets whether logical operations are enabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_LOGIC_OP_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendStateCreateInfo::logicOpEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3LogicOpEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
- If the
logicOpfeature is not enabled,logicOpEnablemust beFALSE
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.logicOpEnable- specifies whether logical operations are enabled.
- At least one of the following must be true:
-
nvkCmdSetColorBlendEnableEXT
public static void nvkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendEnables) Unsafe version of:CmdSetColorBlendEnableEXT- Parameters:
attachmentCount- the number of color blending enables in thepColorBlendEnablesarray.
-
vkCmdSetColorBlendEnableEXT
public static void vkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, IntBuffer pColorBlendEnables) Specify theblendEnablefor each attachment dynamically for a command buffer.C Specification
To dynamically set
blendEnable, call:void vkCmdSetColorBlendEnableEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables);Description
This command sets the color blending enable of the specified color attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendAttachmentState::blendEnablevalues used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ColorBlendEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepColorBlendEnablesmust be a valid pointer to an array ofattachmentCountVkBool32valuescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
attachmentCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.firstAttachment- the first color attachment the color blending enable applies.pColorBlendEnables- an array of booleans to indicate whether color blending is enabled for the corresponding attachment.
- At least one of the following must be true:
-
nvkCmdSetColorBlendEquationEXT
public static void nvkCmdSetColorBlendEquationEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendEquations) Unsafe version of:CmdSetColorBlendEquationEXT- Parameters:
attachmentCount- the number ofVkColorBlendEquationEXTelements in thepColorBlendEquationsarray.
-
vkCmdSetColorBlendEquationEXT
public static void vkCmdSetColorBlendEquationEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, VkColorBlendEquationEXT.Buffer pColorBlendEquations) Specify the blend factors and operations dynamically for a command buffer.C Specification
To dynamically set color blend factors and operations, call:
void vkCmdSetColorBlendEquationEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations);Description
This command sets the color blending factors and operations of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendAttachmentState::srcColorBlendFactor,VkPipelineColorBlendAttachmentState::dstColorBlendFactor,VkPipelineColorBlendAttachmentState::colorBlendOp,VkPipelineColorBlendAttachmentState::srcAlphaBlendFactor,VkPipelineColorBlendAttachmentState::dstAlphaBlendFactor, andVkPipelineColorBlendAttachmentState::alphaBlendOpvalues used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ColorBlendEquationfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepColorBlendEquationsmust be a valid pointer to an array ofattachmentCountvalidVkColorBlendEquationEXTstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
attachmentCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.firstAttachment- the first color attachment the color blend factors and operations apply to.pColorBlendEquations- an array ofVkColorBlendEquationEXTstructs that specify the color blend factors and operations for the corresponding attachments.
- At least one of the following must be true:
-
nvkCmdSetColorWriteMaskEXT
public static void nvkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorWriteMasks) Unsafe version of:CmdSetColorWriteMaskEXT- Parameters:
attachmentCount- the number ofVkColorComponentFlagsvalues in thepColorWriteMasksarray.
-
vkCmdSetColorWriteMaskEXT
public static void vkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, IntBuffer pColorWriteMasks) Specify the color write masks for each attachment dynamically for a command buffer.C Specification
To dynamically set the color write masks, call:
void vkCmdSetColorWriteMaskEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks);Description
This command sets the color write masks of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_COLOR_WRITE_MASK_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendAttachmentState::colorWriteMaskvalues used to create the currently active pipeline.Note
Formats with bits that are shared between components specified by
VkColorComponentFlagBits, such asFORMAT_E5B9G9R9_UFLOAT_PACK32, cannot have their channels individually masked by this functionality; either all components that share bits have to be enabled, or none of them.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ColorWriteMaskfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepColorWriteMasksmust be a valid pointer to an array ofattachmentCountvalid combinations ofVkColorComponentFlagBitsvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
attachmentCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.firstAttachment- the first color attachment the color write masks apply to.pColorWriteMasks- an array ofVkColorComponentFlagsvalues that specify the color write masks of the corresponding attachments.
- At least one of the following must be true:
-
vkCmdSetRasterizationStreamEXT
public static void vkCmdSetRasterizationStreamEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int rasterizationStream) Specify the rasterization stream dynamically for a command buffer.C Specification
To dynamically set the
rasterizationStreamstate, call:void vkCmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream);Description
This command sets the
rasterizationStreamstate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_RASTERIZATION_STREAM_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStreamvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3RasterizationStreamfeature is enabled - The
shaderObjectfeature is enabled
- The
- The
transformFeedbackfeature must be enabled rasterizationStreammust be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreamsrasterizationStreammust be zero ifVkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackRasterizationStreamSelectisFALSE
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.rasterizationStream- specifies therasterizationStreamstate.
- At least one of the following must be true:
-
vkCmdSetConservativeRasterizationModeEXT
public static void vkCmdSetConservativeRasterizationModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int conservativeRasterizationMode) Specify the conservative rasterization mode dynamically for a command buffer.C Specification
To dynamically set the
conservativeRasterizationMode, call:void vkCmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode);Description
This command sets the
conservativeRasterizationModestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationConservativeStateCreateInfoEXT::conservativeRasterizationModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ConservativeRasterizationModefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandleconservativeRasterizationModemust be a validVkConservativeRasterizationModeEXTvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.conservativeRasterizationMode- specifies theconservativeRasterizationModestate.
- At least one of the following must be true:
-
vkCmdSetExtraPrimitiveOverestimationSizeEXT
public static void vkCmdSetExtraPrimitiveOverestimationSizeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer.C Specification
To dynamically set the
extraPrimitiveOverestimationSize, call:void vkCmdSetExtraPrimitiveOverestimationSizeEXT( VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize);Description
This command sets the
extraPrimitiveOverestimationSizefor subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationConservativeStateCreateInfoEXT::extraPrimitiveOverestimationSizevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ExtraPrimitiveOverestimationSizefeature is enabled - The
shaderObjectfeature is enabled
- The
extraPrimitiveOverestimationSizemust be in the range of0.0toVkPhysicalDeviceConservativeRasterizationPropertiesEXT::maxExtraPrimitiveOverestimationSizeinclusive
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.extraPrimitiveOverestimationSize- specifies theextraPrimitiveOverestimationSize.
- At least one of the following must be true:
-
vkCmdSetDepthClipEnableEXT
public static void vkCmdSetDepthClipEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean depthClipEnable) Specify dynamically whether depth clipping is enabled in the command buffer.C Specification
To dynamically set enable or disable depth clipping, call:
void vkCmdSetDepthClipEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClipEnable);Description
This command sets whether depth clipping is enabled or disabled for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationDepthClipStateCreateInfoEXT::depthClipEnablevalue used to create the currently active pipeline, or by the inverse ofVkPipelineRasterizationStateCreateInfo::depthClampEnableifVkPipelineRasterizationDepthClipStateCreateInfoEXTis not specified.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3DepthClipEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
- The
depthClipEnablefeature must be enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthClipEnable- specifies whether depth clipping is enabled.
- At least one of the following must be true:
-
vkCmdSetSampleLocationsEnableEXT
public static void vkCmdSetSampleLocationsEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean sampleLocationsEnable) Specify the samples locations enable state dynamically for a command buffer.C Specification
To dynamically set the
sampleLocationsEnablestate, call:void vkCmdSetSampleLocationsEnableEXT( VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable);Description
This command sets the
sampleLocationsEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3SampleLocationsEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.sampleLocationsEnable- specifies thesampleLocationsEnablestate.
- At least one of the following must be true:
-
nvkCmdSetColorBlendAdvancedEXT
public static void nvkCmdSetColorBlendAdvancedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int attachmentCount, long pColorBlendAdvanced) Unsafe version of:CmdSetColorBlendAdvancedEXT- Parameters:
attachmentCount- the number ofVkColorBlendAdvancedEXTelements in thepColorBlendAdvancedarray.
-
vkCmdSetColorBlendAdvancedEXT
public static void vkCmdSetColorBlendAdvancedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, VkColorBlendAdvancedEXT.Buffer pColorBlendAdvanced) Specify the advanced color blend state dynamically for a command buffer.C Specification
To dynamically set the advanced blend state, call:
void vkCmdSetColorBlendAdvancedEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced);Description
This command sets the advanced blend operation parameters of the specified attachments for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorBlendAdvancedStateCreateInfoEXT::srcPremultiplied,VkPipelineColorBlendAdvancedStateCreateInfoEXT::dstPremultiplied, andVkPipelineColorBlendAdvancedStateCreateInfoEXT::blendOverlapvalues used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ColorBlendAdvancedfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepColorBlendAdvancedmust be a valid pointer to an array ofattachmentCountvalidVkColorBlendAdvancedEXTstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
attachmentCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.firstAttachment- the first color attachment the advanced blend parameters apply to.pColorBlendAdvanced- an array ofVkColorBlendAdvancedEXTstructs that specify the advanced color blend parameters for the corresponding attachments.
- At least one of the following must be true:
-
vkCmdSetProvokingVertexModeEXT
public static void vkCmdSetProvokingVertexModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int provokingVertexMode) Specify the provoking vertex mode dynamically for a command buffer.C Specification
To dynamically set the
provokingVertexModestate, call:void vkCmdSetProvokingVertexModeEXT( VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode);Description
This command sets the
provokingVertexModestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationProvokingVertexStateCreateInfoEXT::provokingVertexModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ProvokingVertexModefeature is enabled - The
shaderObjectfeature is enabled
- The
- If
provokingVertexModeisPROVOKING_VERTEX_MODE_LAST_VERTEX_EXT, then theprovokingVertexLastfeature must be enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandleprovokingVertexModemust be a validVkProvokingVertexModeEXTvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.provokingVertexMode- specifies theprovokingVertexModestate.
- At least one of the following must be true:
-
vkCmdSetLineRasterizationModeEXT
public static void vkCmdSetLineRasterizationModeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int lineRasterizationMode) Specify the line rasterization mode dynamically for a command buffer.C Specification
To dynamically set the
lineRasterizationModestate, call:void vkCmdSetLineRasterizationModeEXT( VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode);Description
This command sets the
lineRasterizationModestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationLineStateCreateInfo::lineRasterizationModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3LineRasterizationModefeature is enabled - The
shaderObjectfeature is enabled
- The
- If
lineRasterizationModeisLINE_RASTERIZATION_MODE_RECTANGULAR, then therectangularLinesfeature must be enabled - If
lineRasterizationModeisLINE_RASTERIZATION_MODE_BRESENHAM, then thebresenhamLinesfeature must be enabled - If
lineRasterizationModeisLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, then thesmoothLinesfeature must be enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlelineRasterizationModemust be a validVkLineRasterizationModeEXTvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.lineRasterizationMode- specifies thelineRasterizationModestate.
- At least one of the following must be true:
-
vkCmdSetLineStippleEnableEXT
public static void vkCmdSetLineStippleEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean stippledLineEnable) Specify the line stipple enable dynamically for a command buffer.C Specification
To dynamically set the
stippledLineEnablestate, call:void vkCmdSetLineStippleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable);Description
This command sets the
stippledLineEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRasterizationLineStateCreateInfo::stippledLineEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3LineStippleEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.stippledLineEnable- specifies thestippledLineEnablestate.
- At least one of the following must be true:
-
vkCmdSetDepthClipNegativeOneToOneEXT
public static void vkCmdSetDepthClipNegativeOneToOneEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean negativeOneToOne) Specify the negative one to one depth clip mode dynamically for a command buffer.C Specification
To dynamically set
negativeOneToOne, call:void vkCmdSetDepthClipNegativeOneToOneEXT( VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne);Description
This command sets the
negativeOneToOnestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportDepthClipControlCreateInfoEXT::negativeOneToOnevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3DepthClipNegativeOneToOnefeature is enabled - The
shaderObjectfeature is enabled
- The
- The
depthClipControlfeature must be enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.negativeOneToOne- specifies thenegativeOneToOnestate.
- At least one of the following must be true:
-
vkCmdSetViewportWScalingEnableNV
public static void vkCmdSetViewportWScalingEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean viewportWScalingEnable) Specify the viewport W scaling enable state dynamically for a command buffer.C Specification
To dynamically set the
viewportWScalingEnablestate, call:void vkCmdSetViewportWScalingEnableNV( VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable);Description
This command sets the
viewportWScalingEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportWScalingStateCreateInfoNV::viewportWScalingEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ViewportWScalingEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.viewportWScalingEnable- specifies theviewportWScalingEnablestate.
- At least one of the following must be true:
-
nvkCmdSetViewportSwizzleNV
public static void nvkCmdSetViewportSwizzleNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pViewportSwizzles) Unsafe version of:CmdSetViewportSwizzleNV- Parameters:
viewportCount- the number of viewports whose parameters are updated by the command.
-
vkCmdSetViewportSwizzleNV
public static void vkCmdSetViewportSwizzleNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstViewport, VkViewportSwizzleNV.Buffer pViewportSwizzles) Specify the viewport swizzle state dynamically for a command buffer.C Specification
To dynamically set the viewport swizzle state, call:
void vkCmdSetViewportSwizzleNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles);Description
This command sets the viewport swizzle state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_VIEWPORT_SWIZZLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportSwizzleStateCreateInfoNV::viewportCount, andVkPipelineViewportSwizzleStateCreateInfoNV::pViewportSwizzlesvalues used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ViewportSwizzlefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepViewportSwizzlesmust be a valid pointer to an array ofviewportCountvalidVkViewportSwizzleNVstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
viewportCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.firstViewport- the index of the first viewport whose parameters are updated by the command.pViewportSwizzles- a pointer to an array ofVkViewportSwizzleNVstructures specifying viewport swizzles.
- At least one of the following must be true:
-
vkCmdSetCoverageToColorEnableNV
public static void vkCmdSetCoverageToColorEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean coverageToColorEnable) Specify the coverage to color enable state dynamically for a command buffer.C Specification
To dynamically set the
coverageToColorEnablestate, call:void vkCmdSetCoverageToColorEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable);Description
This command sets the
coverageToColorEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageToColorStateCreateInfoNV::coverageToColorEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageToColorEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.coverageToColorEnable- specifies thecoverageToColorEnablestate.
- At least one of the following must be true:
-
vkCmdSetCoverageToColorLocationNV
public static void vkCmdSetCoverageToColorLocationNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageToColorLocation) Specify the coverage to color location dynamically for a command buffer.C Specification
To dynamically set the
coverageToColorLocationstate, call:void vkCmdSetCoverageToColorLocationNV( VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation);Description
This command sets the
coverageToColorLocationstate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageToColorStateCreateInfoNV::coverageToColorLocationvalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageToColorLocationfeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.coverageToColorLocation- specifies thecoverageToColorLocationstate.
- At least one of the following must be true:
-
vkCmdSetCoverageModulationModeNV
public static void vkCmdSetCoverageModulationModeNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageModulationMode) Specify the coverage modulation mode dynamically for a command buffer.C Specification
To dynamically set the
coverageModulationModestate, call:void vkCmdSetCoverageModulationModeNV( VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode);Description
This command sets the
coverageModulationModestate for subsequent drawing commands when drawing using shader objects, or the graphics pipeline is created withDYNAMIC_STATE_COVERAGE_MODULATION_MODE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageModulationStateCreateInfoNV::coverageModulationModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageModulationModefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecoverageModulationModemust be a validVkCoverageModulationModeNVvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.coverageModulationMode- specifies thecoverageModulationModestate.
- At least one of the following must be true:
-
vkCmdSetCoverageModulationTableEnableNV
public static void vkCmdSetCoverageModulationTableEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean coverageModulationTableEnable) Specify the coverage modulation table enable state dynamically for a command buffer.C Specification
To dynamically set the
coverageModulationTableEnablestate, call:void vkCmdSetCoverageModulationTableEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable);Description
This command sets the
coverageModulationTableEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageModulationStateCreateInfoNV::coverageModulationTableEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageModulationTableEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.coverageModulationTableEnable- specifies thecoverageModulationTableEnablestate.
- At least one of the following must be true:
-
nvkCmdSetCoverageModulationTableNV
public static void nvkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageModulationTableCount, long pCoverageModulationTable) Unsafe version of:CmdSetCoverageModulationTableNV- Parameters:
coverageModulationTableCount- specifies the number of elements inpCoverageModulationTable.
-
vkCmdSetCoverageModulationTableNV
public static void vkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, FloatBuffer pCoverageModulationTable) Specify the coverage modulation table dynamically for a command buffer.C Specification
To dynamically set the
pCoverageModulationTablestate, call:void vkCmdSetCoverageModulationTableNV( VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable);Description
This command sets the table of modulation factors for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageModulationStateCreateInfoNV::coverageModulationTableCount, andVkPipelineCoverageModulationStateCreateInfoNV::pCoverageModulationTablevalues used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageModulationTablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepCoverageModulationTablemust be a valid pointer to an array ofcoverageModulationTableCountfloatvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
coverageModulationTableCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pCoverageModulationTable- specifies the table of modulation factors containing a value for each number of covered samples.
- At least one of the following must be true:
-
vkCmdSetShadingRateImageEnableNV
public static void vkCmdSetShadingRateImageEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean shadingRateImageEnable) Specify the shading rate image enable state dynamically for a command buffer.C Specification
To dynamically set the
shadingRateImageEnablestate, call:void vkCmdSetShadingRateImageEnableNV( VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable);Description
This command sets the
shadingRateImageEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportShadingRateImageStateCreateInfoNV::shadingRateImageEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3ShadingRateImageEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.shadingRateImageEnable- specifies theshadingRateImageEnablestate.
- At least one of the following must be true:
-
vkCmdSetRepresentativeFragmentTestEnableNV
public static void vkCmdSetRepresentativeFragmentTestEnableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, boolean representativeFragmentTestEnable) Specify the representative fragment test enable dynamically for a command buffer.C Specification
To dynamically set the
representativeFragmentTestEnablestate, call:void vkCmdSetRepresentativeFragmentTestEnableNV( VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable);Description
This command sets the
representativeFragmentTestEnablestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineRepresentativeFragmentTestStateCreateInfoNV::representativeFragmentTestEnablevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3RepresentativeFragmentTestEnablefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.representativeFragmentTestEnable- specifies therepresentativeFragmentTestEnablestate.
- At least one of the following must be true:
-
vkCmdSetCoverageReductionModeNV
public static void vkCmdSetCoverageReductionModeNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int coverageReductionMode) Specify the coverage reduction mode dynamically for a command buffer.C Specification
To dynamically set the
coverageReductionModestate, call:void vkCmdSetCoverageReductionModeNV( VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode);Description
This command sets the
coverageReductionModestate for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created withDYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineCoverageReductionStateCreateInfoNV::coverageReductionModevalue used to create the currently active pipeline.Valid Usage
- At least one of the following must be true:
- The
extendedDynamicState3CoverageReductionModefeature is enabled - The
shaderObjectfeature is enabled
- The
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecoverageReductionModemust be a validVkCoverageReductionModeNVvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.coverageReductionMode- specifies thecoverageReductionModestate.
- At least one of the following must be true:
-
nvkCmdSetDepthClampRangeEXT
public static void nvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, long pDepthClampRange) Unsafe version of:CmdSetDepthClampRangeEXT -
vkCmdSetDepthClampRangeEXT
public static void vkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, @Nullable VkDepthClampRangeEXT pDepthClampRange) Set the viewport depth clamp range dynamically for a command buffer.C Specification
To dynamically set the viewport depth clamp range parameters, call:
void vkCmdSetDepthClampRangeEXT( VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange);Description
This command sets the viewport depth clamp range for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with
DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportDepthClampControlCreateInfoEXT::depthClampModevalue used to create the currently active pipeline.Valid Usage
- If
depthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, thenpDepthClampRangemust be a valid pointer to a validVkDepthClampRangeEXTstructure
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandledepthClampModemust be a validVkDepthClampModeEXTvalue- If
pDepthClampRangeis notNULL,pDepthClampRangemust be a valid pointer to a validVkDepthClampRangeEXTstructure commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthClampMode- determines how the clamp range is determined for each viewport.pDepthClampRange- sets the depth clamp range for all viewports ifdepthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.
- If
-
vkCreateShadersEXT
public static int vkCreateShadersEXT(org.lwjgl.vulkan.VkDevice device, VkShaderCreateInfoEXT.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pShaders) Array version of:CreateShadersEXT -
vkCmdBindShadersEXT
public static void vkCmdBindShadersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int[] pStages, long[] pShaders) Array version of:CmdBindShadersEXT -
vkCmdBindVertexBuffers2EXT
public static void vkCmdBindVertexBuffers2EXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, long @Nullable [] pSizes, long @Nullable [] pStrides) Array version of:CmdBindVertexBuffers2EXT -
vkCmdSetSampleMaskEXT
public static void vkCmdSetSampleMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int samples, int[] pSampleMask) Array version of:CmdSetSampleMaskEXT -
vkCmdSetColorBlendEnableEXT
public static void vkCmdSetColorBlendEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorBlendEnables) Array version of:CmdSetColorBlendEnableEXT -
vkCmdSetColorWriteMaskEXT
public static void vkCmdSetColorWriteMaskEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorWriteMasks) Array version of:CmdSetColorWriteMaskEXT -
vkCmdSetCoverageModulationTableNV
public static void vkCmdSetCoverageModulationTableNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, float[] pCoverageModulationTable) Array version of:CmdSetCoverageModulationTableNV
-