Check that all complex struct members that have :type: in docstrings

* Ideally we'd document every member unconditionally for best autocompletion,
  but that's a lot of modification so for now we stick to just making sure that
  any members that are struct types (or lists/tuples) have the :type:
  declaration so that we can autocomplete inside them.
This commit is contained in:
baldurk committed 2020-12-09 15:18:27 +00:00
1 parent dd3e7ab121
commit 659fdaa235
18 files changed
+1524 -640

No files matched your search

+51 -2
View File
@@ -7,6 +7,7 @@ import re
import os
import glob
import argparse
import inspect
from enum import EnumMeta
from typing import List
@@ -118,6 +119,7 @@ def make_c_type(ret: str, pattern: bool, typelist: List[str]):
RTYPE_PATTERN = re.compile(r":rtype: (.*)")
PARAM_PATTERN = re.compile(r":param ([^:]*) ([^: ]*):")
TYPE_PATTERN = re.compile(r":type: (.*)")
count = 0
@@ -272,6 +274,12 @@ for mod_name in ['renderdoc', 'qrenderdoc']:
source = source.group(0)
instance = None
try:
instance = obj()
except TypeError:
pass
for member_name in obj.__dict__.keys():
if '__' in member_name or member_name in ['this', 'thisown']:
continue
@@ -297,6 +305,43 @@ for mod_name in ['renderdoc', 'qrenderdoc']:
check_function(qualname, member_name, member, source, False, used_types)
check_used_types('{}.{}'.format(qualname, member_name), mod, used_types)
elif instance and '__get__' in dir(member):
value = getattr(instance, member_name)
type_name = type(value).__name__
if type(value).__module__ != mod_name:
type_name = type(value).__module__ + '.' + type_name
type_name = re.sub('(.*)rdcarray_of_(.*)', 'List[\\1\\2]', type_name)
type_name = re.sub('(renderdoc\.)?u?int[163264]{2}_t', 'int', type_name)
type_name = re.sub('(renderdoc\.)?rdcstr', 'str', type_name)
type_name = re.sub('Pipe_', '', type_name)
type_name = re.sub('StructuredBufferList', 'List[bytes]', type_name)
type_name = re.sub('StructuredObjectList', 'List[SDObject]', type_name)
type_name = re.sub('StructuredChunkList', 'List[SDChunk]', type_name)
# Maybe in future we could enforce :type: on all members? For now we
# only really care about ones we might want to access properties on,
# so not builtin types (lists/tuples excluded) or ResourceId
if type(value).__module__ not in [rd.__name__, qrd.__name__] or type_name == 'ResourceId' and type(value) is not tuple:
continue
if args.verbose:
print('Checking struct member {}.{}'.format(qualname, member_name))
result = TYPE_PATTERN.search(member.__doc__)
if result is not None:
type_decl = result.group(1)
else:
type_decl = None
if type_decl is None:
count += 1
print("Error {:3}: {}.{} is missing :type: declaration, should be {}".format(count, qualname, member_name, type_name))
elif type_decl != type_name:
count += 1
print("Error {:3}: {}.{} has wrong :type: declaration {}, should be {}".format(count, qualname, member_name, type_decl, type_name))
elif callable(obj):
used_types = []
@@ -305,5 +350,9 @@ for mod_name in ['renderdoc', 'qrenderdoc']:
check_used_types(qualname, mod, used_types)
print("{} mismatches detected".format(count))
sys.exit(count)
if count > 0:
print("{} problems detected".format(count))
sys.exit(count)
print("No problems detected")
sys.exit(0)
+231 -305
View File
@@ -304,107 +304,337 @@ DECLARE_REFLECTION_STRUCT(BugReport);
// Note that only public properties should be documented.
#define CONFIG_SETTINGS() \
\
DOCUMENT(R"(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.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, UIStyle, "") \
\
DOCUMENT(R"(The path to the last capture to be opened, which is useful as a default location for
browsing.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, LastCaptureFilePath, "") \
\
DOCUMENT(R"(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
:data:`LastCaptureFilePath`).
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, LastFileBrowsePath, "") \
\
DOCUMENT(R"(The recently opened capture files.
:type: List[str]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<rdcstr>, RecentCaptureFiles) \
\
DOCUMENT(R"(The path containing the last executable that was captured, which is useful as a
default location for browsing.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, LastCapturePath, "") \
\
DOCUMENT(R"(The filename of the last executable that was captured, inside :data:`LastCapturePath`.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, LastCaptureExe, "") \
\
DOCUMENT(R"(The recently opened capture settings files.
:type: List[str]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<rdcstr>, RecentCaptureSettings) \
\
DOCUMENT(R"(The path to where temporary capture files should be stored until they're saved
permanently.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, TemporaryCaptureDirectory, "") \
\
DOCUMENT(R"(The default path to save captures in, when browsing to save a temporary capture
somewhere.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, DefaultCaptureSaveDirectory, "") \
\
DOCUMENT(R"(A :class:`ReplayOptions` containing the configured default replay options to use in
most scenarios when no specific options are given.
:type: renderdoc.ReplayOptions
)"); \
CONFIG_SETTING(public, QVariant, ReplayOptions, DefaultReplayOptions) \
\
DOCUMENT(R"(``True`` if the :class:`TextureViewer` should reset the visible range when a new
texture is selected.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, TextureViewer_ResetRange, false) \
\
DOCUMENT(R"(``True`` if the :class:`TextureViewer` should store most visualisation settings on a
per-texture basis instead of keeping it persistent across different textures.
Defaults to ``True``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, TextureViewer_PerTexSettings, true) \
\
DOCUMENT(R"(``True`` if the :class:`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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, TextureViewer_PerTexYFlip, false) \
\
DOCUMENT(R"(List of the directories containing custom shader files for the Texture Viewer.
:type: List[str]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<rdcstr>, TextureViewer_ShaderDirs) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, AlwaysReplayLocally, false) \
\
DOCUMENT(R"(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``.
)"); \
CONFIG_SETTING_VAL(public, int, int, LocalProxyAPI, -1) \
\
DOCUMENT(R"(``True`` if the buffer formatter's help section should be shown.
Defaults to ``True``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, BufferFormatter_ShowHelp, true) \
\
DOCUMENT(R"(The :class:`TimeUnit` to use to display the duration column in the
:class:`EventBrowser`.
Defaults to microseconds.
)"); \
CONFIG_SETTING_VAL(public, int, TimeUnit, EventBrowser_TimeUnit, TimeUnit::Microseconds) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_AddFake, true) \
\
DOCUMENT(R"(``True`` if the :class:`EventBrowser` should hide marker regions that don't contain
any actual non-marker events.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_HideEmpty, false) \
\
DOCUMENT(R"(``True`` if the :class:`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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_HideAPICalls, false) \
\
DOCUMENT(R"(``True`` if the :class:`EventBrowser` should apply any colors specified with API
marker regions.
Defaults to ``True``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ApplyColors, true) \
\
DOCUMENT(R"(``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row
should be colored instead of just a side-bar.
Defaults to ``True``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ColorEventRow, true) \
\
DOCUMENT(R"(``True`` if when loading a new capture that contains a comments section, the comment
viewer will be opened and focussed.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, Comments_ShowOnLoad, true) \
\
DOCUMENT(R"(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``.
)"); \
CONFIG_SETTING_VAL(public, int, int, Formatter_MinFigures, 2) \
\
DOCUMENT(R"(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``.
)"); \
CONFIG_SETTING_VAL(public, int, int, Formatter_MaxFigures, 5) \
\
DOCUMENT(R"(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``.
)"); \
CONFIG_SETTING_VAL(public, int, int, Formatter_NegExp, 5) \
\
DOCUMENT(R"(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``.
)"); \
CONFIG_SETTING_VAL(public, int, int, Formatter_PosExp, 7) \
\
DOCUMENT(R"(The global scale to apply to fonts in the application, expressed as a float.
Defaults to ``1.0`` which means 100%.
)"); \
CONFIG_SETTING_VAL(public, float, float, Font_GlobalScale, 1.0f) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, Font_PreferMonospaced, false) \
\
DOCUMENT(R"(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.
)"); \
CONFIG_SETTING_VAL(public, QDateTime, rdcdatetime, UnsupportedAndroid_LastUpdate, \
rdcdatetime(2015, 01, 01)) \
\
DOCUMENT(R"(``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row
should be colored instead of just a side-bar.
Defaults to ``True``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_AllowChecks, true) \
\
DOCUMENT(R"(``True`` if an update to a newer version is currently available.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_UpdateAvailable, false) \
\
DOCUMENT(R"(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.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, CheckUpdate_CurrentVersion, "") \
\
DOCUMENT(R"(Contains the response from the update server from the last update check, with any
release notes for the new version.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, CheckUpdate_UpdateResponse, "") \
\
DOCUMENT(R"(A date containing the last time that update checks happened.
)"); \
CONFIG_SETTING_VAL(public, QDateTime, rdcdatetime, CheckUpdate_LastUpdate, \
rdcdatetime(2012, 06, 27)) \
\
DOCUMENT(R"(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.
)"); \
CONFIG_SETTING_VAL(public, QDateTime, rdcdatetime, DegradedCapture_LastUpdate, \
rdcdatetime(2015, 01, 01)) \
\
DOCUMENT(R"(The path to the executable of the external Radeon GPU Profiler tool.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, ExternalTool_RadeonGPUProfiler, "") \
\
DOCUMENT(R"(``True`` if the user has seen the first tip, which should always be shown first before
randomising.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, Tips_HasSeenFirst, false) \
\
DOCUMENT(R"(``True`` if global hooking is enabled. Since it has potentially problematic
side-effects and is dangerous, it requires explicit opt-in.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, AllowGlobalHook, false) \
\
DOCUMENT(R"(A list of :class:`ShaderProcessingTool` detailing shader processing programs. The list
comes in priority order, with earlier processors preferred over later ones.
:type: List[ShaderProcessingTool]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<ShaderProcessingTool>, ShaderProcessors) \
\
DOCUMENT(R"(``True`` if the user has selected to completely opt-out from and disable all analytics
collection and reporting.
Defaults to ``False``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, Analytics_TotalOptOut, false) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, Analytics_ManualCheck, false) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, CrashReport_EmailNagged, false) \
\
DOCUMENT(R"(``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``.
)"); \
CONFIG_SETTING_VAL(public, bool, bool, CrashReport_ShouldRememberEmail, true) \
\
DOCUMENT(R"(The saved email address for pre-filling out in crash reports.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, CrashReport_EmailAddress, "") \
\
DOCUMENT(R"(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.
)"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, CrashReport_LastOpenedCapture, "") \
\
DOCUMENT(R"(A list of :class:`BugReport` detailing previously submitted bugs that we're watching
for updates.
:type: List[BugReport]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<BugReport>, CrashReport_ReportedBugs) \
\
DOCUMENT(R"(A list of strings with extension packages to always load on startup, without needing
manual enabling.
:type: List[str]
)"); \
CONFIG_SETTING(public, QVariantList, rdcarray<rdcstr>, AlwaysLoad_Extensions) \
\
DOCUMENT(""); \
CONFIG_SETTING(private, QVariantList, rdcarray<RemoteHost>, RemoteHostList)
DOCUMENT(R"(The unit that GPU durations are displayed in.
@@ -479,315 +709,11 @@ void RemoveRecentFile(rdcarray<rdcstr> &recentList, const rdcstr &file);
struct LegacyData;
DOCUMENT2(R"(A persistant config file that is automatically loaded and saved, which contains any
DOCUMENT(R"(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
:ref:`the documentation for the settings window <settings-window>`.
.. data:: 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.
.. data:: LastCaptureFilePath
The path to the last capture to be opened, which is useful as a default location for browsing.
.. data:: 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
:data:`LastCaptureFilePath`).
.. data:: RecentCaptureFiles
The recently opened capture files.
:type: List[str]
.. data:: LastCapturePath
The path containing the last executable that was captured, which is useful as a default location
for browsing.
.. data:: LastCaptureExe
The filename of the last executable that was captured, inside :data:`LastCapturePath`.
.. data:: RecentCaptureSettings
The recently opened capture settings files.
:type: List[str]
.. data:: TemporaryCaptureDirectory
The path to where temporary capture files should be stored until they're saved permanently.
.. data:: DefaultCaptureSaveDirectory
The default path to save captures in, when browsing to save a temporary capture somewhere.
.. data:: DefaultReplayOptions
A :class:`ReplayOptions` containing the configured default replay options to use in most scenarios
when no specific options are given.
.. data:: TextureViewer_ResetRange
``True`` if the :class:`TextureViewer` should reset the visible range when a new texture is
selected.
Defaults to ``False``.
.. data:: TextureViewer_PerTexSettings
``True`` if the :class:`TextureViewer` should store most visualisation settings on a per-texture
basis instead of keeping it persistent across different textures.
Defaults to ``True``.
.. data:: TextureViewer_PerTexYFlip
``True`` if the :class:`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``.
.. data:: TextureViewer_ShadersDirs
List of the directories containing custom shader files for the Texture Viewer.
.. data:: 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``.
.. data:: 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``.
.. data:: BufferFormatter_ShowHelp
``True`` if the buffer formatter's help section should be shown.
Defaults to ``True``.
.. data:: EventBrowser_TimeUnit
The :class:`TimeUnit` to use to display the duration column in the :class:`EventBrowser`.
Defaults to microseconds.
.. data:: 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``.
.. data:: EventBrowser_HideEmpty
``True`` if the :class:`EventBrowser` should hide marker regions that don't contain any actual
non-marker events.
Defaults to ``False``.
.. data:: EventBrowser_HideAPICalls
``True`` if the :class:`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``.
.. data:: EventBrowser_ApplyColors
``True`` if the :class:`EventBrowser` should apply any colors specified with API marker regions.
Defaults to ``True``.
.. data:: EventBrowser_ColorEventRow
``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row should be
colored instead of just a side-bar.
Defaults to ``True``.
)",
R"(
.. data:: 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``.
.. data:: 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``.
.. data:: 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``.
.. data:: 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``.
.. data:: 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``.
.. data:: 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``.
.. data:: 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.
.. data:: CheckUpdate_AllowChecks
``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row should be
colored instead of just a side-bar.
Defaults to ``True``.
.. data:: CheckUpdate_UpdateAvailable
``True`` if an update to a newer version is currently available.
Defaults to ``False``.
.. data:: 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.
.. data:: CheckUpdate_UpdateResponse
Contains the response from the update server from the last update check, with any release notes
for the new version.
.. data:: CheckUpdate_LastUpdate
A date containing the last time that update checks happened.
.. data:: 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.
.. data:: ExternalTool_RadeonGPUProfiler
The path to the executable of the external Radeon GPU Profiler tool.
.. data:: Tips_HasSeenFirst
``True`` if the user has seen the first tip, which should always be shown first before
randomising.
Defaults to ``False``.
.. data:: 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``.
.. data:: ShaderProcessors
A list of :class:`ShaderProcessingTool` detailing shader processing programs. The list comes in
priority order, with earlier processors preferred over later ones.
.. data:: Analytics_TotalOptOut
``True`` if the user has selected to completely opt-out from and disable all analytics collection
and reporting.
Defaults to ``False``.
.. data:: 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``.
.. data:: 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``.
.. data:: 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``.
.. data:: CrashReport_EmailAddress
The saved email address for pre-filling out in crash reports.
.. data:: 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.
.. data:: CrashReport_ReportedBugs
A list of :class:`BugReport` detailing previously submitted bugs that we're watching for updates.
.. data:: AlwaysLoad_Extensions
A list of strings with extension packages to always load on startup, without needing manual
enabling.
)");
class PersistantConfig
{
+4 -1
View File
@@ -102,7 +102,10 @@ struct CaptureSettings
VARIANT_CAST(CaptureSettings);
DOCUMENT("The :class:`~renderdoc.CaptureOptions` with fine-tuned settings for the capture.");
DOCUMENT(R"(The settings for the capture.
:type: renderdoc.CaptureOptions
)");
CaptureOptions options;
DOCUMENT(
"``True`` if the described capture is an inject-into-process instead of a launched "
+1 -1
View File
@@ -143,7 +143,7 @@ public:
IDeviceProtocolController *Protocol() const { return m_protocol; }
DOCUMENT(R"(
:return: The name to display for this host in the UI, either :meth:`FriendlyName` if it is valid, or
:meth:`Hostname` if not.
:meth:`Hostname` if not.
:rtype: str
)");
rdcstr Name() const
+4
View File
@@ -369,6 +369,10 @@ TEMPLATE_ARRAY_INSTANTIATE(rdcarray, FloatVector)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, GraphicsAPI)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, GPUDevice)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderVariableType)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderChangeStats)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ResourceBindStats)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, SamplerBindStats)
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ConstantBindStats)
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, Attachment)
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, BindingElement)
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, DescriptorBinding)
+4 -4
View File
@@ -176,7 +176,7 @@ void StatisticsViewer::AppendShaderStatistics()
{
const FrameDescription &frameInfo = m_Ctx.FrameInfo();
const ShaderChangeStats *shaders = frameInfo.stats.shaders;
const rdcarray<ShaderChangeStats> &shaders = frameInfo.stats.shaders;
ShaderChangeStats totalShadersPerStage;
memset(&totalShadersPerStage, 0, sizeof(totalShadersPerStage));
for(auto s : indices<ShaderStage>())
@@ -230,7 +230,7 @@ void StatisticsViewer::AppendConstantBindStatistics()
}
{
const ConstantBindStats *constants = frameInfo.stats.constants;
const rdcarray<ConstantBindStats> &constants = frameInfo.stats.constants;
for(auto s : indices<ShaderStage>())
{
totalConstantsPerStage[s].calls += constants[s].calls;
@@ -321,7 +321,7 @@ void StatisticsViewer::AppendSamplerBindStatistics()
}
{
const SamplerBindStats *samplers = frameInfo.stats.samplers;
const rdcarray<SamplerBindStats> &samplers = frameInfo.stats.samplers;
for(auto s : indices<ShaderStage>())
{
totalSamplersPerStage[s].calls += samplers[s].calls;
@@ -388,7 +388,7 @@ void StatisticsViewer::AppendResourceBindStatistics()
}
{
const ResourceBindStats *resources = frameInfo.stats.resources;
const rdcarray<ResourceBindStats> &resources = frameInfo.stats.resources;
for(auto s : indices<ShaderStage>())
{
totalResourcesPerStage[s].calls += resources[s].calls;
+6 -1
View File
@@ -41,7 +41,8 @@
// )"
// * Use :class:`ClassName` to refer to classes, :data:`ClassName.constant` to refer to constants or
// member variables, and :meth:`ClassName.method` to refer to member functions. You can also link
// to the external documentation with :ref:`external-ref-name`.
// to the external documentation with :ref:`external-ref-name`. Function parameters can be
// referenced with :paramref:`parameter`.
// * For constants like ``None`` or ``True`` use the python term (i.e. ``None`` not ``NULL``) and
// surround with double backticks ``.
// * Likewise use python types to refer to basic types - ``str``, ``int``, ``float``, etc.
@@ -49,6 +50,10 @@
// document the values. See the examples in replay_enums.h for the syntax
// * Take care not to go too far over 100 columns, if you're using raw C++11 string literals then
// clang-format won't reformat them into the column limit.
// * Type annotations should follow python typing rules - e.g. List[int] for rdcarray<uint32_t>.
// All parameters and return types should be fully documented, and any 'complex' struct members
// i.e. lists, tuples, and other structs, should be given an explicit type in their docstring with
// :type:.
//
#ifndef DOCUMENT
#define DOCUMENT(text)
+23 -7
View File
@@ -187,9 +187,15 @@ struct ColorBlend
return false;
}
DOCUMENT("A :class:`BlendEquation` describing the blending for color values.");
DOCUMENT(R"(The blending equation for color values.
:type: BlendEquation
)");
BlendEquation colorBlend;
DOCUMENT("A :class:`BlendEquation` describing the blending for alpha values.");
DOCUMENT(R"(The blending equation for alpha values.
:type: BlendEquation
)");
BlendEquation alphaBlend;
DOCUMENT(R"(The :class:`LogicOperation` to use for logic operations, if
@@ -321,10 +327,16 @@ struct BoundResourceArray
bool operator==(const BoundResourceArray &o) const { return bindPoint == o.bindPoint; }
bool operator!=(const BoundResourceArray &o) const { return !(bindPoint == o.bindPoint); }
bool operator<(const BoundResourceArray &o) const { return bindPoint < o.bindPoint; }
DOCUMENT("The bind point for this array of bound resources.");
DOCUMENT(R"(The bind point for this array of bound resources.
:type: Bindpoint
)");
Bindpoint bindPoint;
DOCUMENT("The resources at this bind point");
DOCUMENT(R"(The resources at this bind point.
:type: List[BoundResource]
)");
rdcarray<BoundResource> resources;
DOCUMENT(R"(Lists how many bindings in :data:`resources` are dynamically used.
@@ -451,10 +463,14 @@ struct VertexInputAttribute
from the vertex buffer before advancing to the next value.
)");
int instanceRate;
DOCUMENT("A :class:`~renderdoc.ResourceFormat` with the interpreted format of this attribute.");
DOCUMENT(R"(The interpreted format of this attribute.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT(R"(A :class:`~renderdoc.PixelValue` with the generic value for this attribute if it has
no VB bound.
DOCUMENT(R"(The generic value for this attribute if it has no vertex buffer bound.
:type: PixelValue
)");
PixelValue genericValue;
DOCUMENT("``True`` if this attribute is using :data:`genericValue` for its data.");
+72 -19
View File
@@ -60,12 +60,16 @@ struct MeshFormat
DOCUMENT("The number of bytes to use from the vertex buffer. Only valid on APIs that allow it.");
uint64_t vertexByteSize = 0;
DOCUMENT("The :class:`ResourceFormat` describing this mesh component.");
DOCUMENT(R"(The format description of this mesh components elements.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT(
"The color to use for rendering the wireframe of this mesh element, as a "
":class:`FloatVector`.");
DOCUMENT(R"(The color to use for rendering the wireframe of this mesh element.
:type: FloatVector
)");
FloatVector meshColor;
DOCUMENT("The :class:`Topology` that describes the primitives in this mesh.");
@@ -119,7 +123,10 @@ struct MeshDisplay
DOCUMENT("The :class:`MeshDataStage` where this mesh data comes from.");
MeshDataStage type = MeshDataStage::Unknown;
DOCUMENT("The :class:`Camera` to use when rendering all of the meshes.");
DOCUMENT(R"(The camera to use when rendering all of the meshes.
:type: Camera
)");
ICamera *cam = NULL;
DOCUMENT(
@@ -147,15 +154,26 @@ struct MeshDisplay
DOCUMENT("The index of the vertex to highlight, or :data:`NoHighlight` to select no vertex.");
uint32_t highlightVert = ~0U;
DOCUMENT("The :class:`MeshFormat` of the position data for the mesh.");
DOCUMENT(R"(The configuration for the primary mesh's position data.
:type: MeshFormat
)");
MeshFormat position;
DOCUMENT(
"The :class:`MeshFormat` of the secondary data for the mesh, if used for solid shading.");
DOCUMENT(R"(The configuration for the primary mesh's secondary data, if used for solid shading.
:type: MeshFormat
)");
MeshFormat second;
DOCUMENT("The minimum co-ordinates in each axis of the mesh bounding box.");
DOCUMENT(R"(The minimum co-ordinates in each axis of the mesh bounding box.
:type: FloatVector
)");
FloatVector minBounds;
DOCUMENT("The maximum co-ordinates in each axis of the mesh bounding box.");
DOCUMENT(R"(The maximum co-ordinates in each axis of the mesh bounding box.
:type: FloatVector
)");
FloatVector maxBounds;
DOCUMENT("``True`` if the bounding box around the mesh should be rendered.");
bool showBBox = false;
@@ -265,6 +283,8 @@ See :meth:`ReplayController.BuildCustomShader` for creating an appropriate custo
If the :data:`Subresource.sample` member is set to :data:`ResolveSamples` then a default resolve
will be performed that averages all samples.
:type: Subresource
)");
Subresource subresource = {0, 0, 0};
@@ -284,6 +304,8 @@ the input texture in cases where it isn't easy to directly fetch the input textu
DOCUMENT(R"(The background color to use behind the texture display.
If set to (0, 0, 0, 0) the global checkerboard colors are used.
:type: FloatVector
)");
FloatVector backgroundColor;
@@ -428,14 +450,23 @@ written
int32_t mip = -1;
DOCUMENT(R"(Controls black/white point mapping for output formats that are normal
:attr:`8-bit SRGB <CompType.UNorm>`, values are
:attr:`8-bit SRGB <CompType.UNorm>`, values are truncated so that values below the black point
and above the white point are clamped, and the values in between are evenly distributed.
:type: TextureComponentMapping
)");
TextureComponentMapping comp;
DOCUMENT("Controls mapping for multisampled textures (ignored if texture is not multisampled)");
DOCUMENT(R"(Controls mapping for multisampled textures (ignored if texture is not multisampled)
:type: TextureSampleMapping
)");
TextureSampleMapping sample;
DOCUMENT("Controls mapping for arrayed textures (ignored if texture is not arrayed)");
DOCUMENT(R"(Controls mapping for arrayed textures (ignored if texture is not arrayed)
:type: TextureSliceMapping
)");
TextureSliceMapping slice;
DOCUMENT("Selects a single component out of a texture to save as grayscale, or -1 to save all.");
@@ -451,7 +482,10 @@ It is an :class:`AlphaMapping` that controls what behaviour to use.
)");
AlphaMapping alpha = AlphaMapping::Preserve;
DOCUMENT("The background color if :data:`alpha` is set to :attr:`AlphaMapping.BlendToColor`");
DOCUMENT(R"(The background color if :data:`alpha` is set to :attr:`AlphaMapping.BlendToColor`.
:type: FloatVector
)");
FloatVector alphaCol;
DOCUMENT("The quality to use when saving to a ``JPG`` file. Valid values are between 1 and 100.");
@@ -558,14 +592,30 @@ struct TargetControlMessage
DOCUMENT("The :class:`type <TargetControlMessageType>` of message received");
TargetControlMessageType type = TargetControlMessageType::Unknown;
DOCUMENT("The :class:`new capture data <NewCaptureData>`.");
DOCUMENT(R"(The new capture data.
:type: NewCaptureData
)");
NewCaptureData newCapture;
DOCUMENT("The :class:`API use data <APIUseData>`.");
DOCUMENT(R"(The API use data.
:type: APIUseData
)");
APIUseData apiUse;
DOCUMENT("The :class:`busy signal data <BusyData>`.");
DOCUMENT(R"(The busy signal data.
:type: BusyData
)");
BusyData busy;
DOCUMENT("The :class:`new child process data <NewChildData>`.");
DOCUMENT(R"(The new child process data.
:type: NewChildData
)");
NewChildData newChild;
DOCUMENT(R"(The progress of an on-going capture.
When valid, will be in the range of 0.0 to 1.0 (0 - 100%). If not valid when a capture isn't going
@@ -708,7 +758,10 @@ struct GPUDevice
DOCUMENT("The human-readable name of this GPU.");
rdcstr name;
DOCUMENT("The list of APIs that this device supports.");
DOCUMENT(R"(The APIs that this device supports.
:type: List[GraphicsAPI]
)");
rdcarray<GraphicsAPI> apis;
};
+154 -38
View File
@@ -27,6 +27,9 @@
#include "common_pipestate.h"
// NOTE: Remember that python sees namespaces flattened to a prefix - i.e. D3D11Pipe::Layout is
// renamed to D3D11Layout, so these types must be referenced in the documentation
namespace D3D11Pipe
{
DOCUMENT(R"(Describes a single D3D11 input layout element for one vertex input.
@@ -72,7 +75,10 @@ struct Layout
DOCUMENT("The semantic index for this input.");
uint32_t semanticIndex = 0;
DOCUMENT("The :class:`ResourceFormat` describing how the input data is interpreted.");
DOCUMENT(R"(The format describing how the input data is interpreted.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT("The vertex buffer input slot where the data is sourced from.");
@@ -156,19 +162,31 @@ struct InputAssembly
InputAssembly(const InputAssembly &) = default;
InputAssembly &operator=(const InputAssembly &) = default;
DOCUMENT("A list of :class:`D3D11Layout` describing the input layout elements in this layout.");
DOCUMENT(R"(The input layout elements in this layout.
:type: List[D3D11Layout]
)");
rdcarray<Layout> layouts;
DOCUMENT("The :class:`ResourceId` of the layout object.");
ResourceId resourceId;
DOCUMENT("A :class:`ShaderReflection` describing the bytecode used to create the input layout.");
DOCUMENT(R"(The shader reflection for the bytecode used to create the input layout.
:type: ShaderReflection
)");
ShaderReflection *bytecode = NULL;
DOCUMENT("A list of :class:`D3D11VertexBuffer` with the vertex buffers that are bound.");
DOCUMENT(R"(The bound vertex buffers
:type: List[D3D11VertexBuffer]
)");
rdcarray<VertexBuffer> vertexBuffers;
DOCUMENT("The :class:`D3D11IndexBuffer` describing the index buffer.");
DOCUMENT(R"(The bound index buffer.
:type: D3D11IndexBuffer
)");
IndexBuffer indexBuffer;
};
@@ -235,7 +253,10 @@ struct View
DOCUMENT("The :class:`TextureType` of the view type.");
TextureType type;
DOCUMENT("The :class:`ResourceFormat` that the view uses.");
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT("``True`` if this view describes a structured buffer.");
@@ -329,7 +350,10 @@ struct Sampler
float borderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
DOCUMENT("The :class:`CompareFunction` for comparison samplers.");
CompareFunction compareFunction = CompareFunction::AlwaysTrue;
DOCUMENT("The :class:`TextureFilter` describing the filtering mode.");
DOCUMENT(R"(The filtering mode.
:type: TextureFilter
)");
TextureFilter filter;
DOCUMENT("The maximum anisotropic filtering level to use.");
uint32_t maxAnisotropy = 0;
@@ -401,29 +425,49 @@ struct Shader
DOCUMENT("The :class:`ResourceId` of the shader itself.");
ResourceId resourceId;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
DOCUMENT(R"(The reflection data for this shader.
:type: ShaderReflection
)");
ShaderReflection *reflection = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`reflection` with the bindpoint
mapping data.
DOCUMENT(R"(The bindpoint mapping data to match :data:`reflection`.
:type: ShaderBindpointMapping
)");
ShaderBindpointMapping bindpointMapping;
DOCUMENT("A :class:`ShaderStage` identifying which stage this shader is bound to.");
ShaderStage stage = ShaderStage::Vertex;
DOCUMENT("A list of :class:`D3D11View` with the bound SRVs.");
DOCUMENT(R"(The bound SRVs.
:type: List[D3D11View]
)");
rdcarray<View> srvs;
DOCUMENT("A list of :class:`D3D11View` with the bound UAVs - only valid for the compute stage.");
DOCUMENT(R"(The bound UAVs - only valid for the compute stage, other stages pull the UAVs from
the :data:`D3D11OutputMerger`.
:type: List[D3D11View]
)");
rdcarray<View> uavs;
DOCUMENT("A list of :class:`D3D11Sampler` with the bound samplers.");
DOCUMENT(R"(The bound samplers.
:type: List[D3D11Sampler]
)");
rdcarray<Sampler> samplers;
DOCUMENT("A list of :class:`D3D11ConstantBuffer` with the bound constant buffers.");
DOCUMENT(R"(The bound constant buffers.
:type: List[D3D11ConstantBuffer]
)");
rdcarray<ConstantBuffer> constantBuffers;
DOCUMENT("A list of ``str`` with the bound class instance names.");
DOCUMENT(R"(The bound class instance names.
:type: List[str]
)");
rdcarray<rdcstr> classInstances;
};
@@ -462,7 +506,10 @@ struct StreamOut
StreamOut(const StreamOut &) = default;
StreamOut &operator=(const StreamOut &) = default;
DOCUMENT("A list of ``D3D11StreamOutBind`` with the bound buffers.");
DOCUMENT(R"(The bound stream-out buffer bindings.
:type: List[D3D11StreamOutBind]
)");
rdcarray<StreamOutBind> outputs;
};
@@ -518,13 +565,22 @@ struct Rasterizer
Rasterizer(const Rasterizer &) = default;
Rasterizer &operator=(const Rasterizer &) = default;
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
DOCUMENT(R"(The bound viewports.
:type: List[Viewport]
)");
rdcarray<Viewport> viewports;
DOCUMENT("A list of :class:`Scissor` with the bound scissor regions.");
DOCUMENT(R"(The bound scissor regions.
:type: List[Scissor]
)");
rdcarray<Scissor> scissors;
DOCUMENT("A :class:`D3D11RasterizerState` with the details of the rasterization state.");
DOCUMENT(R"(The details of the rasterization state.
:type: D3D11RasterizerState
)");
RasterizerState state;
};
@@ -547,9 +603,16 @@ struct DepthStencilState
DOCUMENT("``True`` if stencil operations should be performed.");
bool stencilEnable = false;
DOCUMENT("A :class:`StencilFace` describing what happens for front-facing polygons.");
DOCUMENT(R"(The stencil state for front-facing polygons.
:type: StencilFace
)");
StencilFace frontFace;
DOCUMENT("A :class:`StencilFace` describing what happens for back-facing polygons.");
DOCUMENT(R"(The stencil state for back-facing polygons.
:type: StencilFace
)");
StencilFace backFace;
};
@@ -572,7 +635,10 @@ struct BlendState
)");
bool independentBlend = false;
DOCUMENT("A list of :class:`ColorBlend` describing the blend operations for each target.");
DOCUMENT(R"(The blend operations for each target.
:type: List[ColorBlend]
)");
rdcarray<ColorBlend> blends;
DOCUMENT("The constant blend factor to use in blend equations.");
@@ -589,20 +655,37 @@ struct OutputMerger
OutputMerger(const OutputMerger &) = default;
OutputMerger &operator=(const OutputMerger &) = default;
DOCUMENT("A :class:`D3D11DepthStencilState` with the details of the depth-stencil state.");
DOCUMENT(R"(The current depth-stencil state details.
:type: D3D11DepthStencilState
)");
DepthStencilState depthStencilState;
DOCUMENT("A :class:`D3D11BlendState` with the details of the blend state.");
DOCUMENT(R"(The current blend state details.
:type: D3D11BlendState
)");
BlendState blendState;
DOCUMENT("A list of :class:`D3D11View` describing the bound render targets.");
DOCUMENT(R"(The bound render targets.
:type: List[D3D11View]
)");
rdcarray<View> renderTargets;
DOCUMENT("Which slot in the output targets is the first UAV.");
uint32_t uavStartSlot = 0;
DOCUMENT("A list of :class:`D3D11View` describing the bound UAVs.");
DOCUMENT(R"(The bound UAVs.
:type: List[D3D11View]
)");
rdcarray<View> uavs;
DOCUMENT("A :class:`D3D11View` with details of the bound depth-stencil target.");
DOCUMENT(R"(The currently bound depth-stencil target.
:type: D3D11View
)");
View depthTarget;
DOCUMENT("``True`` if depth access to the depth-stencil target is read-only.");
bool depthReadOnly = false;
@@ -637,32 +720,65 @@ struct State
State(const State &) = delete;
#endif
DOCUMENT("A :class:`D3D11InputAssembly` describing the input assembly pipeline stage.");
DOCUMENT(R"(The input assembly pipeline stage.
:type: D3D11InputAssembly
)");
InputAssembly inputAssembly;
DOCUMENT("A :class:`D3D11Shader` describing the vertex shader stage.");
DOCUMENT(R"(The vertex shader stage.
:type: D3D11Shader
)");
Shader vertexShader;
DOCUMENT("A :class:`D3D11Shader` describing the hull shader stage.");
DOCUMENT(R"(The hull shader stage.
:type: D3D11Shader
)");
Shader hullShader;
DOCUMENT("A :class:`D3D11Shader` describing the domain shader stage.");
DOCUMENT(R"(The domain shader stage.
:type: D3D11Shader
)");
Shader domainShader;
DOCUMENT("A :class:`D3D11Shader` describing the geometry shader stage.");
DOCUMENT(R"(The geometry shader stage.
:type: D3D11Shader
)");
Shader geometryShader;
DOCUMENT("A :class:`D3D11Shader` describing the pixel shader stage.");
DOCUMENT(R"(The pixel shader stage.
:type: D3D11Shader
)");
Shader pixelShader;
DOCUMENT("A :class:`D3D11Shader` describing the compute shader stage.");
DOCUMENT(R"(The compute shader stage.
:type: D3D11Shader
)");
Shader computeShader;
DOCUMENT("A :class:`D3D11StreamOut` describing the stream-out pipeline stage.");
DOCUMENT(R"(The stream-out pipeline stage.
:type: D3D11StreamOut
)");
StreamOut streamOut;
DOCUMENT("A :class:`D3D11Rasterizer` describing the rasterizer pipeline stage.");
DOCUMENT(R"(The rasterizer pipeline stage.
:type: D3D11Rasterizer
)");
Rasterizer rasterizer;
DOCUMENT("A :class:`D3D11OutputMerger` describing the output merger pipeline stage.");
DOCUMENT(R"(The output merger pipeline stage.
:type: D3D11OutputMerger
)");
OutputMerger outputMerger;
DOCUMENT("A :class:`D3D11Predication` describing the predicated rendering state.");
DOCUMENT(R"(The predicated rendering state.
:type: D3D11Predication
)");
Predication predication;
};
+149 -39
View File
@@ -71,7 +71,10 @@ struct Layout
DOCUMENT("The semantic index for this input.");
uint32_t semanticIndex = 0;
DOCUMENT("The :class:`ResourceFormat` describing how the input data is interpreted.");
DOCUMENT(R"(The format describing how the input data is interpreted.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT("The vertex buffer input slot where the data is sourced from.");
@@ -164,13 +167,22 @@ struct InputAssembly
InputAssembly(const InputAssembly &) = default;
InputAssembly &operator=(const InputAssembly &) = default;
DOCUMENT("A list of :class:`D3D12Layout` describing the input layout elements in this layout.");
DOCUMENT(R"(The input layout elements in this layout.
:type: List[D3D12Layout]
)");
rdcarray<Layout> layouts;
DOCUMENT("A list of :class:`D3D12VertexBuffer` with the vertex buffers that are bound.");
DOCUMENT(R"(The bound vertex buffers
:type: List[D3D12VertexBuffer]
)");
rdcarray<VertexBuffer> vertexBuffers;
DOCUMENT("The :class:`D3D12IndexBuffer` describing the index buffer.");
DOCUMENT(R"(The bound index buffer.
:type: D3D12IndexBuffer
)");
IndexBuffer indexBuffer;
DOCUMENT(R"(The index value to use for cutting strips. Either ``0``, ``0xffff`` or ``0xffffffff``.
@@ -248,10 +260,16 @@ struct View
ResourceId resourceId;
DOCUMENT("The :class:`TextureType` of the view type.");
TextureType type;
DOCUMENT("The :class:`ResourceFormat` that the view uses.");
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT("A :class:`TextureSwizzle4` indicating the swizzle applied to this texture.");
DOCUMENT(R"(The swizzle applied to a texture by the view.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
DOCUMENT("The :class:`D3DBufferViewFlags` set for the buffer.");
D3DBufferViewFlags bufferFlags = D3DBufferViewFlags::NoFlags;
@@ -352,7 +370,10 @@ struct Sampler
float borderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
DOCUMENT("The :class:`CompareFunction` for comparison samplers.");
CompareFunction compareFunction = CompareFunction::AlwaysTrue;
DOCUMENT("The :class:`TextureFilter` describing the filtering mode.");
DOCUMENT(R"(The filtering mode.
:type: TextureFilter
)");
TextureFilter filter;
DOCUMENT("The maximum anisotropic filtering level to use.");
uint32_t maxAnisotropy = 0;
@@ -417,8 +438,10 @@ struct ConstantBuffer
DOCUMENT("How many bytes are in this constant buffer view.");
uint32_t byteSize = 0;
DOCUMENT(R"(If :data:`immediate` is ``True`` and this is a root constant, this contains a list of
``int`` values with the root values set.
DOCUMENT(R"(If :data:`immediate` is ``True`` and this is a root constant, this contains the root
values set as interpreted as a series of DWORD values.
:type: List[int]
)");
rdcarray<uint32_t> rootValues;
};
@@ -466,11 +489,20 @@ struct RootSignatureRange
ShaderStageMask visibility = ShaderStageMask::All;
DOCUMENT("The register space of this element.");
uint32_t registerSpace;
DOCUMENT("List of :class:`ConstantBuffer` containing the constant buffers.");
DOCUMENT(R"(The constant buffers in this range.
:type: List[D3D12ConstantBuffer]
)");
rdcarray<ConstantBuffer> constantBuffers;
DOCUMENT("List of :class:`Sampler` containing the samplers.");
DOCUMENT(R"(The samplers in this range.
:type: List[D3D12Sampler]
)");
rdcarray<Sampler> samplers;
DOCUMENT("List of :class:`View` containing the SRVs or UAVs.");
DOCUMENT(R"(The SRVs or UAVs in this range.
:type: List[D3D12View]
)");
rdcarray<View> views;
};
@@ -485,10 +517,14 @@ struct Shader
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
ResourceId resourceId;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
DOCUMENT(R"(The reflection data for this shader.
:type: ShaderReflection
)");
ShaderReflection *reflection = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`reflection` with the bindpoint
mapping data.
DOCUMENT(R"(The bindpoint mapping data to match :data:`reflection`.
:type: ShaderBindpointMapping
)");
ShaderBindpointMapping bindpointMapping;
@@ -549,7 +585,10 @@ struct StreamOut
StreamOut(const StreamOut &) = default;
StreamOut &operator=(const StreamOut &) = default;
DOCUMENT("A list of ``D3D12SOBind`` with the bound buffers.");
DOCUMENT(R"(The bound stream-out buffer bindings.
:type: List[D3D12StreamOutBind]
)");
rdcarray<StreamOutBind> outputs;
};
@@ -604,13 +643,22 @@ struct Rasterizer
DOCUMENT("The mask determining which samples are written to.");
uint32_t sampleMask = ~0U;
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
DOCUMENT(R"(The bound viewports.
:type: List[Viewport]
)");
rdcarray<Viewport> viewports;
DOCUMENT("A list of :class:`Scissor` with the bound scissor regions.");
DOCUMENT(R"(The bound scissor regions.
:type: List[Scissor]
)");
rdcarray<Scissor> scissors;
DOCUMENT("A :class:`D3D12RasterizerState` with the details of the rasterization state.");
DOCUMENT(R"(The details of the rasterization state.
:type: D3D12RasterizerState
)");
RasterizerState state;
};
@@ -633,9 +681,16 @@ struct DepthStencilState
DOCUMENT("``True`` if stencil operations should be performed.");
bool stencilEnable = false;
DOCUMENT("A :class:`StencilFace` describing what happens for front-facing polygons.");
DOCUMENT(R"(The stencil state for front-facing polygons.
:type: StencilFace
)");
StencilFace frontFace;
DOCUMENT("A :class:`StencilFace` describing what happens for back-facing polygons.");
DOCUMENT(R"(The stencil state for back-facing polygons.
:type: StencilFace
)");
StencilFace backFace;
DOCUMENT("The near plane bounding value.");
@@ -660,7 +715,10 @@ struct BlendState
)");
bool independentBlend = false;
DOCUMENT("A list of :class:`ColorBlend` describing the blend operations for each target.");
DOCUMENT(R"(The blend operations for each target.
:type: List[ColorBlend]
)");
rdcarray<ColorBlend> blends;
DOCUMENT("The constant blend factor to use in blend equations.");
@@ -675,15 +733,28 @@ struct OM
OM(const OM &) = default;
OM &operator=(const OM &) = default;
DOCUMENT("A :class:`D3D12DepthStencilState` with the details of the depth-stencil state.");
DOCUMENT(R"(The current depth-stencil state details.
:type: D3D12DepthStencilState
)");
DepthStencilState depthStencilState;
DOCUMENT("A :class:`D3D12BlendState` with the details of the blend state.");
DOCUMENT(R"(The current blend state details.
:type: D3D12BlendState
)");
BlendState blendState;
DOCUMENT("A list of :class:`D3D12View` describing the bound render targets.");
DOCUMENT(R"(The bound render targets.
:type: List[D3D12View]
)");
rdcarray<View> renderTargets;
DOCUMENT("A :class:`D3D12View` with details of the bound depth-stencil target.");
DOCUMENT(R"(The currently bound depth-stencil target.
:type: D3D12View
)");
View depthTarget = D3D12Pipe::View(0);
DOCUMENT("``True`` if depth access to the depth-stencil target is read-only.");
bool depthReadOnly = false;
@@ -738,7 +809,10 @@ struct ResourceData
DOCUMENT("The :class:`ResourceId` of the resource.");
ResourceId resourceId;
DOCUMENT("A list of :class:`D3D12ResourceState` entries, one for each subresource.");
DOCUMENT(R"(The subresource states in this resource.
:type: List[D3D12ResourceState]
)");
rdcarray<ResourceState> states;
};
@@ -757,35 +831,71 @@ struct State
DOCUMENT("The :class:`ResourceId` of the root signature object.");
ResourceId rootSignatureResourceId;
DOCUMENT("A list of :class:`RootSignatureRange` entries comprising the root signature.");
DOCUMENT(R"(The root signature, as a range per element.
:type: List[RootSignatureRange]
)");
rdcarray<RootSignatureRange> rootElements;
DOCUMENT("A :class:`D3D12InputAssembly` describing the input assembly pipeline stage.");
DOCUMENT(R"(The input assembly pipeline stage.
:type: D3D12InputAssembly
)");
InputAssembly inputAssembly;
DOCUMENT("A :class:`D3D12Shader` describing the vertex shader stage.");
DOCUMENT(R"(The vertex shader stage.
:type: D3D12Shader
)");
Shader vertexShader;
DOCUMENT("A :class:`D3D12Shader` describing the hull shader stage.");
DOCUMENT(R"(The hull shader stage.
:type: D3D12Shader
)");
Shader hullShader;
DOCUMENT("A :class:`D3D12Shader` describing the domain shader stage.");
DOCUMENT(R"(The domain shader stage.
:type: D3D12Shader
)");
Shader domainShader;
DOCUMENT("A :class:`D3D12Shader` describing the geometry shader stage.");
DOCUMENT(R"(The geometry shader stage.
:type: D3D12Shader
)");
Shader geometryShader;
DOCUMENT("A :class:`D3D12Shader` describing the pixel shader stage.");
DOCUMENT(R"(The pixel shader stage.
:type: D3D12Shader
)");
Shader pixelShader;
DOCUMENT("A :class:`D3D12Shader` describing the compute shader stage.");
DOCUMENT(R"(The compute shader stage.
:type: D3D12Shader
)");
Shader computeShader;
DOCUMENT("A :class:`D3D12StreamOut` describing the stream-out pipeline stage.");
DOCUMENT(R"(The stream-out pipeline stage.
:type: D3D12StreamOut
)");
StreamOut streamOut;
DOCUMENT("A :class:`D3D12Rasterizer` describing the rasterizer pipeline stage.");
DOCUMENT(R"(The rasterizer pipeline stage.
:type: D3D12Rasterizer
)");
Rasterizer rasterizer;
DOCUMENT("A :class:`D3D12OM` describing the output merger pipeline stage.");
DOCUMENT(R"(The output merger pipeline stage.
:type: D3D12OM
)");
OM outputMerger;
DOCUMENT("A list of :class:`D3D12ResourceData` entries, one for each resource.");
DOCUMENT(R"(The resource states for the currently live resources.
:type: List[ResourceData]
)");
rdcarray<ResourceData> resourceStates;
};
+259 -57
View File
@@ -497,6 +497,8 @@ human-readable name by the application.
DOCUMENT(R"(The chunk indices in the structured file that initialised this resource.
This will at least contain the first call that created it, but may contain other auxilliary calls.
:type: List[int]
)");
rdcarray<uint32_t> initialisationChunks;
@@ -506,6 +508,8 @@ Can be empty if there are no derived resources.
This is the inverse of :data:`parentResources` in a potentially many:many relationship, but
typically it is one parent to many derived.
:type: List[ResourceId]
)");
rdcarray<ResourceId> derivedResources;
@@ -515,6 +519,8 @@ Can be empty if there are no parent resources.
This is the inverse of :data:`derivedResources` in a potentially many:many relationship, but
typically it is one parent to many derived.
:type: List[ResourceId]
)");
rdcarray<ResourceId> parentResources;
@@ -619,7 +625,10 @@ struct TextureDescription
return byteSize < o.byteSize;
return false;
}
DOCUMENT("The :class:`ResourceFormat` that describes the format of each pixel in the texture.");
DOCUMENT(R"(The format of each pixel in the texture.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT("The base dimension of the texture - either 1, 2, or 3.");
@@ -690,7 +699,10 @@ of results part way through the multi draw.
)");
uint32_t eventId = 0;
DOCUMENT("A list of addresses in the CPU callstack where this function was called.");
DOCUMENT(R"(The addresses in the CPU callstack where this function was called.
:type: List[int]
)");
rdcarray<uint64_t> callstack;
DOCUMENT("The chunk index for this function call in the structured file.");
@@ -791,6 +803,24 @@ struct ConstantBindStats
ConstantBindStats() = default;
ConstantBindStats(const ConstantBindStats &) = default;
ConstantBindStats &operator=(const ConstantBindStats &) = default;
bool operator<(const ConstantBindStats &o) const
{
if(!(calls == o.calls))
return calls < o.calls;
if(!(sets == o.sets))
return sets < o.sets;
if(!(nulls == o.nulls))
return nulls < o.nulls;
if(!(bindslots == o.bindslots))
return bindslots < o.bindslots;
return sizes < o.sizes;
}
bool operator==(const ConstantBindStats &o) const
{
return calls == o.calls && sets == o.sets && nulls == o.nulls && bindslots == o.bindslots &&
sizes == o.sizes;
}
static const BucketRecordType BucketType = BucketRecordType::Pow2;
static const size_t BucketCount = 31;
@@ -804,10 +834,16 @@ struct ConstantBindStats
DOCUMENT("How many objects were unbound.");
uint32_t nulls;
DOCUMENT("A list where the Nth element contains the number of calls that bound N buffers.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N buffers.
:type: List[int]
)");
rdcarray<uint32_t> bindslots;
DOCUMENT("A :class:`bucketed <BucketType>` list over the sizes of buffers bound.");
DOCUMENT(R"(A :class:`bucketed <BucketType>` list over the sizes of buffers bound.
:type: List[int]
)");
rdcarray<uint32_t> sizes;
};
@@ -820,6 +856,21 @@ struct SamplerBindStats
SamplerBindStats() = default;
SamplerBindStats(const SamplerBindStats &) = default;
SamplerBindStats &operator=(const SamplerBindStats &) = default;
bool operator<(const SamplerBindStats &o) const
{
if(!(calls == o.calls))
return calls < o.calls;
if(!(sets == o.sets))
return sets < o.sets;
if(!(nulls == o.nulls))
return nulls < o.nulls;
return bindslots < o.bindslots;
}
bool operator==(const SamplerBindStats &o) const
{
return calls == o.calls && sets == o.sets && nulls == o.nulls && bindslots == o.bindslots;
}
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -830,7 +881,10 @@ struct SamplerBindStats
DOCUMENT("How many objects were unbound.");
uint32_t nulls;
DOCUMENT("A list where the Nth element contains the number of calls that bound N samplers.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N samplers.
:type: List[int]
)");
rdcarray<uint32_t> bindslots;
};
@@ -843,6 +897,24 @@ struct ResourceBindStats
ResourceBindStats() = default;
ResourceBindStats(const ResourceBindStats &) = default;
ResourceBindStats &operator=(const ResourceBindStats &) = default;
bool operator<(const ResourceBindStats &o) const
{
if(!(calls == o.calls))
return calls < o.calls;
if(!(sets == o.sets))
return sets < o.sets;
if(!(nulls == o.nulls))
return nulls < o.nulls;
if(!(types == o.types))
return types < o.types;
return bindslots < o.bindslots;
}
bool operator==(const ResourceBindStats &o) const
{
return calls == o.calls && sets == o.sets && nulls == o.nulls && types == o.types &&
bindslots == o.bindslots;
}
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -856,10 +928,15 @@ struct ResourceBindStats
DOCUMENT(R"(A list with one element for each type in :class:`TextureType`.
The Nth element contains the number of times a resource of that type was bound.
:type: List[int]
)");
rdcarray<uint32_t> types;
DOCUMENT("A list where the Nth element contains the number of calls that bound N resources.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N resources.
:type: List[int]
)");
rdcarray<uint32_t> bindslots;
};
@@ -897,10 +974,15 @@ struct ResourceUpdateStats
DOCUMENT(R"(A list with one element for each type in :class:`TextureType`.
The Nth element contains the number of times a resource of that type was updated.
:type: List[int]
)");
rdcarray<uint32_t> types;
DOCUMENT("A :class:`bucketed <BucketType>` list over the number of bytes in the update.");
DOCUMENT(R"(A :class:`bucketed <BucketType>` list over the number of bytes in the update.
:type: List[int]
)");
rdcarray<uint32_t> sizes;
};
@@ -938,7 +1020,10 @@ struct DrawcallStats
DOCUMENT("How many of :data:`calls` were indirect.");
uint32_t indirect;
DOCUMENT("A :class:`bucketed <BucketType>` list over the number of instances in the draw.");
DOCUMENT(R"(A :class:`bucketed <BucketType>` list over the number of instances in the draw.
:type: List[int]
)");
rdcarray<uint32_t> counts;
};
@@ -998,8 +1083,10 @@ struct VertexBindStats
DOCUMENT("How many objects were unbound.");
uint32_t nulls;
DOCUMENT(
"A list where the Nth element contains the number of calls that bound N vertex buffers.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N vertex buffers.
:type: List[int]
)");
rdcarray<uint32_t> bindslots;
};
@@ -1032,6 +1119,21 @@ struct ShaderChangeStats
ShaderChangeStats() = default;
ShaderChangeStats(const ShaderChangeStats &) = default;
ShaderChangeStats &operator=(const ShaderChangeStats &) = default;
bool operator<(const ShaderChangeStats &o) const
{
if(!(calls == o.calls))
return calls < o.calls;
if(!(sets == o.sets))
return sets < o.sets;
if(!(nulls == o.nulls))
return nulls < o.nulls;
return redundants < o.redundants;
}
bool operator==(const ShaderChangeStats &o) const
{
return calls == o.calls && sets == o.sets && nulls == o.nulls && redundants == o.redundants;
}
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -1114,10 +1216,16 @@ struct RasterizationStats
DOCUMENT("How many calls made no change due to the existing bind being identical.");
uint32_t redundants;
DOCUMENT("A list where the Nth element contains the number of calls that bound N viewports.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N viewports.
:type: List[int]
)");
rdcarray<uint32_t> viewports;
DOCUMENT("A list where the Nth element contains the number of calls that bound N scissor rects.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N scissor rects.
:type: List[int]
)");
rdcarray<uint32_t> rects;
};
@@ -1140,7 +1248,10 @@ struct OutputTargetStats
DOCUMENT("How many objects were unbound.");
uint32_t nulls;
DOCUMENT("A list where the Nth element contains the number of calls that bound N targets.");
DOCUMENT(R"(A list where the Nth element contains the number of calls that bound N targets.
:type: List[int]
)");
rdcarray<uint32_t> bindslots;
};
@@ -1153,54 +1264,102 @@ Currently this information is only available on D3D11 and is fairly API-centric.
struct FrameStatistics
{
DOCUMENT("");
FrameStatistics() = default;
FrameStatistics()
{
constants.resize(ENUM_ARRAY_SIZE(ShaderStage));
samplers.resize(ENUM_ARRAY_SIZE(ShaderStage));
resources.resize(ENUM_ARRAY_SIZE(ShaderStage));
shaders.resize(ENUM_ARRAY_SIZE(ShaderStage));
}
FrameStatistics(const FrameStatistics &) = default;
FrameStatistics &operator=(const FrameStatistics &) = default;
DOCUMENT("``True`` if the statistics in this structure are valid.");
bool recorded;
bool recorded = false;
DOCUMENT("A list of constant buffer bind statistics, one per each :class:`stage <ShaderStage>`.");
ConstantBindStats constants[ENUM_ARRAY_SIZE(ShaderStage)];
DOCUMENT(R"(A list of constant buffer bind statistics, one per each :class:`stage <ShaderStage>`.
:type: List[ConstantBindStats]
)");
rdcarray<ConstantBindStats> constants;
DOCUMENT("A list of sampler bind statistics, one per each :class:`stage <ShaderStage>`.");
SamplerBindStats samplers[ENUM_ARRAY_SIZE(ShaderStage)];
DOCUMENT(R"(A list of sampler bind statistics, one per each :class:`stage <ShaderStage>`.
:type: List[SamplerBindStats]
)");
rdcarray<SamplerBindStats> samplers;
DOCUMENT("A list of resource bind statistics, one per each :class:`stage <ShaderStage>`.");
ResourceBindStats resources[ENUM_ARRAY_SIZE(ShaderStage)];
DOCUMENT(R"(A list of resource bind statistics, one per each :class:`stage <ShaderStage>`.
:type: List[ResourceBindStats]
)");
rdcarray<ResourceBindStats> resources;
DOCUMENT("Information about resource contents updates.");
ResourceUpdateStats updates;
DOCUMENT(R"(Information about resource contents updates.
:type: ResourceUpdateStats
)");
ResourceUpdateStats updates = {};
DOCUMENT("Information about drawcalls.");
DrawcallStats draws;
DOCUMENT(R"(Information about drawcalls.
:type: DrawcallStats
)");
DrawcallStats draws = {};
DOCUMENT("Information about compute dispatches.");
DispatchStats dispatches;
DOCUMENT(R"(Information about compute dispatches.
:type: DispatchStats
)");
DispatchStats dispatches = {};
DOCUMENT("Information about index buffer binds.");
IndexBindStats indices;
DOCUMENT(R"(Information about index buffer binds.
:type: IndexBindStats
)");
IndexBindStats indices = {};
DOCUMENT("Information about vertex buffer binds.");
VertexBindStats vertices;
DOCUMENT(R"(Information about vertex buffer binds.
:type: VertexBindStats
)");
VertexBindStats vertices = {};
DOCUMENT("Information about vertex layout binds.");
LayoutBindStats layouts;
DOCUMENT(R"(Information about vertex layout binds.
:type: LayoutBindStats
)");
LayoutBindStats layouts = {};
DOCUMENT("A list of shader bind statistics, one per each :class:`stage <ShaderStage>`.");
ShaderChangeStats shaders[ENUM_ARRAY_SIZE(ShaderStage)];
DOCUMENT(R"(A list of shader bind statistics, one per each :class:`stage <ShaderStage>`.
:type: List[ShaderChangeStats]
)");
rdcarray<ShaderChangeStats> shaders;
DOCUMENT("Information about blend state binds.");
BlendStats blends;
DOCUMENT(R"(Information about blend state binds.
:type: BlendStats
)");
BlendStats blends = {};
DOCUMENT("Information about depth-stencil state binds.");
DepthStencilStats depths;
DOCUMENT(R"(Information about depth-stencil state binds.
:type: DepthStencilStats
)");
DepthStencilStats depths = {};
DOCUMENT("Information about rasterizer state binds.");
RasterizationStats rasters;
DOCUMENT(R"(Information about rasterizer state binds.
:type: RasterizationStats
)");
RasterizationStats rasters = {};
DOCUMENT("Information about output merger and UAV binds.");
OutputTargetStats outputs;
DOCUMENT(R"(Information about output merger and UAV binds.
:type: OutputTargetStats
)");
OutputTargetStats outputs = {};
};
DECLARE_REFLECTION_STRUCT(FrameStatistics);
@@ -1258,10 +1417,16 @@ this counts the frame number when the capture was made.
DOCUMENT("The time when the capture was created, as a unix timestamp in UTC.");
uint64_t captureTime;
DOCUMENT("The :class:`frame statistics <FrameStatistics>`.");
DOCUMENT(R"(The frame statistics.
:type: FrameStatistics
)");
FrameStatistics stats;
DOCUMENT("A list of debug messages that are not associated with any particular event.");
DOCUMENT(R"(The debug messages that are not associated with any particular event.
:type: List[DebugMessage]
)");
rdcarray<DebugMessage> debugMessages;
static const uint32_t NoFrameNumber = ~0U;
@@ -1450,26 +1615,40 @@ Valid values are 1 (depending on API), 2 or 4, or 0 if the drawcall is not an in
operation.
)");
ResourceId copySource;
DOCUMENT(R"(The :class:`Subresource` specifying which part in :data:`copySource` is used.)");
DOCUMENT(R"(Which part of :data:`copySource` is used.
:type: Subresource
)");
Subresource copySourceSubresource;
DOCUMENT(R"(The :class:`ResourceId` identifying the destination object in a copy, resolve or blit
operation.
)");
ResourceId copyDestination;
DOCUMENT(R"(The :class:`Subresource` specifying which part in :data:`copyDestination` is used.)");
DOCUMENT(R"(Which part of :data:`copyDestination` is used.
:type: Subresource
)");
Subresource copyDestinationSubresource;
DOCUMENT(R"(The parent of this drawcall, or ``None`` if there is no parent for this drawcall.
:type: DrawcallDescription
)");
const DrawcallDescription *parent;
DOCUMENT(R"(The previous drawcall in the frame, or ``None`` if this is the first drawcall in the
frame.
:type: DrawcallDescription
)");
const DrawcallDescription *previous;
DOCUMENT(
"The next drawcall in the frame, or ``None`` if this is the last drawcall in the frame.");
DOCUMENT(R"(The next drawcall in the frame, or ``None`` if this is the last drawcall in the frame.
:type: DrawcallDescription
)");
const DrawcallDescription *next;
DOCUMENT(R"(A simple list of the :class:`ResourceId` ids for the color outputs, which can be used
@@ -1479,10 +1658,16 @@ for very coarse bucketing of drawcalls into similar passes by their outputs.
DOCUMENT("The resource used for depth output - see :data:`outputs`.");
ResourceId depthOut;
DOCUMENT("A list of the :class:`APIEvent` events that happened since the previous drawcall.");
DOCUMENT(R"(The events that happened since the previous drawcall.
:type: List[APIEvent]
)");
rdcarray<APIEvent> events;
DOCUMENT("A list of :class:`DrawcallDescription` child drawcalls.");
DOCUMENT(R"(The child drawcalls below this one, if it's a marker region or multidraw type draw.
:type: List[DrawcallDescription]
)");
rdcarray<DrawcallDescription> children;
};
@@ -1626,7 +1811,10 @@ struct CounterDescription
DOCUMENT("The :class:`CounterUnit` for the result value.");
CounterUnit unit;
DOCUMENT("The :class:`Uuid` of this counter, which uniquely identifies it.");
DOCUMENT(R"(The unique identifier for this counter that will not change across drivers or replays.
:type: Uuid
)");
Uuid uuid;
};
@@ -1722,7 +1910,10 @@ struct CounterResult
GPUCounter counter;
#endif
DOCUMENT("The value itself.");
DOCUMENT(R"(The value itself.
:type: CounterValue
)");
CounterValue value;
};
@@ -1763,7 +1954,10 @@ struct ModificationValue
return stencil < o.stencil;
return false;
}
DOCUMENT("The color value.");
DOCUMENT(R"(The color value.
:type: PixelValue
)");
PixelValue col;
DOCUMENT("The depth output, as a ``float``.");
@@ -1861,15 +2055,23 @@ multiple fragments from a single draw wrote to a pixel.
DOCUMENT("The primitive that generated this fragment.");
uint32_t primitiveID;
DOCUMENT(R"(The :class:`ModificationValue` of the texture before this fragment ran.
DOCUMENT(R"(The value of the texture before this fragment ran.
This is valid only for the first fragment if multiple fragments in the same event write to the same
pixel.
:type: ModificationValue
)");
ModificationValue preMod;
DOCUMENT("The :class:`ModificationValue` that this fragment wrote from the pixel shader.");
DOCUMENT(R"(The value that this fragment wrote from the pixel shader.
:type: ModificationValue
)");
ModificationValue shaderOut;
DOCUMENT(R"(The :class:`ModificationValue` of the texture after this fragment ran.)");
DOCUMENT(R"(The value of the texture after this fragment ran.
:type: ModificationValue
)");
ModificationValue postMod;
DOCUMENT("``True`` if the sample mask eliminated this fragment.");
+178 -46
View File
@@ -73,10 +73,16 @@ glVertexAttribIFormat) so they will be cast.
)");
bool floatCast = false;
DOCUMENT("The :class:`ResourceFormat` of the vertex attribute.");
DOCUMENT(R"(The format describing how the vertex attribute is interpreted.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT("A :class:`PixelValue` containing the generic value of a vertex attribute.");
DOCUMENT(R"(The generic value of the vertex attribute if no buffer is bound.
:type: PixelValue
)");
PixelValue genericValue;
DOCUMENT("The vertex buffer input slot where the data is sourced from.");
@@ -140,10 +146,16 @@ struct VertexInput
DOCUMENT("The :class:`ResourceId` of the vertex array object that's bound.");
ResourceId vertexArrayObject;
DOCUMENT("A list of :class:`GLVertexAttribute` with the vertex attributes.");
DOCUMENT(R"(The vertex attributes.
:type: List[GLVertexAttribute]
)");
rdcarray<VertexAttribute> attributes;
DOCUMENT("A list of :class:`GLVertexBuffer` with the vertex buffers.");
DOCUMENT(R"(The vertex buffers.
:type: List[GLVertexBuffer]
)");
rdcarray<VertexBuffer> vertexBuffers;
DOCUMENT("The :class:`ResourceId` of the index buffer.");
@@ -174,17 +186,24 @@ struct Shader
DOCUMENT("The :class:`ResourceId` of the program bound to this stage.");
ResourceId programResourceId;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
DOCUMENT(R"(The reflection data for this shader.
:type: ShaderReflection
)");
ShaderReflection *reflection = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`reflection` with the bindpoint
mapping data.
DOCUMENT(R"(The bindpoint mapping data to match :data:`reflection`.
:type: ShaderBindpointMapping
)");
ShaderBindpointMapping bindpointMapping;
DOCUMENT("A :class:`ShaderStage` identifying which stage this shader is bound to.");
ShaderStage stage = ShaderStage::Vertex;
DOCUMENT("A list of integers with the subroutine values.");
DOCUMENT(R"(A list of integers with the subroutine values.
:type: List[int]
)");
rdcarray<uint32_t> subroutines;
};
@@ -255,7 +274,10 @@ struct Texture
DOCUMENT("The :class:`TextureType` of the texture.");
TextureType type = TextureType::Unknown;
DOCUMENT("A :class:`TextureSwizzle4` indicating the swizzle applied to this texture.");
DOCUMENT(R"(The swizzle applied to a texture.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
DOCUMENT(R"(The channel to read from in a depth-stencil texture.
@@ -337,7 +359,10 @@ struct Sampler
float borderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
DOCUMENT("The :class:`CompareFunction` for comparison samplers.");
CompareFunction compareFunction = CompareFunction::AlwaysTrue;
DOCUMENT("The :class:`TextureFilter` describing the filtering mode.");
DOCUMENT(R"(The filtering mode.
:type: TextureFilter
)");
TextureFilter filter;
DOCUMENT("``True`` if seamless cubemap filtering is enabled for this texture.");
bool seamlessCubeMap = false;
@@ -442,7 +467,10 @@ struct ImageLoadStore
bool readAllowed = false;
DOCUMENT("``True`` if storing to the image is allowed.");
bool writeAllowed = false;
DOCUMENT("The :class:`ResourceFormat` that the image is bound as.");
DOCUMENT(R"(The format that the image is bound as.
:type: ResourceFormat
)");
ResourceFormat imageFormat;
};
@@ -542,13 +570,22 @@ struct Rasterizer
Rasterizer(const Rasterizer &) = default;
Rasterizer &operator=(const Rasterizer &) = default;
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
DOCUMENT(R"(The bound viewports.
:type: List[Viewport]
)");
rdcarray<Viewport> viewports;
DOCUMENT("A list of :class:`Scissor` with the bound scissor regions.");
DOCUMENT(R"(The bound scissor regions.
:type: List[Scissor]
)");
rdcarray<Scissor> scissors;
DOCUMENT("A :class:`GLRasterizerState` with the details of the rasterization state.");
DOCUMENT(R"(The details of the rasterization state.
:type: GLRasterizerState
)");
RasterizerState state;
};
@@ -585,9 +622,16 @@ struct StencilState
DOCUMENT("``True`` if stencil operations should be performed.");
bool stencilEnable = false;
DOCUMENT("A :class:`StencilFace` describing what happens for front-facing polygons.");
DOCUMENT(R"(The stencil state for front-facing polygons.
:type: StencilFace
)");
StencilFace frontFace;
DOCUMENT("A :class:`StencilFace` describing what happens for back-facing polygons.");
DOCUMENT(R"(The stencil state for back-facing polygons.
:type: StencilFace
)");
StencilFace backFace;
};
@@ -624,7 +668,10 @@ struct Attachment
uint32_t numSlices = 1;
DOCUMENT("The mip of the texture that's used in the attachment.");
uint32_t mipLevel = 0;
DOCUMENT("A :class:`TextureSwizzle4` indicating the swizzle applied to this texture.");
DOCUMENT(R"(The swizzle applied to the texture.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
};
@@ -638,14 +685,26 @@ struct FBO
DOCUMENT("The :class:`ResourceId` of the framebuffer.");
ResourceId resourceId;
DOCUMENT("The list of :class:`GLAttachment` with the framebuffer color attachments.");
DOCUMENT(R"(The framebuffer color attachments.
:type: List[GLAttachment]
)");
rdcarray<Attachment> colorAttachments;
DOCUMENT("The :class:`GLAttachment` with the framebuffer depth attachment.");
DOCUMENT(R"(The framebuffer depth attachment.
:type: GLAttachment
)");
Attachment depthAttachment;
DOCUMENT("The :class:`GLAttachment` with the framebuffer stencil attachment.");
DOCUMENT(R"(The framebuffer stencil attachment.
:type: GLAttachment
)");
Attachment stencilAttachment;
DOCUMENT("The list of draw buffer indices into the :data:`colorAttachments` attachment list.");
DOCUMENT(R"(The draw buffer indices into the :data:`colorAttachments` attachment list.
:type: List[int]
)");
rdcarray<int32_t> drawBuffers;
DOCUMENT("The read buffer index in the :data:`colorAttachments` attachment list.");
int32_t readBuffer = 0;
@@ -659,7 +718,10 @@ struct BlendState
BlendState(const BlendState &) = default;
BlendState &operator=(const BlendState &) = default;
DOCUMENT("A list of :class:`ColorBlend` describing the blend operations for each target.");
DOCUMENT(R"(The blend operations for each target.
:type: List[ColorBlend]
)");
rdcarray<ColorBlend> blends;
DOCUMENT("The constant blend factor to use in blend equations.");
@@ -680,12 +742,21 @@ struct FrameBuffer
DOCUMENT("``True`` if dithering should be used when writing to color buffers.");
bool dither = false;
DOCUMENT("A :class:`GLFBO` with the information about a draw framebuffer.");
DOCUMENT(R"(The draw framebuffer.
:type: GLFBO
)");
FBO drawFBO;
DOCUMENT("A :class:`GLFBO` with the information about a read framebuffer.");
DOCUMENT(R"(The read framebuffer.
:type: GLFBO
)");
FBO readFBO;
DOCUMENT("A :class:`GLBlendState` with the details of the blending state.");
DOCUMENT(R"(The details of the blending state.
:type: GLBlendState
)");
BlendState blendState;
};
@@ -720,60 +791,121 @@ struct State
State(const State &) = delete;
#endif
DOCUMENT("A :class:`GLVertexInput` describing the vertex input stage.");
DOCUMENT(R"(The vertex input stage.
:type: GLVertexInput
)");
VertexInput vertexInput;
DOCUMENT("A :class:`GLShader` describing the vertex shader stage.");
DOCUMENT(R"(The vertex shader stage.
:type: GLShader
)")
Shader vertexShader;
DOCUMENT("A :class:`GLShader` describing the tessellation control shader stage.");
DOCUMENT(R"(The tessellation control shader stage.
:type: GLShader
)");
Shader tessControlShader;
DOCUMENT("A :class:`GLShader` describing the tessellation evaluation shader stage.");
DOCUMENT(R"(The tessellation evaluation shader stage.
:type: GLShader
)");
Shader tessEvalShader;
DOCUMENT("A :class:`GLShader` describing the geometry shader stage.");
DOCUMENT(R"(The geometry shader stage.
:type: GLShader
)");
Shader geometryShader;
DOCUMENT("A :class:`GLShader` describing the fragment shader stage.");
DOCUMENT(R"(The fragment shader stage.
:type: GLShader
)");
Shader fragmentShader;
DOCUMENT("A :class:`GLShader` describing the compute shader stage.");
DOCUMENT(R"(The compute shader stage.
:type: GLShader
)");
Shader computeShader;
DOCUMENT("The :class:`ResourceId` of the program pipeline (if active).");
ResourceId pipelineResourceId;
DOCUMENT(
"A :class:`GLFixedVertexProcessing` describing the fixed-function vertex processing stage.");
DOCUMENT(R"(The fixed-function vertex processing stage.
:type: GLFixedVertexProcessing
)");
FixedVertexProcessing vertexProcessing;
DOCUMENT("A list of :class:`GLTexture` with the currently bound textures.");
DOCUMENT(R"(The currently bound textures.
:type: List[GLTexture]
)");
rdcarray<Texture> textures;
DOCUMENT("A list of :class:`GLSampler` with the currently bound samplers.");
DOCUMENT(R"(The currently bound samplers.
:type: List[GLSampler]
)");
rdcarray<Sampler> samplers;
DOCUMENT("A list of :class:`GLBuffer` with the currently bound atomic buffers.");
DOCUMENT(R"(The currently bound atomic buffers.
:type: List[GLBuffer]
)");
rdcarray<Buffer> atomicBuffers;
DOCUMENT("A list of :class:`GLBuffer` with the currently bound uniform buffers.");
DOCUMENT(R"(The currently bound uniform buffers.
:type: List[GLBuffer]
)");
rdcarray<Buffer> uniformBuffers;
DOCUMENT("A list of :class:`GLBuffer` with the currently bound shader storage buffers.");
DOCUMENT(R"(The currently bound shader storage buffers.
:type: List[GLBuffer]
)");
rdcarray<Buffer> shaderStorageBuffers;
DOCUMENT("A list of :class:`GLImageLoadStore` with the currently bound load/store images.");
DOCUMENT(R"(The currently bound load/store images.
:type: List[GLImageLoadStore]
)");
rdcarray<ImageLoadStore> images;
DOCUMENT("A :class:`GLFeedback` describing the transform feedback stage.");
DOCUMENT(R"(The transform feedback stage.
:type: GLFeedback
)");
Feedback transformFeedback;
DOCUMENT("A :class:`GLRasterizer` describing rasterization.");
DOCUMENT(R"(The rasterization configuration.
:type: GLRasterizer
)");
Rasterizer rasterizer;
DOCUMENT("A :class:`GLDepthState` describing depth processing.");
DOCUMENT(R"(The depth state.
:type: GLDepthState
)");
DepthState depthState;
DOCUMENT("A :class:`GLStencilState` describing stencil processing.");
DOCUMENT(R"(The stencil state.
:type: GLStencilState
)");
StencilState stencilState;
DOCUMENT("A :class:`GLFrameBuffer` describing the framebuffer.");
DOCUMENT(R"(The bound framebuffer.
:type: GLFrameBuffer
)");
FrameBuffer framebuffer;
DOCUMENT("A :class:`GLHints` describing the hint state.");
DOCUMENT(R"(The hint state.
:type: GLHints
)");
Hints hints;
};
+154 -51
View File
@@ -184,42 +184,57 @@ DECLARE_REFLECTION_STRUCT(BindpointIndex);
DOCUMENT("A C union that holds 16 values, with each different basic variable type.");
union ShaderValue
{
DOCUMENT("A convenient subset of :data:`fv` as a named 4 component vector.");
DOCUMENT(R"(A convenient subset of :data:`fv` as a named 4 component vector.
:type: FloatVecVal
)");
FloatVecVal f;
DOCUMENT("``float`` values.");
DOCUMENT("16-tuple of ``float`` values.");
float fv[16];
DOCUMENT("A convenient subset of :data:`iv` as a named 4 component vector.");
DOCUMENT(R"(A convenient subset of :data:`iv` as a named 4 component vector.
:type: IntVecVal
)");
IntVecVal i;
DOCUMENT("Signed integer values.");
DOCUMENT("16-tuple of 32-bit signed integer values.");
int32_t iv[16];
DOCUMENT("A convenient subset of :data:`uv` as a named 4 component vector.");
DOCUMENT(R"(A convenient subset of :data:`uv` as a named 4 component vector.
:type: UIntVecVal
)");
UIntVecVal u;
DOCUMENT("Unsigned integer values.");
DOCUMENT("16-tuple of 32-bit unsigned integer values.");
uint32_t uv[16];
DOCUMENT("A convenient subset of :data:`dv` as a named 4 component vector.");
DOCUMENT(R"(A convenient subset of :data:`dv` as a named 4 component vector.
:type: DoubleVecVal
)");
DoubleVecVal d;
DOCUMENT("``double`` values.");
DOCUMENT("16-tuple of ``double`` values.");
double dv[16];
DOCUMENT("64-bit unsigned integer values.");
DOCUMENT("16-tuple of 64-bit unsigned integer values.");
uint64_t u64v[16];
DOCUMENT("64-bit signed integer values.");
DOCUMENT("16-tuple of 64-bit signed integer values.");
int64_t s64v[16];
DOCUMENT("16-bit unsigned integer values.");
DOCUMENT("16-tuple of 16-bit unsigned integer values.");
uint16_t u16v[16];
DOCUMENT("16-bit signed integer values.");
DOCUMENT("16-tuple of 16-bit signed integer values.");
int16_t s16v[16];
DOCUMENT("8-bit unsigned integer values.");
DOCUMENT("16-tuple of 8-bit unsigned integer values.");
uint8_t u8v[16];
DOCUMENT("8-bit signed integer values.");
DOCUMENT("16-tuple of 8-bit signed integer values.");
int8_t s8v[16];
};
@@ -331,10 +346,16 @@ struct ShaderVariable
DOCUMENT("The :class:`basic type <VarType>` of this variable.");
VarType type;
DOCUMENT("The :class:`contents <ShaderValue>` of this variable if it has no members.");
DOCUMENT(R"(The contents of this variable if it has no members.
:type: ShaderValue
)");
ShaderValue value;
DOCUMENT("The members of this variable as a list of :class:`ShaderVariable`.");
DOCUMENT(R"(The members of this variable.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> members;
DOCUMENT(R"(Utility function for setting a pointer value with no type information.
@@ -524,6 +545,8 @@ This will be set to -1 if the variable is not part of either signature.
ranges could refer to the same variable if a contiguous range is mapped to - the mapping is
component-by-component to greatly simplify algorithms at the expense of a small amount of storage
space.
:type: List[DebugVariableReference]
)");
rdcarray<DebugVariableReference> variables;
};
@@ -624,11 +647,15 @@ struct ShaderVariableChange
DOCUMENT(R"(The value of the variable before the change. If this variable is uninitialised that
means the variable came into existance on this step.
:type: ShaderVariable
)");
ShaderVariable before;
DOCUMENT(R"(The value of the variable after the change. If this variable is uninitialised that
means the variable stopped existing on this step.
:type: ShaderVariable
)");
ShaderVariable after;
};
@@ -677,18 +704,22 @@ will increment linearly after that regardless of loops or branching.
DOCUMENT("A set of :class:`ShaderEvents` flags that indicate what events happened on this step.");
ShaderEvents flags = ShaderEvents::NoEvent;
DOCUMENT(R"(The changes in mutable variables for this shader as a list of
:class:`ShaderVariableChange`. The change documents the bidirectional change of variables, so that
a single state can be updated either forwards or backwards using the information.
DOCUMENT(R"(The changes in mutable variables for this shader. The change documents the
bidirectional change of variables, so that a single state can be updated either forwards or
backwards using the information.
:type: List[ShaderVariableChange]
)");
rdcarray<ShaderVariableChange> changes;
DOCUMENT(R"(An optional list of :class:`SourceVariableMapping` indicating which high-level source
variables map to which debug variables and including extra type information.
DOCUMENT(R"(An optional mapping of which high-level source variables map to which debug variables
and including extra type information.
This list contains source variable mapping that is only valid at this state - it is not valid at any
other state where the lifetime of the source variable may have run out, or it may now be stored in
a different debug variable.
:type: List[SourceVariableMapping]
)");
rdcarray<SourceVariableMapping> sourceVars;
@@ -732,55 +763,70 @@ struct ShaderDebugTrace
DOCUMENT("The shader stage being debugged in this trace");
ShaderStage stage;
DOCUMENT("The input variables for this shader as a list of :class:`ShaderVariable`.");
DOCUMENT(R"(The input variables for this shader.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> inputs;
DOCUMENT(R"(Constant buffer backed variables for this shader as a list of :class:`ShaderVariable`.
DOCUMENT(R"(Constant buffer backed variables for this shader.
Each entry in this list corresponds to a constant block with the same index in the
:data:`ShaderBindpointMapping.constantBlocks` list, which can be used to look up the metadata.
Depending on the underlying shader representation, the constant block may retain any structure or
it may have been vectorised and flattened.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> constantBlocks;
DOCUMENT(R"(The read-only resource variables for this shader as a list of :class:`ShaderVariable`.
DOCUMENT(R"(The read-only resource variables for this shader.
The 'value' of the variable is always a single unsigned integer, which is the bindpoint - an index
into the :data:`ShaderBindpointMapping.readOnlyResources` list, which can be used to look up the
other metadata as well as find the binding from the pipeline state.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> readOnlyResources;
DOCUMENT(R"(The read-write resource variables for this shader as a list of :class:`ShaderVariable`.
DOCUMENT(R"(The read-write resource variables for this shader.
The 'value' of the variable is always a single unsigned integer, which is the bindpoint - an index
into the :data:`ShaderBindpointMapping.readWriteResources` list, which can be used to look up the
other metadata as well as find the binding from the pipeline state.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> readWriteResources;
DOCUMENT(R"(The sampler variables for this shader as a list of :class:`ShaderVariable`.
DOCUMENT(R"(The sampler variables for this shader.
The 'value' of the variable is always a single unsigned integer, which is the bindpoint - an index
into the :data:`ShaderBindpointMapping.samplers` list, which can be used to look up the
other metadata as well as find the binding from the pipeline state.
:type: List[ShaderVariable]
)");
rdcarray<ShaderVariable> samplers;
DOCUMENT(R"(An optional list of :class:`SourceVariableMapping` indicating which high-level source
variables map to which debug variables and includes extra type information.
DOCUMENT(R"(An optional mapping from high-level source variables to which debug variables and
includes extra type information.
This list contains source variable mapping that is valid for the lifetime of a debug trace. It may
be empty if there is no source variable mapping that extends to the life of the debug trace.
:type: List[SourceVariableMapping]
)");
rdcarray<SourceVariableMapping> sourceVars;
DOCUMENT(R"(An opaque handle of :class:`ShaderDebugger` identifying by the undelying debugger,
which is used to simulate the shader and generate new debug states.
DOCUMENT(R"(An opaque handle identifying by the underlying debugger, which is used to simulate the
shader and generate new debug states.
If this is ``None`` then the trace is invalid.
:type: ShaderDebugger
)");
ShaderDebugger *debugger = NULL;
@@ -975,10 +1021,16 @@ struct ShaderVariableType
return members < o.members;
return false;
}
DOCUMENT("The :class:`ShaderVariableDescriptor` that describes the current constant.");
DOCUMENT(R"(The description of this constant.
:type: ShaderVariableDescriptor
)");
ShaderVariableDescriptor descriptor;
DOCUMENT("A list of :class:`ShaderConstant` with any members that this constant may contain.");
DOCUMENT(R"(Any members that this constant may contain.
:type: List[ShaderConstant]
)");
rdcarray<ShaderConstant> members;
};
@@ -1015,8 +1067,10 @@ struct ShaderConstant
uint32_t byteOffset = 0;
DOCUMENT("If this constant is no larger than a 64-bit constant, gives a default value for it.");
uint64_t defaultValue = 0;
DOCUMENT(
"A :class:`ShaderVariableType` giving details of the type information for this constant.");
DOCUMENT(R"(The type information for this constant.
:type: ShaderVariableType
)");
ShaderVariableType type;
};
@@ -1054,7 +1108,10 @@ struct ConstantBlock
}
DOCUMENT("The name of this constant block, may be empty on some APIs.");
rdcstr name;
DOCUMENT("The constants contained within this block as a list of :class:`ShaderConstant`.");
DOCUMENT(R"(The constants contained within this block.
:type: List[ShaderConstant]
)");
rdcarray<ShaderConstant> variables;
DOCUMENT(R"(The bindpoint for this block. This is an index in the
:data:`ShaderBindpointMapping.constantBlocks` list.
@@ -1147,7 +1204,10 @@ struct ShaderResource
DOCUMENT("The name of this resource.");
rdcstr name;
DOCUMENT("A :class:`ShaderVariableType` describing type of each element of this resource.");
DOCUMENT(R"(The type of each element of this resource.
:type: ShaderVariableType
)");
ShaderVariableType variableType;
DOCUMENT(R"(The bindpoint for this block. This is an index in either the
@@ -1226,9 +1286,9 @@ struct ShaderCompileFlags
ShaderCompileFlags(const ShaderCompileFlags &) = default;
ShaderCompileFlags &operator=(const ShaderCompileFlags &) = default;
DOCUMENT(R"(A list of :class:`ShaderCompileFlag`.
DOCUMENT(R"(The API or compiler specific flags used to compile this shader originally.
Each entry is an API or compiler specific flag used to compile this shader originally.
:type: List[ShaderCompileFlag]
)");
rdcarray<ShaderCompileFlag> flags;
};
@@ -1275,12 +1335,17 @@ struct ShaderDebugInfo
ShaderDebugInfo(const ShaderDebugInfo &) = default;
ShaderDebugInfo &operator=(const ShaderDebugInfo &) = default;
DOCUMENT("A :class:`ShaderCompileFlags` containing the flags used to compile this shader.");
DOCUMENT(R"(The flags used to compile this shader.
:type: ShaderCompileFlags
)");
ShaderCompileFlags compileFlags;
DOCUMENT(R"(A list of :class:`ShaderSourceFile`, encoded in the form denoted by :data:`encoding`.
DOCUMENT(R"(The shader files encoded in the form denoted by :data:`encoding`.
The first entry in the list is always the file where the entry point is.
:type: List[ShaderSourceFile]
)");
rdcarray<ShaderSourceFile> files;
@@ -1324,8 +1389,10 @@ struct ShaderReflection
"The :class:`ShaderStage` that this shader corresponds to, if multiple entry points exist.");
ShaderStage stage;
DOCUMENT(
"A :class:`ShaderDebugInfo` containing any embedded debugging information in this shader.");
DOCUMENT(R"(The embedded debugging information.
:type: ShaderDebugInfo
)");
ShaderDebugInfo debugInfo;
DOCUMENT("The :class:`ShaderEncoding` of this shader. See :data:`rawBytes`.");
@@ -1339,27 +1406,53 @@ struct ShaderReflection
DOCUMENT("The 3D dimensions of a compute workgroup, for compute shaders.");
uint32_t dispatchThreadsDimension[3];
DOCUMENT("A list of :class:`SigParameter` with the shader's input signature.");
DOCUMENT(R"(The input signature.
:type: List[SigParameter]
)");
rdcarray<SigParameter> inputSignature;
DOCUMENT("A list of :class:`SigParameter` with the shader's output signature.");
DOCUMENT(R"(The output signature.
:type: List[SigParameter]
)");
rdcarray<SigParameter> outputSignature;
DOCUMENT("A list of :class:`ConstantBlock` with the shader's constant bindings.");
DOCUMENT(R"(The constant block bindings.
:type: List[ConstantBlock]
)");
rdcarray<ConstantBlock> constantBlocks;
DOCUMENT("A list of :class:`ShaderSampler` with the shader's samplers.");
DOCUMENT(R"(The sampler bindings.
:type: List[ShaderSampler]
)");
rdcarray<ShaderSampler> samplers;
DOCUMENT("A list of :class:`ShaderResource` with the shader's read-only resources.");
DOCUMENT(R"(The read-only resource bindings.
:type: List[ShaderResource]
)");
rdcarray<ShaderResource> readOnlyResources;
DOCUMENT("A list of :class:`ShaderResource` with the shader's read-write resources.");
DOCUMENT(R"(The read-write resource bindings.
:type: List[ShaderResource]
)");
rdcarray<ShaderResource> readWriteResources;
// TODO expand this to encompass shader subroutines.
DOCUMENT("A list of strings with the shader's interfaces. Largely an unused API feature.");
DOCUMENT(R"(The list of strings with the shader's interfaces. Largely an unused API feature.
:type: List[str]
)");
rdcarray<rdcstr> interfaces;
DOCUMENT("A list of :class:`ShaderVariableType` with the shader's pointer types.");
DOCUMENT(R"(The list of pointer types referred to in this shader.
:type: List[ShaderVariableType]
)");
rdcarray<ShaderVariableType> pointerTypes;
};
@@ -1466,26 +1559,36 @@ struct ShaderBindpointMapping
DOCUMENT(R"(This maps input attributes as a simple swizzle on the
:data:`ShaderReflection.inputSignature` indices for APIs where this mapping is mutable at runtime.
:type: List[int]
)");
rdcarray<int> inputAttributes;
rdcarray<int32_t> inputAttributes;
DOCUMENT(R"(Provides a list of :class:`Bindpoint` entries for remapping the
:data:`ShaderReflection.constantBlocks` list.
:type: List[Bindpoint]
)");
rdcarray<Bindpoint> constantBlocks;
DOCUMENT(R"(Provides a list of :class:`Bindpoint` entries for remapping the
:data:`ShaderReflection.samplers` list.
:type: List[Bindpoint]
)");
rdcarray<Bindpoint> samplers;
DOCUMENT(R"(Provides a list of :class:`Bindpoint` entries for remapping the
:data:`ShaderReflection.readOnlyResources` list.
:type: List[Bindpoint]
)");
rdcarray<Bindpoint> readOnlyResources;
DOCUMENT(R"(Provides a list of :class:`Bindpoint` entries for remapping the
:data:`ShaderReflection.readWriteResources` list.
:type: List[Bindpoint]
)");
rdcarray<Bindpoint> readWriteResources;
};
+227 -61
View File
@@ -130,9 +130,16 @@ since single descriptors may only be dynamically skipped by control flow.
)");
bool dynamicallyUsed = true;
DOCUMENT("The :class:`ResourceFormat` that the view uses.");
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT("A :class:`TextureSwizzle4` indicating the swizzle applied to this texture.");
DOCUMENT(R"(The swizzle applied to a texture by the view.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
DOCUMENT("For textures - the first mip level used in the view.");
@@ -150,7 +157,10 @@ since single descriptors may only be dynamically skipped by control flow.
DOCUMENT("For buffers - how many bytes are in this buffer view.");
uint64_t byteSize = 0;
DOCUMENT("For samplers - the :class:`TextureFilter` describing the filtering mode.");
DOCUMENT(R"(The filtering mode.
:type: TextureFilter
)");
TextureFilter filter;
DOCUMENT("For samplers - the :class:`AddressMode` in the U direction.");
AddressMode addressU = AddressMode::Wrap;
@@ -185,8 +195,9 @@ this sampler.
YcbcrConversion ycbcrModel;
DOCUMENT("For ycbcr samplers - the :class:`YcbcrRange` used for conversion.");
YcbcrRange ycbcrRange;
DOCUMENT(R"(For ycbcr samplers - A :class:`TextureSwizzle4` indicating the swizzle applied before
conversion.
DOCUMENT(R"(For ycbcr samplers - The swizzle applied before conversion.
:type: TextureSwizzle4
)");
TextureSwizzle4 ycbcrSwizzle;
DOCUMENT("For ycbcr samplers - the :class:`ChromaSampleLocation` X-axis chroma offset.");
@@ -268,8 +279,10 @@ For more information see :data:`VKBindingElement.dynamicallyUsed`.
DOCUMENT("The :class:`ShaderStageMask` where this binding is visible.");
ShaderStageMask stageFlags = ShaderStageMask::Unknown;
DOCUMENT(R"(A list of :class:`VKBindingElement` with the binding elements.
If :data:`descriptorCount` is 1 then this isn't an array, and this list has only one element.
DOCUMENT(R"(The binding elements.
If :data:`descriptorCount` is 1 then this list has only one element and the binding is not arrayed.
:type: List[VKBindingElement]
)");
rdcarray<BindingElement> binds;
};
@@ -307,8 +320,10 @@ struct DescriptorSet
DOCUMENT("Indicates if this is a virtual 'push' descriptor set.");
bool pushDescriptor = false;
DOCUMENT(R"(A list of :class:`VKDescriptorBinding` with the bindings within this set.
DOCUMENT(R"(The bindings within this set.
This list is indexed by the binding, so it may be sparse (some entries do not contain any elements).
:type: List[VKDescriptorBinding]
)");
rdcarray<DescriptorBinding> bindings;
};
@@ -328,7 +343,10 @@ struct Pipeline
DOCUMENT("The flags used to create the pipeline object.");
uint32_t flags = 0;
DOCUMENT("A list of :class:`VKDescriptorSet` with the bound descriptor sets.");
DOCUMENT(R"(The bound descriptor sets.
:type: List[VKDescriptorSet]
)");
rdcarray<DescriptorSet> descriptorSets;
};
@@ -358,7 +376,10 @@ struct InputAssembly
DOCUMENT("``True`` if primitive restart is enabled for strip primitives.");
bool primitiveRestartEnable = false;
DOCUMENT("The :class:`VKIndexBuffer` with the index buffer binding.");
DOCUMENT(R"(The index buffer binding.
:type: VKIndexBuffer
)");
IndexBuffer indexBuffer;
};
@@ -391,7 +412,10 @@ struct VertexAttribute
uint32_t location = 0;
DOCUMENT("The vertex binding where data will be sourced from.");
uint32_t binding = 0;
DOCUMENT("The :class:`ResourceFormat` describing how each input element will be interpreted.");
DOCUMENT(R"(The format describing how the input element is interpreted.
:type: ResourceFormat
)");
ResourceFormat format;
DOCUMENT(
"The byte offset from the start of each vertex data in the :data:`binding` to this "
@@ -479,11 +503,20 @@ struct VertexInput
VertexInput(const VertexInput &) = default;
VertexInput &operator=(const VertexInput &) = default;
DOCUMENT("A list of :class:`VKVertexAttribute` with the vertex attributes.");
DOCUMENT(R"(The vertex attributes.
:type: List[VKVertexAttribute]
)");
rdcarray<VertexAttribute> attributes;
DOCUMENT("A list of :class:`VKVertexBinding` with the vertex bindings.");
DOCUMENT(R"(The vertex bindings.
:type: List[VKVertexBinding]
)");
rdcarray<VertexBinding> bindings;
DOCUMENT("A list of :class:`VKVertexBuffer` with the vertex buffers.");
DOCUMENT(R"(The vertex buffers.
:type: List[VKVertexBuffer]
)");
rdcarray<VertexBuffer> vertexBuffers;
};
@@ -526,18 +559,24 @@ struct Shader
DOCUMENT("The name of the entry point in the shader module that is used.");
rdcstr entryPoint;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
DOCUMENT(R"(The reflection data for this shader.
:type: ShaderReflection
)");
ShaderReflection *reflection = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`reflection` with the bindpoint
mapping data.
DOCUMENT(R"(The bindpoint mapping data to match :data:`reflection`.
:type: ShaderBindpointMapping
)");
ShaderBindpointMapping bindpointMapping;
DOCUMENT("A :class:`ShaderStage` identifying which stage this shader is bound to.");
ShaderStage stage = ShaderStage::Vertex;
DOCUMENT(
"A list of :class:`VKSpecializationConstant` with the provided specialization constants.");
DOCUMENT(R"(The provided specialization constants.
:type: List[VKSpecializationConstant]
)");
rdcarray<SpecializationConstant> specialization;
};
@@ -615,7 +654,10 @@ struct TransformFeedback
TransformFeedback(const TransformFeedback &) = default;
TransformFeedback &operator=(const TransformFeedback &) = default;
DOCUMENT("The bound transform feedback buffers.");
DOCUMENT(R"(The bound transform feedback buffers.
:type: List[VKXFBBuffer]
)");
rdcarray<XFBBuffer> buffers;
};
@@ -670,9 +712,15 @@ struct ViewportScissor
return scissor < o.scissor;
return false;
}
DOCUMENT("The :class:`Viewport`.");
DOCUMENT(R"(The viewport.
:type: Viewport
)");
Viewport vp;
DOCUMENT("The :class:`Scissor`.");
DOCUMENT(R"(The scissor.
:type: Scissor
)");
Scissor scissor;
};
@@ -684,10 +732,16 @@ struct ViewState
ViewState(const ViewState &) = default;
ViewState &operator=(const ViewState &) = default;
DOCUMENT("A list of :class:`VKViewportScissor`.");
DOCUMENT(R"(The bound viewports and scissors.
:type: List[VKViewportScissor]
)");
rdcarray<ViewportScissor> viewportScissors;
DOCUMENT("A list of :class:`VKRenderArea` defining discard rectangles.");
DOCUMENT(R"(The discard rectangles, if enabled.
:type: List[VKRenderArea]
)");
rdcarray<RenderArea> discardRectangles;
DOCUMENT(R"(``True`` if a fragment in any one of the discard rectangles fails the discard test,
@@ -774,10 +828,11 @@ struct SampleLocations
uint32_t gridWidth = 1;
DOCUMENT("The height in pixels of the region configured.");
uint32_t gridHeight = 1;
DOCUMENT(R"(A list of :class:`FloatVector` giving the custom sample locations. Only x and y are
valid, z and w are set to 0.0.
DOCUMENT(R"(The custom sample locations. Only x and y are valid, z and w are set to 0.0.
If the list is empty then the standard sample pattern is in use.
:type: List[FloatVector]
)");
rdcarray<FloatVector> customLocations;
};
@@ -798,7 +853,10 @@ struct MultiSample
float minSampleShading = 0.0f;
DOCUMENT("A mask that generated samples should be masked with using bitwise ``AND``.");
uint32_t sampleMask = 0;
DOCUMENT("The :class:`VKSampleLocations` with any custom sample locations that are configured.");
DOCUMENT(R"(The custom sample locations configuration.
:type: VKSampleLocations
)");
SampleLocations sampleLocations;
};
@@ -815,7 +873,10 @@ struct ColorBlendState
DOCUMENT("``True`` if alpha-to-one should be used when blending to an MSAA target.");
bool alphaToOneEnable = false;
DOCUMENT("The list of :class:`ColorBlend` with the blending configuration per-attachment.");
DOCUMENT(R"(The blend operations for each target.
:type: List[ColorBlend]
)");
rdcarray<ColorBlend> blends;
DOCUMENT("The constant blend factor to use in blend equations.");
@@ -842,9 +903,16 @@ struct DepthStencil
DOCUMENT("``True`` if stencil operations should be performed.");
bool stencilTestEnable = false;
DOCUMENT("A :class:`StencilFace` describing what happens for front-facing polygons.");
DOCUMENT(R"(The stencil state for front-facing polygons.
:type: StencilFace
)");
StencilFace frontFace;
DOCUMENT("A :class:`StencilFace` describing what happens for back-facing polygons.");
DOCUMENT(R"(The stencil state for back-facing polygons.
:type: StencilFace
)");
StencilFace backFace;
DOCUMENT("The near plane bounding value.");
@@ -869,11 +937,23 @@ struct RenderPass
// VKTODOMED renderpass and subpass information here
DOCUMENT("A list of indices into the framebuffer attachments for input attachments.");
DOCUMENT(R"(The input attachments for the current subpass, as indices into the framebuffer
attachments.
:type: List[int]
)");
rdcarray<uint32_t> inputAttachments;
DOCUMENT("A list of indices into the framebuffer attachments for color attachments.");
DOCUMENT(R"(The color attachments for the current subpass, as indices into the framebuffer
attachments.
:type: List[int]
)");
rdcarray<uint32_t> colorAttachments;
DOCUMENT("A list of indices into the framebuffer attachments for resolve attachments.");
DOCUMENT(R"(The resolve attachments for the current subpass, as indices into the framebuffer
attachments.
:type: List[int]
)");
rdcarray<uint32_t> resolveAttachments;
DOCUMENT(R"(An index into the framebuffer attachments for the depth-stencil attachment.
@@ -891,6 +971,8 @@ If there is no fragment density attachment, this index is ``-1``.
rendering.
If the list is empty, multiview is disabled and rendering is as normal.
:type: List[int]
)");
rdcarray<uint32_t> multiviews;
};
@@ -934,9 +1016,15 @@ struct Attachment
DOCUMENT("The :class:`ResourceId` of the underlying image that the view refers to.");
ResourceId imageResourceId;
DOCUMENT("The :class:`ResourceFormat` that the view uses.");
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT("A :class:`TextureSwizzle4` indicating the swizzle applied to this texture.");
DOCUMENT(R"(The swizzle applied to the texture by the view.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
DOCUMENT("The first mip level used in the attachment.");
uint32_t firstMip = 0;
@@ -959,7 +1047,10 @@ struct Framebuffer
DOCUMENT("The :class:`ResourceId` of the framebuffer object.");
ResourceId resourceId;
DOCUMENT("A list of :class:`VKAttachment` with the attachments of this framebuffer.");
DOCUMENT(R"(The attachments of this framebuffer.
:type: List[VKAttachment]
)");
rdcarray<Attachment> attachments;
DOCUMENT("The width of this framebuffer in pixels.");
@@ -978,11 +1069,20 @@ struct CurrentPass
CurrentPass(const CurrentPass &) = default;
CurrentPass &operator=(const CurrentPass &) = default;
DOCUMENT("The :class:`VKRenderPass` that is currently active.");
DOCUMENT(R"(The renderpass and subpass that is currently active.
:type: VKRenderPass
)");
RenderPass renderpass;
DOCUMENT("The :class:`VKFramebuffer` that is currently being used.");
DOCUMENT(R"(The framebuffer that is currently being used.
:type: VKFramebuffer
)");
Framebuffer framebuffer;
DOCUMENT("The :class:`VKRenderArea` that is currently being rendered to.");
DOCUMENT(R"(The render area that is currently being rendered to.
:type: VKRenderArea
)");
RenderArea renderArea;
};
@@ -1043,7 +1143,10 @@ struct ImageData
DOCUMENT("The :class:`ResourceId` of the image.");
ResourceId resourceId;
DOCUMENT("A list of :class:`VKImageLayout` with the set of subresources that make up the image.");
DOCUMENT(R"(The subresource regions in this resource.
:type: List[VKImageLayout]
)");
rdcarray<ImageLayout> layouts;
};
@@ -1078,57 +1181,120 @@ struct State
State(const State &) = delete;
#endif
DOCUMENT("A :class:`VKPipeline` with the currently bound compute pipeline, if any.");
DOCUMENT(R"(The currently bound compute pipeline, if any.
:type: VKPipeline
)");
Pipeline compute;
DOCUMENT("A :class:`VKPipeline` with the currently bound graphics pipeline, if any.");
DOCUMENT(R"(The currently bound graphics pipeline, if any.
:type: VKPipeline
)");
Pipeline graphics;
DOCUMENT("A ``bytes`` containing the raw push constant data.");
DOCUMENT(R"(The raw push constant data.
:type: bytes
)");
bytebuf pushconsts;
DOCUMENT("A :class:`VKInputAssembly` describing the input assembly stage.");
DOCUMENT(R"(The input assembly stage.
:type: VKInputAssembly
)");
InputAssembly inputAssembly;
DOCUMENT("A :class:`VKVertexInput` describing the vertex input stage.");
DOCUMENT(R"(The vertex input stage.
:type: VKVertexInput
)");
VertexInput vertexInput;
DOCUMENT("A :class:`VKShader` describing the vertex shader stage.");
DOCUMENT(R"(The vertex shader stage.
:type: VKShader
)");
Shader vertexShader;
DOCUMENT("A :class:`VKShader` describing the tessellation control shader stage.");
DOCUMENT(R"(The tessellation control shader stage.
:type: VKShader
)");
Shader tessControlShader;
DOCUMENT("A :class:`VKShader` describing the tessellation evaluation shader stage.");
DOCUMENT(R"(The tessellation evaluation shader stage.
:type: VKShader
)");
Shader tessEvalShader;
DOCUMENT("A :class:`VKShader` describing the geometry shader stage.");
DOCUMENT(R"(The geometry shader stage.
:type: VKShader
)");
Shader geometryShader;
DOCUMENT("A :class:`VKShader` describing the fragment shader stage.");
DOCUMENT(R"(The fragment shader stage.
:type: VKShader
)");
Shader fragmentShader;
DOCUMENT("A :class:`VKShader` describing the compute shader stage.");
DOCUMENT(R"(The compute shader stage.
:type: VKShader
)");
Shader computeShader;
DOCUMENT("A :class:`VKTessellation` describing the tessellation stage.");
DOCUMENT(R"(The tessellation stage.
:type: VKTessellation
)");
Tessellation tessellation;
DOCUMENT("A :class:`VKTransformFeedback` describing the tessellation stage.");
DOCUMENT(R"(The transform feedback stage.
:type: VKTransformFeedback
)");
TransformFeedback transformFeedback;
DOCUMENT("A :class:`VKViewState` describing the viewport setup.");
DOCUMENT(R"(The viewport setup.
:type: VKViewState
)");
ViewState viewportScissor;
DOCUMENT("A :class:`VKRasterizer` describing rasterization.");
DOCUMENT(R"(The rasterization configuration.
:type: VKRasterizer
)");
Rasterizer rasterizer;
DOCUMENT("A :class:`VKMultiSample` describing the multisample setup.");
DOCUMENT(R"(The multisampling configuration.
:type: VKMultiSample
)");
MultiSample multisample;
DOCUMENT("A :class:`VKColorBlendState` describing color blending.");
DOCUMENT(R"(The color blending configuration.
:type: VKColorBlendState
)");
ColorBlendState colorBlend;
DOCUMENT("A :class:`VKDepthStencil` describing the depth-stencil stage.");
DOCUMENT(R"(The depth-stencil state.
:type: VKDepthStencil
)");
DepthStencil depthStencil;
DOCUMENT("A :class:`VKCurrentPass` describing the current renderpass, subpass and framebuffer.");
DOCUMENT(R"(The current renderpass, subpass and framebuffer.
:type: VKCurrentPass
)");
CurrentPass currentPass;
DOCUMENT("A list of :class:`VKImageData` entries, one for each image.");
DOCUMENT(R"(The resource states for the currently live resources.
:type: List[VKImageData]
)");
rdcarray<ImageData> images;
DOCUMENT("A :class:`ConditionalRendering` describing the current conditional rendering state.");
DOCUMENT(R"(The current conditional rendering state.
:type: VKConditionalRendering
)");
ConditionalRendering conditionalRendering;
};
+4 -4
View File
@@ -1572,7 +1572,7 @@ void WrappedID3D11DeviceContext::RecordConstantStats(ShaderStage stage, UINT Num
ID3D11Buffer *const Buffers[])
{
FrameStatistics &stats = m_pDevice->GetFrameStats();
RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.constants));
RDCASSERT(size_t(stage) < stats.constants.size());
ConstantBindStats &constants = stats.constants[uint32_t(stage)];
constants.calls += 1;
RDCASSERT(NumBuffers < constants.bindslots.size());
@@ -1602,7 +1602,7 @@ void WrappedID3D11DeviceContext::RecordResourceStats(ShaderStage stage, UINT Num
ID3D11ShaderResourceView *const Resources[])
{
FrameStatistics &stats = m_pDevice->GetFrameStats();
RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.resources));
RDCASSERT(size_t(stage) < stats.resources.size());
ResourceBindStats &resources = stats.resources[(uint32_t)stage];
resources.calls += 1;
RDCASSERT(NumResources < resources.bindslots.size());
@@ -1643,7 +1643,7 @@ void WrappedID3D11DeviceContext::RecordSamplerStats(ShaderStage stage, UINT NumS
ID3D11SamplerState *const Samplers[])
{
FrameStatistics &stats = m_pDevice->GetFrameStats();
RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.samplers));
RDCASSERT(size_t(stage) < stats.samplers.size());
SamplerBindStats &samplers = stats.samplers[uint32_t(stage)];
samplers.calls += 1;
RDCASSERT(NumSamplers < samplers.bindslots.size());
@@ -1729,7 +1729,7 @@ void WrappedID3D11DeviceContext::RecordShaderStats(ShaderStage stage, ID3D11Devi
ID3D11DeviceChild *Shader)
{
FrameStatistics &stats = m_pDevice->GetFrameStats();
RDCASSERT(size_t(stage) <= ARRAY_COUNT(stats.shaders));
RDCASSERT(size_t(stage) <= stats.shaders.size());
ShaderChangeStats &shaders = stats.shaders[uint32_t(stage)];
shaders.calls += 1;
-1
View File
@@ -1257,7 +1257,6 @@ bool WrappedID3D11Device::Serialise_CaptureScope(SerialiserType &ser)
GetReplay()->WriteFrameRecord().frameInfo.frameNumber = frameNumber;
FrameStatistics &stats = GetReplay()->WriteFrameRecord().frameInfo.stats;
RDCEraseEl(stats);
// #mivance GL/Vulkan don't set this so don't get stats in window
stats.recorded = true;
+3 -3
View File
@@ -762,7 +762,7 @@ void DoSerialise(SerialiserType &ser, FrameStatistics &el)
SERIALISE_MEMBER(rasters);
SERIALISE_MEMBER(outputs);
SIZE_CHECK(1432);
SIZE_CHECK(424);
}
template <typename SerialiserType>
@@ -778,7 +778,7 @@ void DoSerialise(SerialiserType &ser, FrameDescription &el)
SERIALISE_MEMBER(stats);
SERIALISE_MEMBER(debugMessages);
SIZE_CHECK(1512);
SIZE_CHECK(504);
}
template <typename SerialiserType>
@@ -787,7 +787,7 @@ void DoSerialise(SerialiserType &ser, FrameRecord &el)
SERIALISE_MEMBER(frameInfo);
SERIALISE_MEMBER(drawcallList);
SIZE_CHECK(1536);
SIZE_CHECK(528);
}
template <typename SerialiserType>