Main Interfaces

Context

class qrenderdoc.CaptureContext

The capture context that the python script is running in.

APIProps()

Retrieve the APIProperties for the currently loaded capture.

Returns

The API properties.

Return type

renderdoc.APIProperties

AddCaptureViewer(viewer)

Register a new instance of CaptureViewer to receive capture event notifications.

Parameters

viewer# (CaptureViewer) – The viewer to register.

AddDockWindow(newWindow, ref, refWindow, percentage=0.5)
AddDockWindow(newWindow, ref, refWindow) None

Adds a new window within the docking system.

Parameters
  • newWindow# (QWidget) – The new window to add.

  • ref# (DockReference) – The location to add the new window, possibly relative to refWindow.

  • refWindow# (QWidget) – The window to refer to if the new window is being added relative, or can be None if the new location is absolute.

  • percentage# (float) – Optionally the percentage to split the area. If omitted, a 50% split is used.

AddMessages(msgs)

Add messages into the list returned by DebugMessages(). Initially set to unread.

Parameters

msgs# (List[renderdoc.DebugMessage]) – A list of debug messages to add.

BuiltinWindowClosed(window)

Marks a built-in window as closed.

This function is intended for internal use by the built-in windows for singleton management, and should not be called by user code.

Parameters

window# (QWidget) – The built-in window that closed.

CloseCapture()

Close the currently open capture file.

Config()

Retrieve the current persistant config.

Returns

The current persistant config manager.

Return type

PersistantConfig

ConnectToRemoteServer(host)

Connect to a remote server.

Parameters

host# (RemoteHost) – The host to connect to.

CreateBuiltinWindow(objectName)

Creates and returns a built-in window.

This function is intended for internal use for restoring layouts, and generally should not be used by user code.

Parameters

objectName# (str) – The built-in name of a singleton window.

Returns

The handle to the existing or newly created window of this type.

Return type

QWidget

CreateWindowingData(window)

Create an opaque pointer suitable for passing to CreateOutput() or other functions that expect windowing data.

Note

This function must be called on the main UI thread.

Parameters

window# (QWidget) – The window to create windowing data for.

Returns

The windowing data.

Return type

renderdoc.WindowingData

CurAction()

Retrieve the current action.

Returns

The current action, or None if no action is selected.

Return type

renderdoc.ActionDescription

CurD3D11PipelineState()

Retrieve the current D3D11State pipeline state.

The return value will be None if the capture is not using the D3D11 API. You should determine the API of the capture first before fetching it.

Returns

The current D3D11 pipeline state.

Return type

renderdoc.D3D11State

CurD3D12PipelineState()

Retrieve the current D3D12State pipeline state.

The return value will be None if the capture is not using the D3D12 API. You should determine the API of the capture first before fetching it.

Returns

The current D3D12 pipeline state.

Return type

renderdoc.D3D12State

CurEvent()

Retrieve the current eventId.

Returns

The current event.

Return type

int

CurGLPipelineState()

Retrieve the current GLState pipeline state.

The return value will be None if the capture is not using the OpenGL API. You should determine the API of the capture first before fetching it.

Returns

The current OpenGL pipeline state.

Return type

renderdoc.GLState

CurPipelineState()

Retrieve the current PipeState abstracted pipeline state.

This pipeline state will always be valid, and allows queries that will work regardless of the capture’s API.

Returns

The current API-agnostic abstracted pipeline state.

Return type

renderdoc.PipeState

CurRootActions()

Retrieve the root list of actions in the current capture.

Returns

The root actions.

Return type

List[renderdoc.ActionDescription]

CurSelectedAction()

Retrieve the currently selected action.

In most cases, prefer using CurAction(). See CaptureViewer.OnSelectedEventChanged() for more information for how this differs.

Returns

The currently selected action.

Return type

renderdoc.ActionDescription

CurSelectedEvent()

Retrieve the currently selected eventId.

In most cases, prefer using CurEvent(). See CaptureViewer.OnSelectedEventChanged() for more information for how this differs.

Returns

The current selected event.

Return type

int

CurVulkanPipelineState()

Retrieve the current VKState pipeline state.

The return value will be None if the capture is not using the Vulkan API. You should determine the API of the capture first before fetching it.

Returns

The current Vulkan pipeline state.

Return type

renderdoc.VKState

CurWindowingSystem()

Retrieve the current windowing system in use.

Returns

The active windowing system.

Return type

renderdoc.WindowingSystem

CustomShaderEncodings()

Retrieve the list of ShaderEncoding that are available for building custom shaders for the currently loaded capture. See BuildCustomShader().

Returns

The available encodings.

Return type

List[renderdoc.ShaderEncoding]

CustomShaderSourcePrefixes()

