Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTShaderObject

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

This extension introduces a new 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);
VK_EXT_shader_object
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_properties2      or      Version 1.1 and      VK_KHR_dynamic_rendering      or      Version 1.3
Contact
Extension Proposal
VK_EXT_shader_object
Other Extension Metadata
Last Modified Date
2023-03-30
Interactions and External Dependencies
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

Modifier and TypeField and Description
public static final int
public static final String
public static final int
VK_EXT_SHADER_OBJECT_SPEC_VERSION

The extension specification version.

public static final int
VK_OBJECT_TYPE_SHADER_EXT

Extends VkObjectType.

public static final int
VK_SHADER_CODE_TYPE_BINARY_EXT

VkShaderCodeTypeEXT - Indicate a shader code type Description

public static final int
VK_SHADER_CODE_TYPE_SPIRV_EXT

VkShaderCodeTypeEXT - Indicate a shader code type Description

public static final int
VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT

Extends VkShaderCreateFlagBitsEXT.

public static final int
VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT

Extends VkShaderCreateFlagBitsEXT.

public static final int
public static final int
public static final int
VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT

Extends VkShaderCreateFlagBitsEXT.

public static final int
VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT

Extends VkShaderCreateFlagBitsEXT.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdBindShadersEXT(VkCommandBuffer commandBuffer, int
the length of the pStages and pShaders arrays.
stageCount
,
long pStages, long pShaders)

Unsafe version of: CmdBindShadersEXT

public static void
nvkCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, int firstBinding, int
the number of vertex input bindings whose state is updated by the command.
bindingCount
,
long pBuffers, long pOffsets, long pSizes, long pStrides)

Unsafe version of: CmdBindVertexBuffers2EXT

public static void
nvkCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, int firstAttachment, int
the number of VkColorBlendAdvancedEXT elements in the pColorBlendAdvanced array.
attachmentCount
,
long pColorBlendAdvanced)

Unsafe version of: CmdSetColorBlendAdvancedEXT

public static void
nvkCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, int firstAttachment, int
the number of color blending enables in the pColorBlendEnables array.
attachmentCount
,
long pColorBlendEnables)

Unsafe version of: CmdSetColorBlendEnableEXT

public static void
nvkCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, int firstAttachment, int
the number of VkColorBlendEquationEXT elements in the pColorBlendEquations array.
attachmentCount
,
long pColorBlendEquations)

Unsafe version of: CmdSetColorBlendEquationEXT

public static void
nvkCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, int firstAttachment, int
the number of VkColorComponentFlags values in the pColorWriteMasks array.
attachmentCount
,
long pColorWriteMasks)

Unsafe version of: CmdSetColorWriteMaskEXT

public static void
nvkCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, int
specifies the number of elements in pCoverageModulationTable.
coverageModulationTableCount
,
long pCoverageModulationTable)

Unsafe version of: CmdSetCoverageModulationTableNV

public static void
nvkCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, int samples, long pSampleMask)

Unsafe version of: CmdSetSampleMaskEXT

public static void
nvkCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, int
specifies the scissor count.
scissorCount
,
long pScissors)

Unsafe version of: CmdSetScissorWithCountEXT

public static void
nvkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, int
the number of vertex binding descriptions provided in pVertexBindingDescriptions.
vertexBindingDescriptionCount
,
long pVertexBindingDescriptions, int
the number of vertex attribute descriptions provided in pVertexAttributeDescriptions.
vertexAttributeDescriptionCount
,
long pVertexAttributeDescriptions)

Unsafe version of: CmdSetVertexInputEXT

public static void
nvkCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, int firstViewport, int
the number of viewports whose parameters are updated by the command.
viewportCount
,
long pViewportSwizzles)

Unsafe version of: CmdSetViewportSwizzleNV

public static void
nvkCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, int
specifies the viewport count.
viewportCount
,
long pViewports)

Unsafe version of: CmdSetViewportWithCountEXT

public static int
nvkCreateShadersEXT(VkDevice device, int
the length of the pCreateInfos and pShaders arrays.
createInfoCount
,
long pCreateInfos, long pAllocator, long pShaders)

Unsafe version of: CreateShadersEXT

public static void
nvkDestroyShaderEXT(VkDevice device, long shader, long pAllocator)

Unsafe version of: DestroyShaderEXT

public static int
nvkGetShaderBinaryDataEXT(VkDevice device, long shader, long
a pointer to a size_t value related to the size of the binary shader code, as described below.
pDataSize
,
long pData)

