Vulkan Pipeline State

class renderdoc.VKState

The full current Vulkan pipeline state.

colorBlend

The color blending configuration.

Type

VKColorBlendState

compute

The currently bound compute pipeline, if any.

Type

VKPipeline

computeShader

The compute shader stage.

Type

VKShader

conditionalRendering

The current conditional rendering state.

Type

VKConditionalRendering

currentPass

The current renderpass, subpass and framebuffer.

Type

VKCurrentPass

depthStencil

The depth-stencil state.

Type

VKDepthStencil

fragmentShader

The fragment shader stage.

Type

VKShader

geometryShader

The geometry shader stage.

Type

VKShader

graphics

The currently bound graphics pipeline, if any.

Type

VKPipeline

images

The resource states for the currently live resources.

Type

List[VKImageData]

inputAssembly

The input assembly stage.

Type

VKInputAssembly

meshShader

The mesh shader stage.

Type

VKShader

multisample

The multisampling configuration.

Type

VKMultiSample

pushconsts

The raw push constant data.

Type

bytes

rasterizer

The rasterization configuration.

Type

VKRasterizer

shaderMessages

The shader messages retrieved for this action.

Type

List[ShaderMessage]

taskShader

The task shader stage.

Type

VKShader

tessControlShader

The tessellation control shader stage.

Type

VKShader

tessEvalShader

The tessellation evaluation shader stage.

Type

VKShader

tessellation

The tessellation stage.

Type

VKTessellation

transformFeedback

The transform feedback stage.

Type

VKTransformFeedback

vertexInput

The vertex input stage.

Type

VKVertexInput

vertexShader

The vertex shader stage.

Type

VKShader

viewportScissor

The viewport setup.

Type

VKViewState

Pipeline and Bindings

class renderdoc.VKPipeline

Describes the object and descriptor set bindings of a Vulkan pipeline object.

descriptorSets

The bound descriptor sets.

Type

List[VKDescriptorSet]

flags

The flags used to create the pipeline object.

pipelineComputeLayoutResourceId

The ResourceId of the compute pipeline layout object.

pipelineFragmentLayoutResourceId

The ResourceId of the fragment pipeline layout object.

When not using pipeline libraries, this will be identical to pipelinePreRastLayoutResourceId.

pipelinePreRastLayoutResourceId

The ResourceId of the pre-rasterization pipeline layout object.

When not using pipeline libraries, this will be identical to pipelineFragmentLayoutResourceId.

pipelineResourceId

The ResourceId of the pipeline object.

class renderdoc.VKDescriptorSet

The contents of a descriptor set.

bindings

The bindings within this set. This list is indexed by the binding, so it may be sparse (some entries do not contain any elements).

Type

List[VKDescriptorBinding]

descriptorSetResourceId

The ResourceId of the descriptor set object.

inlineData

The inline byte data within this descriptor set. Individual bindings will have an offset and size into this buffer.

Type

bytes

layoutResourceId

The ResourceId of the descriptor set layout that matches this set.

pushDescriptor

Indicates if this is a virtual ‘push’ descriptor set.

class renderdoc.VKDescriptorBinding

The contents of a single binding within a descriptor set, either arrayed or not.

binds

The binding elements. If descriptorCount is 1 then this list has only one element and the binding is not arrayed.

Type

List[VKBindingElement]

descriptorCount

How many descriptors are in this binding array. If this binding is empty/non-existant this value will be 0.

dynamicallyUsedCount

Lists how many bindings in binds are dynamically used. Useful to avoid redundant iteration to determine whether any bindings are present.

For more information see VKBindingElement.dynamicallyUsed.

firstUsedIndex

Gives the index of the first binding in binds that is dynamically used. Useful to avoid redundant iteration in very large descriptor arrays with a small subset that are used.

For more information see VKBindingElement.dynamicallyUsed.

lastUsedIndex

Gives the index of the first binding in binds that is dynamically used. Useful to avoid redundant iteration in very large descriptor arrays with a small subset that are used.

Note

This may be set to a higher value than the number of bindings, if no dynamic use information is available. Ensure that this is an additional check on the bind and the count is still respected.

For more information see VKBindingElement.dynamicallyUsed.

stageFlags

The ShaderStageMask where this binding is visible.

class renderdoc.VKBindingElement

The contents of a single binding element within a descriptor set, possibly in an array.

UseBorder()

For samplers - check if the border color is used in this Vulkan sampler.