Retrieve the list of prefixes for each ShaderEncoding that should be added to custom compiled shaders. See GetCustomShaderSourcePrefixes().

Returns

A list of pairs, listing a prefix for each shader encoding referenced.

Return type

List[renderdoc.ShaderSourcePrefix]

DebugMessages()

Retrieve the current list of debug messages. This includes messages from the capture as well as messages generated during replay and analysis.

Returns

The debug messages generated to date.

Return type

List[renderdoc.DebugMessage]

DebugShader(shader, pipeline, trace, debugContext)

Show a new ShaderViewer window, showing a read-only view of a debug trace through the execution of a given shader.

Parameters
  • shader# (renderdoc.ShaderReflection) – The reflection data for the shader to view.

  • pipeline# (renderdoc.ResourceId) – The pipeline state object, if applicable, that this shader is bound to.

  • trace# (renderdoc.ShaderDebugTrace) – The execution trace of the debugged shader.

  • debugContext# (str) – A human-readable context string describing which invocation of this shader was debugged. For example ‘Pixel 12,34 at eventId 678’.

Returns

The new ShaderViewer window opened, but not shown.

Return type

ShaderViewer

EditShader(id, stage, entryPoint, files, knownTool, shaderEncoding, flags, saveCallback, revertCallback)

Show a new ShaderViewer window, showing an editable view of a given shader.

Parameters
  • id# (renderdoc.ResourceId) – The shader object, if applicable, that’s being edited. If this edit corresponds to no shader object (such as if it’s a custom shader) this can be a null ID.

  • stage# (renderdoc.ShaderStage) – The shader stage for this shader.

  • entryPoint# (str) – The entry point to be used when compiling the edited shader.

  • files# (List[Tuple[str,str]]) – The source files, with each tuple being a pair of the filename and the file contents.

  • knownTool# (renderdoc.KnownShaderTool) – The preferred tool to use to compile, if known.

  • shaderEncoding# (renderdoc.ShaderEncoding) – The encoding of the input files.

  • flags# (renderdoc.ShaderCompileFlags) – The flags originally used to compile the shader.

  • saveCallback# (ShaderViewer.SaveCallback) – The callback function to call when a save/update is triggered.

  • revertCallback# (ShaderViewer.RevertCallback) – The callback function to call when the shader is to be reverted - either by user request or because the shader viewer was closed.

Returns

The new ShaderViewer window opened but not shown for editing.

Return type

ShaderViewer

ExportCapture(fmt, exportfile)

Exports the current capture file to a given path with a specified capture file format.

The capture must be available locally, if it’s not this function will fail.

Parameters
Extensions()

Retrieve the manager for extensions.

Returns

The current extension manager.

Return type

ExtensionManager

FrameInfo()

Retrieve the FrameDescription for the currently loaded capture.

Returns

The frame information.

Return type

renderdoc.FrameDescription

GetAPIInspector()

Retrieve the current singleton APIInspector.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

APIInspector

GetAction(eventId)

Retrieve the information about an action at a given eventId.

Parameters

eventId# (int) – The eventId to query for.

Returns

The information about the action, or None if the eventId doesn’t correspond to an action.

Return type

renderdoc.ActionDescription

GetBookmarks()

Get the current list of bookmarks in the capture. Each bookmark is associated with an eventId and has some text attached. There will only be at most one bookmark for any given eventId.

The list of bookmarks is not necessarily sorted by eventId. Thus, bookmark 1 is always bookmark 1 until it is removed, the indices do not shift as new bookmarks are added or removed.

Returns

The currently set bookmarks.

Return type

List[EventBookmark]

GetBuffer(id)

Retrieve the information about a particular buffer.

Parameters

id# (renderdoc.ResourceId) – The ID of the buffer to query about.

Returns

The information about a buffer, or None if the ID does not correspond to a buffer.

Return type

renderdoc.BufferDescription

GetBuffers()

Retrieve the list of buffers in the current capture.

Returns

The list of buffers.

Return type

List[renderdoc.BufferDescription]

GetCaptureDialog()

Retrieve the current singleton CaptureDialog.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

CaptureDialog

GetCaptureFilename()

Retrieve the filename for the currently loaded capture.

Returns

The filename of the current capture.

Return type

str

GetCaptureModifications()

Get a bitmask indicating which modifications (if any) have been made to the capture in the UI which aren’t reflected in the capture file on disk.

Returns

The modifications (if any) that have been made to the capture.

Return type

CaptureModifications

GetCommentView()

Retrieve the current singleton CommentView.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

CommentView

GetDebugMessageView()

Retrieve the current singleton DebugMessageView.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

DebugMessageView

GetDescriptorStore(id)

Retrieve the information about a particular descriptor store.

Parameters

id# (renderdoc.ResourceId) – The ID of the buffer to query about.

Returns

