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
-
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: - stage# (ShaderStage) – The shader stage to fetch from.
- BufIdx# (int) – The index in the shader’s ConstantBlocks array to look up.
- ArrayIdx# (int) – For APIs that support arrays of constant buffers in a single binding, the index in that array to look up.
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 BoundVBufferwith 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: listofBoundResource.
-
GetReadOnlyResources(stage)¶ Retrieves the read-only resources bound to a particular shader stage.
Parameters: stage# (ShaderStage) – The shader stage to fetch from. Returns: The currently bound read-only resoruces. Return type: listofBoundResourceArrayentries
-
GetReadWriteResources(stage)¶ Retrieves the read/write resources bound to a particular shader stage.
Parameters: stage# (ShaderStage) – The shader stage to fetch from. Returns: The currently bound read/write resoruces. Return type: listofBoundResourceArrayentries
-
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
-
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
-
GetShaderExtension()¶ Retrieves the common file extension for high level shaders in the current API.
Typically this is
glslorhlsl.Returns: The file extension with no ..Return type: str
-
GetShaderReflection(stage)¶ Retrieves the shader reflection information for a shader stage.
This returns
Noneif no shader is bound.Parameters: stage# (ShaderStage) – The shader stage to fetch. Returns: The reflection data for the given shader. Return type: ShaderBindpointMappingorNone
-
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: listofBoundVBuffer.
-
GetVertexInputs()¶ Retrieves the currently specified vertex attributes.
Returns: The list of current vertex attributes. Return type: listofVertexInputAttribute.
-
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
float4boundaries). 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
-
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¶
-
class
renderdoc.BlendEquation¶ Describes the details of a blend operation.
-
destination¶ The
BlendMultiplierfor the destination blend value.
-
operation¶ The
BlendOperationto use in the blend calculation.
-
source¶ The
BlendMultiplierfor the source blend value.
-
ColorBlend¶
-
class
renderdoc.ColorBlend¶ Describes the blend configuration for a given output target.
-
alphaBlend¶ A
BlendEquationdescribing the blending for alpha values.
-
colorBlend¶ A
BlendEquationdescribing the blending for color values.
-
enabled¶ Trueif blending is enabled for this target.
-
logicOperation¶ The
LogicOperationto use for logic operations, iflogicOperationEnabledisTrue.
-
logicOperationEnabled¶ Trueif the logic operation inlogicOperationshould 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
StencilOperationto apply if the depth-test fails.
-
failOperation¶ The
StencilOperationto apply if the stencil-test fails.
-
function¶ the
CompareFunctionto use for testing stencil values.
-
passOperation¶ the
StencilOperationto 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.
-
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
ResourceIdidentifying the bound resource.
-
BoundResourceArray¶
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.
-
byteStride¶ The stride in bytes between the start of one element and the start of the next.
-
resourceId¶ A
ResourceIdidentifying 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
ResourceIdidentifying 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
ResourceFormatwith the interpreted format of this attribute.
-
genericEnabled¶ Trueif this attribute is usinggenericValuefor its data.
-
genericValue¶ A
PixelValuewith the generic value for this attribute if it has no VB bound.
-
instanceRate¶ If
perInstanceisTrue, 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¶ Trueif this attribute runs at instance rate.
-
used¶ Trueif this attribute is enabled and used by the vertex shader.
-
vertexBuffer¶ The index of the vertex buffer used to provide this attribute.
-