Returns

True if the border color is used, False otherwise.

Return type

bool

addressU

For samplers - the AddressMode in the U direction.

addressV

For samplers - the AddressMode in the V direction.

addressW

For samplers - the AddressMode in the W direction.

borderColorType

For samplers - the RGBA border color type. This determines how the data in borderColorValue will be interpreted.

Type

CompType

borderColorValue

For samplers - the RGBA border color value. Typically the float tuple inside will be used, but the exact component type can be checked with borderColorType.

Type

PixelValue

byteOffset

For buffers - the byte offset where the buffer view starts in the underlying buffer.

For inline block uniforms (see inlineBlock) this is the byte offset into the descriptor set’s inline block data.

byteSize

For buffers - how many bytes are in this buffer view.

chromaFilter

For ycbcr samplers - the FilterMode describing the chroma filtering mode.

compareFunction

For samplers - the CompareFunction for comparison samplers.

dynamicallyUsed

True if this binding element is dynamically used.

If set to False this means that the binding was available to the shader but during execution it was not referenced. The data gathered for setting this variable is conservative, meaning that only accesses through arrays will have this calculated to reduce the required feedback bandwidth - single non-arrayed descriptors may have this value set to True even if the shader did not use them, since single descriptors may only be dynamically skipped by control flow.

filter

The filtering mode.

Type

TextureFilter

firstMip

For textures - the first mip level used in the view.

firstSlice

For 3D textures and texture arrays - the first slice used in the view.

forceExplicitReconstruction

For ycbcr samplers - True if explicit reconstruction is force enabled.

immutableSampler

True if this is an immutable sampler binding.

inlineBlock

True if this is an inline uniform block binding.

maxAnisotropy

For samplers - the maximum anisotropic filtering level to use.

maxLOD

For samplers - the maximum mip level that can be used.

minLOD

For samplers and image views - the minimum mip level that can be used.

mipBias

For samplers - a bias to apply to the calculated mip level before sampling.

numMips

For textures - the number of mip levels in the view.

numSlices

For 3D textures and texture arrays - the number of array slices in the view.

resourceResourceId

The ResourceId of the current underlying buffer or image object.

samplerResourceId

The ResourceId of the current sampler object.

samplerSwizzle

The swizzle applied to samplers. Primarily for ycbcr samplers applied before conversion but for non-ycbcr samplers can be used for implementations that require sampler swizzle information for border colors.

Type

TextureSwizzle4

seamless

True if this sampler is seamless across cubemap boundaries (the default).

srgbBorder

For samplers - True if the border colour is swizzled with an sRGB formatted image.

swizzle

The swizzle applied to a texture by the view.

Type

TextureSwizzle4

type

The BindType of this binding element.

unnormalized

For samplers - True if unnormalized co-ordinates are used in this sampler.

viewFormat

The format cast that the view uses.

Type

ResourceFormat

viewResourceId

The ResourceId of the current view object, if one is in use.

xChromaOffset

For ycbcr samplers - the ChromaSampleLocation X-axis chroma offset.

yChromaOffset

For ycbcr samplers - the ChromaSampleLocation Y-axis chroma offset.

ycbcrModel

For ycbcr samplers - the YcbcrConversion used for conversion.

ycbcrRange

For ycbcr samplers - the YcbcrRange used for conversion.

ycbcrSampler

For samplers - the ResourceId of the ycbcr conversion object associated with this sampler.

Vertex Input

class renderdoc.VKInputAssembly

Describes the vulkan input assembly configuration.

indexBuffer

The index buffer binding.

Type

VKIndexBuffer

primitiveRestartEnable

True if primitive restart is enabled for strip primitives.

topology

The current primitive topology.

Type

Topology

class renderdoc.VKIndexBuffer

Describes the Vulkan index buffer binding.

byteOffset

The byte offset from the start of the buffer to the beginning of the index data.

byteStride

The number of bytes for each index in the index buffer. Typically 2 or 4 bytes but it can be 0 if no index buffer is bound.

resourceId

The ResourceId of the index buffer.

class renderdoc.VKVertexInput

Describes the fixed-function vertex input fetch setup.

attributes

The vertex attributes.

Type

List[VKVertexAttribute]

bindings

The vertex bindings.

Type

List[VKVertexBinding]

vertexBuffers

The vertex buffers.

Type

List[VKVertexBuffer]