The information about a descriptor store, or None if the ID does not correspond to a descriptor store.

Return type

renderdoc.DescriptorStoreDescription

GetDiagnosticLogView()

Retrieve the current singleton LogView.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

DiagnosticLogView

GetEventBrowser()

Retrieve the current singleton EventBrowser.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

EventBrowser

GetFatalError()

If a capture is loaded, return the current fatal error status.

Returns

If a capture is currently loaded, return the fatal error status.

Return type

renderdoc.ResultDetails

GetFirstAction()

Retrieve the first action in the capture.

Returns

The first action.

Return type

renderdoc.ActionDescription

GetLastAction()

Retrieve the last action in the capture.

Returns

The last action.

Return type

renderdoc.ActionDescription

GetMainWindow()

Retrieve the current singleton MainWindow.

Returns

The current window.

Return type

MainWindow

GetMeshPreview()

Retrieve the current singleton BufferViewer configured for mesh viewing.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

BufferViewer

GetNotes(key)

Retrieve the contents for a given notes field.

Examples of fields are:

  • ‘comments’ for generic comments to be displayed in a text field

  • ‘hwinfo’ for a plaintext summary of the hardware and driver configuration of the system.

Parameters

key# (str) – The name of the notes field to retrieve.

Returns

The contents, or an empty string if the field doesn’t exist.

Return type

str

GetPerformanceCounterViewer()

Retrieve the current singleton PerformanceCounterViewer.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

PerformanceCounterViewer

GetPipelineViewer()

Retrieve the current singleton PipelineStateViewer.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

PipelineStateViewer

GetPythonShell()

Retrieve the current singleton PythonShell.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

PythonShell

GetRGPInterop()

Returns the current interop handle for RGP.

This may return None in several cases:

  • if there is no capture loaded

  • if no RGP profile has been associated with the current capture yet (See OpenRGPProfile())

  • if RGP failed to launch or connect.

The handle returned is invalidated when the capture is closed, or if OpenRGPProfile() is called.

Returns

The RGP interop connection handle.

Return type

RGPInterop

GetResource(id)

Retrieve the information about a particular resource.

Parameters

id# (renderdoc.ResourceId) – The ID of the resource to query about.

Returns

The information about a resource, or None if the ID does not correspond to a resource.

Return type

renderdoc.ResourceDescription

GetResourceInspector()

Retrieve the current singleton ResourceInspector.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

ResourceInspector

GetResourceName(id)

Retrieve the human-readable name for the resource to display.

This will first check to see if a custom name has been set for the resource, and if so use that. See SetResourceCustomName(). If no custom name has been set, it will use the resource name found in the capture, either a name set via API-specific debug methods, or an auto-generated name based on the resource type.

Parameters

id# (renderdoc.ResourceId) – The ID of the resource to query.

Returns

The current name of the resource.

Return type

str

GetResourceNameUnsuffixed(id)

Returns the same name as GetResourceName() but without any added suffix, e.g. to indicate the resource’s status such as (Edited).

Parameters

id# (renderdoc.ResourceId) – The ID of the resource to query.

Returns

The unsuffixed resource name.

Return type

str

GetResourceReplacement(id)

Return the id of a replacement for the given resource. See RegisterReplacement() and IsResourceReplaced().

Parameters

id# (renderdoc.ResourceId) – The id of the resource to check.

Returns

The replacement id, or a null id if the resource hasn’t been replaced

Return type

renderdoc.ResourceId

GetResources()

Retrieve the list of resources in the current capture.

Returns

The list of resources.

Return type

List[renderdoc.ResourceDescription]

GetStatisticsViewer()

Retrieve the current singleton StatisticsViewer.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

StatisticsViewer

GetStructuredFile()

Retrieve the SDFile for the currently open capture.

Returns

The structured file.

Return type

renderdoc.SDFile

GetTexture(id)

Retrieve the information about a particular texture.

Parameters

id# (renderdoc.ResourceId) – The ID of the texture to query about.

Returns

The information about a texture, or None if the ID does not correspond to a texture.

Return type

renderdoc.TextureDescription

GetTextureViewer()

Retrieve the current singleton TextureViewer.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

TextureViewer

GetTextures()

Retrieve the list of textures in the current capture.

Returns

The list of textures.

Return type

List[renderdoc.TextureDescription]

GetTimelineBar()

Retrieve the current singleton TimelineBar.

Returns

The current window, which is created (but not shown) it there wasn’t one open.

Return type

TimelineBar

HasAPIInspector()

Check if there is a current APIInspector open.

Returns

True if there is a window open.

Return type

bool

HasCaptureDialog()

Check if there is a current CaptureDialog open.

Returns

True if there is a window open.

Return type

bool

HasCommentView()

Check if there is a current CommentView open.

