Common Pipeline State Abstraction¶
-
class
renderdoc.
PipeState
¶ An API-agnostic view of the common aspects of the pipeline state. This allows simple access to e.g. find out the bound resources or vertex buffers, or certain pipeline state which is available on all APIs.
For more detailed or precise information without abstraction, access the specific pipeline state for the capture that’s open.
-
Abbrev
(stage)¶ Retrieves a suitable two or three letter abbreviation of the given shader stage.
Parameters: stage# (ShaderStage) – The shader stage to abbreviate. Returns: The abbreviation of the stage. Return type: str
-
GetBindpointMapping
(stage)¶ Retrieves the current bindpoint mapping for a shader stage.
This returns an empty bindpoint mapping if no shader is bound.
Parameters: stage# (ShaderStage) – The shader stage to fetch. Returns: The bindpoint mapping for the given shader. Return type: ShaderBindpointMapping
-
GetColorBlends
()¶ Retrieves the current color blending states, per target.
Returns: The currently color blend states. Return type: list
ofColorBlend
.
-
GetComputePipelineObject
()¶ Retrieves the the compute pipeline state object, if applicable.
Returns: The object ID for the given pipeline object. Return type: ResourceId
-
GetConstantBuffer
(stage, BufIdx, ArrayIdx)¶ Retrieves the constant buffer at a given binding.
Parameters: Returns: The constant buffer at the specified binding.
Return type:
-
GetDepthTarget
()¶ Retrieves the read/write resources bound to the depth-stencil output.
Returns: The currently bound depth-stencil resource. Return type: BoundResource
-
GetGraphicsPipelineObject
()¶ Retrieves the the graphics pipeline state object, if applicable.
Returns: The object ID for the given pipeline object. Return type: ResourceId
-
GetIBuffer
()¶ Retrieves the current index buffer binding.
Returns: A BoundVBuffer
with the index buffer details. The stride is always 0.Return type: BoundVBuffer
-
GetOutputTargets
()¶ Retrieves the resources bound to the color outputs.
Returns: The currently bound output targets. Return type: list
ofBoundResource
.
-
GetReadOnlyResources
(stage, onlyUsed=False)¶ GetReadOnlyResources(stage)
Retrieves the read-only resources bound to a particular shader stage.
Parameters: Returns: The currently bound read-only resources.
Return type: list
ofBoundResourceArray
entries
-
GetReadWriteResources
(stage, onlyUsed=False)¶ GetReadWriteResources(stage)
Retrieves the read/write resources bound to a particular shader stage.
Parameters: Returns: The currently bound read/write resources.
Return type: list
ofBoundResourceArray
entries
-
GetResourceLayout
(id)¶ For APIs that have explicit barriers, retrieves the current layout of a resource.
Returns: The name of the current resource layout. Return type: str
-
GetSamplers
(stage)¶ Retrieves the samplers bound to a particular shader stage.
Parameters: stage# (ShaderStage) – The shader stage to fetch from. Returns: The currently bound sampler resources. Return type: list
ofBoundResourceArray
entries
-
GetScissor
(index)¶ Retrieves the scissor region for a given index.
Parameters: index# (int) – The index to retrieve. Returns: The scissor region for the given index. Return type: Scissor
-
GetShader
(stage)¶ Retrieves the object ID of the shader bound at a shader stage.
Parameters: stage# (ShaderStage) – The shader stage to fetch. Returns: The object ID for the given shader. Return type: ResourceId
-
GetShaderEntryPoint
(stage)¶ Retrieves the name of the entry point function for a shader stage.
For some APIs that don’t distinguish by entry point, this may be empty.
Parameters: stage# (ShaderStage) – The shader stage to fetch. Returns: The entry point name for the given shader. Return type: str
-
GetShaderReflection
(stage)¶ Retrieves the shader reflection information for a shader stage.
This returns
None
if no shader is bound.Parameters: stage# (ShaderStage) – The shader stage to fetch. Returns: The reflection data for the given shader. Return type: ShaderReflection
orNone
-
GetStripRestartIndex
()¶ Retrieves the primitive restart index.
Parameters: indexByteWidth# (int) – The width in bytes of the indices. Returns: The index value that represents a strip restart not a real index. Return type: int
-
GetVBuffers
()¶ Retrieves the currently bound vertex buffers.
Returns: The list of bound vertex buffers. Return type: list
ofBoundVBuffer
.
-
GetVertexInputs
()¶ Retrieves the currently specified vertex attributes.
Returns: The list of current vertex attributes. Return type: list
ofVertexInputAttribute
.
-
GetViewport
(index)¶ Retrieves the viewport for a given index.
Parameters: index# (int) – The index to retrieve. Returns: The viewport for the given index. Return type: Viewport
-
HasAlignedPostVSData
(stage)¶ Determines whether or not the PostVS data is aligned in the typical fashion (ie. vectors not crossing
float4
boundaries). APIs that use stream-out or transform feedback have tightly packed data, but APIs that rewrite shaders to dump data might have these alignment requirements.Parameters: stage# (MeshDataStage) – The mesh data stage for the output data. Returns: A boolean indicating if post-VS data is aligned. Return type: bool
-
IsCaptureD3D11
()¶ Determines whether or not a D3D11 capture is currently loaded.
Returns: A boolean indicating if a D3D11 capture is currently loaded. Return type: bool
-
IsCaptureD3D12
()¶ Determines whether or not a D3D12 capture is currently loaded.
Returns: A boolean indicating if a D3D12 capture is currently loaded. Return type: bool
-
IsCaptureGL
()¶ Determines whether or not an OpenGL capture is currently loaded.
Returns: A boolean indicating if an OpenGL capture is currently loaded. Return type: bool
-
IsCaptureLoaded
()¶ Determines whether or not a capture is currently loaded.
Returns: A boolean indicating if a capture is currently loaded. Return type: bool
-
IsCaptureVK
()¶ Determines whether or not a Vulkan capture is currently loaded.
Returns: A boolean indicating if a Vulkan capture is currently loaded. Return type: bool
-
IsIndependentBlendingEnabled
()¶ Determines whether or not independent blending is enabled.
Returns: A boolean indicating if independent blending is enabled. Return type: bool
-
IsStripRestartEnabled
()¶ Determines whether or not primitive restart is enabled.
Returns: A boolean indicating if primitive restart is enabled. Return type: bool
-
IsTessellationEnabled
()¶ Determines whether or not tessellation is currently enabled.
Returns: A boolean indicating if tessellation is currently enabled. Return type: bool
-
MultiviewBroadcastCount
()¶ Returns the number of views being broadcast to simultaneously during rendering.
-
OutputAbbrev
()¶ Retrieves a suitable two or three letter abbreviation of the output stage. Typically ‘OM’ or ‘FBO’.
Returns: The abbreviation of the output stage. Return type: str
-
SupportsBarriers
()¶ Determines whether or not the current capture uses explicit barriers.
Returns: A boolean indicating if explicit barriers are used. Return type: bool
-
SupportsResourceArrays
()¶ Determines whether or not the current capture supports binding arrays of resources.
Returns: A boolean indicating if binding arrays of resources is supported. Return type: bool
-
Viewport¶
-
class
renderdoc.
Viewport
¶ Information about a viewport.
-
enabled
¶ Is this viewport enabled.
-
height
¶ The height of the viewport.
-
maxDepth
¶ The maximum depth of the viewport.
-
minDepth
¶ The minimum depth of the viewport.
-
width
¶ The width of the viewport.
-
x
¶ The X co-ordinate of the viewport.
-
y
¶ The Y co-ordinate of the viewport.
-
Scissor¶
BlendEquation¶
ColorBlend¶
-
class
renderdoc.
ColorBlend
¶ Describes the blend configuration for a given output target.
-
alphaBlend
¶ A
BlendEquation
describing the blending for alpha values.
-
colorBlend
¶ A
BlendEquation
describing the blending for color values.
-
enabled
¶ True
if blending is enabled for this target.
-
logicOperation
¶ The
LogicOperation
to use for logic operations, iflogicOperationEnabled
isTrue
.
-
logicOperationEnabled
¶ True
if the logic operation inlogicOperation
should be used.
-
writeMask
¶ The mask for writes to the render target.
-
StencilFace¶
-
class
renderdoc.
StencilFace
¶ Describes the details of a stencil operation.
-
compareMask
¶ The mask for testing stencil values.
-
depthFailOperation
¶ the
StencilOperation
to apply if the depth-test fails.
-
failOperation
¶ The
StencilOperation
to apply if the stencil-test fails.
-
function
¶ the
CompareFunction
to use for testing stencil values.
-
passOperation
¶ the
StencilOperation
to apply if the stencil-test passes.
-
reference
¶ The current stencil reference value.
-
writeMask
¶ The mask for writing stencil values.
-
BoundResource¶
-
class
renderdoc.
BoundResource
¶ Information about a single resource bound to a slot in an API-specific way.
-
dynamicallyUsed
¶ True
if this binding element is dynamically used.Some APIs provide fine-grained usage based on dynamic shader feedback, to support ‘bindless’ scenarios where only a small sparse subset of bound resources are actually used.
-
firstMip
¶ For textures, the highest mip level available on this binding, or -1 for all mips
-
firstSlice
¶ For textures, the first array slice available on this binding. or -1 for all slices.
-
resourceId
¶ A
ResourceId
identifying the bound resource.
-
typeCast
¶ For textures, a
CompType
hint for how to interpret typeless textures.
-
BoundResourceArray¶
-
class
renderdoc.
BoundResourceArray
¶ Contains all of the bound resources at a particular bindpoint. In APIs that don’t support resource arrays, there will only be one bound resource.
-
bindPoint
¶ The bind point for this array of bound resources.
-
dynamicallyUsedCount
¶ Lists how many bindings in
resources
are dynamically used.Some APIs provide fine-grained usage based on dynamic shader feedback, to support ‘bindless’ scenarios where only a small sparse subset of bound resources are actually used.
If this information isn’t present this will be set to a large number.
-
firstIndex
¶ Gives the array index of the first binding in
resource
. If only a small subset of the resources are used by the shader then the array may be rebased such that the first element is not array index 0.For more information see
VKBindingElement.dynamicallyUsed
.
-
resources
¶ The resources at this bind point
-
BoundVBuffer¶
-
class
renderdoc.
BoundVBuffer
¶ Information about a single vertex or index buffer binding.
-
byteOffset
¶ The offset in bytes from the start of the buffer to the data.
-
byteSize
¶ The size of the buffer binding, or 0xFFFFFFFF if the whole buffer is bound.
-
byteStride
¶ The stride in bytes between the start of one element and the start of the next.
-
resourceId
¶ A
ResourceId
identifying the buffer.
-
BoundCBuffer¶
-
class
renderdoc.
BoundCBuffer
¶ Information about a single constant buffer binding.
-
byteOffset
¶ The offset in bytes from the start of the buffer to the constant data.
-
byteSize
¶ The size in bytes for the constant buffer. Access outside this size returns 0.
-
resourceId
¶ A
ResourceId
identifying the buffer.
-
VertexInputAttribute¶
-
class
renderdoc.
VertexInputAttribute
¶ Information about a vertex input attribute feeding the vertex shader.
-
byteOffset
¶ The byte offset from the start of the vertex data for this VB to this attribute.
-
format
¶ A
ResourceFormat
with the interpreted format of this attribute.
-
genericEnabled
¶ True
if this attribute is usinggenericValue
for its data.
-
genericValue
¶ A
PixelValue
with the generic value for this attribute if it has no VB bound.
-
instanceRate
¶ If
perInstance
isTrue
, the number of instances that source the same value from the vertex buffer before advancing to the next value.
-
name
¶ The name of this input. This may be a variable name or a semantic name.
-
perInstance
¶ True
if this attribute runs at instance rate.
-
used
¶ True
if this attribute is enabled and used by the vertex shader.
-
vertexBuffer
¶ The index of the vertex buffer used to provide this attribute.
-