Remove use of automodule in docs

* One automodule in a file for our modules is way too much, so we split it into
  files. Unfortunately this means that only one file can have those classes and
  functions be linkable from elsewhere.
* Instead we bite the bullet and manually curate the items into pages, and at
  the same time subdivide the 'enums and data' page more which is a general
  readability and usability win as well.
* We also add some previously not-included functions, and add a doc-build time
  check to ensure that functions and classes aren't omitted from the
  documentation in future
This commit is contained in:
baldurk
2020-12-04 00:23:58 +00:00
parent 8a58ba6843
commit df6fec13f9
45 changed files with 1488 additions and 369 deletions
+97 -66
View File
@@ -15,6 +15,7 @@
import sys
import os
import re
import datetime
# If extensions (or modules to document with autodoc) are in another directory,
@@ -26,9 +27,9 @@ import struct
# path to module libraries for windows
if struct.calcsize("P") == 8:
binpath = '../x64/'
binpath = '../x64/'
else:
binpath = '../Win32/'
binpath = '../Win32/'
# Prioritise release over development builds
sys.path.insert(0, os.path.abspath(binpath + 'Development/pymodules'))
@@ -82,11 +83,11 @@ major_version = 123
minor_version = 999
with open('../renderdoc/api/replay/version.h') as f:
for line in f:
if line.find('#define RENDERDOC_VERSION_MAJOR') >= 0:
major_version = line.split()[2]
if line.find('#define RENDERDOC_VERSION_MINOR') >= 0:
minor_version = line.split()[2]
for line in f:
if line.find('#define RENDERDOC_VERSION_MAJOR') >= 0:
major_version = line.split()[2]
if line.find('#define RENDERDOC_VERSION_MINOR') >= 0:
minor_version = line.split()[2]
version = '{0}.{1}'.format(major_version, minor_version)
# The full version, including alpha/beta/rc tags.
@@ -321,85 +322,115 @@ texinfo_documents = [
# custom theme based on sphinx_rtd_theme
if os.path.isdir('sphinx_rtd_theme_chm_friendly'):
html_theme = "sphinx_rtd_theme_chm_friendly"
html_theme_path = ["."]
html_theme = "sphinx_rtd_theme_chm_friendly"
html_theme_path = ["."]
else:
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_rtd_theme"
html_context = {
'show_source': False,
'html_show_sourcelink': False,
'display_github': True,
'github_user': 'baldurk',
'github_repo': 'renderdoc',
'github_version': 'v{0}'.format(version),
'conf_py_path': '/docs/',
'display_github': True,
'github_user': 'baldurk',
'github_repo': 'renderdoc',
'github_version': 'v{0}'.format(version),
'conf_py_path': '/docs/',
}
# We need 1.5 and above for the htmlhelp links to be handled properly without
# needing separate ugly _blank links. If you don't care about that, you can
# disable this
if(tags.has('htmlhelp')):
print("**** We require sphinx 1.5 for htmlhelp build to have the fix for issue #2550 ****")
needs_sphinx = '1.5'
print("**** We require sphinx 1.5 for htmlhelp build to have the fix for issue #2550 ****")
needs_sphinx = '1.5'
def maybe_skip_member(app, what, name, obj, skip, options):
# Hide these SWIG internals
if name == "this" or name == "thisown":
return True
# Allow hiding free module functions, or only showing free module functions
if 'exclude-members' in options and what == "module":
if 'free_functions__' in options['exclude-members'] and 'built-in function' in repr(obj):
return True
if 'non_free_functions__' in options['exclude-members'] and 'built-in function' not in repr(obj):
return True
# Allow hiding enum constant members (i.e. int constants). These can then be documented explicitly
# as we don't have a way in SWIG to attach docstrings to constants directly.
if 'exclude-members' in options and 'enum_constants__' in options['exclude-members'] and isinstance(obj, int):
return True
if 'exclude-members' in options and 'properties__' in options['exclude-members'] and 'getset_desc' in str(type(obj)):
return True
# Allow arbitrary globbing as a hack to exclude or include members
if 'exclude-members' in options:
for exclude in options['exclude-members']:
# Look for a hack that describes a name match
if exclude.startswith('name_match__'):
match = exclude.replace('name_match__', '')
# Hide these SWIG internals
if name == "this" or name == "thisown":
return True
# Allow hiding free module functions, or only showing free module functions
if 'exclude-members' in options and what == "module":
if 'free_functions__' in options['exclude-members'] and 'built-in function' in repr(obj):
return True
if 'non_free_functions__' in options['exclude-members'] and 'built-in function' not in repr(obj):
return True
# Allow hiding enum constant members (i.e. int constants). These can then be documented explicitly
# as we don't have a way in SWIG to attach docstrings to constants directly.
if 'exclude-members' in options and 'enum_constants__' in options['exclude-members'] and isinstance(obj, int):
return True
if 'exclude-members' in options and 'properties__' in options['exclude-members'] and 'getset_desc' in str(type(obj)):
return True
# Allow arbitrary globbing as a hack to exclude or include members
if 'exclude-members' in options:
for exclude in options['exclude-members']:
# Look for a hack that describes a name match
if exclude.startswith('name_match__'):
match = exclude.replace('name_match__', '')
include_only = False
include_only = False
# see if it wants to include only matches, or exclude matches (default)
if match.startswith('include_only__'):
match = match.replace('include_only__', '')
include_only = True
# see if it wants to include only matches, or exclude matches (default)
if match.startswith('include_only__'):
match = match.replace('include_only__', '')
include_only = True
objname = ""
if '__qualname__' in dir(obj):
objname = obj.__qualname__
else:
try:
objname = obj.__name__
except AttributeError:
objname = obj.__class__.__name__
ismatch = False
objname = ""
if '__qualname__' in dir(obj):
objname = obj.__qualname__
else:
try:
objname = obj.__name__
except AttributeError:
objname = obj.__class__.__name__
ismatch = False
# see if we're matching a prefix, or doing just a glob
if match.startswith('startswith__'):
match = match.replace('startswith__', '')
ismatch = objname.startswith(match)
# see if we're matching a prefix, or doing just a glob
if match.startswith('startswith__'):
match = match.replace('startswith__', '')
ismatch = objname.startswith(match)
if match.startswith('in__'):
match = match.replace('in__', '')
ismatch = match in objname
if match.startswith('in__'):
match = match.replace('in__', '')
ismatch = match in objname
# if we want to include only matches and it didn't match, skip this
if include_only and not ismatch:
return True
# if we want to include only matches and it didn't match, skip this
if include_only and not ismatch:
return True
# If we want to exclude matches and it DID match, skip
if not include_only and ismatch:
return True
return None
# If we want to exclude matches and it DID match, skip
if not include_only and ismatch:
return True
return None
def build_finished(app, exception):
import renderdoc as rd
import qrenderdoc as qrd
from sphinx.domains.python import PythonDomain
from sphinx.errors import SphinxError
# Get list of documented/indexed python objects
objs = app.env.get_domain('py').objects
# Enumerate the namespaced objects in both modules
items = []
for module_name in ['renderdoc', 'qrenderdoc']:
module = sys.modules[module_name]
entries = dir(module)
for item in dir(module):
if 'INTERNAL:' not in str(module.__dict__[item].__doc__):
items.append('{}.{}'.format(module_name, item))
items = set(filter(lambda i: re.search('__|SWIG|ResourceId_Null|rdcarray_of|Structured.*List', i) is None, items))
# Remove any documented/indexed python objects
items -= set(app.env.get_domain('py').objects.keys())
# Print an error if any remain
if len(items) > 0:
items = sorted(list(items))
raise SphinxError("These {} global classes/functions are not included in the documentation index:\n* {}".format(len(items), '\n* '.join(items)))
def setup(app):
app.connect('autodoc-skip-member', maybe_skip_member)
app.connect('build-finished', build_finished)
+21 -5
View File
@@ -10,21 +10,37 @@ Config
.. autoclass:: qrenderdoc.PersistantConfig
:members:
:exclude-members: enum_constants__,properties__
.. autoclass:: qrenderdoc.TimeUnit
:members:
.. autofunction:: qrenderdoc.ConfigFilePath
.. autofunction:: qrenderdoc.UnitSuffix
.. autofunction:: qrenderdoc.AddRecentFile
.. autofunction:: qrenderdoc.RemoveRecentFile
Shader Processing
-----------------
.. autoclass:: qrenderdoc.ShaderProcessingTool
:members:
.. autoclass:: qrenderdoc.KnownShaderTool
:members:
.. autoclass:: qrenderdoc.ShaderToolOutput
:members:
.. autofunction:: qrenderdoc.ToolExecutable
.. autofunction:: qrenderdoc.ToolInput
.. autofunction:: qrenderdoc.ToolOutput
Bug Reports
-----------
.. autoclass:: qrenderdoc.BugReport
:members:
.. autoclass:: qrenderdoc.TimeUnit
:members:
:exclude-members: enum_constants__,
Remote Host
-----------
@@ -35,3 +35,7 @@ Helpers
:members:
:exclude-members: enum_constants__,
.. autoclass:: qrenderdoc.DialogButton
:members:
:exclude-members: enum_constants__,
+82
View File
@@ -0,0 +1,82 @@
Replay Analysis
===============
.. contents::
.. currentmodule:: renderdoc
Frame and Drawcalls
-------------------
.. autoclass:: FrameDescription
:members:
.. autoclass:: DrawcallDescription
:members:
.. autoclass:: DrawFlags
:members:
.. autoclass:: APIEvent
:members:
Debug Messages
--------------
.. autoclass:: DebugMessage
:members:
.. autoclass:: MessageCategory
:members:
.. autoclass:: MessageSeverity
:members:
.. autoclass:: MessageSource
:members:
Resource Usage
--------------
.. autoclass:: EventUsage
:members:
.. autoclass:: ResourceUsage
:members:
.. autofunction:: renderdoc.ResUsage
.. autofunction:: renderdoc.RWResUsage
.. autofunction:: renderdoc.CBUsage
Texture Saving
--------------
.. autoclass:: TextureSave
:members:
.. autoclass:: FileType
:members:
.. autoclass:: AlphaMapping
:members:
.. autoclass:: TextureComponentMapping
:members:
.. autoclass:: TextureSampleMapping
:members:
.. autoclass:: TextureSliceMapping
:members:
Pixel History
-------------
.. autoclass:: PixelModification
:members:
.. autoclass:: ModificationValue
:members:
.. autoclass:: PixelValue
:members:
+65
View File
@@ -0,0 +1,65 @@
Capturing
=========
.. contents::
.. currentmodule:: renderdoc
Execution & Injection
---------------------
.. autofunction:: renderdoc.ExecuteAndInject
.. autofunction:: renderdoc.InjectIntoProcess
.. autoclass:: renderdoc.CaptureOptions
:members:
.. autofunction:: renderdoc.GetDefaultCaptureOptions
.. autoclass:: renderdoc.EnvironmentModification
:members:
.. autoclass:: renderdoc.EnvMod
:members:
.. autoclass:: renderdoc.EnvSep
:members:
.. autoclass:: renderdoc.ExecuteResult
:members:
Global Hooking
--------------
.. autofunction:: renderdoc.StartGlobalHook
.. autofunction:: renderdoc.StopGlobalHook
.. autofunction:: renderdoc.IsGlobalHookActive
.. autofunction:: renderdoc.CanGlobalHook
Target Control
--------------
.. autofunction:: renderdoc.EnumerateRemoteTargets
.. autofunction:: renderdoc.CreateTargetControl
.. autoclass:: renderdoc.TargetControl
:members:
.. autoclass:: renderdoc.TargetControlMessage
:members:
.. autoclass:: renderdoc.TargetControlMessageType
:members:
.. autoclass:: renderdoc.NewCaptureData
:members:
.. autoclass:: renderdoc.APIUseData
:members:
.. autoclass:: renderdoc.BusyData
:members:
.. autoclass:: renderdoc.NewChildData
:members:
+40
View File
@@ -0,0 +1,40 @@
Performance Counters
====================
.. contents::
.. currentmodule:: renderdoc
Counters
--------
.. autoclass:: renderdoc.CounterDescription
:members:
.. autoclass:: renderdoc.CounterUnit
:members:
.. autoclass:: renderdoc.Uuid
:members:
Counter Types
-------------
.. autoclass:: renderdoc.GPUCounter
:members:
.. autofunction:: renderdoc.IsAMDCounter
.. autofunction:: renderdoc.IsARMCounter
.. autofunction:: renderdoc.IsGenericCounter
.. autofunction:: renderdoc.IsIntelCounter
.. autofunction:: renderdoc.IsNvidiaCounter
.. autofunction:: renderdoc.IsVulkanExtendedCounter
Results
-------
.. autoclass:: renderdoc.CounterResult
:members:
.. autoclass:: renderdoc.CounterValue
:members:
-10
View File
@@ -1,10 +0,0 @@
Enums and Data Structures
=========================
.. currentmodule:: renderdoc
.. automodule:: renderdoc
:noindex:
:members:
:imported-members:
:exclude-members: free_functions__, enum_constants__, name_match__startswith__D3D11, name_match__startswith__D3D12, name_match__startswith__VK, name_match__startswith__GL, name_match__startswith__rdcarray_of, rdcstr, bytebuf, ReplayController, ReplayOutput, TargetControl, RemoteServer, DeviceProtocolController, CaptureFile, Viewport, Scissor, BlendEquation, ColorBlend, StencilFace, BoundResource, BoundResourceArray, BoundVBuffer, BoundCBuffer, VertexInputAttribute, PipeState, StructuredBufferList, StructuredObjectList, GlobalEnvironment
+19
View File
@@ -0,0 +1,19 @@
Formats
=======
.. contents::
.. currentmodule:: renderdoc
Resource Format
---------------
.. autoclass:: renderdoc.ResourceFormat
:members:
.. autoclass:: renderdoc.ResourceFormatType
:members:
.. autoclass:: renderdoc.CompType
:members:
+67
View File
@@ -0,0 +1,67 @@
Frame Statistics
================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: renderdoc.FrameStatistics
:members:
Resource Statistics
-------------------
.. autoclass:: renderdoc.ResourceUpdateStats
:members:
.. autoclass:: renderdoc.BucketRecordType
:members:
Drawcall Statistics
-------------------
.. autoclass:: renderdoc.DrawcallStats
:members:
.. autoclass:: renderdoc.DispatchStats
:members:
Shader Statistics
-----------------
.. autoclass:: renderdoc.ConstantBindStats
:members:
.. autoclass:: renderdoc.SamplerBindStats
:members:
.. autoclass:: renderdoc.ResourceBindStats
:members:
.. autoclass:: renderdoc.ShaderChangeStats
:members:
Fixed Function Statistics
-------------------------
.. autoclass:: renderdoc.IndexBindStats
:members:
.. autoclass:: renderdoc.VertexBindStats
:members:
.. autoclass:: renderdoc.LayoutBindStats
:members:
.. autoclass:: renderdoc.BlendStats
:members:
.. autoclass:: renderdoc.DepthStencilStats
:members:
.. autoclass:: renderdoc.RasterizationStats
:members:
.. autoclass:: renderdoc.OutputTargetStats
:members:
-91
View File
@@ -1,91 +0,0 @@
Functions
=========
.. contents::
.. module:: renderdoc
Initialisation and Shutdown
---------------------------
.. autofunction:: renderdoc.InitialiseReplay
.. autofunction:: renderdoc.ShutdownReplay
Capture File Access
-------------------
.. autofunction:: renderdoc.OpenCaptureFile
Target Control
--------------
.. autofunction:: renderdoc.EnumerateRemoteTargets
.. autofunction:: renderdoc.CreateTargetControl
Remote Servers
--------------
.. autofunction:: renderdoc.CreateRemoteServerConnection
.. autofunction:: renderdoc.CheckRemoteServerConnection
.. autofunction:: renderdoc.BecomeRemoteServer
Device Protocols
----------------
.. autofunction:: renderdoc.GetSupportedDeviceProtocols
.. autofunction:: renderdoc.GetDeviceProtocolController
Local Execution & Injection
---------------------------
.. autofunction:: renderdoc.GetDefaultCaptureOptions
.. autofunction:: renderdoc.ExecuteAndInject
.. autofunction:: renderdoc.InjectIntoProcess
.. autofunction:: renderdoc.StartGlobalHook
.. autofunction:: renderdoc.StopGlobalHook
.. autofunction:: renderdoc.IsGlobalHookActive
.. autofunction:: renderdoc.CanGlobalHook
Logging & Versioning
--------------------
.. autofunction:: renderdoc.SetDebugLogFile
.. autofunction:: renderdoc.GetLogFile
.. autofunction:: renderdoc.GetVersionString
.. autofunction:: renderdoc.GetCommitHash
.. autofunction:: renderdoc.GetDriverInformation
.. autofunction:: renderdoc.IsReleaseBuild
Settings & Configuration
------------------------
.. autofunction:: renderdoc.GetConfigSetting
.. autofunction:: renderdoc.SetConfigSetting
Maths & Utilities
-----------------
.. autofunction:: renderdoc.CreateHeadlessWindowingData
.. autofunction:: renderdoc.CreateWin32WindowingData
.. autofunction:: renderdoc.CreateXlibWindowingData
.. autofunction:: renderdoc.CreateXCBWindowingData
.. autofunction:: renderdoc.CreateWaylandWindowingData
.. autofunction:: renderdoc.CreateGgpWindowingData
.. autofunction:: renderdoc.CreateAndroidWindowingData
.. autofunction:: renderdoc.CreateMacOSWindowingData
.. autofunction:: renderdoc.InitCamera
.. autofunction:: renderdoc.HalfToFloat
.. autofunction:: renderdoc.FloatToHalf
.. autofunction:: renderdoc.NumVerticesPerPrimitive
.. autofunction:: renderdoc.VertexOffset
.. autofunction:: renderdoc.PatchList_Count
.. autofunction:: renderdoc.PatchList_Topology
.. autofunction:: renderdoc.SupportsRestart
.. autofunction:: renderdoc.IsStrip
.. autofunction:: renderdoc.IsD3D
.. autofunction:: renderdoc.MaskForStage
.. autofunction:: renderdoc.StartSelfHostCapture
.. autofunction:: renderdoc.EndSelfHostCapture
.. autofunction:: renderdoc.GetCurrentProcessMemoryUsage
.. autofunction:: renderdoc.VarTypeByteSize
.. autofunction:: renderdoc.VarTypeCompType
+23 -7
View File
@@ -4,12 +4,28 @@ renderdoc API Reference
.. toctree::
:hidden:
main_ifaces
funcs
enums_data
capturing
replay
outputs
analysis
formats
resources
shaders
pipelines/index
structured_data
counters
frame_stats
utils
* :doc:`main_ifaces`
* :doc:`funcs`
* :doc:`enums_data`
* :doc:`pipelines/index`
* :doc:`capturing`
* :doc:`replay`
* :doc:`outputs`
* :doc:`analysis`
* :doc:`formats`
* :doc:`resources`
* :doc:`shaders`
* :doc:`pipelines/index`
* :doc:`structured_data`
* :doc:`counters`
* :doc:`frame_stats`
* :doc:`utils`
-48
View File
@@ -1,48 +0,0 @@
Primary Interfaces
==================
.. contents::
.. currentmodule:: renderdoc
ReplayController
----------------
.. autoclass:: renderdoc.ReplayController
:members:
ReplayOutput
------------
.. autoclass:: renderdoc.ReplayOutput
:members:
TargetControl
-------------
.. autoclass:: renderdoc.TargetControl
:members:
RemoteServer
------------
.. autoclass:: renderdoc.RemoteServer
:members:
DeviceProtocolController
------------------------
.. autoclass:: renderdoc.DeviceProtocolController
:members:
CaptureFile
-----------
.. autoclass:: renderdoc.CaptureFile
:members:
GlobalEnvironment
-----------------
.. autoclass:: renderdoc.GlobalEnvironment
:members:
+67
View File
@@ -0,0 +1,67 @@
Replay Outputs
==============
.. contents::
.. currentmodule:: renderdoc
General
-------
.. autoclass:: ReplayOutput
:members:
.. autoclass:: ReplayOutputType
:members:
.. autofunction:: renderdoc.SetColors
Window Configuration
--------------------
.. autoclass:: WindowingData
:members:
.. autoclass:: WindowingSystem
:members:
.. autofunction:: renderdoc.CreateHeadlessWindowingData
.. autofunction:: renderdoc.CreateWin32WindowingData
.. autofunction:: renderdoc.CreateXlibWindowingData
.. autofunction:: renderdoc.CreateXCBWindowingData
.. autofunction:: renderdoc.CreateWaylandWindowingData
.. autofunction:: renderdoc.CreateGgpWindowingData
.. autofunction:: renderdoc.CreateAndroidWindowingData
.. autofunction:: renderdoc.CreateMacOSWindowingData
Texture View
------------
.. autoclass:: TextureDisplay
:members:
.. autoclass:: DebugOverlay
:members:
Mesh View
---------
.. autoclass:: MeshDisplay
:members:
.. autoclass:: MeshDataStage
:members:
.. autoclass:: MeshFormat
:members:
.. autoclass:: SolidShade
:members:
.. autoclass:: Camera
:members:
.. autoclass:: CameraType
:members:
.. autofunction:: renderdoc.InitCamera
+112 -48
View File
@@ -1,68 +1,132 @@
Common Pipeline State Abstraction
=================================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: PipeState
:members:
Viewport
--------
.. autoclass:: renderdoc.Viewport
:members:
Scissor
-------
.. autoclass:: renderdoc.Scissor
:members:
BlendEquation
Vertex Inputs
-------------
.. autoclass:: renderdoc.BlendEquation
:members:
ColorBlend
----------
.. autoclass:: renderdoc.ColorBlend
:members:
StencilFace
-----------
.. autoclass:: renderdoc.StencilFace
:members:
BoundResource
-------------
.. autoclass:: renderdoc.BoundResource
:members:
BoundResourceArray
------------------
.. autoclass:: renderdoc.BoundResourceArray
:members:
BoundVBuffer
------------
.. autoclass:: renderdoc.BoundVBuffer
:members:
BoundCBuffer
------------
.. autoclass:: renderdoc.VertexInputAttribute
:members:
.. autoclass:: renderdoc.Topology
:members:
.. autofunction:: renderdoc.NumVerticesPerPrimitive
.. autofunction:: renderdoc.VertexOffset
.. autofunction:: renderdoc.PatchList_Count
.. autofunction:: renderdoc.PatchList_Topology
.. autofunction:: renderdoc.SupportsRestart
.. autofunction:: renderdoc.IsStrip
Shader Resource Bindings
------------------------
.. autoclass:: renderdoc.BoundResourceArray
:members:
.. autoclass:: renderdoc.BoundResource
:members:
.. autoclass:: renderdoc.BoundCBuffer
:members:
VertexInputAttribute
.. autoclass:: renderdoc.BindType
:members:
.. autoclass:: renderdoc.TextureSwizzle
:members:
.. autoclass:: renderdoc.TextureSwizzle4
:members:
.. autoclass:: renderdoc.D3DBufferViewFlags
:members:
Samplers
--------
.. autoclass:: renderdoc.AddressMode
:members:
.. autoclass:: renderdoc.TextureFilter
:members:
.. autoclass:: renderdoc.FilterMode
:members:
.. autoclass:: renderdoc.FilterFunction
:members:
.. autoclass:: renderdoc.ChromaSampleLocation
:members:
.. autoclass:: renderdoc.YcbcrConversion
:members:
.. autoclass:: renderdoc.YcbcrRange
:members:
Viewport and Scissor
--------------------
.. autoclass:: renderdoc.VertexInputAttribute
.. autoclass:: renderdoc.Viewport
:members:
.. autoclass:: renderdoc.Scissor
:members:
Rasterizer
----------
.. autoclass:: renderdoc.CullMode
:members:
.. autoclass:: renderdoc.FillMode
:members:
.. autoclass:: renderdoc.ConservativeRaster
:members:
.. autoclass:: renderdoc.LineRaster
:members:
Stencil
-------
.. autoclass:: renderdoc.StencilFace
:members:
.. autoclass:: renderdoc.StencilOperation
:members:
.. autoclass:: renderdoc.CompareFunction
:members:
Blending
--------
.. autoclass:: renderdoc.ColorBlend
:members:
.. autoclass:: renderdoc.BlendEquation
:members:
.. autoclass:: renderdoc.BlendMultiplier
:members:
.. autoclass:: renderdoc.BlendOperation
:members:
.. autoclass:: renderdoc.LogicOperation
:members:
+66 -4
View File
@@ -1,13 +1,75 @@
D3D11 Pipeline State
====================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: D3D11State
:members:
.. automodule:: renderdoc
:noindex:
Vertex Input
------------
.. autoclass:: D3D11InputAssembly
:members:
.. autoclass:: D3D11IndexBuffer
:members:
.. autoclass:: D3D11VertexBuffer
:members:
.. autoclass:: D3D11Layout
:members:
Shaders and Bindings
--------------------
.. autoclass:: D3D11Shader
:members:
.. autoclass:: D3D11ConstantBuffer
:members:
.. autoclass:: D3D11Sampler
:members:
.. autoclass:: D3D11View
:members:
Stream-out
----------
.. autoclass:: D3D11StreamOut
:members:
.. autoclass:: D3D11StreamOutBind
:members:
Rasterizer
----------
.. autoclass:: D3D11Rasterizer
:members:
.. autoclass:: D3D11RasterizerState
:members:
Output Merger
-------------
.. autoclass:: D3D11OutputMerger
:members:
.. autoclass:: D3D11DepthStencilState
:members:
.. autoclass:: D3D11BlendState
:members:
Predication
-----------
.. autoclass:: D3D11Predication
:members:
:imported-members:
:exclude-members: D3D11State, free_functions__, enum_constants__, name_match__include_only__startswith__D3D11
+76 -4
View File
@@ -1,13 +1,85 @@
D3D12 Pipeline State
====================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: D3D12State
:members:
.. automodule:: renderdoc
:noindex:
Root Signature and Bindings
---------------------------
.. autoclass:: D3D12RootSignatureRange
:members:
:imported-members:
:exclude-members: D3D12State, free_functions__, enum_constants__, name_match__include_only__startswith__D3D12
.. autoclass:: D3D12ConstantBuffer
:members:
.. autoclass:: D3D12Sampler
:members:
.. autoclass:: D3D12View
:members:
Vertex Input
------------
.. autoclass:: D3D12InputAssembly
:members:
.. autoclass:: D3D12Layout
:members:
.. autoclass:: D3D12VertexBuffer
:members:
.. autoclass:: D3D12IndexBuffer
:members:
Shader
------
.. autoclass:: D3D12Shader
:members:
Stream-out
----------
.. autoclass:: D3D12StreamOut
:members:
.. autoclass:: D3D12StreamOutBind
:members:
Rasterizer
----------
.. autoclass:: D3D12Rasterizer
:members:
.. autoclass:: D3D12RasterizerState
:members:
Output Merger
-------------
.. autoclass:: D3D12OM
:members:
.. autoclass:: D3D12DepthStencilState
:members:
.. autoclass:: D3D12BlendState
:members:
Resource States
---------------
.. autoclass:: D3D12ResourceData
:members:
.. autoclass:: D3D12ResourceState
:members:
+90 -4
View File
@@ -1,13 +1,99 @@
OpenGL Pipeline State
=====================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: GLState
:members:
.. automodule:: renderdoc
:noindex:
Vertex Input
------------
.. autoclass:: GLVertexInput
:members:
.. autoclass:: GLVertexAttribute
:members:
.. autoclass:: GLVertexBuffer
:members:
Shader
------
.. autoclass:: GLShader
:members:
Fixed Vertex Processing
-----------------------
.. autoclass:: GLFixedVertexProcessing
:members:
Shader Bindings
---------------
.. autoclass:: GLTexture
:members:
.. autoclass:: GLSampler
:members:
.. autoclass:: GLBuffer
:members:
.. autoclass:: GLImageLoadStore
:members:
Transform Feedback
------------------
.. autoclass:: GLFeedback
:members:
Rasterizer
----------
.. autoclass:: GLRasterizer
:members:
.. autoclass:: GLRasterizerState
:members:
Depth/Stencil State
-------------------
.. autoclass:: GLDepthState
:members:
.. autoclass:: GLStencilState
:members:
Framebuffer
-----------
.. autoclass:: GLFrameBuffer
:members:
.. autoclass:: GLFBO
:members:
.. autoclass:: GLAttachment
:members:
Blending
--------
.. autoclass:: GLBlendState
:members:
Hints
-----
.. autoclass:: GLHints
:members:
.. autoclass:: QualityHint
:members:
:imported-members:
:exclude-members: GLState, free_functions__, enum_constants__, name_match__include_only__startswith__GL
+127 -4
View File
@@ -1,13 +1,136 @@
Vulkan Pipeline State
=====================
.. contents::
.. currentmodule:: renderdoc
.. autoclass:: VKState
:members:
.. automodule:: renderdoc
:noindex:
Pipeline and Bindings
---------------------
.. autoclass:: VKPipeline
:members:
:imported-members:
:exclude-members: VKState, free_functions__, enum_constants__, name_match__include_only__startswith__VK
.. autoclass:: VKDescriptorSet
:members:
.. autoclass:: VKDescriptorBinding
:members:
.. autoclass:: VKBindingElement
:members:
Vertex Input
------------
.. autoclass:: VKInputAssembly
:members:
.. autoclass:: VKIndexBuffer
:members:
.. autoclass:: VKVertexInput
:members:
.. autoclass:: VKVertexAttribute
:members:
.. autoclass:: VKVertexBinding
:members:
.. autoclass:: VKVertexBuffer
:members:
Shader
------
.. autoclass:: VKShader
:members:
.. autoclass:: VKSpecializationConstant
:members:
Tessellation
------------
.. autoclass:: VKTessellation
:members:
Transform Feedback
------------------
.. autoclass:: VKTransformFeedback
:members:
.. autoclass:: VKXFBBuffer
:members:
Rasterizer
----------
.. autoclass:: VKViewportScissor
:members:
.. autoclass:: VKViewState
:members:
.. autoclass:: VKRasterizer
:members:
Multisampling
-------------
.. autoclass:: VKMultiSample
:members:
.. autoclass:: VKSampleLocations
:members:
Blending
--------
.. autoclass:: VKColorBlendState
:members:
Depth/Stencil State
-------------------
.. autoclass:: VKDepthStencil
:members:
Renderpass and Framebuffer
--------------------------
.. autoclass:: VKCurrentPass
:members:
.. autoclass:: VKRenderPass
:members:
.. autoclass:: VKFramebuffer
:members:
.. autoclass:: VKAttachment
:members:
.. autoclass:: VKRenderArea
:members:
Image States
------------
.. autoclass:: VKImageData
:members:
.. autoclass:: VKImageLayout
:members:
Conditional Rendering
---------------------
.. autoclass:: VKConditionalRendering
:members:
+108
View File
@@ -0,0 +1,108 @@
Replay Control
==============
.. contents::
.. currentmodule:: renderdoc
Initialisation and Shutdown
---------------------------
.. autofunction:: renderdoc.InitialiseReplay
.. autofunction:: renderdoc.ShutdownReplay
.. autoclass:: renderdoc.GlobalEnvironment
:members:
Capture File Access
-------------------
.. autofunction:: renderdoc.OpenCaptureFile
.. autoclass:: renderdoc.CaptureAccess
:members:
.. autoclass:: renderdoc.CaptureFile
:members:
.. autoclass:: renderdoc.ReplayStatus
:members:
.. autoclass:: renderdoc.ReplaySupport
:members:
.. autoclass:: renderdoc.CaptureFileFormat
:members:
.. autoclass:: renderdoc.SectionProperties
:members:
.. autoclass:: renderdoc.SectionType
:members:
.. autoclass:: renderdoc.SectionFlags
:members:
.. autoclass:: renderdoc.Thumbnail
:members:
GPU Enumeration
---------------
.. autoclass:: renderdoc.GPUDevice
:members:
.. autoclass:: renderdoc.GPUVendor
:members:
.. autofunction:: renderdoc.GPUVendorFromPCIVendor
.. autoclass:: renderdoc.GraphicsAPI
:members:
.. autofunction:: renderdoc.IsD3D
.. autofunction:: renderdoc.GetDriverInformation
.. autoclass:: renderdoc.DriverInformation
:members:
Replay Controller
-----------------
.. autoclass:: renderdoc.ReplayController
:members:
.. autoclass:: renderdoc.ReplayOptions
:members:
.. autoclass:: renderdoc.ReplayOptimisationLevel
:members:
.. autoclass:: renderdoc.APIProperties
:members:
Device Protocols
----------------
.. autoclass:: renderdoc.DeviceProtocolController
:members:
.. autofunction:: renderdoc.GetSupportedDeviceProtocols
.. autofunction:: renderdoc.GetDeviceProtocolController
Remote Servers
--------------
.. autoclass:: renderdoc.RemoteServer
:members:
.. autofunction:: renderdoc.CreateRemoteServerConnection
.. autofunction:: renderdoc.CheckRemoteServerConnection
.. autofunction:: renderdoc.BecomeRemoteServer
.. autoclass:: renderdoc.PathEntry
:members:
.. autoclass:: renderdoc.PathProperty
:members:
+42
View File
@@ -0,0 +1,42 @@
Resources
=========
.. contents::
.. currentmodule:: renderdoc
General
-------
.. autoclass:: renderdoc.ResourceId
:members:
.. autoclass:: renderdoc.ResourceDescription
:members:
.. autoclass:: renderdoc.ResourceType
:members:
Textures
--------
.. autoclass:: renderdoc.TextureDescription
:members:
.. autoclass:: renderdoc.TextureType
:members:
.. autoclass:: renderdoc.TextureCategory
:members:
.. autoclass:: renderdoc.Subresource
:members:
Buffers
-------
.. autoclass:: renderdoc.BufferDescription
:members:
.. autoclass:: renderdoc.BufferCategory
:members:
+143
View File
@@ -0,0 +1,143 @@
Shaders
=======
.. contents::
.. currentmodule:: renderdoc
Bindpoints
----------
.. autoclass:: renderdoc.ShaderBindpointMapping
:members:
.. autoclass:: renderdoc.Bindpoint
:members:
.. autoclass:: renderdoc.BindpointIndex
:members:
Reflection
----------
.. autoclass:: renderdoc.ShaderReflection
:members:
.. autoclass:: renderdoc.ShaderStage
:members:
.. autoclass:: renderdoc.ShaderStageMask
:members:
.. autofunction:: renderdoc.MaskForStage
.. autoclass:: renderdoc.SigParameter
:members:
.. autoclass:: renderdoc.ShaderBuiltin
:members:
.. autoclass:: renderdoc.ConstantBlock
:members:
.. autoclass:: renderdoc.ShaderSampler
:members:
.. autoclass:: renderdoc.ShaderResource
:members:
Debug Info
----------
.. autoclass:: renderdoc.ShaderDebugInfo
:members:
.. autoclass:: renderdoc.ShaderEncoding
:members:
.. autofunction:: renderdoc.IsTextRepresentation
.. autoclass:: renderdoc.ShaderEntryPoint
:members:
.. autoclass:: renderdoc.ShaderSourceFile
:members:
.. autoclass:: renderdoc.ShaderCompileFlags
:members:
.. autoclass:: renderdoc.ShaderCompileFlag
:members:
Shader Constants
----------------
.. autoclass:: renderdoc.ShaderConstant
:members:
.. autoclass:: renderdoc.ShaderVariableType
:members:
.. autoclass:: renderdoc.ShaderVariableDescriptor
:members:
.. autoclass:: renderdoc.VarType
:members:
.. autofunction:: renderdoc.VarTypeByteSize
.. autofunction:: renderdoc.VarTypeCompType
Shader Debugging
----------------
.. autoclass:: renderdoc.ShaderDebugTrace
:members:
.. autoclass:: renderdoc.ShaderDebugger
:members:
.. autoclass:: renderdoc.SourceVariableMapping
:members:
.. autoclass:: renderdoc.DebugVariableReference
:members:
.. autoclass:: renderdoc.DebugVariableType
:members:
.. autoclass:: renderdoc.LineColumnInfo
:members:
.. autoclass:: renderdoc.ShaderDebugState
:members:
.. autoclass:: renderdoc.ShaderEvents
:members:
.. autoclass:: renderdoc.ShaderVariableChange
:members:
Shader Variables
----------------
.. autoclass:: renderdoc.ShaderVariable
:members:
.. autoclass:: renderdoc.ShaderValue
:members:
.. autoclass:: renderdoc.PointerVal
:members:
.. autoclass:: renderdoc.FloatVecVal
:members:
.. autoclass:: renderdoc.DoubleVecVal
:members:
.. autoclass:: renderdoc.UIntVecVal
:members:
.. autoclass:: renderdoc.IntVecVal
:members:
@@ -0,0 +1,63 @@
Structured Data
===============
.. contents::
.. currentmodule:: renderdoc
Type information
----------------
.. autoclass:: SDType
:members:
.. autoclass:: SDBasic
:members:
.. autoclass:: SDTypeFlags
:members:
Objects
-------
.. autoclass:: SDObject
:members:
.. autoclass:: SDObjectData
:members:
.. autoclass:: SDObjectPODData
:members:
Chunks
------
.. autoclass:: SDChunk
:members:
.. autoclass:: SDChunkMetaData
:members:
.. autoclass:: SDChunkFlags
:members:
Structured File
---------------
.. autoclass:: SDFile
:members:
Creation Helper Functions
-------------------------
.. autofunction:: renderdoc.makeSDArray
.. autofunction:: renderdoc.makeSDBool
.. autofunction:: renderdoc.makeSDEnum
.. autofunction:: renderdoc.makeSDFloat
.. autofunction:: renderdoc.makeSDInt32
.. autofunction:: renderdoc.makeSDInt64
.. autofunction:: renderdoc.makeSDResourceId
.. autofunction:: renderdoc.makeSDString
.. autofunction:: renderdoc.makeSDStruct
.. autofunction:: renderdoc.makeSDUInt32
.. autofunction:: renderdoc.makeSDUInt64
+48
View File
@@ -0,0 +1,48 @@
Utilities
=========
.. contents::
.. currentmodule:: renderdoc
Maths
-----
.. autoclass:: FloatVector
:members:
.. autofunction:: renderdoc.HalfToFloat
.. autofunction:: renderdoc.FloatToHalf
Logging & Versioning
--------------------
.. autofunction:: renderdoc.LogMessage
.. autofunction:: renderdoc.SetDebugLogFile
.. autofunction:: renderdoc.GetLogFile
.. autofunction:: renderdoc.GetCurrentProcessMemoryUsage
.. autofunction:: renderdoc.DumpObject
.. autoclass:: LogType
:members:
Versioning
----------
.. autofunction:: renderdoc.GetVersionString
.. autofunction:: renderdoc.GetCommitHash
.. autofunction:: renderdoc.IsReleaseBuild
Settings
--------
.. autofunction:: renderdoc.GetConfigSetting
.. autofunction:: renderdoc.SetConfigSetting
.. autofunction:: renderdoc.SaveConfigSettings
Self-hosted captures
--------------------
.. autofunction:: renderdoc.StartSelfHostCapture
.. autofunction:: renderdoc.EndSelfHostCapture
+1 -1
View File
@@ -97,7 +97,7 @@ CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg)
m_MainWindow->LoadInitialLayout();
{
QDir dir(configFilePath("extensions"));
QDir dir(ConfigFilePath("extensions"));
if(!dir.exists())
dir.mkpath(dir.absolutePath());
+1 -1
View File
@@ -477,7 +477,7 @@ void Analytics::Load()
Analytics::db = &actualDB;
// find the filename where the analytics will be saved
analyticsSaveLocation = configFilePath(lit("analytics.json"));
analyticsSaveLocation = ConfigFilePath(lit("analytics.json"));
QFile f(analyticsSaveLocation);
@@ -76,6 +76,16 @@ enum class KnownShaderTool : uint32_t
ITERABLE_OPERATORS(KnownShaderTool);
DOCUMENT(R"(Returns the default executable name with no suffix for a given :class:`KnownShaderTool`.
.. note::
The executable name is returned with no suffix, e.g. ``foobar`` which may need a platform specific
suffix like ``.exe`` appended.
:param KnownShaderTool tool: The tool to get the executable name for.
:return: The default executable name for this tool, or an empty string if the tool is unrecognised.
:rtype: str
)");
inline rdcstr ToolExecutable(KnownShaderTool tool)
{
if(tool == KnownShaderTool::SPIRV_Cross)
@@ -94,6 +104,14 @@ inline rdcstr ToolExecutable(KnownShaderTool tool)
return "";
}
DOCUMENT(R"(Returns the expected default input :class:`ShaderEncoding` that a
:class:`KnownShaderTool` expects. This may not be accurate and may be configurable depending on the
tool.
:param KnownShaderTool tool: The tool to get the input encoding for.
:return: The encoding that this tool expects as an input by default.
:rtype: ShaderEncoding
)");
inline ShaderEncoding ToolInput(KnownShaderTool tool)
{
if(tool == KnownShaderTool::SPIRV_Cross || tool == KnownShaderTool::spirv_dis)
@@ -110,6 +128,14 @@ inline ShaderEncoding ToolInput(KnownShaderTool tool)
return ShaderEncoding::Unknown;
}
DOCUMENT(R"(Returns the expected default output :class:`ShaderEncoding` that a
:class:`KnownShaderTool` produces. This may not be accurate and may be configurable depending on the
tool.
:param KnownShaderTool tool: The tool to get the output encoding for.
:return: The encoding that this tool produces as an output by default.
:rtype: ShaderEncoding
)");
inline ShaderEncoding ToolOutput(KnownShaderTool tool)
{
if(tool == KnownShaderTool::SPIRV_Cross)
+1 -14
View File
@@ -160,7 +160,7 @@ CaptureSettings::CaptureSettings(const QVariant &v)
numQueuedFrames = 0;
}
rdcstr configFilePath(const rdcstr &filename)
rdcstr ConfigFilePath(const rdcstr &filename)
{
QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
@@ -170,16 +170,3 @@ rdcstr configFilePath(const rdcstr &filename)
return QDir::cleanPath(dir.absoluteFilePath(filename));
}
ICaptureContext *getCaptureContext(const QWidget *widget)
{
void *ctxptr = NULL;
while(widget && !ctxptr)
{
ctxptr = widget->property("ICaptureContext").value<void *>();
widget = widget->parentWidget();
}
return (ICaptureContext *)ctxptr;
}
+2 -16
View File
@@ -2319,28 +2319,14 @@ protected:
DECLARE_REFLECTION_STRUCT(ICaptureContext);
DOCUMENT(R"(Attempt to retrieve the capture context for a particular widget.
This will search up the widget heirarchy to find if a capture context is associated with this widget
or any of its parents. Mostly useful from within widget code where a capture context can't be
explicitly passed in.
This may return ``None`` if no capture context can be found.
:param QWidget widget: The widget to search from.
:return: The capture context associated with this widget, if one unambiguously exists.
:rtype: CaptureContext
)");
ICaptureContext *getCaptureContext(const QWidget *widget);
DOCUMENT(R"(Retrieve the absolute path where a given file can be stored with other application
data.
:param str filename: The base filename.
:return: The absolute path.
:rtype: ``str``
:rtype: str
)");
rdcstr configFilePath(const rdcstr &filename);
rdcstr ConfigFilePath(const rdcstr &filename);
// simple helper for the common case of 'we just need to run this on the replay thread'
#define INVOKE_MEMFN(function) \
+13
View File
@@ -327,6 +327,19 @@ typedef QSharedPointer<GPUAddress> GPUAddressPtr;
Q_DECLARE_METATYPE(GPUAddressPtr);
ICaptureContext *getCaptureContext(const QWidget *widget)
{
void *ctxptr = NULL;
while(widget && !ctxptr)
{
ctxptr = widget->property("ICaptureContext").value<void *>();
widget = widget->parentWidget();
}
return (ICaptureContext *)ctxptr;
}
QString ResIdTextToString(RichResourceTextPtr ptr)
{
ptr->cacheDocument(NULL);
+2
View File
@@ -172,6 +172,8 @@ struct GPUAddress
void cacheAddress(const QWidget *widget);
};
ICaptureContext *getCaptureContext(const QWidget *widget);
// this will check the variant, and if it contains a ResourceId directly or text with ResourceId
// identifiers then it will be converted into a RichResourceTextPtr or ResourceId in-place. The new
// QVariant will still convert to QString so it doesn't have to be special-cased. However it must be
@@ -43,16 +43,11 @@ CaptureSettings::CaptureSettings()
RENDERDOC_GetDefaultCaptureOptions(&options);
}
rdcstr configFilePath(const rdcstr &filename)
rdcstr ConfigFilePath(const rdcstr &filename)
{
return "";
}
ICaptureContext *getCaptureContext(const QWidget *widget)
{
return NULL;
}
////////////////////////////////////////////////////////////////////////////////
// PythonContext.cpp stubs
////////////////////////////////////////////////////////////////////////////////
+12 -1
View File
@@ -264,12 +264,23 @@ TEMPLATE_ARRAY_DECLARE(rdcarray);
%rename("%s") count;
}
%inline %{
%feature("docstring") R"(Returns a string representation of an object. This is quite similar to
the built-in repr() function but it iterates over struct members and prints them out, where normally
repr() would stop and say something like 'Swig Object of type ...'.
:param Any object: The object to dump
:return: The string representation of the object.
:rtype: str
)";
%inline %{
extern "C" PyObject *RENDERDOC_DumpObject(PyObject *obj);
%}
%feature("docstring") "";
%extend SDObject {
%feature("docstring") R"(Interprets the object as an integer and returns its value.
Invalid if the object is not actually an integer.
+1 -1
View File
@@ -314,7 +314,7 @@ int main(int argc, char *argv[])
dir.mkpath(configPath);
}
QString configFilename = configFilePath(lit("UI.config"));
QString configFilename = ConfigFilePath(lit("UI.config"));
if(!config.Load(configFilename))
{
@@ -34,6 +34,7 @@
#include <QStylePainter>
#include <QToolTip>
#include <QWheelEvent>
#include "Code/QRDUtils.h"
#include "Code/Resources.h"
static int GetDepth(const QAbstractItemModel *model, const QModelIndex &idx)
+1 -1
View File
@@ -95,7 +95,7 @@ void CaptureDialog::initWarning(RDLabel *warning)
QString CaptureDialog::mostRecentFilename()
{
return configFilePath(lit("most_recent.cap"));
return ConfigFilePath(lit("most_recent.cap"));
}
void CaptureDialog::PopulateMostRecent()
@@ -57,7 +57,7 @@ ExtensionManager::ExtensionManager(ICaptureContext &ctx)
QObject::connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
QString extensionFolder = configFilePath("extensions");
QString extensionFolder = ConfigFilePath("extensions");
m_Extensions = m_Ctx.Extensions().GetInstalledExtensions();
@@ -125,7 +125,7 @@ void ExtensionManager::on_openLocation_clicked()
{
if(m_Extensions.empty())
{
QDesktopServices::openUrl(QString(configFilePath("extensions")));
QDesktopServices::openUrl(QString(ConfigFilePath("extensions")));
return;
}
+1 -1
View File
@@ -509,7 +509,7 @@ QString MainWindow::GetLayoutPath(int layout)
if(layout > 0)
filename = lit("Layout%1.config").arg(layout);
return configFilePath(filename);
return ConfigFilePath(filename);
}
void MainWindow::on_action_Exit_triggered()
+3 -3
View File
@@ -2929,7 +2929,7 @@ void TextureViewer::OnCaptureLoaded()
GUIInvoke::call(this, [this]() { OnEventChanged(m_Ctx.CurEvent()); });
});
m_Watcher = new QFileSystemWatcher({configFilePath(QString())}, this);
m_Watcher = new QFileSystemWatcher({ConfigFilePath(QString())}, this);
QObject::connect(m_Watcher, &QFileSystemWatcher::fileChanged, this,
&TextureViewer::customShaderModified);
@@ -4328,7 +4328,7 @@ QList<QDir> TextureViewer::getShaderDirectories() const
{
QList<QDir> dirs;
dirs.reserve(int(m_Ctx.Config().TextureViewer_ShaderDirs.size() + 1u));
dirs.append(QDir(configFilePath(QString())));
dirs.append(QDir(ConfigFilePath(QString())));
for(const rdcstr &dir : m_Ctx.Config().TextureViewer_ShaderDirs)
{
dirs.append(QDir(dir));
@@ -4429,7 +4429,7 @@ void TextureViewer::on_customCreate_clicked()
src = tr("Unknown format - no template available");
}
QString path = QDir::cleanPath(QDir(configFilePath(QString())).absoluteFilePath(filename));
QString path = QDir::cleanPath(QDir(ConfigFilePath(QString())).absoluteFilePath(filename));
QFile fileHandle(path);
if(fileHandle.open(QFile::WriteOnly | QIODevice::Truncate | QIODevice::Text))
{
+1 -1
View File
@@ -869,7 +869,7 @@ DECLARE_STRINGISE_TYPE(WindowingData);
#endif
DOCUMENT(R"(Internal structure used for initialising environment in a replay application.)");
DOCUMENT(R"(Structure used for initialising environment in a replay application.)");
struct GlobalEnvironment
{
DOCUMENT("");
+2 -1
View File
@@ -143,9 +143,10 @@ DECLARE_REFLECTION_STRUCT(SectionProperties);
struct ResourceFormat;
DOCUMENT("Internal function for getting the name for a resource format.");
#if !defined(SWIG)
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_ResourceFormatName(const ResourceFormat &fmt,
rdcstr &name);
#endif
DOCUMENT("Description of the format of a resource or element.");
struct ResourceFormat
+45 -19
View File
@@ -40,12 +40,14 @@
DOCUMENT("");
typedef uint8_t byte;
#if !defined(SWIG)
// needs to be declared up here for reference in rdcarray/rdcstr
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_FreeArrayMem(void *mem);
typedef void(RENDERDOC_CC *pRENDERDOC_FreeArrayMem)(void *mem);
extern "C" RENDERDOC_API void *RENDERDOC_CC RENDERDOC_AllocArrayMem(uint64_t sz);
typedef void *(RENDERDOC_CC *pRENDERDOC_AllocArrayMem)(uint64_t sz);
#endif
// declare base types and stringise interface
#include "rdcarray.h"
@@ -1911,7 +1913,7 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EndSelfHostCapture(const ch
// Vulkan layer handling
//////////////////////////////////////////////////////////////////////////
DOCUMENT("Structure containing all the information about vulkan layer registration");
DOCUMENT("INTERNAL: Information about vulkan layer registration");
struct VulkanLayerRegistrationInfo
{
DOCUMENT(":class:`VulkanLayerFlags` detailing the current registration.");
@@ -1924,19 +1926,21 @@ struct VulkanLayerRegistrationInfo
rdcarray<rdcstr> otherJSONs;
};
DOCUMENT("Internal function for determining vulkan layer registration status.");
DOCUMENT("INTERNAL: Determine vulkan layer registration status.");
extern "C" RENDERDOC_API bool RENDERDOC_CC
RENDERDOC_NeedVulkanLayerRegistration(VulkanLayerRegistrationInfo *info);
DOCUMENT("Internal function for updating vulkan layer registration.");
DOCUMENT("INTERNAL: Update vulkan layer registration.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_UpdateVulkanLayerRegistration(bool systemLevel);
//////////////////////////////////////////////////////////////////////////
// Miscellaneous!
//////////////////////////////////////////////////////////////////////////
DOCUMENT("Internal function for updating installed version number in windows registry.");
#if !defined(SWIG)
DOCUMENT("INTERNAL: Update installed version number in windows registry.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_UpdateInstalledVersionNumber();
#endif
DOCUMENT(R"(Initialises RenderDoc for replay. Replay API functions should not be called before this
has been called. It should be called exactly once, and before shutdown you must call
@@ -1955,16 +1959,18 @@ should only be called at program shutdown. This function must only be called if
)");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_ShutdownReplay();
DOCUMENT("Internal function for creating a bug report zip.");
#if !defined(SWIG)
DOCUMENT("INTERNAL: Create a bug report zip.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_CreateBugReport(const char *logfile,
const char *dumpfile,
rdcstr &report);
DOCUMENT("Internal function for registering a memory region to be saved with crash dumps.");
DOCUMENT("INTERNAL: Register a memory region to be saved with crash dumps.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_RegisterMemoryRegion(void *base, size_t size);
DOCUMENT("Internal function for unregistering a memory region to be saved with crash dumps.");
DOCUMENT("INTERNAL: Unregister a memory region to be saved with crash dumps.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_UnregisterMemoryRegion(void *base);
#endif
DOCUMENT(R"(Sets the location for the diagnostic log output, shared by captured programs and the
analysis program.
@@ -1981,14 +1987,21 @@ analysis program.
)");
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetLogFile();
DOCUMENT("Internal function for fetching the contents of a log");
#if !defined(SWIG)
DOCUMENT("INTERNAL: Atomically fetch the contents of the log");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_GetLogFileContents(uint64_t offset,
rdcstr &logfile);
#endif
DOCUMENT("Internal function for logging text simply.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogText(const char *text);
DOCUMENT(R"(Add a message to RenderDoc's logfile.
DOCUMENT("Internal function for logging messages in detail.");
:param LogType type: The type of the log message. Error messages will trigger a debugger breakpoint
if a debugger is attached, and fatal errors will kill the process after logging.
:param str project: A short project tag, which should be uppercase and either 3 or 4 characters.
:param str file: The file where this log message came from.
:param int line: The line number in :paramref:`file` where this log message came from.
:param str text: The text of the message.
)");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogMessage(LogType type, const char *project,
const char *file, unsigned int line,
const char *text);
@@ -2057,19 +2070,30 @@ If no such setting exists, `None` is returned.
)");
extern "C" RENDERDOC_API SDObject *RENDERDOC_CC RENDERDOC_SetConfigSetting(const char *name);
DOCUMENT("Internal function for saving config settings.");
DOCUMENT(R"(Flush the current config settings as they are in memory to the config file on disk.
Without calling this function, settings changes will only be temporary. The settings are **not**
saved to disk on exit implicitly.
)");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SaveConfigSettings();
DOCUMENT("Internal function for setting UI theme colors.");
DOCUMENT(R"(Configure the default colours used for checkerboards, this can broadly speaking help
match the replay rendering to the overall theme of the replay application.
:param FloatVector darkChecker: The color of dark squares in checkerboard patterns.
:param FloatVector lightChecker: The color of light squares in checkerboard patterns.
:param bool darkTheme: ``True`` if the theme is a 'dark' theme, used to pick different contrasting
colors. ``False`` if the theme is 'light' and normal colors are used.
)");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetColors(FloatVector darkChecker,
FloatVector lightChecker,
bool darkTheme);
DOCUMENT("Internal function for checking remote Android package for requirements");
DOCUMENT("INTERNAL: Check remote Android package for requirements");
extern "C" RENDERDOC_API void RENDERDOC_CC
RENDERDOC_CheckAndroidPackage(const char *URL, const char *packageAndActivity, AndroidFlags *flags);
DOCUMENT("Internal function that attempts to modify APK contents, adding debuggable flag.");
DOCUMENT("INTERNAL: Patch an APK to add debuggable flag.");
extern "C" RENDERDOC_API AndroidFlags RENDERDOC_CC RENDERDOC_MakeDebuggablePackage(
const char *URL, const char *packageAndActivity, RENDERDOC_ProgressCallback progress);
@@ -2168,21 +2192,23 @@ immediate use of it may block.
extern "C" RENDERDOC_API IDeviceProtocolController *RENDERDOC_CC
RENDERDOC_GetDeviceProtocolController(const rdcstr &protocol);
DOCUMENT("Internal function that runs unit tests.");
#if !defined(SWIG)
DOCUMENT("INTERNAL: Run unit tests.");
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_RunUnitTests(const rdcstr &command,
const rdcarray<rdcstr> &args);
DOCUMENT("Internal function that runs functional tests.");
DOCUMENT("INTERNAL: Run functional tests.");
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_RunFunctionalTests(int pythonMinorVersion,
const rdcarray<rdcstr> &args);
#endif
#if !defined(SWIG)
#include "version.h"
DOCUMENT("Internal function that begins a profile region.");
DOCUMENT("INTERNAL: Begin a profile region.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_BeginProfileRegion(const rdcstr &name);
DOCUMENT("Internal function that ends a profile region.");
DOCUMENT("INTERNAL: End a profile region.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EndProfileRegion();
// don't define profile regions in stable builds
+3 -2
View File
@@ -4241,7 +4241,8 @@ enum class DrawFlags : uint32_t
BITMASK_OPERATORS(DrawFlags);
DECLARE_REFLECTION_ENUM(DrawFlags);
DOCUMENT(R"(A set of flags giving details of the current status of vulkan layer registration.
DOCUMENT(R"(INTERNAL: A set of flags giving details of the current status of vulkan layer
registration.
.. data:: NoFlags
@@ -4306,7 +4307,7 @@ enum class VulkanLayerFlags : uint32_t
BITMASK_OPERATORS(VulkanLayerFlags);
DECLARE_REFLECTION_ENUM(VulkanLayerFlags);
DOCUMENT(R"(A set of flags giving details of the current status of Android tracability.
DOCUMENT(R"(INTERNAL: A set of flags giving details of the current status of Android tracability.
.. data:: NoFlags
+6
View File
@@ -38,6 +38,12 @@ extern "C" void NSGL_update(void *nsctx);
extern "C" void NSGL_flushBuffer(void *nsctx);
extern "C" void NSGL_destroyContext(void *nsctx);
// helper for cgl_platform.mm
extern "C" void NSGL_LogText(const char *text)
{
RDCLOG("CGL: %s", text);
}
// gl functions (used for quad rendering on legacy contexts)
extern "C" void glPushMatrix();
extern "C" void glLoadIdentity();
+3 -3
View File
@@ -1,6 +1,6 @@
#import <Cocoa/Cocoa.h>
extern "C" void RENDERDOC_LogText(const char *text);
extern "C" void NSGL_LogText(const char *text);
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -47,7 +47,7 @@ extern "C" void *NSGL_createContext(void *handle, void *sharehandle)
if(pix == nil)
{
RENDERDOC_LogText("Failed to create NSOpenGLPixelFormat");
NSGL_LogText("Failed to create NSOpenGLPixelFormat");
return nil;
}
@@ -56,7 +56,7 @@ extern "C" void *NSGL_createContext(void *handle, void *sharehandle)
if(context == nil)
{
RENDERDOC_LogText("Failed to create NSOpenGLContext");
NSGL_LogText("Failed to create NSOpenGLContext");
return nil;
}
-5
View File
@@ -238,11 +238,6 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetDebugLogFile(const char
}
}
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogText(const char *text)
{
rdclog_direct(FILL_AUTO_VALUE, FILL_AUTO_VALUE, LogType::Comment, "EXT", "external", 0, "%s", text);
}
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogMessage(LogType type, const char *project,
const char *file, unsigned int line,
const char *text)