Returns

True if there is a window open.

Return type

bool

HasDebugMessageView()

Check if there is a current DebugMessageView open.

Returns

True if there is a window open.

Return type

bool

HasDiagnosticLogView()

Check if there is a current DiagnosticLogView open.

Returns

True if there is a window open.

Return type

bool

HasEventBrowser()

Check if there is a current EventBrowser open.

Returns

True if there is a window open.

Return type

bool

HasMeshPreview()

Check if there is a current mesh previewing BufferViewer open.

Returns

True if there is a window open.

Return type

bool

HasPerformanceCounterViewer()

Check if there is a current PerformanceCounterViewer open.

Returns

True if there is a window open.

Return type

bool

HasPipelineViewer()

Check if there is a current PipelineStateViewer open.

Returns

True if there is a window open.

Return type

bool

HasPythonShell()

Check if there is a current PythonShell open.

Returns

True if there is a window open.

Return type

bool

HasResourceCustomName(id)

Checks whether a runtime custom name has been set with SetResourceCustomName().

In general, IsAutogeneratedName() should be preferred to check if the resource name is default generated just from the ID, or if it has been set to some human readable name. This function will only check if a name has been set in the UI itself, a resource could still have a custom name that was set programmatically during capture time.

Parameters

id# (renderdoc.ResourceId) – The ID of the resource to query.

Returns

Whether the name for the resource has been customised with SetResourceCustomName().

Return type

bool

HasResourceInspector()

Check if there is a current ResourceInspector open.

Returns

True if there is a window open.

Return type

bool

HasStatisticsViewer()

Check if there is a current StatisticsViewer open.

Returns

True if there is a window open.

Return type

bool

HasTextureViewer()

Check if there is a current TextureViewer open.

Returns

True if there is a window open.

Return type

bool

HasTimelineBar()

Check if there is a current TimelineBar open.

Returns

True if there is a window open.

Return type

bool

ImportCapture(fmt, importfile, rdcfile)

Imports a capture file from a non-native format, via conversion to temporary rdc.

This converts the file to a specified temporary .rdc and loads it, closing any existing capture.

The capture must be available locally, if it’s not this function will fail.

Parameters
  • fmt# (renderdoc.CaptureFileFormat) – The capture file format to import from.

  • importfile# (str) – The path to import from.

  • rdcfile# (str) – The temporary path to save the rdc file to.

Returns

True if the import operation was successful and the capture was loaded.

Return type

bool

IsAutogeneratedName(id)

Determines whether the name for the given resource has been customised at all, either during capture time or with SetResourceCustomName().

If not, the name is just auto-generated based on the ID and resource type, so depending on circumstance it may be preferable to omit the name.

Parameters

id# (renderdoc.ResourceId) – The ID of the resource to query.

Returns

Whether the name for the resource has just been auto-generated.

Return type

bool

IsCaptureLoaded()

Check whether or not a capture is currently loaded.

Returns

True if a capture is loaded.

Return type

bool

IsCaptureLoading()

Check whether or not a capture is currently loading in-progress.

Returns

True if a capture is currently loading.

Return type

bool

IsCaptureLocal()

Check whether or not the current capture is stored locally, or on a remote host.

Returns

True if a capture is local.

Return type

bool

IsCaptureTemporary()

Check whether or not the current capture is considered temporary. Captures that were made by an application and then have not been explicitly saved anywhere are temporary and will be cleaned up on close (with a final prompt to save). Once they are save to disk, they are no longer temporary and treated like any other capture.

Returns

True if a capture is temporary.

Return type

bool

IsResourceReplaced(id)

Determine if a resource has been replaced. See RegisterReplacement().

Parameters

id# (renderdoc.ResourceId) – The id of the resource to check.

Returns

True if the resource has been replaced.

Return type

bool

LoadCapture(captureFile, opts, origFilename, temporary, local)

Open a capture file for replay.

Parameters
  • captureFile# (str) – The actual path to the capture file.

  • opts# (renderdoc.ReplayOptions) – The options controlling how the capture should be replayed.

  • origFilename# (str) – The original filename, if the capture was copied remotely for replay.

  • temporary# (bool) – True if this is a temporary capture which should prompt the user for either save or delete on close.

  • local# (bool) – True if captureFile refers to a file on the local machine.

MarkMessagesRead()

Mark all messages as read, resets UnreadMessageCount() to 0.

OpenRGPProfile(filename)

Sets the path to the RGP profile to use with GetRGPInterop(), launches RGP and opens an interop connection. This function will block (with a progress dialog) until either an error is encountered or else the connection is successfully established.

This could be newly created, or extracted from an embedded section in the RDC.

The connection is automatically closed when the capture is closed. If OpenRGPProfile is called again, any previous connection will be closed.

Parameters

