Enums and Data Structures¶
-
class
renderdoc.
GlobalEnvironment
¶ Internal structure used for initialising environment in a replay application.
-
xlibDisplay
¶ The handle to the X display to use internally. If left
NULL
, one will be opened.
-
-
class
renderdoc.
WindowingSystem
¶ An enumeration.
-
class
renderdoc.
ResourceId
¶ This is an opaque identifier that uniquely locates a resource.
Note
These IDs do not overlap ever - textures, buffers, shaders and samplers will all have unique IDs and do not reuse the namespace. Likewise the IDs assigned for resources during capture are not re-used on replay - the corresponding resources created on replay to stand-in for capture-time resources are given unique IDs and a mapping is stored to between the capture-time resource and the replay-time one.
-
static
Null
()¶ A helper function that explicitly creates an empty/invalid/null
ResourceId
.
-
static
-
class
renderdoc.
CaptureAccess
¶ An interface for accessing a capture, possibly over a network connection. This is a subset of the functionality provided in
CaptureFile
which only supports import/export and construction of files.-
FindSectionByName
(name)¶ Locate the index of a section by its name. Returns
-1
if the section is not found.This index should not be cached, as writing sections could re-order the indices.
Parameters: name# (str) – The name of the section to search for. Returns: The index of the section, or -1
if not found.Return type: int
.
-
FindSectionByType
(type)¶ Locate the index of a section by its type. Returns
-1
if the section is not found.This index should not be cached, as writing sections could re-order the indices.
Parameters: type# (SectionType) – The type of the section to search for. Returns: The index of the section, or -1
if not found.Return type: int
.
-
GetResolve
(callstack)¶ Retrieve the details of each stackframe in the provided callstack.
Must only be called after
InitResolver()
has returnedTrue
.Parameters: callstack# (list) – The integer addresses in the original callstack. Returns: The list of resolved callstack entries as strings. Return type: list
ofstr
-
GetSectionContents
(index)¶ Get the raw byte contents of the specified section.
Parameters: index# (int) – The index of the section. Returns: The raw contents of the section, if the index is valid. Return type: bytes
.
-
GetSectionCount
()¶ Retrieve the total number of available sections.
Returns: The number of sections in the capture Return type: int
.
-
GetSectionProperties
(index)¶ Get the describing properties of the specified section.
Parameters: index# (int) – The index of the section. Returns: The properties of the section, if the index is valid. Return type: SectionProperties
-
HasCallstacks
()¶ Query if callstacks are available.
Returns: True
if any callstacks are available,False
otherwise.Return type: bool
-
InitResolver
(progress, killSignal)¶ Begin initialising a callstack resolver, looking up symbol files and caching as necessary.
This function blocks while trying to initialise callstack resolving, so it should be called on a separate thread.
Parameters: Returns: True
if the resolver successfully initialised,False
if something went wrong.Return type: bool
-
WriteSection
(props, contents)¶ Writes a new section with specified properties and contents. If an existing section already has the same type or name, it will be overwritten (two sections cannot share the same type or name).
Parameters: - props# (SectionProperties) – The properties of the section to be written.
- contents# (bytes) – The raw contents of the section.
-
-
class
renderdoc.
Camera
¶ A handle to a camera controller, used for user interaction and controlling a view of a 3D scene.
-
GetForward
()¶ Retrieves the forward vector of the camera, in the positive Z direction.
Returns: The forward vector of the camera. W is set to 1 Return type: FloatVector
-
GetPosition
()¶ Retrieves the position of the camera
Returns: The position vector of the camera. W is set to 1 Return type: FloatVector
-
GetRight
()¶ Retrieves the right vector of the camera, in the positive X direction.
Returns: The right vector of the camera. W is set to 1 Return type: FloatVector
-
GetUp
()¶ Retrieves the up vector of the camera, in the positive Y direction.
Returns: The up vector of the camera. W is set to 1 Return type: FloatVector
-
ResetArcball
()¶ Reset the arcball to defaults.
-
RotateArcball
(ax, ay, bx, by)¶ Rotates the arcball based on relative window co-ordinates.
The co-ordinates are in pixels and represent the old/new co-ordinates of the mouse cursor over the drag.
Parameters:
-
SetArcballDistance
(dist)¶ Sets the distance in units the arcball camera sits away from the lookat position.
Parameters: dist# (float) – The distance of the camera from the lookat position.
-
SetFPSRotation
(x, y, z)¶ Sets the rotation for an FPS camera.
It is invalid to call this function for arcball cameras.
Parameters:
-
SetPosition
(x, y, z)¶ Sets the position for the camera, either arcball or FPS.
For arcball cameras, this sets the lookat position at the centre of the arcball.
For FPS look cameras, this sets the position of the camera in space.
Parameters:
-
Shutdown
()¶ Closes the camera handle.
-
-
class
renderdoc.
SDBasic
¶ An enumeration.
-
class
renderdoc.
SDTypeFlags
¶ An enumeration.
-
class
renderdoc.
SDType
¶ Details the name and properties of a structured type
-
byteSize
¶ The size in bytes that an instance of this type takes up.
This is only valid for whole chunks (where it contains the whole chunk size), for buffers that have an arbitrary size, or for basic types such as integers and floating point values where it gives the size/precision of the type.
For variable size types like structs, arrays, etc it will be set to 0.
-
flags
¶ The
SDTypeFlags
flags for this type.
-
name
¶ The name of this type.
-
-
class
renderdoc.
SDChunkFlags
¶ An enumeration.
-
class
renderdoc.
SDChunkMetaData
¶ The metadata that goes along with a
SDChunk
to detail how it was recorded.-
callstack
¶ The frames of the CPU-side callstack leading up to the chunk.
-
chunkID
¶ The internal chunk ID - unique given a particular driver in use.
-
durationMicro
¶ The duration in microseconds that this chunk took. This is the time for the actual work, not the serialising.
-
flags
¶ The
SDChunkFlags
for this chunk.
-
length
¶ The length in bytes of this chunk - may be longer than the actual sum of the data if a conservative size estimate was used on creation to avoid seeking to fix-up the stored length.
-
threadID
¶ The ID of the thread where this chunk was recorded.
-
timestampMicro
¶ The point in time when this chunk was recorded, in microseconds since program start.
-
-
class
renderdoc.
SDObjectPODData
¶ The plain-old-data contents of an
SDObject
.Only one member is valid, as defined by the type of the
SDObject
.-
b
¶ The value as a boolean.
-
c
¶ The value as a single byte character.
-
d
¶ The value as a floating point number.
-
i
¶ The value as a signed integer.
-
u
¶ The value as an unsigned integer.
-
-
class
renderdoc.
StructuredObjectList
¶ A
list
ofSDObject
objects-
append
(value)¶
-
clear
()¶
-
copy
()¶
-
count
(item)¶
-
extend
(items)¶
-
index
(item, start=None, end=None)¶
-
insert
(index, value)¶
-
pop
(index=None)¶
-
remove
(item)¶
-
reverse
()¶
-
sort
(key=None, reverse=False)¶
-
-
class
renderdoc.
SDObjectData
¶ The data inside an class:SDObject, whether it’s plain old data or complex children.
-
basic
¶ The plain-old data contents of the object, in a
SDObjectPODData
.
-
children
¶ A
list
of class:SDObject containing the children of this class:SDObject.
-
str
¶ The string contents of the object.
-
-
class
renderdoc.
SDObject
¶ Defines a single structured object.
-
AddChild
(child)¶ Add a new child object by duplicating it.
-
Duplicate
()¶ Create a deep copy of this object.
-
FindChild
(childName)¶ Find a child object by a given name.
-
data
¶ The
SDObjectData
with the contents of this object.
-
name
¶ The name of this object.
-
-
class
renderdoc.
SDChunk
¶ Defines a single structured chunk, which is a
SDObject
.-
Duplicate
()¶ Create a deep copy of this chunk.
-
metadata
¶ The
SDChunkMetaData
with the metadata for this chunk.
-
-
class
renderdoc.
StructuredChunkList
¶ A
list
ofSDChunk
objects-
append
(value)¶
-
clear
()¶
-
copy
()¶
-
count
(item)¶
-
extend
(items)¶
-
index
(item, start=None, end=None)¶
-
insert
(index, value)¶
-
pop
(index=None)¶
-
remove
(item)¶
-
reverse
()¶
-
sort
(key=None, reverse=False)¶
-
-
class
renderdoc.
StructuredBufferList
¶ A
list
ofbytes
objects-
append
(value)¶
-
clear
()¶
-
copy
()¶
-
count
(item)¶
-
extend
(items)¶
-
index
(item, start=None, end=None)¶
-
insert
(index, value)¶
-
pop
(index=None)¶
-
remove
(item)¶
-
reverse
()¶
-
sort
(key=None, reverse=False)¶
-
-
class
renderdoc.
SDFile
¶ Contains the structured information in a file. Owns the buffers and chunks.
-
Swap
(other)¶ The version of this structured stream, typically only used internally.
-
buffers
¶ A
list
of serialised buffers stored asbytes
objects
-
version
¶ The version of this structured stream, typically only used internally.
-
-
class
renderdoc.
CaptureOptions
¶ Sets up configuration and options for optional features either at capture time or at API initialisation time that the user can enable or disable at will.
-
allowFullscreen
¶ Allow the application to enable fullscreen.
Default - enabled
True
- The application can enable or disable fullscreen at will.False
- fullscreen is force disabled.
-
allowVSync
¶ Allow the application to enable vsync.
Default - enabled
True
- The application can enable or disable vsync at will.False
- vsync is force disabled.
-
apiValidation
¶ Record API debugging events and messages
Default - disabled
True
- Enable built-in API debugging features and records the results into the capture logfile, which is matched up with events on replay.False
- no API debugging is forcibly enabled.
-
captureAllCmdLists
¶ In APIs that allow for the recording of command lists to be replayed later, RenderDoc may choose to not capture command lists before a frame capture is triggered, to reduce overheads. This means any command lists recorded once and replayed many times will not be available and may cause a failure to capture.
Note
This is only true for APIs where multithreading is difficult or discouraged. Newer APIs like Vulkan and D3D12 will ignore this option and always capture all command lists since the API is heavily oriented around it and the overheads have been reduced by API design.
True
- All command lists are captured from the start of the application.False
- Command lists are only captured if their recording begins during the period when a frame capture is in progress.
-
captureCallstacks
¶ Capture CPU callstacks for API events
Default - disabled
True
- Enables capturing of callstacks.False
- no callstacks are captured.
-
captureCallstacksOnlyDraws
¶ When capturing CPU callstacks, only capture them from drawcalls. This option does nothing if
captureCallstacks
is not enabled.Default - disabled
True
- Only captures callstacks for drawcall type API events.False
- Callstacks, if enabled, are captured for every event.
-
debugOutputMute
¶ Mute API debugging output when the API validation mode option is enabled.
Default - enabled
True
- Mute any API debug messages from being displayed or passed through.False
- API debugging is displayed as normal.
-
delayForDebugger
¶ Specify a delay in seconds to wait for a debugger to attach, after creating or injecting into a process, before continuing to allow it to run.
0
indicates no delay, and the process will run immediately after injection.Default - 0 seconds
-
hookIntoChildren
¶ Hooks any system API calls that create child processes, and injects RenderDoc into them recursively with the same options.
Default - disabled
True
- Hooks into spawned child processes.False
- Child processes are not hooked by RenderDoc.
-
refAllResources
¶ By default RenderDoc only includes resources in the final logfile necessary for that frame, this allows you to override that behaviour.
Default - disabled
True
- all live resources at the time of capture are included in the log and available for inspection.False
- only the resources referenced by the captured frame are included.
-
saveAllInitials
¶ By default RenderDoc skips saving initial states for resources where the previous contents don’t appear to be used, assuming that writes before reads indicate previous contents aren’t used.
Default - disabled
True
- initial contents at the start of each captured frame are saved, even if- they are later overwritten or cleared before being used.
False
- unless a read is detected, initial contents will not be saved and will- appear as black or empty data.
-
verifyMapWrites
¶ Verify any writes to mapped buffers, by checking the memory after the bounds of the returned pointer to detect any modification.
Default - disabled
True
- Verify any writes to mapped buffers.False
- No verification is performed, and overwriting bounds may cause crashes or corruption in RenderDoc.
-
-
class
renderdoc.
MeshFormat
¶ Contains the details of a single element of data (such as position or texture co-ordinates) within a mesh.
-
baseVertex
¶ For indexed meshes, a value added to each index before using it to read the vertex.
-
farPlane
¶ The far plane for the projection matrix.
-
format
¶ The
ResourceFormat
describing this mesh component.
-
indexByteOffset
¶ The offset in bytes where the indices start in idxbuf.
-
indexByteStride
¶ The width in bytes of each index. Valid values are 1 (depending on API), 2 or 4.
-
indexResourceId
¶ The
ResourceId
of the index buffer that goes with this mesh element.
-
meshColor
¶ The color to use for rendering the wireframe of this mesh element, as a
FloatVector
.
-
nearPlane
¶ The near plane for the projection matrix.
-
numIndices
¶ The number of vertices in the mesh.
-
showAlpha
¶ True
if the alpha component of this element should be used.
-
unproject
¶ True
if this mesh element contains post-projection positional data.
-
vertexByteOffset
¶ The offset in bytes to the start of the vertex data.
-
vertexByteStride
¶ The stride in bytes between the start of one vertex and the start of another.
-
vertexResourceId
¶ The
ResourceId
of the vertex buffer containing this mesh element.
-
-
class
renderdoc.
MeshDisplay
¶ Describes how to render a mesh preview of one or more meshes. Describes the camera configuration as well as what options to use when rendering both the current mesh, and any other auxilliary meshes.
-
NoHighlight
¶ Value for
highlightVert
if no vertex should be highlighted.
-
aspect
¶ The aspect ratio to use when calculating a perspective projection matrix.
-
curInstance
¶ The index of the currently selected instance in the drawcall.
-
fov
¶ The field of view to use when calculating a perspective projection matrix.
-
highlightVert
¶ The index of the vertex to highlight, or
NoHighlight
to select no vertex.
-
maxBounds
¶ The maximum co-ordinates in each axis of the mesh bounding box.
-
minBounds
¶ The minimum co-ordinates in each axis of the mesh bounding box.
-
ortho
¶ True
if the projection matrix to use when unprojecting vertex positions is orthographic.
-
position
¶ The
MeshFormat
of the position data for the mesh.
-
second
¶ The
MeshFormat
of the secondary data for the mesh, if used for solid shading.
-
showAllInstances
¶ True
if all instances in the drawcall should be drawn as secondary meshes.
-
showBBox
¶ True
if the bounding box around the mesh should be rendered.
-
showPrevInstances
¶ True
if all previous instances in the drawcall should be drawn as secondary meshes.
-
showWholePass
¶ True
if all draws in the current pass up to the current draw should be drawn as secondary meshes.
-
solidShadeMode
¶ The
solid shading mode
to use when rendering the current mesh.
-
type
¶ The
MeshDataStage
where this mesh data comes from.
-
wireframeDraw
¶ True
if the wireframe of the mesh should be rendered as well as solid shading.
-
-
class
renderdoc.
TextureDisplay
¶ Describes how to render a texture preview of an image. Describes the zoom and pan settings for the texture when rendering on a particular output, as well as the modification and selection of a particular subresource (such as array slice, mip or multi-sampled sample).
-
alpha
¶ True
if the alpha channel should be visible. If enabled with any of RGB, the texture will be blended to the background color or checkerboard.If only one channel is selected, it will be rendered in grayscale
-
backgroundColor
¶ The background color to use behind the texture display.
If set to (0, 0, 0, 0) the global checkerboard colors are used.
-
blue
¶ True
if the blue channel should be visible.If only one channel is selected, it will be rendered in grayscale
-
customShaderId
¶ The
ResourceId
of a custom shader to use when rendering.See
ReplayController.BuildCustomShader()
for creating an appropriate custom shader.
-
flipY
¶ True
if the texture should be flipped vertically when rendering.
-
green
¶ True
if the green channel should be visible.If only one channel is selected, it will be rendered in grayscale
-
hdrMultiplier
¶ If
>= 0.0
the RGBA values will be viewed as HDRM with this as the multiplier.
-
linearDisplayAsGamma
¶ True
if the texture should be interpreted as gamma.See the FAQ entry.
-
mip
¶ Select the mip of the texture to display.
-
overlay
¶ Selects a
DebugOverlay
to draw over the top of the texture.
-
rangeMax
¶ The value in each channel to map to the white point.
-
rangeMin
¶ The value in each channel to map to the black point.
-
rawOutput
¶ True
if the rendered image should be as close as possible in value to the input.This is primarily useful when rendering to a floating point target for retrieving pixel data from the input texture in cases where it isn’t easy to directly fetch the input texture data.
-
red
¶ True
if the red channel should be visible.If only one channel is selected, it will be rendered in grayscale
-
resourceId
¶ The
ResourceId
of the texture to display.
-
sampleIdx
¶ Select the sample of the texture to display if it’s a multi-sampled texture.
If this is set to
ResolveSamples
then a default resolve will be performed that averages all samples.
-
scale
¶ The scale to apply to the texture when rendering as a floating point value.
1.0
corresponds to100%
-
sliceFace
¶ Select the slice or face of the texture to display if it’s an array, 3D, or cube tex.
-
xOffset
¶ The offset to pan in the X axis.
-
yOffset
¶ The offset to pan in the Y axis.
-
-
class
renderdoc.
TextureComponentMapping
¶ How to map components to normalised
[0, 255]
for saving to 8-bit file formats.-
blackPoint
¶ The value that should be mapped to
0
-
whitePoint
¶ The value that should be mapped to
255
-
-
class
renderdoc.
TextureSampleMapping
¶ How to map multisampled textures for saving to non-multisampled file formats.
-
ResolveSamples
¶ Value for
sampleIndex
if the samples should be averaged.
-
mapToArray
¶ True
if the samples should be mapped to array slices. A multisampled array expands each slice in-place, so it would be slice 0: sample 0, slice 0: sample 1, slice 1: sample 0, etc.This then follows the mapping for array slices as with any other array texture.
sampleIndex
is ignored.
-
sampleIndex
¶ If
mapToArray
isFalse
this selects which sample should be extracted to treat as a normal 2D image. If set toResolveSamples
then instead there’s a default average resolve.
-
-
class
renderdoc.
TextureSliceMapping
¶ How to map array textures for saving to non-arrayed file formats.
If
sliceIndex
is -1,cubeCruciform
==slicesAsGrid
==False
and the file format doesn’t support saving all slices, only slice 0 is saved.-
cubeCruciform
¶ Write out 6 slices in a cruciform pattern:
+----+ | +y | | | +----+----+----+----+ | -x | +z | +x | -z | | | | | | +----+----+----+----+ | -y | | | +----+
With the gaps filled in with transparent black.
-
sliceGridWidth
¶ The width of a grid if
slicesAsGrid
isTrue
.
-
sliceIndex
¶ Selects the (depth/array) slice to save.
If this is -1, then all slices are written out as detailed below. This is only supported in formats that don’t support slices natively, and will be done in RGBA8.
-
slicesAsGrid
¶ If
True
, write out the slices as a 2D grid with the width given insliceGridWidth
. Any empty slices in the grid are written as transparent black.
-
-
class
renderdoc.
TextureSave
¶ Describes a texture to save and how to map it to the destination file format.
-
alpha
¶ Controls handling of alpha channel, mostly relevant for file formats that without alpha.
It is an
AlphaMapping
that controls what behaviour to use.
-
channelExtract
¶ Selects a single component out of a texture to save as grayscale, or -1 to save all.
-
comp
¶ Controls black/white point mapping for output formats that are normal
8-bit SRGB
, values are
-
id
¶ The
ResourceId
of the texture to save.
-
jpegQuality
¶ The quality to use when saving to a
JPG
file. Valid values are between 1 and 100.
-
mip
¶ Selects the mip to be written out.
If set to
-1
then all mips are written, where allowed by file format. If not allowed, mip 0 is written
-
sample
¶ Controls mapping for multisampled textures (ignored if texture is not multisampled)
-
slice
¶ Controls mapping for arrayed textures (ignored if texture is not arrayed)
-
-
class
renderdoc.
NewCaptureData
¶ Information about the a new capture created by the target.
-
captureId
¶ An identifier to use to refer to this capture.
-
local
¶ True
if the target is running on the local system.
-
path
¶ The local path on the target system where the capture is saved.
-
thumbnail
¶ The raw bytes that contain the capture thumbnail, as RGB8 data.
-
timestamp
¶ The time the capture was created, as a unix timestamp in UTC.
-
-
class
renderdoc.
APIUseData
¶ Information about the API that the target is using.
-
name
¶ The name of the API.
-
presenting
¶ True
if the API is presenting to a swapchain
-
-
class
renderdoc.
BusyData
¶ Information about why the target is busy.
-
clientName
¶ The name of the client currently connected to the target.
-
-
class
renderdoc.
NewChildData
¶ Information about a new child process spawned by the target.
-
ident
¶ The ident where the new child’s target control is active.
-
processId
¶ The PID (Process ID) of the new child.
-
-
class
renderdoc.
TargetControlMessage
¶ A message from a target control connection.
-
apiUse
¶ The
API use data
.
-
busy
¶ The
busy signal data
.
-
newCapture
¶ The
new capture data
.
-
newChild
¶
-
-
class
renderdoc.
EnvironmentModification
¶ A modification to a single environment variable.
-
mod
¶ The
modification
to use.
-
name
¶ The name of the environment variable.
-
-
class
renderdoc.
CaptureFileFormat
¶ The format for a capture file either supported to read from, or export to
-
convertSupported
¶ Indicates whether captures or structured data can be saved out in this format.
-
description
¶ A human readable description of the file format, e.g.
RenderDoc native capture
.
-
name
¶ The name of the format as a single minimal string, e.g.
rdc
.
-
openSupported
¶ Indicates whether or not files in this format can be opened and processed as structured data.
-
-
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.
-
-
class
renderdoc.
Scissor
¶ Describes a single scissor region.
-
enabled
¶ True
if this scissor region is enabled.
-
height
¶ Height of the scissor region.
-
width
¶ Width of the scissor region.
-
x
¶ X co-ordinate of the scissor region.
-
y
¶ Y co-ordinate of the scissor region.
-
-
class
renderdoc.
BlendEquation
¶ Describes the details of a blend operation.
-
destination
¶ The
BlendMultiplier
for the destination blend value.
-
operation
¶ The
BlendOperation
to use in the blend calculation.
-
source
¶ The
BlendMultiplier
for the source blend value.
-
-
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.
-
-
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.
-
-
class
renderdoc.
FloatVector
¶ A floating point four-component vector
-
w
¶ The w component.
-
x
¶ The x component.
-
y
¶ The y component.
-
z
¶ The z component.
-
-
class
renderdoc.
PathEntry
¶ Properties of a path on a remote filesystem.
-
filename
¶ The filename of this path. This contains only the filename, not the full path.
-
flags
¶ The
PathProperty
flags for this path.
-
lastmod
¶ The last modified date of this path, as a unix timestamp in UTC.
-
size
¶ The size of the path in bytes.
-
-
class
renderdoc.
SectionProperties
¶ Properties of a section in a renderdoc capture file.
-
compressedSize
¶ The number of bytes of data in this section when compressed on disk.
-
flags
¶ The flags describing how this section is stored.
-
name
¶ The name of this section.
-
type
¶ The type of this section, if it is a known pre-defined section.
-
uncompressedSize
¶ The number of bytes of data contained in this section, once uncompressed.
-
version
¶ The version of this section - the meaning of which is up to the type.
-
-
class
renderdoc.
ResourceFormat
¶ Description of the format of a resource or element.
-
Name
()¶ Returns: The name of the format. Return type: str
-
Special
()¶ Returns: True
if theResourceFormat
is a ‘special’ non-regular type.Type: bool
-
bgraOrder
¶ True
if the components are to be read inBGRA
order.
-
compByteWidth
¶ The width in bytes of each component.
-
compCount
¶ The number of components in each element.
-
srgbCorrected
¶ True
if the components are SRGB corrected on read and write.
-
type
¶ The
ResourceFormatType
of this format. If the value is notResourceFormatType.Regular
then it’s a non-uniform layout like block-compressed.
-
-
class
renderdoc.
TextureFilter
¶ The details of a texture filter in a sampler.
-
filter
¶ The
FilterFunction
to apply after interpolating values.
-
magnify
¶ The
FilterMode
to use when magnifying the texture.
-
minify
¶ The
FilterMode
to use when minifying the texture.
-
mip
¶ The
FilterMode
to use when interpolating between mips.
-
-
class
renderdoc.
ResourceDescription
¶ A description of any type of resource.
-
SetCustomName
(givenName)¶ Utility function for setting up a custom name to overwrite the auto-generated one.
-
autogeneratedName
¶ True
ifname
was just autogenerated based on the ID, not assigned a human-readable name by the application.
-
derivedResources
¶ The
ResourceId
of any derived resources, such as resource views or aliases.Can be empty if there are no derived resources.
This is the inverse of
parentResources
in a potentially many:many relationship, but typically it is one parent to many derived.
-
initialisationChunks
¶ The chunk indices in the structured file that initialised this resource.
This will at least contain the first call that created it, but may contain other auxilliary calls.
-
name
¶ The name given to this resource.
-
parentResources
¶ The
ResourceId
of parent resources, of which this is derived.Can be empty if there are no parent resources.
This is the inverse of :data:derivedResources in a potentially many:many relationship, but typically it is one parent to many derived.
-
resourceId
¶ The unique
ResourceId
that identifies this resource.
-
type
¶ The
ResourceType
of the resource.
-
-
class
renderdoc.
BufferDescription
¶ A description of a buffer resource.
-
creationFlags
¶ The way this buffer will be used in the pipeline.
-
length
¶ The byte length of the buffer.
-
resourceId
¶ The unique
ResourceId
that identifies this buffer.
-
-
class
renderdoc.
TextureDescription
¶ A description of a texture resource.
-
arraysize
¶ How many array elements this texture has, will be at least 1.
-
byteSize
¶ How many bytes would be used to store this texture and all its mips/slices.
-
creationFlags
¶ The way this texture will be used in the pipeline.
-
cubemap
¶ True
if this texture is used as a cubemap or cubemap array.
-
depth
¶ The depth of the texture, or 1 if not applicable.
-
dimension
¶ The base dimension of the texture - either 1, 2, or 3.
-
format
¶ The
ResourceFormat
that describes the format of each pixel in the texture.
-
height
¶ The height of the texture, or 1 if not applicable.
-
mips
¶ How many mips this texture has, will be at least 1.
-
msQual
¶ The quality setting of this texture, or 0 if not applicable.
-
msSamp
¶ How many multisampled samples this texture has, will be at least 1.
-
resourceId
¶ The unique
ResourceId
that identifies this texture.
-
type
¶ The
TextureType
of the texture.
-
width
¶ The width of the texture, or length for buffer textures.
-
-
class
renderdoc.
APIEvent
¶ An individual API-level event, generally corresponds one-to-one with an API call.
-
callstack
¶ A list of addresses in the CPU callstack where this function was called.
-
chunkIndex
¶ The chunk index for this function call in the structured file.
-
eventId
¶ The API event’s Event ID.
This is a 1-based count of API events in the capture. The eventId is used as a reference point in many places in the API to represent where in the capture the ‘current state’ is, and to perform analysis in reference to the state at a particular point in the frame.
eventIds are always increasing and positive, but they may not be contiguous - in some circumstances there may be gaps if some events are consumed entirely internally, such as debug marker pops which only modify the internal drawcall tree structures.
Also eventIds may not correspond directly to an actual function call - sometimes a function such as a multi draw indirect will be one function call that expands to multiple events to allow inspection of results part way through the multi draw.
-
fileOffset
¶ A byte offset in the data stream where this event happens.
Note
This should only be used as a relative measure, it is not a literal number of bytes from the start of the file on disk.
-
-
class
renderdoc.
DebugMessage
¶ A debugging message from the API validation or internal analysis and error detection.
-
description
¶ The string contents of the message.
-
messageID
¶ An ID that identifies this particular debug message uniquely.
-
-
class
renderdoc.
BucketRecordType
¶ An enumeration.
-
class
renderdoc.
ConstantBindStats
¶ Contains the statistics for constant binds in a frame.
-
BucketType
¶ The type of buckets being used. See
BucketRecordType
.
-
BucketCount
¶ How many buckets there are in the arrays.
-
bindslots
¶ A list where the Nth element contains the number of calls that bound N buffers.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
SamplerBindStats
¶ Contains the statistics for sampler binds in a frame.
-
bindslots
¶ A list where the Nth element contains the number of calls that bound N samplers.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
ResourceBindStats
¶ Contains the statistics for resource binds in a frame.
-
bindslots
¶ A list where the Nth element contains the number of calls that bound N resources.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
types
¶ A list with one element for each type in
TextureType
.The Nth element contains the number of times a resource of that type was bound.
-
-
class
renderdoc.
ResourceUpdateStats
¶ Contains the statistics for resource updates in a frame.
-
BucketType
¶ The type of buckets being used. See
BucketRecordType
.
-
BucketCount
¶ How many buckets there are in the arrays.
-
calls
¶ How many function calls were made.
-
types
¶ A list with one element for each type in
TextureType
.The Nth element contains the number of times a resource of that type was updated.
-
-
class
renderdoc.
DrawcallStats
¶ Contains the statistics for draws in a frame.
-
BucketType
¶ The type of buckets being used. See
BucketRecordType
.
-
BucketSize
¶ How many elements each bucket contains.
-
BucketCount
¶ How many buckets there are in the arrays.
-
calls
¶ How many draw calls were made.
-
-
class
renderdoc.
DispatchStats
¶ Contains the statistics for compute dispatches in a frame.
-
calls
¶ How many dispatch calls were made.
-
-
class
renderdoc.
IndexBindStats
¶ Contains the statistics for index buffer binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
VertexBindStats
¶ Contains the statistics for vertex buffer binds in a frame.
-
bindslots
¶ A list where the Nth element contains the number of calls that bound N vertex buffers.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
LayoutBindStats
¶ Contains the statistics for vertex layout binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
ShaderChangeStats
¶ Contains the statistics for shader binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
redundants
¶ How many calls made no change due to the existing bind being identical.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
BlendStats
¶ Contains the statistics for blend state binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
redundants
¶ How many calls made no change due to the existing bind being identical.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
DepthStencilStats
¶ Contains the statistics for depth stencil state binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
redundants
¶ How many calls made no change due to the existing bind being identical.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
RasterizationStats
¶ Contains the statistics for rasterizer state binds in a frame.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
rects
¶ A list where the Nth element contains the number of calls that bound N scissor rects.
-
redundants
¶ How many calls made no change due to the existing bind being identical.
-
sets
¶ How many objects were bound.
-
viewports
¶ A list where the Nth element contains the number of calls that bound N viewports.
-
-
class
renderdoc.
OutputTargetStats
¶ Contains the statistics for output merger or UAV binds in a frame.
-
bindslots
¶ A list where the Nth element contains the number of calls that bound N targets.
-
calls
¶ How many function calls were made.
-
nulls
¶ How many objects were unbound.
-
sets
¶ How many objects were bound.
-
-
class
renderdoc.
FrameStatistics
¶ Contains all the available statistics about the captured frame.
Currently this information is only available on D3D11 and is fairly API-centric.
-
blends
¶ Information about blend state binds.
-
depths
¶ Information about depth-stencil state binds.
-
dispatches
¶ Information about compute dispatches.
-
draws
¶ Information about drawcalls.
-
indices
¶ Information about index buffer binds.
-
layouts
¶ Information about vertex layout binds.
-
outputs
¶ Information about output merger and UAV binds.
-
rasters
¶ Information about rasterizer state binds.
-
recorded
¶ True
if the statistics in this structure are valid.
-
updates
¶ Information about resource contents updates.
-
vertices
¶ Information about vertex buffer binds.
-
-
class
renderdoc.
FrameDescription
¶ Contains frame-level global information
-
captureTime
¶ The time when the capture was created, as a unix timestamp in UTC.
-
compressedFileSize
¶ The total file size of the whole capture in bytes, before decompression.
-
debugMessages
¶ A list of debug messages that are not associated with any particular event.
-
fileOffset
¶ The offset into the file of the start of the frame.
Note
Similarly to
APIEvent.fileOffset
this should only be used as a relative measure, as it is not a literal number of bytes from the start of the file on disk.
-
frameNumber
¶ Starting from frame #1 defined as the time from application startup to first present, this counts the frame number when the capture was made.
Note
This value is only accurate if the capture was triggered through the default mechanism, if it was triggered from the application API it doesn’t correspond to anything.
-
initDataSize
¶ The byte size of the section of the file that contains frame-initial contents.
-
persistentSize
¶ The byte size of the section of the file that must be kept in memory persistently.
-
stats
¶ The
frame statistics
.
-
uncompressedFileSize
¶ The total file size of the whole capture in bytes, after decompression.
-
-
class
renderdoc.
EventUsage
¶ Describes a particular use of a resource at a specific
eventId
.-
usage
¶ The
ResourceUsage
in question.
-
view
¶ An optional
ResourceId
identifying the view through which the use happened.
-
-
class
renderdoc.
DrawcallDescription
¶ Describes the properties of a drawcall, dispatch, debug marker, or similar event.
-
Reset
()¶ Resets the drawcall back to a default/empty state.
-
baseVertex
¶ For indexed drawcalls, the offset added to each index after fetching.
-
children
¶ A list of
DrawcallDescription
child drawcalls.
-
copyDestination
¶ The
ResourceId
identifying the destination object in a copy, resolve or blit operation.
-
copySource
¶ The
ResourceId
identifying the source object in a copy, resolve or blit operation.
-
dispatchDimension
¶ The 3D number of workgroups to dispatch in a dispatch call.
-
dispatchThreadsDimension
¶ The 3D size of each workgroup in threads if the call allows an override, or 0 if not.
-
drawcallId
¶ A 1-based index of this drawcall relative to other drawcalls.
-
indexByteWidth
¶ The width in bytes of each index.
Valid values are 1 (depending on API), 2 or 4, or 0 if the drawcall is not an indexed draw.
-
indexOffset
¶ For indexed drawcalls, the first index to fetch from the index buffer.
-
instanceOffset
¶ For instanced drawcalls, the offset applied before looking up instanced vertex inputs.
-
markerColor
¶ A RGBA color specified by a debug marker call.
-
name
¶ The name of this drawcall. Typically a summarised/concise list of parameters.
Note
For drawcalls, the convention is to list primary parameters (vertex/index count, instance count) and omit secondary parameters (vertex offset, instance offset).
-
next
¶ The
eventId
of the next drawcall in the frame, or0
if this is the last drawcall in the frame.
-
numIndices
¶ The number of indices or vertices as appropriate for the drawcall. 0 if not used.
-
numInstances
¶ The number of instances for the drawcall. 0 if not used.
-
outputs
¶ A simple list of the
ResourceId
ids for the color outputs, which can be used for very coarse bucketing of drawcalls into similar passes by their outputs.
-
previous
¶ The
eventId
of the previous drawcall in the frame, or0
if this is the first drawcall in the frame.
-
vertexOffset
¶ For non-indexed drawcalls, the offset applied before looking up each vertex input.
-
-
class
renderdoc.
APIProperties
¶ Gives some API-specific information about the capture.
-
degraded
¶ True
if the capture was loaded successfully but running in a degraded mode - e.g. with software rendering, or with some functionality disabled due to lack of support.
-
localRenderer
¶ The
GraphicsAPI
used to render the log. For remote replay this could be different to the above, and lets the UI make decisions e.g. to flip rendering of images.
-
pipelineType
¶ The
GraphicsAPI
of the actual log/capture.
-
shadersMutable
¶ True
if the driver mutates shader reflection structures from event to event. Currently this is only true for OpenGL where the superfluous indirect in the binding model must be worked around by re-sorting bindings.
-
-
class
renderdoc.
CounterDescription
¶ Describes a GPU counter’s purpose and result value.
-
category
¶ The counter category. Can be empty for uncategorized counters.
-
counter
¶ The
GPUCounter
this counter represents.Note
The value may not correspond to any of the predefined values if it’s a hardware-specific counter value.
-
description
¶ If available, a longer human-readable description of the value this counter measures.
-
name
¶ A short human-readable name for the counter.
-
resultByteWidth
¶ The number of bytes in the resulting value.
-
resultType
¶ The
type of value
returned by this counter.
-
unit
¶ The
CounterUnit
for the result value.
-
-
class
renderdoc.
CounterValue
¶ A resulting value from a GPU counter. Only one member is valid, see
CounterDescription
.-
d
¶ A
double
value.
-
f
¶ A
float
value.
-
u32
¶ A 32-bit unsigned integer.
-
u64
¶ A 64-bit unsigned integer.
-
-
class
renderdoc.
CounterResult
¶ The resulting value from a counter at an event.
-
value
¶ The value itself.
-
-
class
renderdoc.
PixelValue
¶ The contents of an RGBA pixel.
-
floatValue
¶ The RGBA value interpreted as
float
.
-
intValue
¶ The RGBA value interpreted as 32-bit signed integer.
-
uintValue
¶ The RGBA value interpreted as 32-bit unsigned integer.
-
-
class
renderdoc.
ModificationValue
¶ The value of pixel output at a particular event.
-
col
¶ The color value.
-
depth
¶ The depth output, as a
float
.
-
stencil
¶ The stencil output, or
-1
if not available.
-
-
class
renderdoc.
PixelModification
¶ An attempt to modify a pixel by a particular event.
-
Passed
()¶ Determine if this fragment passed all tests and wrote to the texture.
Returns: True
if it passed all tests,False
if it failed any.Return type: bool
-
backfaceCulled
¶ True
if the backface culling test eliminated this fragment.
-
depthClipped
¶ True
if depth near/far clipping eliminated this fragment.
-
depthTestFailed
¶ True
if depth testing eliminated this fragment.
-
directShaderWrite
¶ True
if this event came as part of an arbitrary shader write.
-
fragIndex
¶ A 0-based index of which fragment this modification corresponds to, in the case that multiple fragments from a single draw wrote to a pixel.
-
postMod
¶ The
ModificationValue
of the texture after this fragment ran.
-
preMod
¶ The
ModificationValue
of the texture before this fragment ran.This is valid only for the first fragment if multiple fragments in the same event write to the same pixel.
-
predicationSkipped
¶ True
if predicated rendering skipped this call.
-
primitiveID
¶ The primitive that generated this fragment.
-
sampleMasked
¶ True
if the sample mask eliminated this fragment.
-
scissorClipped
¶ True
if scissor clipping eliminated this fragment.
-
shaderDiscarded
¶ True
if the pixel shader executed a discard on this fragment.
-
shaderOut
¶ The
ModificationValue
that this fragment wrote from the pixel shader.
-
stencilTestFailed
¶ True
if stencil testing eliminated this fragment.
-
unboundPS
¶ True
if no pixel shader was bound at this event.
-
viewClipped
¶ True
if viewport clipping eliminated this fragment.
-
-
class
renderdoc.
Thumbnail
¶ Contains the bytes and metadata describing a thumbnail.
-
data
¶ The
bytes
byte array containing the raw data.
-
height
¶ The height of the thumbnail image.
-
width
¶ The width of the thumbnail image.
-
-
class
renderdoc.
SectionType
¶ An enumeration.
-
class
renderdoc.
VarType
¶ An enumeration.
-
class
renderdoc.
CompType
¶ An enumeration.
-
class
renderdoc.
TextureSwizzle
¶ An enumeration.
-
class
renderdoc.
AddressMode
¶ An enumeration.
-
class
renderdoc.
ResourceType
¶ An enumeration.
-
class
renderdoc.
TextureType
¶ An enumeration.
-
class
renderdoc.
BindType
¶ An enumeration.
-
class
renderdoc.
ShaderBuiltin
¶ An enumeration.
-
class
renderdoc.
ReplayOutputType
¶ An enumeration.
-
class
renderdoc.
MeshDataStage
¶ An enumeration.
-
class
renderdoc.
DebugOverlay
¶ An enumeration.
-
class
renderdoc.
FileType
¶ An enumeration.
-
class
renderdoc.
AlphaMapping
¶ An enumeration.
-
class
renderdoc.
ResourceFormatType
¶ An enumeration.
-
class
renderdoc.
QualityHint
¶ An enumeration.
-
class
renderdoc.
GraphicsAPI
¶ An enumeration.
-
class
renderdoc.
ShaderEncoding
¶ An enumeration.
-
class
renderdoc.
Topology
¶ An enumeration.
-
class
renderdoc.
ShaderStage
¶ An enumeration.
-
class
renderdoc.
MessageCategory
¶ An enumeration.
-
class
renderdoc.
MessageSeverity
¶ An enumeration.
-
class
renderdoc.
MessageSource
¶ An enumeration.
-
class
renderdoc.
ResourceUsage
¶ An enumeration.
-
class
renderdoc.
SolidShade
¶ An enumeration.
-
class
renderdoc.
FillMode
¶ An enumeration.
-
class
renderdoc.
CullMode
¶ An enumeration.
-
class
renderdoc.
FilterMode
¶ An enumeration.
-
class
renderdoc.
FilterFunction
¶ An enumeration.
-
class
renderdoc.
CompareFunction
¶ An enumeration.
-
class
renderdoc.
StencilOperation
¶ An enumeration.
-
class
renderdoc.
BlendMultiplier
¶ An enumeration.
-
class
renderdoc.
BlendOperation
¶ An enumeration.
-
class
renderdoc.
LogicOperation
¶ An enumeration.
-
class
renderdoc.
GPUCounter
¶ An enumeration.
-
class
renderdoc.
CounterUnit
¶ An enumeration.
-
class
renderdoc.
CameraType
¶ An enumeration.
-
class
renderdoc.
ReplaySupport
¶ An enumeration.
-
class
renderdoc.
ReplayStatus
¶ An enumeration.
-
class
renderdoc.
TargetControlMessageType
¶ An enumeration.
-
class
renderdoc.
EnvMod
¶ An enumeration.
-
class
renderdoc.
EnvSep
¶ An enumeration.
-
class
renderdoc.
LogType
¶ An enumeration.
-
class
renderdoc.
PathProperty
¶ An enumeration.
-
class
renderdoc.
SectionFlags
¶ An enumeration.
-
class
renderdoc.
BufferCategory
¶ An enumeration.
-
class
renderdoc.
D3DBufferViewFlags
¶ An enumeration.
-
class
renderdoc.
TextureCategory
¶ An enumeration.
-
class
renderdoc.
ShaderStageMask
¶ An enumeration.
-
class
renderdoc.
ShaderEvents
¶ An enumeration.
-
class
renderdoc.
DrawFlags
¶ An enumeration.
-
class
renderdoc.
VulkanLayerFlags
¶ An enumeration.
-
class
renderdoc.
AndroidFlags
¶ An enumeration.
-
class
renderdoc.
FloatVecVal
¶ A
float
4 component vector.-
w
¶ The w component.
-
x
¶ The x component.
-
y
¶ The y component.
-
z
¶ The z component.
-
-
class
renderdoc.
DoubleVecVal
¶ A
double
4 component vector.-
w
¶ The w component.
-
x
¶ The x component.
-
y
¶ The y component.
-
z
¶ The z component.
-
-
class
renderdoc.
IntVecVal
¶ A 32-bit signed
int
4 component vector.-
w
¶ The w component.
-
x
¶ The x component.
-
y
¶ The y component.
-
z
¶ The z component.
-
-
class
renderdoc.
UIntVecVal
¶ A 32-bit unsigned
int
4 component vector.-
w
¶ The w component.
-
x
¶ The x component.
-
y
¶ The y component.
-
z
¶ The z component.
-
-
class
renderdoc.
ShaderValue
¶ A C union that holds 16 values, with each different basic variable type.
-
dv
¶ double
values.
-
fv
¶ float
values.
-
iv
¶ Signed integer values.
-
uv
¶ Unsigned integer values.
-
-
class
renderdoc.
ShaderVariable
¶ Holds a single named shader variable. It contains either a primitive type (up to a 4x4 matrix of a
basic type
) or a list of members, which can either be struct or array members of this parent variable.Matrices are always stored row-major. If necessary they are transposed when retrieving from the raw data bytes when they are specified to be column-major in the API/shader metadata.
-
columns
¶ The number of columns in this matrix.
-
displayAsHex
¶ True
if the contents of this variable should be displayed as hex.
-
isStruct
¶ True
if this variable is a structure and not an array or basic type.
-
members
¶ The members of this variable as a list of
ShaderValue
.
-
name
¶ The name of this variable.
-
rows
¶ The number of rows in this matrix.
-
type
¶ The
basic type
of this variable.
-
-
class
renderdoc.
ShaderDebugState
¶ This stores the current state of shader debugging at one particular step in the shader, with all mutable variable contents.
-
flags
¶ A set of
ShaderEvents
flags that indicate what events happened on this step.
-
indexableTemps
¶ Indexable temporary variables for this shader as a list of
ShaderValue
lists.
-
nextInstruction
¶ The next instruction to be executed after this state. The initial state before any shader execution happened will have
nextInstruction == 0
.
-
outputs
¶ The output variables for this shader as a list of
ShaderValue
.
-
registers
¶ The temporary variables for this shader as a list of
ShaderValue
.
-
-
class
renderdoc.
ShaderDebugTrace
¶ This stores the whole state of a shader’s execution from start to finish, with each individual debugging step along the way, as well as the immutable global constant values that do not change with shader execution.
-
constantBlocks
¶ Constant variables for this shader as a list of
ShaderValue
lists.Each entry in this list corresponds to a constant block with the same index in the
ShaderBindpointMapping.constantBlocks
list, which can be used to look up the metadata.
-
inputs
¶ The input variables for this shader as a list of
ShaderValue
.
-
states
¶ A list of
ShaderDebugState
states representing the state after each instruction was executed
-
-
class
renderdoc.
SigParameter
¶ The information describing an input or output signature element describing the interface between shader stages.
-
NoIndex
¶ Value for an index that means it is invalid or not applicable for this parameter.
-
channelUsedMask
¶ A bitmask indicating which components in the shader register are actually used by the shader itself, for APIs that pack signatures together.
-
compType
¶ The
component type
of data that this element stores.
-
needSemanticIndex
¶ A convenience flag -
True
if the semantic name is unique and no index is needed.
-
regChannelMask
¶ A bitmask indicating which components in the shader register are stored, for APIs that pack signatures together.
-
regIndex
¶ The index of the shader register/binding used to store this signature element.
This may be
NoIndex
if the element is system-generated and not consumed by another shader stage. SeesystemValue
.
-
semanticIdxName
¶ The combined semantic name and index.
-
semanticIndex
¶ The semantic index of this variable - see
semanticName
.
-
semanticName
¶ The semantic name of this variable, if the API uses semantic matching for bindings.
-
stream
¶ Selects a stream for APIs that provide multiple output streams for the same named output.
-
systemValue
¶ The
ShaderBuiltin
value that this element contains.
-
varName
¶ The name of this variable - may not be present in the metadata for all APIs.
-
-
class
renderdoc.
ShaderVariableDescriptor
¶ Describes the storage characteristics for a basic
ShaderConstant
in memory.-
arrayByteStride
¶ The number of bytes between the start of one element in the array and the next.
-
columns
¶ The number of columns in this matrix.
-
elements
¶ The number of elements in the array, or 1 if it’s not an array.
-
name
¶ The name of the type of this constant, e.g. a
struct
name.
-
rowMajorStorage
¶ True
if the matrix is stored as row major instead of column major.
-
rows
¶ The number of rows in this matrix.
-
-
class
renderdoc.
ShaderVariableType
¶ Describes the type and members of a
ShaderConstant
.-
descriptor
¶ The
ShaderVariableDescriptor
that describes the current constant.
-
members
¶ A list of
ShaderConstant
with any members that this constant may contain.
-
-
class
renderdoc.
ShaderRegister
¶ Describes the offset of a constant in memory in terms of 16 byte vectors.
-
comp
¶ The 4 byte component within that vector where this register begins
-
vec
¶ The index of the 16 byte vector where this register begins
-
-
class
renderdoc.
ShaderConstant
¶ Contains the detail of a constant within a
ConstantBlock
in memory.-
defaultValue
¶ If this constant is no larger than a 64-bit constant, gives a default value for it.
-
name
¶ The name of this constant
-
reg
¶ A
ShaderRegister
describing where this constant is offset from the start of the block
-
type
¶ A
ShaderVariableType
giving details of the type information for this constant.
-
-
class
renderdoc.
ConstantBlock
¶ Contains the information for a block of constant values. The values are not present, only the metadata about how the variables are stored in memory itself and their type/name information.
-
bindPoint
¶ The bindpoint for this block. This is an index in the
ShaderBindpointMapping.constantBlocks
list.
-
bufferBacked
¶ True
if the contents are stored in a buffer of memory. If not then they are set by some other API-specific method, such as direct function calls or they may be compile-time specialisation constants.
-
byteSize
¶ The total number of bytes consumed by all of the constants contained in this block.
-
name
¶ The name of this constant block, may be empty on some APIs.
-
variables
¶ The constants contained within this block as a list of
ShaderConstant
.
-
-
class
renderdoc.
ShaderSampler
¶ Contains the information for a separate sampler in a shader. If the API doesn’t have the concept of separate samplers, this struct will be unused and only
ShaderResource
is relevant.Note
that constant blocks will not have a shader resource entry, see
ConstantBlock
.-
bindPoint
¶ The bindpoint for this block. This is an index in either the
ShaderBindpointMapping.samplers
list.
-
name
¶ The name of this sampler.
-
-
class
renderdoc.
ShaderResource
¶ Contains the information for a shader resource that is made accessible to shaders directly by means of the API resource binding system.
Note
that constant blocks and samplers will not have a shader resource entry, see
ConstantBlock
andShaderSampler
.-
bindPoint
¶ The bindpoint for this block. This is an index in either the
ShaderBindpointMapping.readOnlyResources
list orShaderBindpointMapping.readWriteResources
list as appropriate (seeisReadOnly
).
-
isReadOnly
¶ True
if this resource is available to the shader for reading only, otherwise it is able to be read from and written to arbitrarily.
-
isTexture
¶ True
if this resource is a texture, otherwise it is a buffer.
-
name
¶ The name of this resource.
-
resType
¶ The
TextureType
that describes the type of this resource.
-
variableType
¶ A
ShaderVariableType
describing type of each element of this resource.
-
-
class
renderdoc.
ShaderEntryPoint
¶ Describes an entry point in a shader.
-
name
¶ The name of the entry point.
-
stage
¶ The
ShaderStage
for this entry point .
-
-
class
renderdoc.
ShaderCompileFlag
¶ Contains a single flag used at compile-time on a shader.
-
name
¶ The name of the compile flag.
-
value
¶ The value of the compile flag.
-
-
class
renderdoc.
ShaderCompileFlags
¶ Contains the information about the compilation environment of a shader
-
flags
¶ A list of
ShaderCompileFlag
.Each entry is an API or compiler specific flag used to compile this shader originally.
-
-
class
renderdoc.
ShaderSourceFile
¶ Contains a source file available in a debug-compiled shader.
-
contents
¶ The actual contents of the file.
-
filename
¶ The filename of this source file.
-
-
class
renderdoc.
ShaderDebugInfo
¶ Contains the information about a shader contained within API-specific debugging information attached to the shader.
Primarily this means the embedded original source files.
-
compileFlags
¶ A
ShaderCompileFlags
containing the flags used to compile this shader.
-
files
¶ A list of
ShaderSourceFile
.The first entry in the list is always the file where the entry point is.
-
-
class
renderdoc.
ShaderReflection
¶ The reflection and metadata fully describing a shader.
The information in this structure is API agnostic, and is matched up against a
ShaderBindpointMapping
instance to map the information here to the API’s binding points and resource binding scheme.-
constantBlocks
¶ A list of
ConstantBlock
with the shader’s constant bindings.
-
debugInfo
¶ A
ShaderDebugInfo
containing any embedded debugging information in this shader.
-
dispatchThreadsDimension
¶ The 3D dimensions of a compute workgroup, for compute shaders.
-
encoding
¶ The
ShaderEncoding
of this shader. SeerawBytes
.
-
entryPoint
¶ The entry point in the shader for this reflection, if multiple entry points exist.
-
inputSignature
¶ A list of
SigParameter
with the shader’s input signature.
-
interfaces
¶ A list of strings with the shader’s interfaces. Largely an unused API feature.
-
outputSignature
¶ A list of
SigParameter
with the shader’s output signature.
-
readOnlyResources
¶ A list of
ShaderResource
with the shader’s read-only resources.
-
readWriteResources
¶ A list of
ShaderResource
with the shader’s read-write resources.
-
resourceId
¶ The
ResourceId
of this shader.
-
samplers
¶ A list of
ShaderSampler
with the shader’s samplers.
-
stage
¶ The
ShaderStage
that this shader corresponds to, if multiple entry points exist.
-
-
class
renderdoc.
Bindpoint
¶ Declares the binding information for a single resource binding.
See
ShaderBindpointMapping
for how this mapping works in detail.-
arraySize
¶ If this is an arrayed binding, the number of elements in the array.
-
bind
¶ The binding index.
-
bindset
¶ The binding set.
-
used
¶ True
if the shader actually uses this resource, otherwise it’s declared but unused.
-
-
class
renderdoc.
ShaderBindpointMapping
¶ This structure goes hand in hand with
ShaderReflection
to determine how to map from bindpoint indices in the resource lists there to API-specific binding points. ThebindPoint
member inShaderResource
orConstantBlock
refers to an index in these associated lists, which then map potentially sparsely and potentially in different orders to the appropriate API registers, indices, or slots.API specific details:
Direct3D11 - All
Bindpoint.bindset
values are 0 as D3D11 has no notion of sets, and the only namespacing that exists is by shader stage and object type. Mostly this already exists with the constant block, read only and read write resource lists.Bindpoint.arraySize
is likewise unused as D3D11 doesn’t have arrayed resource bindings.Bindpoint.bind
refers to the register/slot binding within the appropriate type (SRVs for read-only resources, UAV for read-write resources, samplers/constant buffers in each type).OpenGL - Similarly to D3D11,
Bindpoint.bindset
andBindpoint.arraySize
are unused as OpenGL does not have true binding sets or array resource binds.For OpenGL there may be many more duplicate
Bindpoint
objects as theBindpoint.bind
refers to the index in the type-specific list, which is much more granular on OpenGL. E.g.0
may refer to images, storage buffers, and atomic buffers all within thereadWriteResources
list. The index is the uniform value of the binding. Since no objects are namespaced by shader stage, the same value in two shaders refers to the same binding.Direct3D12 - Since D3D12 doesn’t have true resource arrays (they are linearised into sequential registers)
Bindpoint.arraySize
is not used.Bindpoint.bindset
corresponds to register spaces, withBindpoint.bind
then mapping to the register within that space. The root signature then maps these registers to descriptors.Vulkan - For Vulkan
Bindpoint.bindset
corresponds to the index of the descriptor set, andBindpoint.bind
refers to the index of the descriptor within that set.Bindpoint.arraySize
also is used as descriptors in Vulkan can be true arrays, bound all at once to a single binding.
-
constantBlocks
¶ Provides a list of
Bindpoint
entries for remapping theShaderReflection.constantBlocks
list.
-
inputAttributes
¶ This maps input attributes as a simple swizzle on the
ShaderReflection.inputSignature
indices for APIs where this mapping is mutable at runtime.
-
readOnlyResources
¶ Provides a list of
Bindpoint
entries for remapping theShaderReflection.readOnlyResources
list.
-
readWriteResources
¶ Provides a list of
Bindpoint
entries for remapping theShaderReflection.readWriteResources
list.
-
samplers
¶ Provides a list of
Bindpoint
entries for remapping theShaderReflection.samplers
list.