# Persistant Config

Contents

- Persistant Config
  - Config
  - Remote Host

## Config

class `qrenderdoc.``PersistantConfig`

  A persistant config file that is automatically loaded and saved, which contains any settings and information that needs to be preserved from one run to the next.

  For more information about some of these settings that are user-facing see the documentation for the settings window.

  `UIStyle`

    The style to load for the UI. Possible values include ‘Native’, ‘RDLight’, ‘RDDark’. If empty, the closest of RDLight and RDDark will be chosen, based on the overall light-on-dark or dark-on-light theme of the application native style.

  `LastCaptureFilePath`

    The path to the last capture to be opened, which is useful as a default location for browsing.

  `LastFileBrowsePath`

    The path to the last file browsed to in any dialog. Used as a default location for all file browsers without another explicit default directory (such as opening capture files - see `LastCaptureFilePath`).

  `RecentCaptureFiles`

    A `list` of `str` with the recently opened capture files.

  `LastCapturePath`

    The path containing the last executable that was captured, which is useful as a default location for browsing.

  `LastCaptureExe`

    The filename of the last executable that was captured, inside `LastCapturePath`.

  `RecentCaptureSettings`

    A `list` of `str` with the recently opened capture settings files.

  `TemporaryCaptureDirectory`

    The path to where temporary capture files should be stored until they’re saved permanently.

  `DefaultCaptureSaveDirectory`

    The default path to save captures in, when browsing to save a temporary capture somewhere.

  `DefaultReplayOptions`

    A `ReplayOptions` containing the configured default replay options to use in most scenarios when no specific options are given.

  `TextureViewer_ResetRange`

    `True` if the `TextureViewer` should reset the visible range when a new texture is selected.

    Defaults to `False`.

  `TextureViewer_PerTexSettings`

    `True` if the `TextureViewer` should store most visualisation settings on a per-texture basis instead of keeping it persistent across different textures.

    Defaults to `True`.

  `TextureViewer_PerTexYFlip`

    `True` if the `TextureViewer` should treat y-flipping as a per-texture state rather than a global toggle.

    Does nothing if per-texture settings are disabled in general.

    Defaults to `False`.

  `AlwaysReplayLocally`

    `True` if when loading a capture that was originally captured on a remote device but uses an API that can be supported locally, should be loaded locally without prompting to switch to a remote context.

    Defaults to `False`.

  `LocalProxyAPI`

    The index of the local proxy API to use when using remote context replay. `-1` if the default proxy should be used.

    Defaults to `-1`.

  `BufferFormatter_ShowHelp`

    `True` if the buffer formatter’s help section should be shown.

    Defaults to `True`.

  `EventBrowser_TimeUnit`

    The `TimeUnit` to use to display the duration column in the `EventBrowser`.

    Defaults to microseconds.

  `EventBrowser_AddFake`

    `True` if fake drawcall marker regions should be added to captures that don’t have any markers, for easier browsing. The regions are identified by grouping drawcalls that write to the same targets together.

    Defaults to `True`.

  `EventBrowser_HideEmpty`

    `True` if the `EventBrowser` should hide marker regions that don’t contain any actual non-marker events.

    Defaults to `False`.

  `EventBrowser_HideAPICalls`

    `True` if the `EventBrowser` should hide marker regions that don’t contain any events that aren’t just drawcalls (this will hide events under “API Events” faux-markers).

    Defaults to `False`.

  `EventBrowser_ApplyColors`

    `True` if the `EventBrowser` should apply any colors specified with API marker regions.

    Defaults to `True`.

  `EventBrowser_ColorEventRow`

    `True` if when coloring marker regions in the `EventBrowser`, the whole row should be colored instead of just a side-bar.

    Defaults to `True`.

  `Comments_ShowOnLoad`

    `True` if when loading a new capture that contains a comments section, the comment viewer will be opened and focussed.

    Defaults to `False`.

  `Formatter_MinFigures`

    The minimum number of decimal places to show in formatted floating point values.

    Note

    The naming of ‘MinFigures’ is a historical artifact - this controls the number of decimal places only, not the number of significant figures.

    Defaults to `2`.

  `Formatter_MaxFigures`

    The maximum number of decimal places to show in formatted floating point values.

    Note

    The naming of ‘MaxFigures’ is a historical artifact - this controls the number of decimal places only, not the number of significant figures.

    Defaults to `5`.

  `Formatter_NegExp`

    The cut-off on negative exponents of a normalised values to display using scientific notation.

    E.g. for a value of 5, anything below 1.0e-5 will be displayed using scientific notation.

    Defaults to `5`.

  `Formatter_PosExp`

    The cut-off on the exponent of a normalised values to display using scientific notation.

    E.g. for a value of 7, anything above 1.0e+7 will be displayed using scientific notation.

    Defaults to `7`.

  `Font_PreferMonospaced`

    `True` if a monospaced font should be used in all places where data is displayed, even if the data is not tabular such as names.

    Defaults to `False`.

  `UnsupportedAndroid_LastUpdate`

    A date containing the last time that the user was warned about an Android device being older than is generally supported. This prevents the user being spammed if they consistently use an old Android device. If it has been more than 3 weeks since the last time an old device was seen, we re-warn the user, but if it’s less than 3 weeks we silently update this date so continuous use doesn’t nag.

  `CheckUpdate_AllowChecks`

    `True` if when coloring marker regions in the `EventBrowser`, the whole row should be colored instead of just a side-bar.

    Defaults to `True`.

  `CheckUpdate_UpdateAvailable`

    `True` if an update to a newer version is currently available.

    Defaults to `False`.

  `CheckUpdate_CurrentVersion`

    The current version at the time of update checks. Used to determine if a cached pending update is no longer valid because we got updated through some other method.

  `CheckUpdate_UpdateResponse`

    Contains the response from the update server from the last update check, with any release notes for the new version.

  `CheckUpdate_LastUpdate`

    A date containing the last time that update checks happened.

  `DegradedCapture_LastUpdate`

    A date containing the last time that the user was warned about captures being loaded in degraded support. This prevents the user being spammed if their hardware is low spec.

  `ExternalTool_RadeonGPUProfiler`

    The path to the executable of the external Radeon GPU Profiler tool.

  `Tips_HasSeenFirst`

    `True` if the user has seen the first tip, which should always be shown first before randomising.

    Defaults to `False`.

  `AllowGlobalHook`

    `True` if global hooking is enabled. Since it has potentially problematic side-effects and is dangerous, it requires explicit opt-in.

    Defaults to `False`.

  `ShaderProcessors`

    A list of `ShaderProcessingTool` detailing shader processing programs. The list comes in priority order, with earlier processors preferred over later ones.

  `Analytics_TotalOptOut`

    `True` if the user has selected to completely opt-out from and disable all analytics collection and reporting.

    Defaults to `False`.

  `Analytics_ManualCheck`

    `True` if the user has remained with analytics turned on, but has chosen to manually check each report that is sent out.

    Defaults to `False`.

  `CrashReport_EmailNagged`

    `True` if the user has been prompted to enter their email address on a crash report. This really helps find fixes for bugs, so we prompt the user once only if they didn’t enter an email. Once the prompt has happened, regardless of the answer this is set to true and remains there forever.

    Defaults to `False`.

  `CrashReport_ShouldRememberEmail`

    `True` if the email address entered in the crash reporter should be remembered for next time. If no email is entered then nothing happens (any previous saved email is kept).

    Defaults to `True`.

  `CrashReport_EmailAddress`

    The saved email address for pre-filling out in crash reports.

  `CrashReport_LastOpenedCapture`

    The last opened capture, to send if any crash is encountered. This is different to the most recent opened file, because it’s set before any processing happens (recent files are only added to the list when they successfully open), and it’s cleared again when the capture is closed.

  `CrashReport_ReportedBugs`

    A list of `BugReport` detailing previously submitted bugs that we’re watching for updates.

  `AlwaysLoad_Extensions`

    A list of strings with extension packages to always load on startup, without needing manual enabling.

  `AddRemoteHost`(host)

    Adds a new remote host.

    Parameters: | host (RemoteHost) – The remote host to add.

  `Close`()

    Closes the config file so that subsequent calls to Save() will not write to disk at the file the config was loaded from.

    This function is rarely directly used, except in the case where RenderDoc is relaunching itself and wants to avoid file locking conflicts between the closing instance saving, and the loading instance loading. It can explicitly save and close before relaunching.

  `GetRemoteHost`(hostname)

    Look up a remote host by hostname.

    Returns: | The remote host for the given hostname, or an invalid `RemoteHost` if no such exists.
    Return type: | `RemoteHost`

  `GetRemoteHosts`()

    Returns a list of all remote hosts.

    Returns: | The remote host list
    Return type: | `list` of `RemoteHost`

  `Load`(filename)

    Loads the config from a given filename. This happens automatically on startup, so it’s not recommended that you call this function manually.

    Parameters: | filename (str) – The filename to load from
    Returns: | A boolean status if the load was successful.
    Return type: | `bool`

  `RemoveRemoteHost`(host)

    Removes an existing remote host.

    Parameters: | host (RemoteHost) – The remote host to remove.

  `Save`()

    Saves the config to disk. This can happen if you want to be sure a setting has been propagated and will not be forgotten in the case of crash or otherwise unexpected exit.

    Returns: | A boolean status if the save was successful.
    Return type: | `bool`

  `SetStyle`()

    Sets the UI style to the value in `UIStyle`.

    Changing the style after the application has started may not properly update everything, so to be sure the new style is applied, the application should be restarted.

    Parameters: | name (str) – The name of the setting.
    Returns: | `True` if the style was set successfully, `False` if there was a problem e.g. the value of `UIStyle` was unrecognised or empty.
    Return type: | `bool`

  `SetupFormatting`()

    Configures the `Formatter` class with the settings from this config.

  `UpdateEnumeratedProtocolDevices`()

    If configured, queries available device protocols to update auto-configured hosts.