filename# (str) – The filename of the extracted temporary RGP capture on disk.

Returns

Whether RGP launched successfully.

Return type

bool

RaiseDockWindow(dockWindow)

Raises a window within its docking manager so it becomes the focus of wherever it is currently docked.

Parameters

dockWindow# (QWidget) – The window to raise.

RecompressCapture()

Recompress the current capture as much as possible.

RefreshStatus()

Replay the capture to the current event again, to pick up any changes that might have been made.

RegisterReplacement(arg2, to)

Register that a resource has replaced, so that the UI can be updated to reflect the change.

This should be called at the same time as ReplayController.ReplaceResource().

Parameters
RemoveBookmark(eventId)

Remove a bookmark at a given eventId.

If no bookmark exists, this function will do nothing.

Parameters

eventId# (int) – The eventId of the bookmark to remove.

RemoveCaptureViewer(viewer)

Unregister an instance of CaptureViewer from receiving notifications.

Parameters

viewer# (CaptureViewer) – The viewer to unregister.

Replay()

Retrieve the replay manager for access to the internal RenderDoc replay controller.

Returns

The current replay manager.

Return type

ReplayManager

ResourceNameCacheID()

Returns an index that can be used to cache the results of resource naming.

In some cases (e.g. formatting in widgets) there might be high frequency fetches to names without an easy way to force a refresh on a rename. Instead, the index here can be cached and compared each time to see if any names have changed.

The index starts at 1, so initialising an internal cache to 0 will cause the first check to be considered out of date

Returns

An incrementing index that can be used as a quick check if any names have changed.

Return type

int

SaveCaptureTo(captureFile)

Saves the current capture file to a given path.

If the capture was temporary, this save action means it is no longer temporary and will be treated like any other capture.

Any modifications to the capture (see GetCaptureModifications()) will be applied at the same time.

Parameters

captureFile# (str) – The path to save the capture file to.

Returns

True if the save operation was successful.

Return type

bool

SetBookmark(mark)

Set or update a bookmark.

A bookmark will be added at the specified eventId, or if one already exists then the attached text will be replaced.

Parameters

mark# (EventBookmark) – The bookmark to add.

SetEventID(exclude, selectedEventId, eventId, force=False)
SetEventID(exclude, selectedEventId, eventId) None

Move the current replay to a new event in the capture.

Parameters
SetNotes(key, contents)

Set the contents for a given notes field.

See GetNotes() for a list of possible common field keys.

Parameters
  • key# (str) – The name of the notes field to set.

  • contents# (str) – The new contents to assign to that field.

SetResourceCustomName(id, name)

Set a custom name for a resource.

This allows an override to the name returned by GetResourceName(), most useful when there are no pre-existing debug names specified in the capture.

To remove a custom name that has been set previously, specify the empty string as the name. Then the custom name will be removed, and instead GetResourceName() will fall back to returning any name fetched from the capture.

Parameters
  • id# (renderdoc.ResourceId) – The ID of the resource to name.

  • name# (str) – The name to provide, or an empty string to remove any previous custom name.

ShowAPIInspector()

Raise the current APIInspector, showing it in the default place if needed.

ShowCaptureDialog()

Raise the current CaptureDialog, showing it in the default place if needed.

ShowCommentView()

Raise the current CommentView, showing it in the default place if needed.

ShowDebugMessageView()

Raise the current DebugMessageView, showing it in the default place if needed.

ShowDiagnosticLogView()

Raise the current DiagnosticLogView, showing it in the default place if needed.

ShowEventBrowser()

Raise the current EventBrowser, showing it in the default place if needed.

ShowMeshPreview()

Raise the current mesh previewing BufferViewer, showing it in the default place if needed.

ShowPerformanceCounterViewer()

Raise the current PerformanceCounterViewer, showing it in the default place if needed.

ShowPipelineViewer()

Raise the current PipelineStateViewer, showing it in the default place if needed.

ShowPythonShell()

Raise the current PythonShell, showing it in the default place if needed.

ShowResourceInspector()

Raise the current ResourceInspector, showing it in the default place if needed.

ShowStatisticsViewer()

Raise the current StatisticsViewer, showing it in the default place if needed.

ShowTextureViewer()

Raise the current TextureViewer, showing it in the default place if needed.

ShowTimelineBar()

Raise the current TimelineBar, showing it in the default place if needed.

TargetShaderEncodings()

Retrieve the list of ShaderEncoding that are available for building target shaders for the currently loaded capture. See BuildTargetShader().

Returns

The available encodings.

Return type

List[renderdoc.ShaderEncoding]

TempCaptureFilename(appname)

Retrieve the absolute path where a given temporary capture should be stored. data.

Parameters

appname# (str) – The name of the application to use as part of the template.

Returns

The absolute path.

Return type

str

UnreadMessageCount()

Retrieve how many messages in DebugMessages() are currently unread.

Returns

The number of unread messages.

Return type

int

UnregisterReplacement(id)

Register that a replacement has been removed, so that the UI can be updated to reflect the change.

This should be called at the same time as ReplayController.RemoveReplacement().

See ReplaceResource().

Parameters

id# (renderdoc.ResourceId) – The id of the original resource that was previously replaced.

ViewBuffer(byteOffset, byteSize, id, format)
ViewBuffer(byteOffset, byteSize, id) None

Show a new BufferViewer window, showing a read-only view of buffer data.

Parameters
  • byteOffset# (int) – The offset in bytes to the start of the buffer data to show.

  • byteSize# (int) – The number of bytes in the buffer to show.

  • id# (renderdoc.ResourceId) – The ID of the buffer to fetch data from.

  • format# (str) – Optionally a HLSL/GLSL style formatting string.

Returns

The new BufferViewer window opened, but not shown.

Return type

BufferViewer

ViewConstantBuffer(stage, slot, idx)

Show a new BufferViewer window, showing a read-only view of a the variables in a constant buffer with their values.

Parameters
  • stage# (renderdoc.ShaderStage) – The stage that the constant buffer is bound to.

  • slot# (int) – The index in the shader’s constant buffer list to look up.

  • idx# (int) – For APIs that support arrayed resource binds, the index in the constant buffer array.

Returns

The new BufferViewer window opened, but not shown.

Return type

BufferViewer

ViewDescriptorStore(id)

Show a new DescriptorViewer window, showing the full raw contents of a descriptor store.

Parameters

id# (renderdoc.ResourceId) – The ID of the descriptor store to fetch data from.

Returns

The new DescriptorViewer window opened, but not shown.

Return type

DescriptorViewer

ViewDescriptors(descriptors, samplerDescriptors)

Show a new DescriptorViewer window, showing contents of an arbitrary list of descriptors.

The descriptor lists should be in parallel, with identical sizes. If a non-sampler descriptor is to be displayed, the corresponding sampler descriptor should be uninitialised and vice-versa. If the lists are not the same length, only indices up to the minimum of the two lengths will be used.

This function should not be used to view the entirety of a descriptor store - in that case the ViewDescriptorStore() function will be more efficient.

Parameters
Returns

The new DescriptorViewer window opened, but not shown.

Return type

DescriptorViewer

ViewPixelHistory(id, x, y, view, display)

Show a new PixelHistoryView window, showing the results from a pixel history operation.

Parameters
  • id# (renderdoc.ResourceId) – The ID of the texture to show the history of.

  • x# (int) – The x co-ordinate of the pixel to search for.

  • y# (int) – The y co-ordinate of the pixel to search for.

  • view# (int) – The layered or multiview rendering view index of the pixel to search for.

  • display# (renderdoc.TextureDisplay) – The texture display configuration to use when looking up the history.

Returns

The new PixelHistoryView window opened, but not shown.

Return type

PixelHistoryView

ViewShader(shader, pipeline)

Show a new ShaderViewer window, showing a read-only view of a given shader.

Parameters
Returns

The new ShaderViewer window opened, but not shown.

Return type

ShaderViewer

ViewShaderMessages(stages)

Show a new ShaderMessageViewer window, showing the current event’s messages.

Parameters

stages# (renderdoc.ShaderStageMask) – The initial stages being viewed.

Returns

The new ShaderMessageViewer window opened, but not shown.

Return type

ShaderMessageViewer

ViewTextureAsBuffer(id, sub, format)
ViewTextureAsBuffer(id, sub) None

Show a new BufferViewer window, showing a read-only view of a texture’s raw bytes.

Parameters
Returns

The new BufferViewer window opened, but not shown.

Return type

BufferViewer

Replay Manager

class qrenderdoc.ReplayManager

A manager for accessing the underlying replay information that isn’t already abstracted in UI side structures. This manager controls and serialises access to the underlying ReplayController, as well as handling remote server connections.

InvokeCallback(controller)

Not a member function - the signature for any InvokeCallback callbacks.

Parameters

controller (renderdoc.ReplayController) – The controller to access. Must not be cached or used after the callback returns.

DirectoryBrowseCallback(path, entries)

Not a member function - the signature for any DirectoryBrowseCallback callbacks.

Parameters
  • path (str) – The path that was queried for.

  • entries (List[renderdoc.PathEntry]) – The entries underneath the path, as relevant.

AsyncInvoke(tag, method)
AsyncInvoke(method) None

Make a tagged non-blocking invoke call onto the replay thread.

This tagged function is for cases when we might send a request - e.g. to pick a vertex or pixel - and want to pre-empt it with a new request before the first has returned. Either because some other work is taking a while or because we’re sending requests faster than they can be processed.