class renderdoc.VKVertexAttribute

Describes the configuration of a single vertex attribute.

binding

The vertex binding where data will be sourced from.

byteOffset

The byte offset from the start of each vertex data in the binding to this attribute.

format

The format describing how the input element is interpreted.

Type

ResourceFormat

location

The location in the shader that is bound to this attribute.

class renderdoc.VKVertexBinding

Describes a vertex binding.

instanceDivisor

The instance rate divisor.

If this is 0 then every vertex gets the same value.

If it’s 1 then one element is read for each instance, and for N greater than 1 then N instances read the same element before advancing.

perInstance

True if the vertex data is instance-rate.

vertexBufferBinding

The vertex binding where data will be sourced from.

class renderdoc.VKVertexBuffer

Describes a single Vulkan vertex buffer binding.

byteOffset

The byte offset from the start of the buffer to the beginning of the vertex data.

byteSize

The size of the vertex buffer.

byteStride

The byte stride between the start of one set of vertex data and the next.

resourceId

The ResourceId of the buffer bound to this slot.

Shader

class renderdoc.VKShader

Describes a Vulkan shader stage.

bindpointMapping

The bindpoint mapping data to match reflection.

Type

ShaderBindpointMapping

entryPoint

The name of the entry point in the shader module that is used.

pushConstantRangeByteOffset

The byte offset into the push constant data that is visible to this shader.

pushConstantRangeByteSize

The number of bytes in the push constant data that is visible to this shader.

reflection

The reflection data for this shader.

Type

ShaderReflection

requiredSubgroupSize

The required subgroup size specified for this shader at pipeline creation time.

resourceId

The ResourceId of the shader module object.

specializationData

The provided specialization constant data. Shader constants store the byte offset into this buffer as their byteOffset. This data includes the applied specialization constants over the top of the default values, so it is safe to read any constant from here and get the correct current value.

Type

bytes

specializationIds

The specialization constant ID for each entry in the specialization constant block of reflection info. This corresponds to the constantID in VkSpecializationMapEntry, while the offset and size into specializationData can be obtained from the reflection info.

Type

List[int]

stage

A ShaderStage identifying which stage this shader is bound to.

Tessellation

class renderdoc.VKTessellation

Describes the state of the fixed-function tessellator.

domainOriginUpperLeft

True if the tessellation domain origin is upper-left, False if lower-left.

numControlPoints

The number of control points in each input patch.

Transform Feedback

class renderdoc.VKTransformFeedback

Describes the state of the fixed-function transform feedback.

buffers

The bound transform feedback buffers.

Type

List[VKXFBBuffer]

rasterizedStream

Which stream-out stream is being used for rasterization.

Type

int

class renderdoc.VKXFBBuffer

Describes a single transform feedback binding.

active

A flag indicating if this buffer is active or not.

bufferResourceId

The ResourceId of the bound data buffer.

byteOffset

The offset in bytes to the start of the data in the bufferResourceId.

byteSize

The size in bytes of the data buffer.

counterBufferOffset

The offset in bytes to the counter in the counterBufferResourceId.

counterBufferResourceId

The ResourceId of the buffer storing the counter value (if set).

Rasterizer

class renderdoc.VKViewportScissor

Describes a combined viewport and scissor region.

scissor

The scissor.

Type

Scissor

vp

The viewport.

Type

Viewport

class renderdoc.VKViewState

Describes the view state in the pipeline.

depthNegativeOneToOne

Whether depth clip range is set to [-1, 1] through VK_EXT_depth_clip_control.

discardRectangles

The discard rectangles, if enabled.

Type

List[VKRenderArea]

discardRectanglesExclusive

True if a fragment in any one of the discard rectangles fails the discard test, and a fragment in none of them passes.

False if a fragment in any one of the discard rectangles passes the discard test, and a fragment in none of them is discarded.

Note

A True value and an empty list of discardRectangles means the test is effectively disabled, since with no rectangles no fragment can be inside one.

viewportScissors

The bound viewports and scissors.

Type

List[VKViewportScissor]

class renderdoc.VKRasterizer

Describes the rasterizer state in the pipeline.

conservativeRasterization

The active conservative rasterization mode.

cullMode

The polygon CullMode.

depthBias

The fixed depth bias value to apply to z-values.

depthBiasClamp

The clamp value for calculated depth bias from depthBias and slopeScaledDepthBias

depthBiasEnable

Whether depth biasing is enabled.