Unsafe version of: GetShaderBinaryDataEXT

public static void
vkCmdBindShadersEXT(VkCommandBuffer
the command buffer that the shader object will be bound to.
commandBuffer
,
IntBuffer
a pointer to an array of VkShaderStageFlagBits values specifying one stage per array index that is affected by the corresponding value in the pShaders array.
pStages
,
LongBuffer
a pointer to an array of VkShaderEXT handles and/or NULL_HANDLE values describing the shader binding operations to be performed on each stage in pStages.
pShaders
)

Bind shader objects to a command buffer.

public static void
vkCmdBindShadersEXT(VkCommandBuffer commandBuffer, int[] pStages, long[] pShaders)

Array version of: CmdBindShadersEXT

public static void
vkCmdBindVertexBuffers2EXT(VkCommandBuffer
the command buffer into which the command is recorded.
commandBuffer
,
int
the index of the first vertex input binding whose state is updated by the command.
firstBinding
,
LongBuffer
a pointer to an array of buffer handles.
pBuffers
,
LongBuffer
a pointer to an array of buffer offsets.
pOffsets
,
LongBuffer
NULL or a pointer to an array of the size in bytes of vertex data bound from pBuffers.
pSizes
,
LongBuffer
NULL or a pointer to an array of buffer strides.
pStrides
)

See CmdBindVertexBuffers2.

public static void
vkCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, long[] pSizes, long[] pStrides)

Array version of: CmdBindVertexBuffers2EXT

public static void
vkCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the alphaToCoverageEnable state.
alphaToCoverageEnable
)

Specify the alpha to coverage enable state dynamically for a command buffer.

public static void
vkCmdSetAlphaToOneEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the alphaToOneEnable state.
alphaToOneEnable
)

Specify the alpha to one enable state dynamically for a command buffer.

public static void
vkCmdSetColorBlendAdvancedEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the first color attachment the advanced blend parameters apply to.
firstAttachment
,
VkColorBlendAdvancedEXT.Buffer
an array of VkColorBlendAdvancedEXT structs that specify the advanced color blend parameters for the corresponding attachments.
pColorBlendAdvanced
)

Specify the advanced color blend state dynamically for a command buffer.

public static void
vkCmdSetColorBlendEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the first color attachment the color blending enable applies.
firstAttachment
,
IntBuffer
an array of booleans to indicate whether color blending is enabled for the corresponding attachment.
pColorBlendEnables
)

Specify the blendEnable for each attachment dynamically for a command buffer.

public static void
vkCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorBlendEnables)

Array version of: CmdSetColorBlendEnableEXT

public static void
vkCmdSetColorBlendEquationEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the first color attachment the color blend factors and operations apply to.
firstAttachment
,
VkColorBlendEquationEXT.Buffer
an array of VkColorBlendEquationEXT structs that specify the color blend factors and operations for the corresponding attachments.
pColorBlendEquations
)

Specify the blend factors and operations dynamically for a command buffer.

public static void
vkCmdSetColorWriteMaskEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the first color attachment the color write masks apply to.
firstAttachment
,
IntBuffer
an array of VkColorComponentFlags values that specify the color write masks of the corresponding attachments.
pColorWriteMasks
)

Specify the color write masks for each attachment dynamically for a command buffer.

public static void
vkCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, int firstAttachment, int[] pColorWriteMasks)

Array version of: CmdSetColorWriteMaskEXT

public static void
vkCmdSetConservativeRasterizationModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the conservativeRasterizationMode state.
conservativeRasterizationMode
)

Specify the conservative rasterization mode dynamically for a command buffer.

public static void
vkCmdSetCoverageModulationModeNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the coverageModulationMode state.
coverageModulationMode
)

Specify the coverage modulation mode dynamically for a command buffer.

public static void
vkCmdSetCoverageModulationTableEnableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the coverageModulationTableEnable state.
coverageModulationTableEnable
)

Specify the coverage modulation table enable state dynamically for a command buffer.

public static void
vkCmdSetCoverageModulationTableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
FloatBuffer
specifies the table of modulation factors containing a value for each number of covered samples.
pCoverageModulationTable
)

Specify the coverage modulation table dynamically for a command buffer.

public static void
vkCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, float[] pCoverageModulationTable)

Array version of: CmdSetCoverageModulationTableNV

public static void
vkCmdSetCoverageReductionModeNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the coverageReductionMode state.
coverageReductionMode
)