class `qrenderdoc.``ShaderProcessingTool`

  Describes an external program that can be used to process shaders, typically either compiling from a high-level language to a binary format, or decompiling from the binary format to a high-level language or textual representation.

  Commonly used with SPIR-V.

  `CompileShader`(window, source, entryPoint, stage, args)

    Runs this program to disassemble a given shader source.

    Parameters: | window (QWidget) – A handle to the window to use when showing a progress bar or error messages. source (str) – The source code, preprocessed into a single file. entryPoint (str) – The name of the entry point in the shader to compile. stage (ShaderStage) – The pipeline stage that this shader represents. args (str) – arguments to pass to the tool. The default arguments can be obtained using `DefaultArguments()` which can then be customised as desired. Passing an empty string uses the default arguments.
    Returns: | The result of running the tool.
    Return type: | ShaderToolOutput

  `DefaultArguments`()

    Return the default arguments used when invoking this tool

    Returns: | The arguments specified for this tool.
    Return type: | `str`

  `DisassembleShader`(window, reflection, args)

    Runs this program to disassemble a given shader reflection.

    Parameters: | window (QWidget) – A handle to the window to use when showing a progress bar or error messages. shader (ShaderReflection) – The shader to disassemble. args (str) – arguments to pass to the tool. The default arguments can be obtained using `DefaultArguments()` which can then be customised as desired. Passing an empty string uses the default arguments.
    Returns: | The result of running the tool.
    Return type: | ShaderToolOutput

  `args`

    The command line argmuents to pass to the program.

  `executable`

    The path to the executable to run for this program.

  `input`

    The input that this program expects.

  `name`

    The human-readable name of the program.

  `output`

    The output that this program provides.

  `tool`

    The `KnownShaderTool` identifying which known tool this program is.

class `qrenderdoc.``ShaderToolOutput`

  Contains the output from invoking a `ShaderProcessingTool`, including both the actual output data desired as well as any stdout/stderr messages.

  `log`

    The output log - containing the information about the tool run and any errors.

  `result`

    The actual output data from the tool

class `qrenderdoc.``BugReport`

  Describes a submitted bug report.

  `URL`()

    Gets the URL for this report.

    Returns: | The URL to the report.
    Return type: | `str`

  `checkDate`

    The last date that we checked for updates.

  `reportId`

    The private ID of the bug report.

  `submitDate`

    The original date when this bug was submitted.

  `unreadUpdates`

    Unread updates to the bug exist

class `qrenderdoc.``TimeUnit`

  The unit that GPU durations are displayed in.

  `Seconds`

    The durations are displayed as seconds (s).

  `Milliseconds`

    The durations are displayed as milliseconds (ms).

  `Microseconds`

    The durations are displayed as microseconds (µs).

  `Nanoseconds`

    The durations are displayed as nanoseconds (ns).

## Remote Host

class `qrenderdoc.``RemoteHost`

  A handle for interacting with a remote server on a given host.

  `CheckStatus`()

    Ping the host to check current status - if the server is running, connection status, etc.

  `FriendlyName`()

    The friendly name for this host, if available (if empty, the Hostname is used).

  `Hostname`()

    The hostname of this host.

  `IsBusy`()

    `True` if someone else is currently connected to this server.

  `IsConnected`()

    `True` if an active connection exists to this remote server.

  `IsLocalhost`()

    Returns `True` if this host represents the special localhost device.

  `IsServerRunning`()

    `True` if a remote server is currently running on this host.

  `IsValid`()

    Returns `True` if this host represents a valid remote host.

  `IsVersionMismatch`()

    `True` if there is a code version mismatch with this server.

  `LastCapturePath`()

    The last folder browsed to on this host, to provide a reasonable default path.

  `Launch`()

    Runs the command specified in `runCommand`. Returns `ReplayStatus` which indicates success or the type of failure.

  `Name`()

    Returns the name to display for this host in the UI, either `FriendlyName()` if it is valid, or `Hostname()` if not.

  `Protocol`()

    The `DeviceProtocolController` for this host, or `None` if no protocol is in use

  `RunCommand`()

    The command to run locally to try to launch the server remotely.

  `SetLastCapturePath`(path)

    Sets the last folder browsed to. See `LastCapturePath()`.

    Parameters: | path (str) – The new path to set.

  `SetRunCommand`(cmd)

    Sets the run command. See `RunCommand()`.

    Parameters: | cmd (str) – The new command to set.