The manager processes only the request on the top of the queue, so when a new tagged invoke comes in, we remove any other requests in the queue before it that have the same tag.

Parameters
  • tag# (str) – The tag to identify this callback.

  • method# (InvokeCallback) – The function to callback on the replay thread.

BlockInvoke(m)

Make a blocking invoke call onto the replay thread.

Parameters

method# (InvokeCallback) – The function to callback on the replay thread.

CancelReplayLoop()

Cancels the active replay loop. See ReplayLoop().

ConnectToRemoteServer(host)

Connect to a remote server.

Parameters

host# (RemoteHost) – The host to connect to.

Returns

Whether or not the connection was successful.

Return type

renderdoc.ResultDetails

CopyCaptureFromRemote(remotepath, localpath, window)

Copy a capture from the remote host to the local machine.

Parameters
  • remotepath# (str) – The path on the remote server to copy from.

  • localpath# (str) – The path on the local machine to copy to.

  • window# (QWidget) – A handle to the window to use when showing a progress bar.

CopyCaptureToRemote(localpath, window)

Copy a capture from the local machine to the remote host.

Parameters
  • localpath# (str) – The path on the local machine to copy from.

  • window# (QWidget) – A handle to the window to use when showing a progress bar.

Returns

The path on the local machine where the file was saved, or empty if something went wrong.

Return type

str

CurrentRemote()

Retrieves the host that the manager is currently connected to.

Returns

The host connected to, or an invalid RemoteHost if no connection is active.

Return type

RemoteHost

DeleteCapture(capturefile, local)

Delete a capture file, whether local or remote.

Parameters
  • capturefile# (str) – The path to the file.

  • local# (bool) – True if the file is on the local machine.

DisconnectFromRemoteServer()

Disconnect from the server the manager is currently connected to.

ExecuteAndInject(exe, workingDir, cmdLine, env, capturefile, opts)

Launch an application and inject into it to allow capturing.

This happens either locally, or on the remote server, depending on whether a connection is active.

Parameters
  • exe# (str) – The path to the executable to run.

  • workingDir# (str) – The working directory to use when running the application. If blank, the directory containing the executable is used.

  • cmdLine# (str) – The command line to use when running the executable, it will be processed in a platform specific way to generate arguments.

  • env# (List[renderdoc.EnvironmentModification]) – Any environment changes that should be made when running the program.

  • capturefile# (str) – The location to save any captures, if running locally.

  • opts# (renderdoc.CaptureOptions) – The capture options to use when injecting into the program.

Returns

The ExecuteResult indicating both the status of the operation (success or failure) and any reason for failure, or else the ident where the new application is listening for target control if everything succeeded.

Return type

renderdoc.ExecuteResult

GetCaptureAccess()

Retrieves the capture access handle for the currently open file.

Returns

The file handle active, or None if no capture is open.

Return type

renderdoc.CaptureAccess

GetCaptureFile()

Retrieves the capture file handle for the currently open file, if it is available.

If the capture is not open locally this will not be available, and only GetCaptureAccess() will be usable.

Returns

The file handle active, or None if no capture is open or the capture is only available remotely.

Return type

renderdoc.CaptureFile

GetCurrentProcessingTime()

Return the amount of time that the currently active command on the replay thread has been executing for.

This can be used to identify if a command is long-running to display a progress bar or notification.

Returns

The time in seconds that the current command has been executing for, or 0.0 if no command is executing.

Return type

float

GetHomeFolder(synchronous, callback)

Query the remote host for its home directory.

If a capture is open, the callback will happen on the replay thread, otherwise it will happen in a blocking fashion on the current thread.

Parameters
  • synchronous# (bool) – If a capture is open, then True will use BlockInvoke() to call the callback. Otherwise if False then AsyncInvoke() will be used.

  • callback# (DirectoryBrowseCallback) – The function to callback on the replay thread.

GetRemoteSupport()

Retrieve a list of drivers that the current remote server supports.

Returns

The list of supported replay drivers.

Return type

List[str]

ListFolder(path, synchronous, callback)

Query the remote host for the contents of a path.

If a capture is open, the callback will happen on the replay thread, otherwise it will happen in a blocking fashion on the current thread.

Parameters
  • path# (str) – The path to query the contents of.

  • synchronous# (bool) – If a capture is open, then True will use BlockInvoke() to call the callback. Otherwise if False then AsyncInvoke() will be used.

  • callback# (DirectoryBrowseCallback) – The function to callback on the replay thread.

PingRemote()

Ping the remote server to ensure the connection is still alive.

ShutdownServer()

Shutdown the server the manager is currently connected to.

RGP Interop Control

class qrenderdoc.RGPInterop

Controlling interface for interop with RGP tool.

HasRGPEvent(eventId)

Return true if the given eventId has and equivalent in RGP.

Parameters

eventId# (int) – The eventId to query for.

Returns

True if there is an equivalent. This only confirms the equivalent exists, not that it will be selectable in all cases.

Return type

bool

SelectRGPEvent(eventId)

Select the given eventId equivalent in RGP.

Parameters

eventId# (int) – The eventId to query for.

Returns

True if the selection request succeeded. This only confirms the request was sent, not that the event was selected in RGP.

Return type

bool

CaptureViewer Interface

class qrenderdoc.CaptureViewer

An interface implemented by any object wanting to be notified of capture events.

OnCaptureClosed()

Called whenever a capture is closed.

OnCaptureLoaded()

Called whenever a capture is opened.

OnEventChanged(eventId)

Called whenever the effective current event changes.

Parameters

eventId# (int) – The new eventId.

OnSelectedEventChanged(eventId)

Called whenever the current selected event changes. This is distinct from the actual effective current event, since for example selecting a marker region will change the current event to be the last event inside that region, to be consistent with selecting an item reflecting the current state after that item.

The selected event shows the eventId that was actually selected, which will usually but not always be the same as the current effective eventId.

The distinction for this callback is not normally desired, instead use OnEventChanged() to be notified whenever the current event changes. The API inspector uses this to display API events up to a marker region.

Parameters

eventId# (int) – The new eventId.

Utilities

class qrenderdoc.DockReference(value)

Specifies the relationship between the existing dock window and the new one when adding a new dock window or moving an existing dock window.

LastUsedArea

The existing dock window is not used, the new dock window is placed wherever the last dock window was placed.

NewFloatingArea

The existing dock window is not used, the new dock window is placed in a new floating area.

EmptySpace

The existing dock window is not used, the new dock window is placed in empty area in the dockarea.

NoArea

The existing dock window is not used, the new window is hidden.

AddTo

The new dock window is placed in a tab set with the existing dock window.

LeftOf

The new dock window is placed to the left of the existing dock window, at a specified proportion.

RightOf

The new dock window is placed to the right of the existing dock window, at a specified proportion.

TopOf

The new dock window is placed above the existing dock window, at a specified proportion.

BottomOf

The new dock window is placed below the existing dock window, at a specified proportion.

LeftWindowSide

The new dock window is placed left of all docks in the window, at a specified proportion.

RightWindowSide

The new dock window is placed right of all docks in the window, at a specified proportion.

TopWindowSide

The new dock window is placed above all docks in the window, at a specified proportion.

BottomWindowSide

The new dock window is placed below all docks in the window, at a specified proportion.

MainToolArea

The new dock window is placed in the ‘main’ tool area as defined by finding an existing known window and using that as the main area. In the default layout this is where most windows are placed.

LeftToolArea

The new dock window is placed in the ‘left’ tool area as defined by finding an existing known window and using that as the main area, then adding to the left of that. In the default layout this is where the event browser is placed.

TransientPopupArea

The new dock window is docked with other similar transient views like constant buffer or pixel history windows, if they exist, or else docked to the right of the main window.

class qrenderdoc.CaptureModifications(value)

Details any changes that have been made to a capture in the UI which can be saved to disk but currently aren’t. Note that detection is conservative - e.g. if a change is made, then cancelled out by reversing the change, this will still count as ‘modified’ even if the end result is the same data. In that sense it’s analogous to adding and then deleting some characters in a text editor, since there is no actual undo system.

This is a bitmask, so several values can be present at once.

NoModifications

Fixed value of 0 indicating no modifications have been made.

Renames

One or more resources have been given a custom name which hasn’t been saved.

Bookmarks

Event bookmarks have been added or removed.

Notes

The general notes field has been changed.

EditedShaders

There are shader editing changes (new edits or reverts).

All

Fixed value with all bits set, indication all modifications have been made.

class qrenderdoc.CaptureSettings

Contains all of the settings that control how to capture an executable.

autoStart

True if this capture settings object should be immediately executed upon load.

commandLine

The command line to pass when running executable.

environment

The environment changes to apply.

Type

List[renderdoc.EnvironmentModification]

executable

The path to the executable to run.

inject

True if the described capture is an inject-into-process instead of a launched executable.

numQueuedFrames

The number of queued frames to capture, or 0 if no frames are queued to be captured.

options

The settings for the capture.

Type

renderdoc.CaptureOptions

queuedFrameCap

The first queued frame to capture. Ignored if numQueuedFrames is 0.

workingDir

The path to the working directory to run in, or blank for the executable’s directory.

class qrenderdoc.EventBookmark

A description of a bookmark on an event

eventId

The eventId at which this bookmark is placed.

text

The text associated with this bookmark - could be empty