Specify the coverage reduction mode dynamically for a command buffer.

public static void
vkCmdSetCoverageToColorEnableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the coverageToColorEnable state.
coverageToColorEnable
)

Specify the coverage to color enable state dynamically for a command buffer.

public static void
vkCmdSetCoverageToColorLocationNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the coverageToColorLocation state.
coverageToColorLocation
)

Specify the coverage to color location dynamically for a command buffer.

public static void
vkCmdSetCullModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the cull mode property to use for drawing.
cullMode
)

See CmdSetCullMode.

public static void
vkCmdSetDepthBiasEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
controls whether to bias fragment depth values.
depthBiasEnable
)

See CmdSetDepthBiasEnable.

public static void
vkCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies if the depth bounds test is enabled.
depthBoundsTestEnable
)

See CmdSetDepthBoundsTestEnable.

public static void
vkCmdSetDepthClampEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies whether depth clamping is enabled.
depthClampEnable
)

Specify dynamically whether depth clamping is enabled in the command buffer.

public static void
vkCmdSetDepthClipEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies whether depth clipping is enabled.
depthClipEnable
)

Specify dynamically whether depth clipping is enabled in the command buffer.

public static void
vkCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the negativeOneToOne state.
negativeOneToOne
)

Specify the negative one to one depth clip mode dynamically for a command buffer.

public static void
vkCmdSetDepthCompareOpEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
a VkCompareOp value specifying the comparison operator used for the Depth Comparison step of the depth test.
depthCompareOp
)

See CmdSetDepthCompareOp.

public static void
vkCmdSetDepthTestEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies if the depth test is enabled.
depthTestEnable
)

See CmdSetDepthTestEnable.

public static void
vkCmdSetDepthWriteEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies if depth writes are enabled.
depthWriteEnable
)

See CmdSetDepthWriteEnable.

public static void
vkCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
float
specifies the extraPrimitiveOverestimationSize.
extraPrimitiveOverestimationSize
)

Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer.

public static void
vkCmdSetFrontFaceEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
a VkFrontFace value specifying the front-facing triangle orientation to be used for culling.
frontFace
)

See CmdSetFrontFace.

public static void
vkCmdSetLineRasterizationModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the lineRasterizationMode state.
lineRasterizationMode
)

Specify the line rasterization mode dynamically for a command buffer.

public static void
vkCmdSetLineStippleEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the stippledLineEnable state.
stippledLineEnable
)

Specify the line stipple enable dynamically for a command buffer.

public static void
vkCmdSetLogicOpEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies whether logical operations are enabled.
logicOpEnable
)

Specify dynamically whether logical operations are enabled for a command buffer.

public static void
vkCmdSetLogicOpEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the logical operation to apply for blend state.
logicOp
)

Select which logical operation to apply for blend state dynamically for a command buffer.

public static void
vkCmdSetPatchControlPointsEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the number of control points per patch.
patchControlPoints
)

Specify the number of control points per patch dynamically for a command buffer.

public static void
vkCmdSetPolygonModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies polygon mode.
polygonMode
)

Specify polygon mode dynamically for a command buffer.

public static void
vkCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
controls whether a special vertex index value is treated as restarting the assembly of primitives. It behaves in the same way as VkPipelineInputAssemblyStateCreateInfo::primitiveRestartEnable
primitiveRestartEnable
)

See CmdSetPrimitiveRestartEnable.

public static void
vkCmdSetPrimitiveTopologyEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the primitive topology to use for drawing.
primitiveTopology
)

See CmdSetPrimitiveTopology.

public static void
vkCmdSetProvokingVertexModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the provokingVertexMode state.
provokingVertexMode
)

Specify the provoking vertex mode dynamically for a command buffer.

public static void
vkCmdSetRasterizationSamplesEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies rasterizationSamples.
rasterizationSamples
)

Specify the rasterization samples dynamically for a command buffer.

public static void
vkCmdSetRasterizationStreamEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the rasterizationStream state.
rasterizationStream
)

Specify the rasterization stream dynamically for a command buffer.

public static void
vkCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
controls whether primitives are discarded immediately before the rasterization stage.
rasterizerDiscardEnable
)

See CmdSetRasterizerDiscardEnable.

public static void
vkCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the representativeFragmentTestEnable state.
representativeFragmentTestEnable
)

Specify the representative fragment test enable dynamically for a command buffer.

