API Reference: Vulkan Pipeline State¶
This is the API reference for the functions, classes, and enums in the renderdoc module which represents the underlying interface that the UI is built on top of. For more high-level information and instructions on using the python API, see Python API.
Sections
- class renderdoc.VKState¶
The full current Vulkan pipeline state.
- colorBlend¶
The color blending configuration.
- Type
- compute¶
The currently bound compute pipeline, if any.
- Type
- conditionalRendering¶
The current conditional rendering state.
- currentPass¶
The current renderpass, subpass and framebuffer.
- Type
- depthStencil¶
The depth-stencil state.
- Type
- graphics¶
The currently bound graphics pipeline, if any.
- Type
- images¶
The resource states for the currently live resources.
- Type
List[VKImageData]
- inputAssembly¶
The input assembly stage.
- Type
- multisample¶
The multisampling configuration.
- Type
- pushconsts¶
The raw push constant data.
- Type
bytes
- rasterizer¶
The rasterization configuration.
- Type
- shaderMessages¶
The shader messages retrieved for this action.
- Type
List[ShaderMessage]
- tessellation¶
The tessellation stage.
- Type
- transformFeedback¶
The transform feedback stage.
- Type
- vertexInput¶
The vertex input stage.
- Type
- viewportScissor¶
The viewport setup.
- Type
Pipeline and Bindings¶
- class renderdoc.VKPipeline¶
Describes the object and descriptor set bindings of a Vulkan pipeline object.
- descriptorBuffers¶
The bound descriptor buffers.
- Type
List[VKDescriptorBuffer]
- descriptorSets¶
The bound descriptor sets.
- Type
List[VKDescriptorSet]
- flags¶
The flags used to create the pipeline object.
- Type
int
- pipelineComputeLayoutResourceId¶
The
ResourceIdof the compute pipeline layout object.- Type
- pipelineFragmentLayoutResourceId¶
The
ResourceIdof the fragment pipeline layout object.When not using pipeline libraries, this will be identical to
pipelinePreRastLayoutResourceId.- Type
- pipelinePreRastLayoutResourceId¶
The
ResourceIdof the pre-rasterization pipeline layout object.When not using pipeline libraries, this will be identical to
pipelineFragmentLayoutResourceId.- Type
- pipelineResourceId¶
The
ResourceIdof the pipeline object.- Type
- class renderdoc.VKDescriptorSet¶
The contents of a descriptor set.
- descriptorBufferByteOffset¶
The byte offset from the start of the descriptor buffer at index
descriptorBufferIndexwhere this set’s data is.- Type
int
- descriptorBufferEmbeddedSamplers¶
Indicates if this is a virtual descriptor set for binding embedded immutable samplers.
- Type
bool
- descriptorBufferIndex¶
The index of the descriptor buffer to be used, or
-1if no descriptor buffer is used.- Type
int
- descriptorSetResourceId¶
The
ResourceIdof the descriptor set object, if a real descriptor set is bound.Note
If using descriptor buffers this value may be unset, see
descriptorBufferIndex.- Type
- dynamicOffsets¶
A list of dynamic offsets to be applied to specific bindings, on top of the contents of their descriptors.
Note
The returned values from
PipeState.GetConstantBuffer()already have these offsets applied.- Type
List[VKDynamicOffset]
- layoutResourceId¶
The
ResourceIdof the descriptor set layout that matches this set.- Type
- pushDescriptor¶
Indicates if this is a virtual ‘push’ descriptor set.
- Type
bool
- class renderdoc.VKDescriptorBuffer¶
A single descriptor buffer binding.
- buffer¶
The
ResourceIdof the buffer object being bound.- Type
- offset¶
The offset in bytes from the base of the buffer object to the start of the bound region.
- Type
int
- pushBuffer¶
For push descriptors where a buffer is required, the
ResourceIdof the push buffer object.- Type
- pushDescriptor¶
Indicates if this is the ‘push’ descriptor buffer.
- Type
bool
- resourceBuffer¶
Indicates if this buffer can contain resources (buffers and images).
- Type
bool
- samplerBuffer¶
Indicates if this buffer can contain samplers.
- Type
bool
Vertex Input¶
- class renderdoc.VKInputAssembly¶
Describes the vulkan input assembly configuration.
- indexBuffer¶
The index buffer binding.
- Type
- primitiveRestartEnable¶
Trueif primitive restart is enabled for strip primitives.- Type
bool
- 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.
- Type
int
- byteSize¶
The byte size from the start offset to the end of the index data.
- Type
int
- 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.
- Type
int
- resourceId¶
The
ResourceIdof the index buffer.- Type
- 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.
- Type
int
- byteOffset¶
The byte offset from the start of each vertex data in the
bindingto this attribute.- Type
int
- format¶
The format describing how the input element is interpreted.
- Type
- location¶
The location in the shader that is bound to this attribute.
- Type
int
- class renderdoc.VKVertexBinding¶
Describes a vertex binding.
- instanceDivisor¶
The instance rate divisor.
If this is
0then every vertex gets the same value.If it’s
1then one element is read for each instance, and forNgreater than1thenNinstances read the same element before advancing.- Type
int
- perInstance¶
Trueif the vertex data is instance-rate.- Type
bool
- vertexBufferBinding¶
The vertex binding where data will be sourced from.
- Type
int
- 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.
- Type
int
- byteSize¶
The size of the vertex buffer.
- Type
int
- byteStride¶
The byte stride between the start of one set of vertex data and the next.
- Type
int
- resourceId¶
The
ResourceIdof the buffer bound to this slot.- Type
Shader¶
- class renderdoc.VKShader¶
Describes a Vulkan shader stage.
- entryPoint¶
The name of the entry point in the shader module that is used.
- Type
str
- pushConstantRangeByteOffset¶
The byte offset into the push constant data that is visible to this shader.
- Type
int
- pushConstantRangeByteSize¶
The number of bytes in the push constant data that is visible to this shader.
- Type
int
- reflection¶
The reflection data for this shader.
- Type
- requiredSubgroupSize¶
The required subgroup size specified for this shader at pipeline creation time.
- Type
int
- resourceId¶
The
ResourceIdof the shader module object.- Type
- shaderObject¶
Whether the shader is a shader object or shader module.
- Type
bool
- 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
ShaderStageidentifying which stage this shader is bound to.- Type
Tessellation¶
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.
- Type
bool
- bufferResourceId¶
The
ResourceIdof the bound data buffer.- Type
- byteOffset¶
The offset in bytes to the start of the data in the
bufferResourceId.- Type
int
- byteSize¶
The size in bytes of the data buffer.
- Type
int
- counterBufferOffset¶
The offset in bytes to the counter in the
counterBufferResourceId.- Type
int
- counterBufferResourceId¶
The
ResourceIdof the buffer storing the counter value (if set).- Type
Rasterizer¶
- class renderdoc.VKViewportScissor¶
Describes a combined viewport and scissor region.
- 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.
- Type
bool
- discardRectangles¶
The discard rectangles, if enabled.
- Type
List[VKRenderArea]
- discardRectanglesExclusive¶
Trueif a fragment in any one of the discard rectangles fails the discard test, and a fragment in none of them passes.Falseif a fragment in any one of the discard rectangles passes the discard test, and a fragment in none of them is discarded.Note
A
Truevalue and an empty list ofdiscardRectanglesmeans the test is effectively disabled, since with no rectangles no fragment can be inside one.- Type
bool
- 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.
- Type
- depthBias¶
The fixed depth bias value to apply to z-values.
- Type
float
- depthBiasClamp¶
The clamp value for calculated depth bias from
depthBiasandslopeScaledDepthBias- Type
float
- depthBiasEnable¶
Whether depth biasing is enabled.
- Type
bool
- depthClampEnable¶
Trueif pixels outside of the near and far depth planes should be clamped and to0.0to1.0.- Type
bool
- depthClipEnable¶
Trueif 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.- Type
bool
- extraPrimitiveOverestimationSize¶
The extra size in pixels to increase primitives by during conservative rasterization, in the x and y directions in screen space.
See
conservativeRasterizationMode- Type
float
- frontCCW¶
Trueif counter-clockwise polygons are front-facing.Falseif clockwise polygons are front-facing.- Type
bool
- lineRasterMode¶
The line rasterization mode.
- Type
- lineStippleFactor¶
The line stipple factor, or 0 if line stipple is disabled.
- Type
int
- lineStipplePattern¶
The line stipple bit-pattern.
- Type
int
- lineWidth¶
The fixed line width in pixels.
- Type
float
- 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).
- Type
bool
- rasterizerDiscardEnable¶
Trueif primitives should be discarded during rasterization.- Type
bool
- 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
pipelineShadingRateand 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
- slopeScaledDepthBias¶
The slope-scaled depth bias value to apply to z-values.
- Type
float
Multisampling¶
- class renderdoc.VKMultiSample¶
Describes the multisampling state in the pipeline.
- minSampleShading¶
The minimum sample shading rate.
- Type
float
- rasterSamples¶
How many samples to use when rasterizing.
- Type
int
- sampleLocations¶
The custom sample locations configuration.
- Type
- sampleMask¶
A mask that generated samples should be masked with using bitwise
AND.- Type
int
- sampleShadingEnable¶
Trueif rendering should happen at sample-rate frequency.- Type
bool
- 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.
- Type
int
- gridWidth¶
The width in pixels of the region configured.
- Type
int
Blending¶
- class renderdoc.VKColorBlendState¶
Describes the pipeline blending state.
- alphaToCoverageEnable¶
Trueif alpha-to-coverage should be used when blending to an MSAA target.- Type
bool
- alphaToOneEnable¶
Trueif alpha-to-one should be used when blending to an MSAA target.- Type
bool
- 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
- depthBoundsEnable¶
Trueif depth bounds tests should be applied.- Type
bool
- depthFunction¶
The
CompareFunctionto use for testing depth values.- Type
- depthTestEnable¶
Trueif depth testing should be performed.- Type
bool
- depthWriteEnable¶
Trueif depth values should be written to the depth target.- Type
bool
- frontFace¶
The stencil state for front-facing polygons.
- Type
- maxDepthBounds¶
The far plane bounding value.
- Type
float
- minDepthBounds¶
The near plane bounding value.
- Type
float
- stencilTestEnable¶
Trueif stencil operations should be performed.- Type
bool
Renderpass and Framebuffer¶
- class renderdoc.VKCurrentPass¶
Describes the current pass instance at the current time.
- colorFeedbackAllowed¶
If feedback loops are allowed on color attachments
- Type
bool
- depthFeedbackAllowed¶
If feedback loops are allowed on depth attachments
- Type
bool
- framebuffer¶
The framebuffer that is currently being used.
- Type
- renderArea¶
The render area that is currently being rendered to.
- Type
- renderpass¶
The renderpass and subpass that is currently active.
- Type
- stencilFeedbackAllowed¶
If feedback loops are allowed on stencil attachments
- Type
bool
- class renderdoc.VKRenderPass¶
Describes the setup of a renderpass and subpasses.
- AttachmentUnused¶
Alias for VK_ATTACHMENT_UNUSED, for use by the UI to know when a value in colorAttachmentLocations or colorAttachmentInputIndices is mapped to VK_ATTACHMENT_UNUSED.
- colorAttachmentInputIndices¶
The color index->input index mapping set up by dynamic rendering local read.
- Type
List[int]
- colorAttachmentLocations¶
The color index->location mapping set up by dynamic rendering local read.
- Type
List[int]
- colorAttachments¶
The color attachments for the current subpass, as indices into the framebuffer attachments.
- Type
List[int]
- depthInputAttachmentIndex¶
Depth input attachment index if explicit (dynamic rendering).
- Type
int
- depthstencilAttachment¶
An index into the framebuffer attachments for the depth-stencil attachment.
If there is no depth-stencil attachment, this index is
-1.- Type
int
- 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.- Type
int
- dynamic¶
Whether or not dynamic rendering is in use (no render pass or framebuffer objects).
- Type
bool
- feedbackLoop¶
Whether or not there is a potential feedback loop.
- Type
bool
- 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
fragmentDensityAttachmentandshadingRateAttachmentwill be set.- Type
int
- 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]
- isDepthInputAttachmentIndexImplicit¶
Whether or not depth input attachment index is implicit (dynamic rendering).
- Type
bool
- isStencilInputAttachmentIndexImplicit¶
Whether or not stencil input attachment index is implicit (dynamic rendering).
- Type
bool
- 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
ResourceIdof the render pass.- Type
- 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
fragmentDensityAttachmentandshadingRateAttachmentwill be set.- Type
int
- 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
shadingRateAttachmentthis will be (1,1).- Type
Tuple[int,int]
- stencilInputAttachmentIndex¶
Stencil input attachment index if explicit (dynamic rendering).
- Type
int
- subpass¶
The index of the current active subpass.
- Type
int
- suspended¶
Whether or not dynamic rendering is currently suspended.
- Type
bool
- 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.
- Type
int
- class renderdoc.VKFramebuffer¶
Describes a framebuffer object and its attachments.
- attachments¶
The attachments of this framebuffer.
- Type
List[Descriptor]
- height¶
The height of this framebuffer in pixels.
- Type
int
- layers¶
The number of layers in this framebuffer.
- Type
int
- resourceId¶
The
ResourceIdof the framebuffer object.- Type
- width¶
The width of this framebuffer in pixels.
- Type
int
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
ResourceIdof the image.- Type
- 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.
- Type
int
- baseMip¶
The first mip level used in the range.
- Type
int
- name¶
The name of the current image state.
- Type
str
- numLayer¶
For 3D textures and texture arrays, the number of array slices in the range.
- Type
int
- numMip¶
The number of mip levels in the range.
- Type
int
Conditional Rendering¶
- class renderdoc.VKConditionalRendering¶
Contains the current conditional rendering state.
- bufferId¶
The
ResourceIdof the buffer containing the predicate for conditional rendering.- Type
- byteOffset¶
The byte offset into buffer where the predicate is located.
- Type
int
- isInverted¶
Trueif predicate result is inverted.- Type
bool
- isPassing¶
Trueif the current predicate would render.- Type
bool