depthClampEnable

True if pixels outside of the near and far depth planes should be clamped and to 0.0 to 1.0.

depthClipEnable

True if pixels outside of the near and far depth planes should be clipped.

Note

In Vulkan 1.0 this value was implicitly set to the opposite of depthClampEnable, but with later extensions & versions it can be set independently.

extraPrimitiveOverestimationSize

The extra size in pixels to increase primitives by during conservative rasterization, in the x and y directions in screen space.

See conservativeRasterizationMode

fillMode

The polygon FillMode.

frontCCW

True if counter-clockwise polygons are front-facing. False if clockwise polygons are front-facing.

lineRasterMode

The line rasterization mode.

lineStippleFactor

The line stipple factor, or 0 if line stipple is disabled.

lineStipplePattern

The line stipple bit-pattern.

lineWidth

The fixed line width in pixels.

pipelineShadingRate

The current pipeline fragment shading rate. This will always be 1x1 when a fragment shading rate has not been specified.

Type

Tuple[int,int]

provokingVertexFirst

Whether the provoking vertex is the first one (default behaviour).

rasterizerDiscardEnable

True if primitives should be discarded during rasterization.

shadingRateCombiners

The fragment shading rate combiners.

The combiners are applied as follows, according to the Vulkan spec:

intermediateRate = combiner[0] ( pipelineShadingRate,  shaderExportedShadingRate ) finalRate        = combiner[1] ( intermediateRate,     imageBasedShadingRate     )

Where the first input is from pipelineShadingRate and the second is the exported shading rate from the last pre-rasterization shader stage, which defaults to 1x1 if not exported.

The intermediate result is then used as the first input to the second combiner, together with the shading rate sampled from the fragment shading rate attachment.

Type

Tuple[ShadingRateCombiner,ShadingRateCombiner]

slopeScaledDepthBias

The slope-scaled depth bias value to apply to z-values.

Multisampling

class renderdoc.VKMultiSample

Describes the multisampling state in the pipeline.

minSampleShading

The minimum sample shading rate.

rasterSamples

How many samples to use when rasterizing.

sampleLocations

The custom sample locations configuration.

Type

VKSampleLocations

sampleMask

A mask that generated samples should be masked with using bitwise AND.

sampleShadingEnable

True if rendering should happen at sample-rate frequency.

class renderdoc.VKSampleLocations

Describes state of custom sample locations in the pipeline.

customLocations

The custom sample locations. Only x and y are valid, z and w are set to 0.0.

If the list is empty then the standard sample pattern is in use.

Type

List[FloatVector]

gridHeight

The height in pixels of the region configured.

gridWidth

The width in pixels of the region configured.

Blending

class renderdoc.VKColorBlendState

Describes the pipeline blending state.

alphaToCoverageEnable

True if alpha-to-coverage should be used when blending to an MSAA target.

alphaToOneEnable

True if alpha-to-one should be used when blending to an MSAA target.

blendFactor

The constant blend factor to use in blend equations.

Type

Tuple[float,float,float,float]

blends

The blend operations for each target.

Type

List[ColorBlend]

Depth/Stencil State

class renderdoc.VKDepthStencil

Describes the pipeline depth-stencil state.

backFace

The stencil state for back-facing polygons.

Type

StencilFace

depthBoundsEnable

True if depth bounds tests should be applied.

depthFunction

The CompareFunction to use for testing depth values.

depthTestEnable

True if depth testing should be performed.

depthWriteEnable

True if depth values should be written to the depth target.

frontFace

The stencil state for front-facing polygons.

Type

StencilFace

maxDepthBounds

The far plane bounding value.

minDepthBounds

The near plane bounding value.

stencilTestEnable

True if stencil operations should be performed.

Renderpass and Framebuffer

class renderdoc.VKCurrentPass

Describes the current pass instance at the current time.

colorFeedbackAllowed

If feedback loops are allowed on color attachments

depthFeedbackAllowed

If feedback loops are allowed on depth attachments

framebuffer

The framebuffer that is currently being used.

Type

VKFramebuffer

renderArea

The render area that is currently being rendered to.

Type

VKRenderArea

renderpass

The renderpass and subpass that is currently active.

Type

VKRenderPass

stencilFeedbackAllowed

If feedback loops are allowed on stencil attachments

class renderdoc.VKRenderPass

Describes the setup of a renderpass and subpasses.

colorAttachments

The color attachments for the current subpass, as indices into the framebuffer attachments.

Type

List[int]

depthstencilAttachment

An index into the framebuffer attachments for the depth-stencil attachment.

If there is no depth-stencil attachment, this index is -1.

depthstencilResolveAttachment

An index into the framebuffer attachments for the depth-stencil resolve attachment.

If there is no depth-stencil resolve attachment, this index is -1.

dynamic

Whether or not dynamic rendering is in use (no render pass or framebuffer objects).

feedbackLoop

Whether or not there is a potential feedback loop.

fragmentDensityAttachment

An index into the framebuffer attachments for the fragment density attachment.

If there is no fragment density attachment, this index is -1.

Note

Only one at most of fragmentDensityAttachment and shadingRateAttachment will be set.

fragmentDensityOffsets

If VK_QCOM_fragment_density_map_offset is enabled, contains a list of offsets applied to the fragment density map during rendering.

If the list is empty, fdm_offset is disabled and rendering is as normal.

Type

List[Offset]

inputAttachments

The input attachments for the current subpass, as indices into the framebuffer attachments.

Type

List[int]

multiviews

If multiview is enabled, contains a list of view indices to be broadcast to during rendering.

If the list is empty, multiview is disabled and rendering is as normal.

Type

List[int]

resolveAttachments

The resolve attachments for the current subpass, as indices into the framebuffer attachments.

Type

List[int]

resourceId

The ResourceId of the render pass.

shadingRateAttachment

An index into the framebuffer attachments for the fragment shading rate attachment.

If there is no fragment shading rate attachment, this index is -1.

Note

Only one at most of fragmentDensityAttachment and shadingRateAttachment will be set.

shadingRateTexelSize

The size of the framebuffer region represented by each texel in shadingRateAttachment.

For example if this is (2,2) then every texel in the attachment gives the shading rate of a 2x2 block in the framebuffer so the shading rate attachment is half the size of the other attachments in each dimension.

If no attachment is set in shadingRateAttachment this will be (1,1).

Type

Tuple[int,int]

subpass

The index of the current active subpass.

suspended

Whether or not dynamic rendering is currently suspended.

tileOnlyMSAASampleCount

If VK_EXT_multisampled_render_to_single_sampled is enabled, contains the number of samples used to render this subpass.

If the subpass is not internally multisampled, tileOnlyMSAASampleCount is set to 0.

class renderdoc.VKFramebuffer

Describes a framebuffer object and its attachments.

attachments

The attachments of this framebuffer.

Type

List[VKAttachment]

height

The height of this framebuffer in pixels.

layers

The number of layers in this framebuffer.

resourceId

The ResourceId of the framebuffer object.

width

The width of this framebuffer in pixels.

class renderdoc.VKAttachment

Describes a single attachment in a framebuffer object.

firstMip

The first mip level used in the attachment.

firstSlice

For 3D textures and texture arrays, the first slice used in the attachment.

imageResourceId

The ResourceId of the underlying image that the view refers to.

numMips

The number of mip levels in the attachment.

numSlices

For 3D textures and texture arrays, the number of array slices in the attachment.

swizzle

The swizzle applied to the texture by the view.

Type

TextureSwizzle4

viewFormat

The format cast that the view uses.

Type

ResourceFormat

viewResourceId

The ResourceId of the image view itself.

class renderdoc.VKRenderArea

Describes a render area in the current framebuffer.

height

The height of the render area.

width

The width of the render area.

x

The X co-ordinate of the render area.

y

The Y co-ordinate of the render area.

Image States

class renderdoc.VKImageData

Contains the current layout of all subresources in the image.

layouts

The subresource regions in this resource.

Type

List[VKImageLayout]

resourceId

The ResourceId of the image.

class renderdoc.VKImageLayout

Contains the layout of a range of subresources in an image.

baseLayer

For 3D textures and texture arrays, the first slice used in the range.

baseMip

The first mip level used in the range.

name

The name of the current image state.

numLayer

For 3D textures and texture arrays, the number of array slices in the range.

numMip

The number of mip levels in the range.

Conditional Rendering

class renderdoc.VKConditionalRendering

Contains the current conditional rendering state.

bufferId

The ResourceId of the buffer containing the predicate for conditional rendering.

byteOffset

The byte offset into buffer where the predicate is located.

isInverted

True if predicate result is inverted.

isPassing

True if the current predicate would render.