public static void
vkCmdSetSampleLocationsEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the sampleLocationsEnable state.
sampleLocationsEnable
)

Specify the samples locations enable state dynamically for a command buffer.

public static void
vkCmdSetSampleMaskEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the number of sample bits in the pSampleMask.
samples
,
IntBuffer
a pointer to an array of VkSampleMask values, where the array size is based on the samples parameter.
pSampleMask
)

Specify the sample mask dynamically for a command buffer.

public static void
vkCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, int samples, int[] pSampleMask)

Array version of: CmdSetSampleMaskEXT

public static void
vkCmdSetScissorWithCountEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
VkRect2D.Buffer
specifies the scissors to use for drawing.
pScissors
)

See CmdSetScissorWithCount.

public static void
vkCmdSetShadingRateImageEnableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the shadingRateImageEnable state.
shadingRateImageEnable
)

Specify the shading rate image enable state dynamically for a command buffer.

public static void
vkCmdSetStencilOpEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
a bitmask of VkStencilFaceFlagBits specifying the set of stencil state for which to update the stencil operation.
faceMask
,
int
a VkStencilOp value specifying the action performed on samples that fail the stencil test.
failOp
,
int
a VkStencilOp value specifying the action performed on samples that pass both the depth and stencil tests.
passOp
,
int
a VkStencilOp value specifying the action performed on samples that pass the stencil test and fail the depth test.
depthFailOp
,
int
a VkCompareOp value specifying the comparison operator used in the stencil test.
compareOp
)

See CmdSetStencilOp.

public static void
vkCmdSetStencilTestEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies if the stencil test is enabled.
stencilTestEnable
)

See CmdSetStencilTestEnable.

public static void
vkCmdSetTessellationDomainOriginEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the origin of the tessellation domain space.
domainOrigin
)

Specify the origin of the tessellation domain space dynamically for a command buffer.

public static void
vkCmdSetVertexInputEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
VkVertexInputBindingDescription2EXT.Buffer
a pointer to an array of VkVertexInputBindingDescription2EXT structures.
pVertexBindingDescriptions
,
VkVertexInputAttributeDescription2EXT.Buffer
a pointer to an array of VkVertexInputAttributeDescription2EXT structures.
pVertexAttributeDescriptions
)

Set the vertex input state dynamically for a command buffer.

public static void
vkCmdSetViewportSwizzleNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the index of the first viewport whose parameters are updated by the command.
firstViewport
,
VkViewportSwizzleNV.Buffer
a pointer to an array of VkViewportSwizzleNV structures specifying viewport swizzles.
pViewportSwizzles
)

Specify the viewport swizzle state dynamically for a command buffer.

public static void
vkCmdSetViewportWithCountEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
VkViewport.Buffer
specifies the viewports to use for drawing.
pViewports
)

See CmdSetViewportWithCount.

public static void
vkCmdSetViewportWScalingEnableNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
boolean
specifies the viewportWScalingEnable state.
viewportWScalingEnable
)

Specify the viewport W scaling enable state dynamically for a command buffer.

public static int
vkCreateShadersEXT(VkDevice
the logical device that creates the shader objects.
device
,
VkShaderCreateInfoEXT.Buffer
a pointer to an array of VkShaderCreateInfoEXT structures.
pCreateInfos
,
VkAllocationCallbacks
controls host memory allocation as described in the Memory Allocation chapter.
pAllocator
,
LongBuffer
a pointer to an array of VkShaderEXT handles in which the resulting shader objects are returned.
pShaders
)

Create one or more new shaders.

public static int
vkCreateShadersEXT(VkDevice device, VkShaderCreateInfoEXT.Buffer pCreateInfos, VkAllocationCallbacks pAllocator, long[] pShaders)

Array version of: CreateShadersEXT

public static void
vkDestroyShaderEXT(VkDevice
the logical device that destroys the shader object.
device
,
long
the handle of the shader object to destroy.
shader
,
VkAllocationCallbacks
controls host memory allocation as described in the Memory Allocation chapter.
pAllocator
)

Destroy a shader object.

public static int
vkGetShaderBinaryDataEXT(VkDevice
the logical device that shader object was created from.
device
,
long
the shader object to retrieve binary shader code from.
shader
,
PointerBuffer
a pointer to a size_t value related to the size of the binary shader code, as described below.
pDataSize
,
ByteBuffer
either NULL or a pointer to a buffer.
pData
)

Get the binary shader code from a shader object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait