Make sure structs exposed to python have explicit copy constructors

* This means SWIG generates a copy constructor which is very useful for making
  duplicate objects in python. Without an explicit 'default copy constructor'
  statement, SWIG doesn't generate one.
This commit is contained in:
baldurk
2018-10-01 18:12:28 +01:00
parent 49b247a7ec
commit 989971f6af
10 changed files with 580 additions and 10 deletions
+35 -9
View File
@@ -30,6 +30,13 @@ DOCUMENT("Information about a viewport.");
struct Viewport
{
DOCUMENT("");
Viewport() = default;
Viewport(float X, float Y, float W, float H, float MN, float MX, bool en = true)
: x(X), y(Y), width(W), height(H), minDepth(MN), maxDepth(MX), enabled(en)
{
}
Viewport(const Viewport &) = default;
bool operator==(const Viewport &o) const
{
return x == o.x && y == o.y && width == o.width && height == o.height &&
@@ -51,11 +58,6 @@ struct Viewport
return maxDepth < o.maxDepth;
return false;
}
Viewport() = default;
Viewport(float X, float Y, float W, float H, float MN, float MX, bool en = true)
: x(X), y(Y), width(W), height(H), minDepth(MN), maxDepth(MX), enabled(en)
{
}
DOCUMENT("Is this viewport enabled.");
bool enabled = true;
@@ -79,6 +81,12 @@ DOCUMENT("Describes a single scissor region.");
struct Scissor
{
DOCUMENT("");
Scissor() = default;
Scissor(int X, int Y, int W, int H, bool en = true) : x(X), y(Y), width(W), height(H), enabled(en)
{
}
Scissor(const Scissor &) = default;
bool operator==(const Scissor &o) const
{
return x == o.x && y == o.y && width == o.width && height == o.height && enabled == o.enabled;
@@ -97,10 +105,6 @@ struct Scissor
return enabled < o.enabled;
return false;
}
Scissor() = default;
Scissor(int X, int Y, int W, int H, bool en = true) : x(X), y(Y), width(W), height(H), enabled(en)
{
}
DOCUMENT("X co-ordinate of the scissor region.");
int32_t x = 0;
DOCUMENT("Y co-ordinate of the scissor region.");
@@ -119,6 +123,9 @@ DOCUMENT("Describes the details of a blend operation.");
struct BlendEquation
{
DOCUMENT("");
BlendEquation() = default;
BlendEquation(const BlendEquation &) = default;
bool operator==(const BlendEquation &o) const
{
return source == o.source && destination == o.destination && operation == o.operation;
@@ -147,6 +154,9 @@ DOCUMENT("Describes the blend configuration for a given output target.");
struct ColorBlend
{
DOCUMENT("");
ColorBlend() = default;
ColorBlend(const ColorBlend &) = default;
bool operator==(const ColorBlend &o) const
{
return enabled == o.enabled && logicOperationEnabled == o.logicOperationEnabled &&
@@ -193,6 +203,10 @@ DECLARE_REFLECTION_STRUCT(ColorBlend);
DOCUMENT("Describes the details of a stencil operation.");
struct StencilFace
{
DOCUMENT("");
StencilFace() = default;
StencilFace(const StencilFace &) = default;
DOCUMENT("The :class:`StencilOperation` to apply if the stencil-test fails.");
StencilOperation failOperation = StencilOperation::Keep;
DOCUMENT("the :class:`StencilOperation` to apply if the depth-test fails.");
@@ -229,6 +243,7 @@ struct BoundResource
firstSlice = -1;
typeHint = CompType::Typeless;
}
BoundResource(const BoundResource &) = default;
bool operator==(const BoundResource &o) const
{
@@ -268,6 +283,7 @@ struct BoundResourceArray
{
DOCUMENT("");
BoundResourceArray() = default;
BoundResourceArray(const BoundResourceArray &) = default;
BoundResourceArray(Bindpoint b) : bindPoint(b) {}
BoundResourceArray(Bindpoint b, const rdcarray<BoundResource> &r) : bindPoint(b), resources(r) {}
// for convenience for searching the array, we compare only using the BindPoint
@@ -287,6 +303,9 @@ DOCUMENT("Information about a single vertex or index buffer binding.");
struct BoundVBuffer
{
DOCUMENT("");
BoundVBuffer() = default;
BoundVBuffer(const BoundVBuffer &) = default;
bool operator==(const BoundVBuffer &o) const
{
return resourceId == o.resourceId && byteOffset == o.byteOffset && byteStride == o.byteStride;
@@ -314,6 +333,10 @@ DECLARE_REFLECTION_STRUCT(BoundVBuffer);
DOCUMENT("Information about a single constant buffer binding.");
struct BoundCBuffer
{
DOCUMENT("");
BoundCBuffer() = default;
BoundCBuffer(const BoundCBuffer &) = default;
DOCUMENT("A :class:`~renderdoc.ResourceId` identifying the buffer.");
ResourceId resourceId;
DOCUMENT("The offset in bytes from the start of the buffer to the constant data.");
@@ -328,6 +351,9 @@ DOCUMENT("Information about a vertex input attribute feeding the vertex shader."
struct VertexInputAttribute
{
DOCUMENT("");
VertexInputAttribute() = default;
VertexInputAttribute(const VertexInputAttribute &) = default;
bool operator==(const VertexInputAttribute &o) const
{
return name == o.name && vertexBuffer == o.vertexBuffer && byteOffset == o.byteOffset &&
+51 -1
View File
@@ -48,6 +48,7 @@ struct MeshFormat
instanced = false;
nearPlane = farPlane = 0.0f;
}
MeshFormat(const MeshFormat &o) = default;
DOCUMENT("The :class:`ResourceId` of the index buffer that goes with this mesh element.");
ResourceId indexResourceId;
@@ -108,6 +109,10 @@ well as what options to use when rendering both the current mesh, and any other
)");
struct MeshDisplay
{
DOCUMENT("");
MeshDisplay() = default;
MeshDisplay(const MeshDisplay &) = default;
DOCUMENT("The :class:`MeshDataStage` where this mesh data comes from.");
MeshDataStage type;
@@ -173,6 +178,10 @@ particular subresource (such as array slice, mip or multi-sampled sample).
)");
struct TextureDisplay
{
DOCUMENT("");
TextureDisplay() = default;
TextureDisplay(const TextureDisplay &) = default;
DOCUMENT("The :class:`ResourceId` of the texture to display.");
ResourceId resourceId;
@@ -278,6 +287,10 @@ DECLARE_REFLECTION_STRUCT(TextureDisplay);
DOCUMENT("How to map components to normalised ``[0, 255]`` for saving to 8-bit file formats.");
struct TextureComponentMapping
{
DOCUMENT("");
TextureComponentMapping() = default;
TextureComponentMapping(const TextureComponentMapping &) = default;
DOCUMENT("The value that should be mapped to ``0``");
float blackPoint = 0.0f;
DOCUMENT("The value that should be mapped to ``255``");
@@ -294,6 +307,10 @@ DOCUMENT(R"(How to map multisampled textures for saving to non-multisampled file
)");
struct TextureSampleMapping
{
DOCUMENT("");
TextureSampleMapping() = default;
TextureSampleMapping(const TextureSampleMapping &) = default;
DOCUMENT(R"(
``True`` if the samples should be mapped to array slices. A multisampled array expands each slice
in-place, so it would be slice 0: sample 0, slice 0: sample 1, slice 1: sample 0, etc.
@@ -321,6 +338,10 @@ format doesn't support saving all slices, only slice 0 is saved.
)");
struct TextureSliceMapping
{
DOCUMENT("");
TextureSliceMapping() = default;
TextureSliceMapping(const TextureSliceMapping &) = default;
DOCUMENT(R"(
Selects the (depth/array) slice to save.
@@ -363,6 +384,10 @@ DECLARE_REFLECTION_STRUCT(TextureSliceMapping);
DOCUMENT("Describes a texture to save and how to map it to the destination file format.");
struct TextureSave
{
DOCUMENT("");
TextureSave() = default;
TextureSave(const TextureSave &) = default;
DOCUMENT("The :class:`ResourceId` of the texture to save.");
ResourceId resourceId;
@@ -418,6 +443,10 @@ DECLARE_REFLECTION_STRUCT(TextureSave);
DOCUMENT("Information about the a new capture created by the target.");
struct NewCaptureData
{
DOCUMENT("");
NewCaptureData() = default;
NewCaptureData(const NewCaptureData &) = default;
DOCUMENT("An identifier to use to refer to this capture.");
uint32_t captureId = 0;
DOCUMENT("The time the capture was created, as a unix timestamp in UTC.");
@@ -445,6 +474,10 @@ DECLARE_REFLECTION_STRUCT(NewCaptureData);
DOCUMENT("Information about the API that the target is using.");
struct APIUseData
{
DOCUMENT("");
APIUseData() = default;
APIUseData(const APIUseData &) = default;
DOCUMENT("The name of the API.");
rdcstr name;
@@ -460,6 +493,10 @@ DECLARE_REFLECTION_STRUCT(APIUseData);
DOCUMENT("Information about why the target is busy.");
struct BusyData
{
DOCUMENT("");
BusyData() = default;
BusyData(const BusyData &) = default;
DOCUMENT("The name of the client currently connected to the target.");
rdcstr clientName;
};
@@ -469,6 +506,10 @@ DECLARE_REFLECTION_STRUCT(BusyData);
DOCUMENT("Information about a new child process spawned by the target.");
struct NewChildData
{
DOCUMENT("");
NewChildData() = default;
NewChildData(const NewChildData &) = default;
DOCUMENT("The PID (Process ID) of the new child.");
uint32_t processId = 0;
DOCUMENT("The ident where the new child's target control is active.");
@@ -480,6 +521,10 @@ DECLARE_REFLECTION_STRUCT(NewChildData);
DOCUMENT("A message from a target control connection.");
struct TargetControlMessage
{
DOCUMENT("");
TargetControlMessage() = default;
TargetControlMessage(const TargetControlMessage &) = default;
DOCUMENT("The :class:`type <TargetControlMessageType>` of message received");
TargetControlMessageType type = TargetControlMessageType::Unknown;
@@ -504,12 +549,14 @@ DECLARE_REFLECTION_STRUCT(TargetControlMessage);
DOCUMENT("A modification to a single environment variable.");
struct EnvironmentModification
{
DOCUMENT("");
EnvironmentModification() : mod(EnvMod::Set), sep(EnvSep::NoSep), name(""), value("") {}
EnvironmentModification(const EnvironmentModification &) = default;
EnvironmentModification(EnvMod m, EnvSep s, const char *n, const char *v)
: mod(m), sep(s), name(n), value(v)
{
}
DOCUMENT("");
bool operator==(const EnvironmentModification &o) const
{
return mod == o.mod && sep == o.sep && name == o.name && value == o.value;
@@ -542,6 +589,9 @@ DOCUMENT("The format for a capture file either supported to read from, or export
struct CaptureFileFormat
{
DOCUMENT("");
CaptureFileFormat() = default;
CaptureFileFormat(const CaptureFileFormat &) = default;
bool operator==(const CaptureFileFormat &o) const
{
return extension == o.extension && name == o.name && description == o.description &&
+58
View File
@@ -39,6 +39,9 @@ DOCUMENT(R"(Describes a single D3D11 input layout element for one vertex input.
struct Layout
{
DOCUMENT("");
Layout() = default;
Layout(const Layout &) = default;
bool operator==(const Layout &o) const
{
return semanticName == o.semanticName && semanticIndex == o.semanticIndex &&
@@ -102,6 +105,9 @@ DOCUMENT("Describes a single D3D11 vertex buffer binding.")
struct VertexBuffer
{
DOCUMENT("");
VertexBuffer() = default;
VertexBuffer(const VertexBuffer &) = default;
bool operator==(const VertexBuffer &o) const
{
return resourceId == o.resourceId && byteStride == o.byteStride && byteOffset == o.byteOffset;
@@ -129,6 +135,10 @@ struct VertexBuffer
DOCUMENT("Describes the D3D11 index buffer binding.")
struct IndexBuffer
{
DOCUMENT("");
IndexBuffer() = default;
IndexBuffer(const IndexBuffer &) = default;
DOCUMENT("The :class:`ResourceId` of the index buffer.");
ResourceId resourceId;
@@ -139,6 +149,10 @@ struct IndexBuffer
DOCUMENT("Describes the input assembler data.");
struct InputAssembly
{
DOCUMENT("");
InputAssembly() = default;
InputAssembly(const InputAssembly &) = default;
DOCUMENT("A list of :class:`D3D11Layout` describing the input layout elements in this layout.");
rdcarray<Layout> layouts;
@@ -159,6 +173,9 @@ DOCUMENT("Describes the details of a D3D11 resource view - any one of UAV, SRV,
struct View
{
DOCUMENT("");
View() = default;
View(const View &) = default;
bool operator==(const View &o) const
{
return viewResourceId == o.viewResourceId && resourceResourceId == o.resourceResourceId &&
@@ -246,6 +263,9 @@ DOCUMENT("Describes a sampler state object.");
struct Sampler
{
DOCUMENT("");
Sampler() = default;
Sampler(const Sampler &) = default;
bool operator==(const Sampler &o) const
{
return resourceId == o.resourceId && addressU == o.addressU && addressV == o.addressV &&
@@ -326,6 +346,9 @@ DOCUMENT("Describes a constant buffer binding.");
struct ConstantBuffer
{
DOCUMENT("");
ConstantBuffer() = default;
ConstantBuffer(const ConstantBuffer &) = default;
bool operator==(const ConstantBuffer &o) const
{
return resourceId == o.resourceId && vecOffset == o.vecOffset && vecCount == o.vecCount;
@@ -359,6 +382,10 @@ If the capture isn't using the D3D11.1 binding methods, this offset will be 4096
DOCUMENT("Describes a D3D11 shader stage.");
struct Shader
{
DOCUMENT("");
Shader() = default;
Shader(const Shader &) = default;
DOCUMENT("The :class:`ResourceId` of the shader itself.");
ResourceId resourceId;
@@ -392,6 +419,9 @@ DOCUMENT("Describes a binding on the D3D11 stream-out stage.");
struct StreamOutBind
{
DOCUMENT("");
StreamOutBind() = default;
StreamOutBind(const StreamOutBind &) = default;
bool operator==(const StreamOutBind &o) const
{
return resourceId == o.resourceId && byteOffset == o.byteOffset;
@@ -414,6 +444,10 @@ struct StreamOutBind
DOCUMENT("Describes the stream-out stage bindings.");
struct StreamOut
{
DOCUMENT("");
StreamOut() = default;
StreamOut(const StreamOut &) = default;
DOCUMENT("A list of ``D3D11StreamOutBind`` with the bound buffers.");
rdcarray<StreamOutBind> outputs;
};
@@ -421,6 +455,10 @@ struct StreamOut
DOCUMENT("Describes a rasterizer state object.");
struct RasterizerState
{
DOCUMENT("");
RasterizerState() = default;
RasterizerState(const RasterizerState &) = default;
DOCUMENT("The :class:`ResourceId` of the rasterizer state object.");
ResourceId resourceId;
DOCUMENT("The polygon :class:`FillMode`.");
@@ -460,6 +498,10 @@ not force any sample count.
DOCUMENT("Describes the rasterization state of the D3D11 pipeline.");
struct Rasterizer
{
DOCUMENT("");
Rasterizer() = default;
Rasterizer(const Rasterizer &) = default;
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
rdcarray<Viewport> viewports;
@@ -473,6 +515,10 @@ struct Rasterizer
DOCUMENT("Describes a depth-stencil state object.");
struct DepthStencilState
{
DOCUMENT("");
DepthStencilState() = default;
DepthStencilState(const DepthStencilState &) = default;
DOCUMENT("The :class:`ResourceId` of the depth-stencil state object.");
ResourceId resourceId;
DOCUMENT("``True`` if depth testing should be performed.");
@@ -493,6 +539,10 @@ struct DepthStencilState
DOCUMENT("Describes a blend state object.");
struct BlendState
{
DOCUMENT("");
BlendState() = default;
BlendState(const BlendState &) = default;
DOCUMENT("The :class:`ResourceId` of the blend state object.");
ResourceId resourceId;
@@ -516,6 +566,10 @@ struct BlendState
DOCUMENT("Describes the current state of the output-merger stage of the D3D11 pipeline.");
struct OutputMerger
{
DOCUMENT("");
OutputMerger() = default;
OutputMerger(const OutputMerger &) = default;
DOCUMENT("A :class:`D3D11DepthStencilState` with the details of the depth-stencil state.");
DepthStencilState depthStencilState;
DOCUMENT("A :class:`D3D11BlendState` with the details of the blend state.");
@@ -540,6 +594,10 @@ struct OutputMerger
DOCUMENT("Describes the current state of predicated rendering.");
struct Predication
{
DOCUMENT("");
Predication() = default;
Predication(const Predication &) = default;
DOCUMENT("The :class:`ResourceId` of the active predicate.");
ResourceId resourceId;
+63
View File
@@ -38,6 +38,9 @@ DOCUMENT(R"(Describes a single D3D12 input layout element for one vertex input.
struct Layout
{
DOCUMENT("");
Layout() = default;
Layout(const Layout &) = default;
bool operator==(const Layout &o) const
{
return semanticName == o.semanticName && semanticIndex == o.semanticIndex &&
@@ -101,6 +104,9 @@ DOCUMENT("Describes a single D3D12 vertex buffer binding.")
struct VertexBuffer
{
DOCUMENT("");
VertexBuffer() = default;
VertexBuffer(const VertexBuffer &) = default;
bool operator==(const VertexBuffer &o) const
{
return resourceId == o.resourceId && byteStride == o.byteStride && byteSize == o.byteSize &&
@@ -134,6 +140,10 @@ struct VertexBuffer
DOCUMENT("Describes the D3D12 index buffer binding.")
struct IndexBuffer
{
DOCUMENT("");
IndexBuffer() = default;
IndexBuffer(const IndexBuffer &) = default;
DOCUMENT("The :class:`ResourceId` of the index buffer.");
ResourceId resourceId;
@@ -147,6 +157,10 @@ struct IndexBuffer
DOCUMENT("Describes the input assembler state in the PSO.");
struct InputAssembly
{
DOCUMENT("");
InputAssembly() = default;
InputAssembly(const InputAssembly &) = default;
DOCUMENT("A list of :class:`D3D12Layout` describing the input layout elements in this layout.");
rdcarray<Layout> layouts;
@@ -169,6 +183,9 @@ DOCUMENT("Describes the details of a D3D12 resource view - any one of UAV, SRV,
struct View
{
DOCUMENT("");
View() = default;
View(const View &) = default;
bool operator==(const View &o) const
{
return resourceId == o.resourceId && type == o.type && viewFormat == o.viewFormat &&
@@ -273,6 +290,9 @@ DOCUMENT("Describes the details of a sampler descriptor.");
struct Sampler
{
DOCUMENT("");
Sampler() = default;
Sampler(const Sampler &) = default;
bool operator==(const Sampler &o) const
{
return immediate == o.immediate && rootElement == o.rootElement && tableIndex == o.tableIndex &&
@@ -363,6 +383,9 @@ DOCUMENT("Describes the details of a constant buffer view descriptor.");
struct ConstantBuffer
{
DOCUMENT("");
ConstantBuffer() = default;
ConstantBuffer(const ConstantBuffer &) = default;
bool operator==(const ConstantBuffer &o) const
{
return immediate == o.immediate && rootElement == o.rootElement && tableIndex == o.tableIndex &&
@@ -411,6 +434,9 @@ DOCUMENT("Contains all of the registers in a single register space mapped to by
struct RegisterSpace
{
DOCUMENT("");
RegisterSpace() = default;
RegisterSpace(const RegisterSpace &) = default;
bool operator==(const RegisterSpace &o) const
{
return spaceIndex == o.spaceIndex && constantBuffers == o.constantBuffers &&
@@ -445,6 +471,10 @@ struct RegisterSpace
DOCUMENT("Describes a D3D12 shader stage.");
struct Shader
{
DOCUMENT("");
Shader() = default;
Shader(const Shader &) = default;
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
ResourceId resourceId;
@@ -480,6 +510,9 @@ DOCUMENT("Describes a binding on the D3D12 stream-out stage.");
struct StreamOutBind
{
DOCUMENT("");
StreamOutBind() = default;
StreamOutBind(const StreamOutBind &) = default;
bool operator==(const StreamOutBind &o) const
{
return resourceId == o.resourceId && byteOffset == o.byteOffset && byteSize == o.byteSize &&
@@ -520,6 +553,10 @@ written.
DOCUMENT("Describes the stream-out state in the PSO.");
struct StreamOut
{
DOCUMENT("");
StreamOut() = default;
StreamOut(const StreamOut &) = default;
DOCUMENT("A list of ``D3D12SOBind`` with the bound buffers.");
rdcarray<StreamOutBind> outputs;
};
@@ -527,6 +564,10 @@ struct StreamOut
DOCUMENT("Describes the rasterizer state in the PSO.");
struct RasterizerState
{
DOCUMENT("");
RasterizerState() = default;
RasterizerState(const RasterizerState &) = default;
DOCUMENT("The polygon :class:`FillMode`.");
FillMode fillMode = FillMode::Solid;
DOCUMENT("The polygon :class:`CullMode`.");
@@ -562,6 +603,10 @@ not force any sample count.
DOCUMENT("Describes the rasterization state of the D3D12 pipeline.");
struct Rasterizer
{
DOCUMENT("");
Rasterizer() = default;
Rasterizer(const Rasterizer &) = default;
DOCUMENT("The mask determining which samples are written to.");
uint32_t sampleMask = ~0U;
@@ -578,6 +623,10 @@ struct Rasterizer
DOCUMENT("Describes the state of the depth-stencil state in the PSO.");
struct DepthStencilState
{
DOCUMENT("");
DepthStencilState() = default;
DepthStencilState(const DepthStencilState &) = default;
DOCUMENT("``True`` if depth testing should be performed.");
bool depthEnable = false;
DOCUMENT("``True`` if depth values should be written to the depth target.");
@@ -603,6 +652,10 @@ struct DepthStencilState
DOCUMENT("Describes the blend state in the PSO.");
struct BlendState
{
DOCUMENT("");
BlendState() = default;
BlendState(const BlendState &) = default;
DOCUMENT("``True`` if alpha-to-coverage should be used when blending to an MSAA target.");
bool alphaToCoverage = false;
DOCUMENT(R"(``True`` if independent blending for each target should be used.
@@ -621,6 +674,10 @@ struct BlendState
DOCUMENT("Describes the current state of the output-merger stage of the D3D12 pipeline.");
struct OM
{
DOCUMENT("");
OM() = default;
OM(const OM &) = default;
DOCUMENT("A :class:`D3D12DepthStencilState` with the details of the depth-stencil state.");
DepthStencilState depthStencilState;
DOCUMENT("A :class:`D3D12BlendState` with the details of the blend state.");
@@ -646,6 +703,9 @@ DOCUMENT("Describes the current state that a sub-resource is in.");
struct ResourceState
{
DOCUMENT("");
ResourceState() = default;
ResourceState(const ResourceState &) = default;
bool operator==(const ResourceState &o) const { return name == o.name; }
bool operator<(const ResourceState &o) const
{
@@ -661,6 +721,9 @@ DOCUMENT("Contains the current state of a given resource.");
struct ResourceData
{
DOCUMENT("");
ResourceData() = default;
ResourceData(const ResourceData &) = default;
bool operator==(const ResourceData &o) const
{
return resourceId == o.resourceId && states == o.states;
+113
View File
@@ -31,6 +31,7 @@ DOCUMENT("A floating point four-component vector");
struct FloatVector
{
FloatVector() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
FloatVector(const FloatVector &) = default;
FloatVector(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) {}
#if defined(RENDERDOC_QT_COMPAT)
FloatVector(const QColor &col) : x(col.redF()), y(col.greenF()), z(col.blueF()), w(col.alphaF())
@@ -54,6 +55,7 @@ struct PathEntry
{
DOCUMENT("");
PathEntry() : flags(PathProperty::NoFlags), lastmod(0), size(0) {}
PathEntry(const PathEntry &) = default;
PathEntry(const char *fn, PathProperty f) : filename(fn), flags(f), lastmod(0), size(0) {}
bool operator==(const PathEntry &o) const
{
@@ -89,6 +91,10 @@ DECLARE_REFLECTION_STRUCT(PathEntry);
DOCUMENT("Properties of a section in a renderdoc capture file.");
struct SectionProperties
{
DOCUMENT("");
SectionProperties() = default;
SectionProperties(const SectionProperties &) = default;
DOCUMENT("The name of this section.");
rdcstr name;
@@ -130,6 +136,7 @@ struct ResourceFormat
bgraOrder = false;
srgbCorrected = false;
}
ResourceFormat(const ResourceFormat &) = default;
bool operator==(const ResourceFormat &r) const
{
@@ -192,6 +199,9 @@ DOCUMENT("The details of a texture filter in a sampler.");
struct TextureFilter
{
DOCUMENT("");
TextureFilter() = default;
TextureFilter(const TextureFilter &) = default;
bool operator==(const TextureFilter &o) const
{
return minify == o.minify && magnify == o.magnify && mip == o.mip && filter == o.filter;
@@ -224,6 +234,9 @@ DOCUMENT("A description of any type of resource.");
struct ResourceDescription
{
DOCUMENT("");
ResourceDescription() = default;
ResourceDescription(const ResourceDescription &) = default;
bool operator==(const ResourceDescription &o) const { return resourceId == o.resourceId; }
bool operator<(const ResourceDescription &o) const { return resourceId < o.resourceId; }
DOCUMENT("The unique :class:`ResourceId` that identifies this resource.");
@@ -278,6 +291,9 @@ DOCUMENT("A description of a buffer resource.");
struct BufferDescription
{
DOCUMENT("");
BufferDescription() = default;
BufferDescription(const BufferDescription &) = default;
bool operator==(const BufferDescription &o) const
{
return resourceId == o.resourceId && creationFlags == o.creationFlags && length == o.length;
@@ -308,6 +324,9 @@ DOCUMENT("A description of a texture resource.");
struct TextureDescription
{
DOCUMENT("");
TextureDescription() = default;
TextureDescription(const TextureDescription &) = default;
bool operator==(const TextureDescription &o) const
{
return format == o.format && dimension == o.dimension && type == o.type && width == o.width &&
@@ -397,6 +416,9 @@ DOCUMENT("An individual API-level event, generally corresponds one-to-one with a
struct APIEvent
{
DOCUMENT("");
APIEvent() = default;
APIEvent(const APIEvent &) = default;
bool operator==(const APIEvent &o) const { return eventId == o.eventId; }
bool operator<(const APIEvent &o) const { return eventId < o.eventId; }
DOCUMENT(R"(The API event's Event ID.
@@ -435,6 +457,9 @@ DOCUMENT("A debugging message from the API validation or internal analysis and e
struct DebugMessage
{
DOCUMENT("");
DebugMessage() = default;
DebugMessage(const DebugMessage &) = default;
bool operator==(const DebugMessage &o) const
{
return eventId == o.eventId && category == o.category && severity == o.severity &&
@@ -508,6 +533,10 @@ DOCUMENT(R"(Contains the statistics for constant binds in a frame.
)");
struct ConstantBindStats
{
DOCUMENT("");
ConstantBindStats() = default;
ConstantBindStats(const ConstantBindStats &) = default;
static const BucketRecordType BucketType = BucketRecordType::Pow2;
static const size_t BucketCount = 31;
@@ -532,6 +561,10 @@ DECLARE_REFLECTION_STRUCT(ConstantBindStats);
DOCUMENT("Contains the statistics for sampler binds in a frame.");
struct SamplerBindStats
{
DOCUMENT("");
SamplerBindStats() = default;
SamplerBindStats(const SamplerBindStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -550,6 +583,10 @@ DECLARE_REFLECTION_STRUCT(SamplerBindStats);
DOCUMENT("Contains the statistics for resource binds in a frame.");
struct ResourceBindStats
{
DOCUMENT("");
ResourceBindStats() = default;
ResourceBindStats(const ResourceBindStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -583,6 +620,10 @@ DOCUMENT(R"(Contains the statistics for resource updates in a frame.
)");
struct ResourceUpdateStats
{
DOCUMENT("");
ResourceUpdateStats() = default;
ResourceUpdateStats(const ResourceUpdateStats &) = default;
static const BucketRecordType BucketType = BucketRecordType::Pow2;
static const size_t BucketCount = 31;
@@ -623,6 +664,10 @@ DOCUMENT(R"(Contains the statistics for draws in a frame.
)");
struct DrawcallStats
{
DOCUMENT("");
DrawcallStats() = default;
DrawcallStats(const DrawcallStats &) = default;
static const BucketRecordType BucketType = BucketRecordType::Linear;
static const size_t BucketSize = 1;
static const size_t BucketCount = 16;
@@ -643,6 +688,10 @@ DECLARE_REFLECTION_STRUCT(DrawcallStats);
DOCUMENT("Contains the statistics for compute dispatches in a frame.");
struct DispatchStats
{
DOCUMENT("");
DispatchStats() = default;
DispatchStats(const DispatchStats &) = default;
DOCUMENT("How many dispatch calls were made.");
uint32_t calls;
@@ -655,6 +704,10 @@ DECLARE_REFLECTION_STRUCT(DispatchStats);
DOCUMENT("Contains the statistics for index buffer binds in a frame.");
struct IndexBindStats
{
DOCUMENT("");
IndexBindStats() = default;
IndexBindStats(const IndexBindStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -670,6 +723,10 @@ DECLARE_REFLECTION_STRUCT(IndexBindStats);
DOCUMENT("Contains the statistics for vertex buffer binds in a frame.");
struct VertexBindStats
{
DOCUMENT("");
VertexBindStats() = default;
VertexBindStats(const VertexBindStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -689,6 +746,10 @@ DECLARE_REFLECTION_STRUCT(VertexBindStats);
DOCUMENT("Contains the statistics for vertex layout binds in a frame.");
struct LayoutBindStats
{
DOCUMENT("");
LayoutBindStats() = default;
LayoutBindStats(const LayoutBindStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -704,6 +765,10 @@ DECLARE_REFLECTION_STRUCT(LayoutBindStats);
DOCUMENT("Contains the statistics for shader binds in a frame.");
struct ShaderChangeStats
{
DOCUMENT("");
ShaderChangeStats() = default;
ShaderChangeStats(const ShaderChangeStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -722,6 +787,10 @@ DECLARE_REFLECTION_STRUCT(ShaderChangeStats);
DOCUMENT("Contains the statistics for blend state binds in a frame.");
struct BlendStats
{
DOCUMENT("");
BlendStats() = default;
BlendStats(const BlendStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -740,6 +809,10 @@ DECLARE_REFLECTION_STRUCT(BlendStats);
DOCUMENT("Contains the statistics for depth stencil state binds in a frame.");
struct DepthStencilStats
{
DOCUMENT("");
DepthStencilStats() = default;
DepthStencilStats(const DepthStencilStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -758,6 +831,10 @@ DECLARE_REFLECTION_STRUCT(DepthStencilStats);
DOCUMENT("Contains the statistics for rasterizer state binds in a frame.");
struct RasterizationStats
{
DOCUMENT("");
RasterizationStats() = default;
RasterizationStats(const RasterizationStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -782,6 +859,10 @@ DECLARE_REFLECTION_STRUCT(RasterizationStats);
DOCUMENT("Contains the statistics for output merger or UAV binds in a frame.");
struct OutputTargetStats
{
DOCUMENT("");
OutputTargetStats() = default;
OutputTargetStats(const OutputTargetStats &) = default;
DOCUMENT("How many function calls were made.");
uint32_t calls;
@@ -803,6 +884,10 @@ Currently this information is only available on D3D11 and is fairly API-centric.
)");
struct FrameStatistics
{
DOCUMENT("");
FrameStatistics() = default;
FrameStatistics(const FrameStatistics &) = default;
DOCUMENT("``True`` if the statistics in this structure are valid.");
bool recorded;
@@ -854,6 +939,7 @@ DECLARE_REFLECTION_STRUCT(FrameStatistics);
DOCUMENT("Contains frame-level global information");
struct FrameDescription
{
DOCUMENT("");
FrameDescription()
: frameNumber(0),
fileOffset(0),
@@ -864,6 +950,7 @@ struct FrameDescription
captureTime(0)
{
}
FrameDescription(const FrameDescription &) = default;
DOCUMENT(R"(Starting from frame #1 defined as the time from application startup to first present,
this counts the frame number when the capture was made.
@@ -910,6 +997,7 @@ struct EventUsage
{
DOCUMENT("");
EventUsage() : eventId(0), usage(ResourceUsage::Unused) {}
EventUsage(const EventUsage &) = default;
EventUsage(uint32_t e, ResourceUsage u) : eventId(e), usage(u) {}
EventUsage(uint32_t e, ResourceUsage u, ResourceId v) : eventId(e), usage(u), view(v) {}
bool operator<(const EventUsage &o) const
@@ -935,7 +1023,10 @@ DECLARE_REFLECTION_STRUCT(EventUsage);
DOCUMENT("Describes the properties of a drawcall, dispatch, debug marker, or similar event.");
struct DrawcallDescription
{
DOCUMENT("");
DrawcallDescription() { Reset(); }
DrawcallDescription(const DrawcallDescription &) = default;
DOCUMENT("Resets the drawcall back to a default/empty state.");
void Reset()
{
@@ -1071,6 +1162,10 @@ DECLARE_REFLECTION_STRUCT(DrawcallDescription);
DOCUMENT("Gives some API-specific information about the capture.");
struct APIProperties
{
DOCUMENT("");
APIProperties() = default;
APIProperties(const APIProperties &) = default;
DOCUMENT("The :class:`GraphicsAPI` of the actual log/capture.");
GraphicsAPI pipelineType = GraphicsAPI::D3D11;
@@ -1111,6 +1206,7 @@ DECLARE_REFLECTION_STRUCT(APIProperties);
DOCUMENT("A 128-bit Uuid.");
struct Uuid
{
DOCUMENT("");
Uuid(uint32_t a, uint32_t b, uint32_t c, uint32_t d)
{
words[0] = a;
@@ -1120,6 +1216,8 @@ struct Uuid
}
Uuid() { words[0] = words[1] = words[2] = words[3] = 0; }
Uuid(const Uuid &) = default;
DOCUMENT("Compares two ``Uuid`` objects for less-than.");
bool operator<(const Uuid &rhs) const
{
@@ -1137,6 +1235,10 @@ DECLARE_REFLECTION_STRUCT(Uuid);
DOCUMENT("Describes a GPU counter's purpose and result value.");
struct CounterDescription
{
DOCUMENT("");
CounterDescription() = default;
CounterDescription(const CounterDescription &) = default;
DOCUMENT(R"(The :class:`GPUCounter` this counter represents.
.. note:: The value may not correspond to any of the predefined values if it's a hardware-specific
@@ -1189,6 +1291,7 @@ DOCUMENT("The resulting value from a counter at an event.");
struct CounterResult
{
CounterResult() : eventId(0), counter(GPUCounter::EventGPUDuration) { value.u64 = 0; }
CounterResult(const CounterResult &) = default;
CounterResult(uint32_t e, GPUCounter c, float data) : eventId(e), counter(c) { value.f = data; }
CounterResult(uint32_t e, GPUCounter c, double data) : eventId(e), counter(c) { value.d = data; }
CounterResult(uint32_t e, GPUCounter c, uint32_t data) : eventId(e), counter(c)
@@ -1248,6 +1351,9 @@ DOCUMENT("The value of pixel output at a particular event.");
struct ModificationValue
{
DOCUMENT("");
ModificationValue() = default;
ModificationValue(const ModificationValue &) = default;
bool operator==(const ModificationValue &o) const
{
return !memcmp(&col, &o.col, sizeof(col)) && depth == o.depth && stencil == o.stencil;
@@ -1278,6 +1384,9 @@ DOCUMENT("An attempt to modify a pixel by a particular event.");
struct PixelModification
{
DOCUMENT("");
PixelModification() = default;
PixelModification(const PixelModification &) = default;
bool operator==(const PixelModification &o) const
{
return eventId == o.eventId && directShaderWrite == o.directShaderWrite &&
@@ -1388,6 +1497,10 @@ DECLARE_REFLECTION_STRUCT(PixelModification);
DOCUMENT("Contains the bytes and metadata describing a thumbnail.");
struct Thumbnail
{
DOCUMENT("");
Thumbnail() = default;
Thumbnail(const Thumbnail &) = default;
DOCUMENT("The :class:`FileType` of the data in the thumbnail.");
FileType type = FileType::Raw;
+69
View File
@@ -38,6 +38,9 @@ DOCUMENT(R"(Describes the configuration for a single vertex attribute.
struct VertexAttribute
{
DOCUMENT("");
VertexAttribute() = default;
VertexAttribute(const VertexAttribute &) = default;
bool operator==(const VertexAttribute &o) const
{
return enabled == o.enabled && format == o.format &&
@@ -78,6 +81,9 @@ DOCUMENT("Describes a single OpenGL vertex buffer binding.")
struct VertexBuffer
{
DOCUMENT("");
VertexBuffer() = default;
VertexBuffer(const VertexBuffer &) = default;
bool operator==(const VertexBuffer &o) const
{
return resourceId == o.resourceId && byteStride == o.byteStride && byteOffset == o.byteOffset &&
@@ -115,6 +121,10 @@ If it's ``1`` then one element is read for each instance, and for ``N`` greater
DOCUMENT("Describes the setup for fixed-function vertex input fetch.");
struct VertexInput
{
DOCUMENT("");
VertexInput() = default;
VertexInput(const VertexInput &) = default;
DOCUMENT("A list of :class:`GLVertexAttribute` with the vertex attributes.");
rdcarray<VertexAttribute> attributes;
@@ -138,6 +148,10 @@ struct VertexInput
DOCUMENT("Describes an OpenGL shader stage.");
struct Shader
{
DOCUMENT("");
Shader() = default;
Shader(const Shader &) = default;
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
ResourceId shaderResourceId;
@@ -161,6 +175,10 @@ mapping data.
DOCUMENT("Describes the setup for fixed vertex processing operations.");
struct FixedVertexProcessing
{
DOCUMENT("");
FixedVertexProcessing() = default;
FixedVertexProcessing(const FixedVertexProcessing &) = default;
DOCUMENT("A list of ``float`` giving the default inner level of tessellation.");
float defaultInnerLevel[2] = {0.0f, 0.0f};
DOCUMENT("A list of ``float`` giving the default outer level of tessellation.");
@@ -186,6 +204,9 @@ DOCUMENT("Describes the details of a texture.");
struct Texture
{
DOCUMENT("");
Texture() = default;
Texture(const Texture &) = default;
bool operator==(const Texture &o) const
{
return resourceId == o.resourceId && firstSlice == o.firstSlice && firstMip == o.firstMip &&
@@ -242,6 +263,9 @@ DOCUMENT("Describes the sampler properties of a texture.");
struct Sampler
{
DOCUMENT("");
Sampler() = default;
Sampler(const Sampler &) = default;
bool operator==(const Sampler &o) const
{
return resourceId == o.resourceId && addressS == o.addressS && addressT == o.addressT &&
@@ -327,6 +351,9 @@ DOCUMENT("Describes the properties of a buffer.");
struct Buffer
{
DOCUMENT("");
Buffer() = default;
Buffer(const Buffer &) = default;
bool operator==(const Buffer &o) const
{
return resourceId == o.resourceId && byteOffset == o.byteOffset && byteSize == o.byteSize;
@@ -353,6 +380,9 @@ DOCUMENT("Describes the properties of a load/store image.");
struct ImageLoadStore
{
DOCUMENT("");
ImageLoadStore() = default;
ImageLoadStore(const ImageLoadStore &) = default;
bool operator==(const ImageLoadStore &o) const
{
return resourceId == o.resourceId && mipLevel == o.mipLevel && layered == o.layered &&
@@ -402,6 +432,10 @@ struct ImageLoadStore
DOCUMENT("Describes the current feedback state.");
struct Feedback
{
DOCUMENT("");
Feedback() = default;
Feedback(const Feedback &) = default;
DOCUMENT("The :class:`ResourceId` of the transform feedback binding.");
ResourceId feedbackResourceId;
DOCUMENT("A list of :class:`ResourceId` with the buffer bindings.");
@@ -419,6 +453,10 @@ struct Feedback
DOCUMENT("Describes the rasterizer state toggles.");
struct RasterizerState
{
DOCUMENT("");
RasterizerState() = default;
RasterizerState(const RasterizerState &) = default;
DOCUMENT("The polygon :class:`FillMode`.");
FillMode fillMode = FillMode::Solid;
DOCUMENT("The polygon :class:`CullMode`.");
@@ -480,6 +518,10 @@ resolve the final output color.
DOCUMENT("Describes the rasterization state of the OpenGL pipeline.");
struct Rasterizer
{
DOCUMENT("");
Rasterizer() = default;
Rasterizer(const Rasterizer &) = default;
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
rdcarray<Viewport> viewports;
@@ -493,6 +535,10 @@ struct Rasterizer
DOCUMENT("Describes the depth state.");
struct DepthState
{
DOCUMENT("");
DepthState() = default;
DepthState(const DepthState &) = default;
DOCUMENT("``True`` if depth testing should be performed.");
bool depthEnable = false;
DOCUMENT("The :class:`CompareFunction` to use for testing depth values.");
@@ -510,6 +556,10 @@ struct DepthState
DOCUMENT("Describes the stencil state.");
struct StencilState
{
DOCUMENT("");
StencilState() = default;
StencilState(const StencilState &) = default;
DOCUMENT("``True`` if stencil operations should be performed.");
bool stencilEnable = false;
@@ -523,6 +573,9 @@ DOCUMENT("Describes the state of a framebuffer attachment.");
struct Attachment
{
DOCUMENT("");
Attachment() = default;
Attachment(const Attachment &) = default;
bool operator==(const Attachment &o) const
{
return resourceId == o.resourceId && slice == o.slice && mipLevel == o.mipLevel &&
@@ -561,6 +614,10 @@ struct Attachment
DOCUMENT("Describes the contents of a framebuffer object.");
struct FBO
{
DOCUMENT("");
FBO() = default;
FBO(const FBO &) = default;
DOCUMENT("The :class:`ResourceId` of the framebuffer.");
ResourceId resourceId;
DOCUMENT("The list of :class:`GLAttachment` with the framebuffer color attachments.");
@@ -579,6 +636,10 @@ struct FBO
DOCUMENT("Describes the blend pipeline state.");
struct BlendState
{
DOCUMENT("");
BlendState() = default;
BlendState(const BlendState &) = default;
DOCUMENT("A list of :class:`ColorBlend` describing the blend operations for each target.");
rdcarray<ColorBlend> blends;
@@ -589,6 +650,10 @@ struct BlendState
DOCUMENT("Describes the current state of the framebuffer stage of the pipeline.");
struct FrameBuffer
{
DOCUMENT("");
FrameBuffer() = default;
FrameBuffer(const FrameBuffer &) = default;
DOCUMENT(
"``True`` if sRGB correction should be applied when writing to an sRGB-formatted texture.");
bool framebufferSRGB = false;
@@ -607,6 +672,10 @@ struct FrameBuffer
DOCUMENT("Describes the current state of GL hints and smoothing.");
struct Hints
{
DOCUMENT("");
Hints() = default;
Hints(const Hints &) = default;
DOCUMENT("A :class:`QualityHint` with the derivatives hint.");
QualityHint derivatives = QualityHint::DontCare;
DOCUMENT("A :class:`QualityHint` with the line smoothing hint.");
+11
View File
@@ -279,6 +279,9 @@ DOCUMENT(R"(This is an opaque identifier that uniquely locates a resource.
struct ResourceId
{
ResourceId() : id() {}
#if defined(SWIG)
ResourceId(const ResourceId &other) : id(other.id) {}
#endif
DOCUMENT("A helper function that explicitly creates an empty/invalid/null :class:`ResourceId`.");
inline static ResourceId Null() { return ResourceId(); }
DOCUMENT("Compares two ``ResourceId`` objects for equality.");
@@ -510,6 +513,10 @@ DECLARE_REFLECTION_STRUCT(ResourceId);
DOCUMENT(R"(Internal structure used for initialising environment in a replay application.)");
struct GlobalEnvironment
{
DOCUMENT("");
GlobalEnvironment() = default;
GlobalEnvironment(const GlobalEnvironment &) = default;
DOCUMENT("The handle to the X display to use internally. If left ``NULL``, one will be opened.");
Display *xlibDisplay = NULL;
};
@@ -517,6 +524,10 @@ struct GlobalEnvironment
DOCUMENT("The result of executing or injecting into a program.")
struct ExecuteResult
{
DOCUMENT("");
ExecuteResult() = default;
ExecuteResult(const ExecuteResult &) = default;
DOCUMENT(
"The :class:`ReplayStatus` resulting from the operation, indicating success or failure.");
ReplayStatus status;
+79
View File
@@ -32,6 +32,10 @@
DOCUMENT("A ``float`` 4 component vector.")
struct FloatVecVal
{
DOCUMENT("");
FloatVecVal() = default;
FloatVecVal(const FloatVecVal &) = default;
DOCUMENT("The x component.");
float x;
DOCUMENT("The y component.");
@@ -45,6 +49,10 @@ struct FloatVecVal
DOCUMENT("A ``double`` 4 component vector.")
struct DoubleVecVal
{
DOCUMENT("");
DoubleVecVal() = default;
DoubleVecVal(const DoubleVecVal &) = default;
DOCUMENT("The x component.");
double x;
DOCUMENT("The y component.");
@@ -58,6 +66,10 @@ struct DoubleVecVal
DOCUMENT("A 32-bit signed ``int`` 4 component vector.")
struct IntVecVal
{
DOCUMENT("");
IntVecVal() = default;
IntVecVal(const IntVecVal &) = default;
DOCUMENT("The x component.");
int32_t x;
DOCUMENT("The y component.");
@@ -71,6 +83,10 @@ struct IntVecVal
DOCUMENT("A 32-bit unsigned ``int`` 4 component vector.")
struct UIntVecVal
{
DOCUMENT("");
UIntVecVal() = default;
UIntVecVal(const UIntVecVal &) = default;
DOCUMENT("The x component.");
uint32_t x;
DOCUMENT("The y component.");
@@ -127,6 +143,7 @@ struct ShaderVariable
for(int i = 0; i < 16; i++)
value.uv[i] = 0;
}
ShaderVariable(const ShaderVariable &) = default;
ShaderVariable(const char *n, float x, float y, float z, float w)
{
name = n;
@@ -231,6 +248,9 @@ DOCUMENT(
struct RegisterRange
{
DOCUMENT("");
RegisterRange() = default;
RegisterRange(const RegisterRange &) = default;
bool operator==(const RegisterRange &o) const
{
return type == o.type && index == o.index && component == o.component;
@@ -271,6 +291,9 @@ Since locals don't always map directly this can change over time.
struct LocalVariableMapping
{
DOCUMENT("");
LocalVariableMapping() = default;
LocalVariableMapping(const LocalVariableMapping &) = default;
bool operator==(const LocalVariableMapping &o) const
{
return localName == o.localName && type == o.type && builtin == o.builtin && rows == o.rows &&
@@ -327,6 +350,9 @@ DOCUMENT("Details the current region of code that an instruction maps to");
struct LineColumnInfo
{
DOCUMENT("");
LineColumnInfo() = default;
LineColumnInfo(const LineColumnInfo &) = default;
bool operator==(const LineColumnInfo &o) const
{
return fileIndex == o.fileIndex && lineStart == o.lineStart && lineEnd == o.lineEnd &&
@@ -384,6 +410,9 @@ with all mutable variable contents.
struct ShaderDebugState
{
DOCUMENT("");
ShaderDebugState() = default;
ShaderDebugState(const ShaderDebugState &) = default;
bool operator==(const ShaderDebugState &o) const
{
return registers == o.registers && outputs == o.outputs && indexableTemps == o.indexableTemps &&
@@ -438,6 +467,10 @@ change with shader execution.
)");
struct ShaderDebugTrace
{
DOCUMENT("");
ShaderDebugTrace() = default;
ShaderDebugTrace(const ShaderDebugTrace &) = default;
DOCUMENT("The input variables for this shader as a list of :class:`ShaderValue`.");
rdcarray<ShaderVariable> inputs;
DOCUMENT(R"(Constant variables for this shader as a list of :class:`ShaderValue` lists.
@@ -473,6 +506,9 @@ between shader stages.
struct SigParameter
{
DOCUMENT("");
SigParameter() = default;
SigParameter(const SigParameter &) = default;
bool operator==(const SigParameter &o) const
{
return varName == o.varName && semanticName == o.semanticName &&
@@ -566,6 +602,9 @@ DOCUMENT("Describes the storage characteristics for a basic :class:`ShaderConsta
struct ShaderVariableDescriptor
{
DOCUMENT("");
ShaderVariableDescriptor() = default;
ShaderVariableDescriptor(const ShaderVariableDescriptor &) = default;
bool operator==(const ShaderVariableDescriptor &o) const
{
return type == o.type && rows == o.rows && columns == o.columns &&
@@ -612,6 +651,9 @@ DOCUMENT("Describes the type and members of a :class:`ShaderConstant`.");
struct ShaderVariableType
{
DOCUMENT("");
ShaderVariableType() = default;
ShaderVariableType(const ShaderVariableType &) = default;
bool operator==(const ShaderVariableType &o) const
{
return descriptor == o.descriptor && members == o.members;
@@ -637,6 +679,9 @@ DOCUMENT("Describes the offset of a constant in memory in terms of 16 byte vecto
struct ShaderRegister
{
DOCUMENT("");
ShaderRegister() = default;
ShaderRegister(const ShaderRegister &) = default;
bool operator==(const ShaderRegister &o) const { return vec == o.vec && comp == o.comp; }
bool operator<(const ShaderRegister &o) const
{
@@ -658,6 +703,9 @@ DOCUMENT("Contains the detail of a constant within a :class:`ConstantBlock` in m
struct ShaderConstant
{
DOCUMENT("");
ShaderConstant() = default;
ShaderConstant(const ShaderConstant &) = default;
bool operator==(const ShaderConstant &o) const
{
return name == o.name && reg == o.reg && defaultValue == o.defaultValue && type == o.type;
@@ -696,6 +744,9 @@ information.
struct ConstantBlock
{
DOCUMENT("");
ConstantBlock() = default;
ConstantBlock(const ConstantBlock &) = default;
bool operator==(const ConstantBlock &o) const
{
return name == o.name && variables == o.variables && bindPoint == o.bindPoint &&
@@ -743,6 +794,9 @@ relevant.
struct ShaderSampler
{
DOCUMENT("");
ShaderSampler() = default;
ShaderSampler(const ShaderSampler &) = default;
bool operator==(const ShaderSampler &o) const
{
return name == o.name && bindPoint == o.bindPoint;
@@ -775,6 +829,9 @@ directly by means of the API resource binding system.
struct ShaderResource
{
DOCUMENT("");
ShaderResource() = default;
ShaderResource(const ShaderResource &) = default;
bool operator==(const ShaderResource &o) const
{
return resType == o.resType && name == o.name && variableType == o.variableType &&
@@ -825,6 +882,7 @@ DOCUMENT("Describes an entry point in a shader.");
struct ShaderEntryPoint
{
ShaderEntryPoint() = default;
ShaderEntryPoint(const ShaderEntryPoint &) = default;
ShaderEntryPoint(const rdcstr &n, ShaderStage s) : name(n), stage(s) {}
DOCUMENT("");
bool operator==(const ShaderEntryPoint &o) const { return name == o.name && stage == o.stage; }
@@ -849,6 +907,9 @@ DOCUMENT("Contains a single flag used at compile-time on a shader.");
struct ShaderCompileFlag
{
DOCUMENT("");
ShaderCompileFlag() = default;
ShaderCompileFlag(const ShaderCompileFlag &) = default;
bool operator==(const ShaderCompileFlag &o) const { return name == o.name && value == o.value; }
bool operator<(const ShaderCompileFlag &o) const
{
@@ -870,6 +931,10 @@ DECLARE_REFLECTION_STRUCT(ShaderCompileFlag);
DOCUMENT("Contains the information about the compilation environment of a shader");
struct ShaderCompileFlags
{
DOCUMENT("");
ShaderCompileFlags() = default;
ShaderCompileFlags(const ShaderCompileFlags &) = default;
DOCUMENT(R"(A list of :class:`ShaderCompileFlag`.
Each entry is an API or compiler specific flag used to compile this shader originally.
@@ -883,6 +948,9 @@ DOCUMENT("Contains a source file available in a debug-compiled shader.");
struct ShaderSourceFile
{
DOCUMENT("");
ShaderSourceFile() = default;
ShaderSourceFile(const ShaderSourceFile &) = default;
bool operator==(const ShaderSourceFile &o) const
{
return filename == o.filename && contents == o.contents;
@@ -912,6 +980,8 @@ Primarily this means the embedded original source files.
struct ShaderDebugInfo
{
ShaderDebugInfo() {}
ShaderDebugInfo(const ShaderDebugInfo &) = default;
DOCUMENT("A :class:`ShaderCompileFlags` containing the flags used to compile this shader.");
ShaderCompileFlags compileFlags;
@@ -935,6 +1005,10 @@ and resource binding scheme.
)");
struct ShaderReflection
{
DOCUMENT("");
ShaderReflection() = default;
ShaderReflection(const ShaderReflection &) = default;
DOCUMENT("The :class:`ResourceId` of this shader.");
ResourceId resourceId;
@@ -997,6 +1071,7 @@ struct Bindpoint
used = false;
arraySize = 1;
}
Bindpoint(const Bindpoint &) = default;
Bindpoint(int32_t s, int32_t b)
{
@@ -1066,6 +1141,10 @@ API specific details:
)");
struct ShaderBindpointMapping
{
DOCUMENT("");
ShaderBindpointMapping() = default;
ShaderBindpointMapping(const ShaderBindpointMapping &) = default;
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.
)");
+8
View File
@@ -219,6 +219,10 @@ DECLARE_REFLECTION_ENUM(SDChunkFlags);
DOCUMENT("The metadata that goes along with a :class:`SDChunk` to detail how it was recorded.");
struct SDChunkMetaData
{
DOCUMENT("");
SDChunkMetaData() = default;
SDChunkMetaData(const SDChunkMetaData &) = default;
DOCUMENT("The internal chunk ID - unique given a particular driver in use.");
uint32_t chunkID = 0;
@@ -308,6 +312,9 @@ DECLARE_REFLECTION_STRUCT(StructuredObjectList);
DOCUMENT("The data inside an class:`SDObject`, whether it's plain old data or complex children.");
struct SDObjectData
{
DOCUMENT("");
SDObjectData() = default;
DOCUMENT("The plain-old data contents of the object, in a :class:`SDObjectPODData`.");
SDObjectPODData basic;
@@ -317,6 +324,7 @@ struct SDObjectData
DOCUMENT("A ``list`` of class:`SDObject` containing the children of this class:`SDObject`.");
StructuredObjectList children;
SDObjectData(const SDObjectData &) = delete;
SDObjectData &operator=(const SDObjectData &other) = delete;
};
+93
View File
@@ -32,6 +32,9 @@ DOCUMENT("The contents of a single binding element within a descriptor set, poss
struct BindingElement
{
DOCUMENT("");
BindingElement() = default;
BindingElement(const BindingElement &) = default;
bool operator==(const BindingElement &o) const
{
return viewResourceId == o.viewResourceId && resourceResourceId == o.resourceResourceId &&
@@ -179,6 +182,9 @@ DOCUMENT("The contents of a single binding within a descriptor set, either array
struct DescriptorBinding
{
DOCUMENT("");
DescriptorBinding() = default;
DescriptorBinding(const DescriptorBinding &) = default;
bool operator==(const DescriptorBinding &o) const
{
return descriptorCount == o.descriptorCount && type == o.type && stageFlags == o.stageFlags &&
@@ -215,6 +221,9 @@ DOCUMENT("The contents of a descriptor set.");
struct DescriptorSet
{
DOCUMENT("");
DescriptorSet() = default;
DescriptorSet(const DescriptorSet &) = default;
bool operator==(const DescriptorSet &o) const
{
return layoutResourceId == o.layoutResourceId &&
@@ -249,6 +258,10 @@ This list is indexed by the binding, so it may be sparse (some entries do not co
DOCUMENT("Describes the object and descriptor set bindings of a Vulkan pipeline object.");
struct Pipeline
{
DOCUMENT("");
Pipeline() = default;
Pipeline(const Pipeline &) = default;
DOCUMENT("The :class:`ResourceId` of the pipeline object.");
ResourceId pipelineResourceId;
DOCUMENT("The :class:`ResourceId` of the pipeline layout object.");
@@ -263,6 +276,10 @@ struct Pipeline
DOCUMENT("Describes the Vulkan index buffer binding.")
struct IndexBuffer
{
DOCUMENT("");
IndexBuffer() = default;
IndexBuffer(const IndexBuffer &) = default;
DOCUMENT("The :class:`ResourceId` of the index buffer.");
ResourceId resourceId;
@@ -273,6 +290,10 @@ struct IndexBuffer
DOCUMENT("Describes the vulkan input assembly configuration.");
struct InputAssembly
{
DOCUMENT("");
InputAssembly() = default;
InputAssembly(const InputAssembly &) = default;
DOCUMENT("``True`` if primitive restart is enabled for strip primitives.");
bool primitiveRestartEnable = false;
@@ -284,6 +305,9 @@ DOCUMENT("Describes the configuration of a single vertex attribute.");
struct VertexAttribute
{
DOCUMENT("");
VertexAttribute() = default;
VertexAttribute(const VertexAttribute &) = default;
bool operator==(const VertexAttribute &o) const
{
return location == o.location && binding == o.binding && format == o.format &&
@@ -317,6 +341,9 @@ DOCUMENT("Describes a vertex binding.");
struct VertexBinding
{
DOCUMENT("");
VertexBinding() = default;
VertexBinding(const VertexBinding &) = default;
bool operator==(const VertexBinding &o) const
{
return vertexBufferBinding == o.vertexBufferBinding && byteStride == o.byteStride &&
@@ -354,6 +381,9 @@ DOCUMENT("Describes a single Vulkan vertex buffer binding.")
struct VertexBuffer
{
DOCUMENT("");
VertexBuffer() = default;
VertexBuffer(const VertexBuffer &) = default;
bool operator==(const VertexBuffer &o) const
{
return resourceId == o.resourceId && byteOffset == o.byteOffset;
@@ -375,6 +405,10 @@ struct VertexBuffer
DOCUMENT("Describes the fixed-function vertex input fetch setup.");
struct VertexInput
{
DOCUMENT("");
VertexInput() = default;
VertexInput(const VertexInput &) = default;
DOCUMENT("A list of :class:`VKVertexAttribute` with the vertex attributes.");
rdcarray<VertexAttribute> attributes;
DOCUMENT("A list of :class:`VKVertexBinding` with the vertex bindings.");
@@ -387,6 +421,9 @@ DOCUMENT("The provided value for a specialization constant.");
struct SpecializationConstant
{
DOCUMENT("");
SpecializationConstant() = default;
SpecializationConstant(const SpecializationConstant &) = default;
bool operator==(const SpecializationConstant &o) const
{
return specializationId == o.specializationId && data == o.data;
@@ -408,6 +445,10 @@ struct SpecializationConstant
DOCUMENT("Describes a Vulkan shader stage.");
struct Shader
{
DOCUMENT("");
Shader() = default;
Shader(const Shader &) = default;
DOCUMENT("The :class:`ResourceId` of the shader module object.");
ResourceId resourceId;
DOCUMENT("The name of the entry point in the shader module that is used.");
@@ -431,6 +472,10 @@ mapping data.
DOCUMENT("Describes the state of the fixed-function tessellator.");
struct Tessellation
{
DOCUMENT("");
Tessellation() = default;
Tessellation(const Tessellation &) = default;
DOCUMENT("The number of control points in each input patch.");
uint32_t numControlPoints = 0;
@@ -442,6 +487,9 @@ DOCUMENT("Describes a combined viewport and scissor region.");
struct ViewportScissor
{
DOCUMENT("");
ViewportScissor() = default;
ViewportScissor(const ViewportScissor &) = default;
bool operator==(const ViewportScissor &o) const { return vp == o.vp && scissor == o.scissor; }
bool operator<(const ViewportScissor &o) const { return vp == o.vp && scissor == o.scissor; }
DOCUMENT("The :class:`Viewport`.");
@@ -453,6 +501,10 @@ struct ViewportScissor
DOCUMENT("Describes the view state in the pipeline.");
struct ViewState
{
DOCUMENT("");
ViewState() = default;
ViewState(const ViewState &) = default;
DOCUMENT("A list of :class:`VKViewportScissor`.");
rdcarray<ViewportScissor> viewportScissors;
};
@@ -460,6 +512,10 @@ struct ViewState
DOCUMENT("Describes the rasterizer state in the pipeline.");
struct Rasterizer
{
DOCUMENT("");
Rasterizer() = default;
Rasterizer(const Rasterizer &) = default;
DOCUMENT(R"(``True`` if pixels outside of the near and far depth planes should be clamped and
to ``0.0`` to ``1.0`` and not clipped.
)");
@@ -500,6 +556,10 @@ See :data:`conservativeRasterizationMode`
DOCUMENT("Describes the multisampling state in the pipeline.");
struct MultiSample
{
DOCUMENT("");
MultiSample() = default;
MultiSample(const MultiSample &) = default;
DOCUMENT("How many samples to use when rasterizing.");
uint32_t rasterSamples = 0;
DOCUMENT("``True`` if rendering should happen at sample-rate frequency.");
@@ -513,6 +573,10 @@ struct MultiSample
DOCUMENT("Describes the pipeline blending state.");
struct ColorBlendState
{
DOCUMENT("");
ColorBlendState() = default;
ColorBlendState(const ColorBlendState &) = default;
DOCUMENT("``True`` if alpha-to-coverage should be used when blending to an MSAA target.");
bool alphaToCoverageEnable = false;
DOCUMENT("``True`` if alpha-to-one should be used when blending to an MSAA target.");
@@ -528,6 +592,10 @@ struct ColorBlendState
DOCUMENT("Describes the pipeline depth-stencil state.");
struct DepthStencil
{
DOCUMENT("");
DepthStencil() = default;
DepthStencil(const DepthStencil &) = default;
DOCUMENT("``True`` if depth testing should be performed.");
bool depthTestEnable = false;
DOCUMENT("``True`` if depth values should be written to the depth target.");
@@ -554,6 +622,10 @@ struct DepthStencil
DOCUMENT("Describes the setup of a renderpass and subpasses.");
struct RenderPass
{
DOCUMENT("");
RenderPass() = default;
RenderPass(const RenderPass &) = default;
DOCUMENT("The :class:`ResourceId` of the render pass.");
ResourceId resourceId;
@@ -586,6 +658,9 @@ DOCUMENT("Describes a single attachment in a framebuffer object.");
struct Attachment
{
DOCUMENT("");
Attachment() = default;
Attachment(const Attachment &) = default;
bool operator==(const Attachment &o) const
{
return viewResourceId == o.viewResourceId && imageResourceId == o.imageResourceId &&
@@ -642,6 +717,10 @@ struct Attachment
DOCUMENT("Describes a framebuffer object and its attachments.");
struct Framebuffer
{
DOCUMENT("");
Framebuffer() = default;
Framebuffer(const Framebuffer &) = default;
DOCUMENT("The :class:`ResourceId` of the framebuffer object.");
ResourceId resourceId;
@@ -659,6 +738,10 @@ struct Framebuffer
DOCUMENT("Describes the render area for a render pass instance.");
struct RenderArea
{
DOCUMENT("");
RenderArea() = default;
RenderArea(const RenderArea &) = default;
DOCUMENT("The X co-ordinate of the render area.");
int32_t x = 0;
DOCUMENT("The Y co-ordinate of the render area.");
@@ -672,6 +755,10 @@ struct RenderArea
DOCUMENT("Describes the current pass instance at the current time.");
struct CurrentPass
{
DOCUMENT("");
CurrentPass() = default;
CurrentPass(const CurrentPass &) = default;
DOCUMENT("The :class:`VKRenderPass` that is currently active.");
RenderPass renderpass;
DOCUMENT("The :class:`VKFramebuffer` that is currently being used.");
@@ -684,6 +771,9 @@ DOCUMENT("Contains the layout of a range of subresources in an image.");
struct ImageLayout
{
DOCUMENT("");
ImageLayout() = default;
ImageLayout(const ImageLayout &) = default;
bool operator==(const ImageLayout &o) const
{
return baseMip == o.baseMip && baseLayer == o.baseLayer && numMip == o.numMip &&
@@ -719,6 +809,9 @@ DOCUMENT("Contains the current layout of all subresources in the image.");
struct ImageData
{
DOCUMENT("");
ImageData() = default;
ImageData(const ImageData &) = default;
bool operator==(const ImageData &o) const { return resourceId == o.resourceId; }
bool operator<(const ImageData &o) const
{