Switch from specific Attachment structs to using Descriptor for outputs

This commit is contained in:
baldurk
2024-04-10 18:58:52 +01:00
parent 6194d5a5a0
commit 0284d551ea
23 changed files with 365 additions and 1218 deletions
+4 -103
View File
@@ -201,104 +201,6 @@ struct InputAssembly
Topology topology = Topology::Unknown;
};
DOCUMENT("Describes the details of a D3D11 resource view - any one of UAV, SRV, RTV or DSV.");
struct View
{
DOCUMENT("");
View() = default;
View(const View &) = default;
View &operator=(const View &) = default;
bool operator==(const View &o) const
{
return viewResourceId == o.viewResourceId && resourceResourceId == o.resourceResourceId &&
counterResourceId == o.counterResourceId && type == o.type && viewFormat == o.viewFormat &&
structured == o.structured && bufferStructCount == o.bufferStructCount &&
elementByteSize == o.elementByteSize && firstElement == o.firstElement &&
numElements == o.numElements && bufferFlags == o.bufferFlags && firstMip == o.firstMip &&
numMips == o.numMips && numSlices == o.numSlices && firstSlice == o.firstSlice;
}
bool operator<(const View &o) const
{
if(!(viewResourceId == o.viewResourceId))
return viewResourceId < o.viewResourceId;
if(!(resourceResourceId == o.resourceResourceId))
return resourceResourceId < o.resourceResourceId;
if(!(counterResourceId == o.counterResourceId))
return counterResourceId < o.counterResourceId;
if(!(type == o.type))
return type < o.type;
if(!(viewFormat == o.viewFormat))
return viewFormat < o.viewFormat;
if(!(structured == o.structured))
return structured < o.structured;
if(!(bufferStructCount == o.bufferStructCount))
return bufferStructCount < o.bufferStructCount;
if(!(elementByteSize == o.elementByteSize))
return elementByteSize < o.elementByteSize;
if(!(firstElement == o.firstElement))
return firstElement < o.firstElement;
if(!(numElements == o.numElements))
return numElements < o.numElements;
if(!(bufferFlags == o.bufferFlags))
return bufferFlags < o.bufferFlags;
if(!(firstMip == o.firstMip))
return firstMip < o.firstMip;
if(!(numMips == o.numMips))
return numMips < o.numMips;
if(!(numSlices == o.numSlices))
return numSlices < o.numSlices;
if(!(firstSlice == o.firstSlice))
return firstSlice < o.firstSlice;
return false;
}
DOCUMENT("The :class:`ResourceId` of the view itself.");
ResourceId viewResourceId;
DOCUMENT("The :class:`ResourceId` of the underlying resource the view refers to.");
ResourceId resourceResourceId;
DOCUMENT("The :class:`ResourceId` of the resource where the hidden buffer counter is stored.");
ResourceId counterResourceId;
DOCUMENT("The :class:`TextureType` of the view type.");
TextureType type;
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT("``True`` if this view describes a structured buffer.");
bool structured = false;
DOCUMENT("If the view has a hidden counter, this stores the current value of the counter.");
uint32_t bufferStructCount = 0;
DOCUMENT(R"(The byte size of a single element in the view. Either the byte size of
:data:`viewFormat`, or the structured buffer element size, as appropriate.
)");
uint32_t elementByteSize = 0;
DOCUMENT("Valid for buffers - the first element to be used in the view.");
uint32_t firstElement = 0;
DOCUMENT("Valid for buffers - the number of elements to be used in the view.");
uint32_t numElements = 1;
DOCUMENT("Valid for buffers - the flags for additional view properties.");
D3DBufferViewFlags bufferFlags = D3DBufferViewFlags::NoFlags;
DOCUMENT("Valid for textures - the first mip that is available through the view.");
uint32_t firstMip = 0;
DOCUMENT("Valid for textures - the number of mip levels in the view.");
uint32_t numMips = 0;
DOCUMENT("Valid for texture arrays or 3D textures - the first slice available through the view.");
uint32_t firstSlice = 0;
DOCUMENT("Valid for texture arrays or 3D textures - the number of slices in the view.");
uint32_t numSlices = 1;
};
DOCUMENT("Describes a D3D11 shader stage.");
struct Shader
{
@@ -543,18 +445,18 @@ struct OutputMerger
DOCUMENT(R"(The bound render targets.
:type: List[D3D11View]
:type: List[Descriptor]
)");
rdcarray<View> renderTargets;
rdcarray<Descriptor> renderTargets;
DOCUMENT("Which slot in the output targets is the first UAV.");
uint32_t uavStartSlot = 0;
DOCUMENT(R"(The currently bound depth-stencil target.
:type: D3D11View
:type: Descriptor
)");
View depthTarget;
Descriptor depthTarget;
DOCUMENT("``True`` if depth access to the depth-stencil target is read-only.");
bool depthReadOnly = false;
DOCUMENT("``True`` if stencil access to the depth-stencil target is read-only.");
@@ -674,7 +576,6 @@ DECLARE_REFLECTION_STRUCT(D3D11Pipe::Layout);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::VertexBuffer);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::IndexBuffer);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::InputAssembly);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::View);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Shader);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::StreamOutBind);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::StreamOut);
+4 -120
View File
@@ -202,121 +202,6 @@ If the value is 0, strip cutting is disabled.
Topology topology = Topology::Unknown;
};
DOCUMENT("Describes the details of a D3D12 resource view - any one of UAV, SRV, RTV or DSV.");
struct View
{
DOCUMENT("");
View() = default;
View(uint32_t binding) : bind(binding) {}
View(const View &) = default;
View &operator=(const View &) = default;
bool operator==(const View &o) const
{
return bind == o.bind && tableIndex == o.tableIndex && resourceId == o.resourceId &&
type == o.type && viewFormat == o.viewFormat && swizzle == o.swizzle &&
bufferFlags == o.bufferFlags && bufferStructCount == o.bufferStructCount &&
elementByteSize == o.elementByteSize && firstElement == o.firstElement &&
numElements == o.numElements && counterResourceId == o.counterResourceId &&
counterByteOffset == o.counterByteOffset && firstMip == o.firstMip &&
numMips == o.numMips && numSlices == o.numSlices && firstSlice == o.firstSlice;
}
bool operator<(const View &o) const
{
if(!(bind == o.bind))
return bind < o.bind;
if(!(tableIndex == o.tableIndex))
return tableIndex < o.tableIndex;
if(!(resourceId == o.resourceId))
return resourceId < o.resourceId;
if(!(type == o.type))
return type < o.type;
if(!(viewFormat == o.viewFormat))
return viewFormat < o.viewFormat;
if(!(swizzle == o.swizzle))
return swizzle < o.swizzle;
if(!(bufferFlags == o.bufferFlags))
return bufferFlags < o.bufferFlags;
if(!(bufferStructCount == o.bufferStructCount))
return bufferStructCount < o.bufferStructCount;
if(!(elementByteSize == o.elementByteSize))
return elementByteSize < o.elementByteSize;
if(!(firstElement == o.firstElement))
return firstElement < o.firstElement;
if(!(numElements == o.numElements))
return numElements < o.numElements;
if(!(counterResourceId == o.counterResourceId))
return counterResourceId < o.counterResourceId;
if(!(counterByteOffset == o.counterByteOffset))
return counterByteOffset < o.counterByteOffset;
if(!(firstMip == o.firstMip))
return firstMip < o.firstMip;
if(!(numMips == o.numMips))
return numMips < o.numMips;
if(!(numSlices == o.numSlices))
return numSlices < o.numSlices;
if(!(firstSlice == o.firstSlice))
return firstSlice < o.firstSlice;
return false;
}
DOCUMENT("The shader register that this view is bound to.");
uint32_t bind = ~0U;
DOCUMENT("The index in the the parent descriptor table where this descriptor came from.");
uint32_t tableIndex = ~0U;
DOCUMENT("The :class:`ResourceId` of the underlying resource the view refers to.");
ResourceId resourceId;
DOCUMENT("The :class:`ResourceId` of the resource where the hidden buffer counter is stored.");
ResourceId counterResourceId;
DOCUMENT("The byte offset in :data:`counterResourceId` where the counter is stored.");
uint32_t counterByteOffset = 0;
DOCUMENT("The :class:`TextureType` of the view type.");
TextureType type;
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
DOCUMENT(R"(The swizzle applied to a texture by the view.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
DOCUMENT(R"(``True`` if this binding element is dynamically used.
If set to ``False`` this means that the binding was available to the shader but during execution it
was not referenced. The data gathered for setting this variable is conservative, meaning that only
accesses through arrays will have this calculated to reduce the required feedback bandwidth - single
non-arrayed descriptors may have this value set to ``True`` even if the shader did not use them,
since single descriptors may only be dynamically skipped by control flow.
)");
bool dynamicallyUsed = true;
DOCUMENT("The :class:`D3DBufferViewFlags` set for the buffer.");
D3DBufferViewFlags bufferFlags = D3DBufferViewFlags::NoFlags;
DOCUMENT("Valid for textures - the highest mip that is available through the view.");
uint8_t firstMip = 0;
DOCUMENT("Valid for textures - the number of mip levels in the view.");
uint8_t numMips = 1;
DOCUMENT("Valid for texture arrays or 3D textures - the first slice available through the view.");
uint16_t firstSlice = 0;
DOCUMENT("Valid for texture arrays or 3D textures - the number of slices in the view.");
uint16_t numSlices = 1;
DOCUMENT("If the view has a hidden counter, this stores the current value of the counter.");
uint32_t bufferStructCount = 0;
DOCUMENT(R"(The byte size of a single element in the view. Either the byte size of
:data:`viewFormat`, or the structured buffer element size, as appropriate.
)");
uint32_t elementByteSize = 0;
DOCUMENT("Valid for buffers - the first element to be used in the view.");
uint64_t firstElement = 0;
DOCUMENT("Valid for buffers - the number of elements to be used in the view.");
uint32_t numElements = 1;
DOCUMENT("The minimum mip-level clamp applied when sampling this texture.");
float minLODClamp = 0.0f;
};
DOCUMENT("Describes a D3D12 shader stage.");
struct Shader
{
@@ -596,15 +481,15 @@ struct OM
DOCUMENT(R"(The bound render targets.
:type: List[D3D12View]
:type: List[Descriptor]
)");
rdcarray<View> renderTargets;
rdcarray<Descriptor> renderTargets;
DOCUMENT(R"(The currently bound depth-stencil target.
:type: D3D12View
:type: Descriptor
)");
View depthTarget = D3D12Pipe::View(0);
Descriptor depthTarget;
DOCUMENT("``True`` if depth access to the depth-stencil target is read-only.");
bool depthReadOnly = false;
DOCUMENT("``True`` if stenncil access to the depth-stencil target is read-only.");
@@ -764,7 +649,6 @@ DECLARE_REFLECTION_STRUCT(D3D12Pipe::Layout);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::VertexBuffer);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::IndexBuffer);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::InputAssembly);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::View);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Shader);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::StreamOutBind);
DECLARE_REFLECTION_STRUCT(D3D12Pipe::StreamOut);
+6 -47
View File
@@ -473,46 +473,6 @@ struct StencilState
StencilFace backFace;
};
DOCUMENT("Describes the state of a framebuffer attachment.");
struct Attachment
{
DOCUMENT("");
Attachment() = default;
Attachment(const Attachment &) = default;
Attachment &operator=(const Attachment &) = default;
bool operator==(const Attachment &o) const
{
return resourceId == o.resourceId && slice == o.slice && numSlices == o.numSlices &&
mipLevel == o.mipLevel && swizzle == o.swizzle;
}
bool operator<(const Attachment &o) const
{
if(!(resourceId == o.resourceId))
return resourceId < o.resourceId;
if(!(slice == o.slice))
return slice < o.slice;
if(!(mipLevel == o.mipLevel))
return mipLevel < o.mipLevel;
if(!(swizzle == o.swizzle))
return swizzle < o.swizzle;
return false;
}
DOCUMENT("The :class:`ResourceId` of the texture bound to this attachment.");
ResourceId resourceId;
DOCUMENT("The slice of the texture that's used in the attachment.");
uint32_t slice = 0;
DOCUMENT("The number of slices of the texture that are used in the attachment.");
uint32_t numSlices = 1;
DOCUMENT("The mip of the texture that's used in the attachment.");
uint32_t mipLevel = 0;
DOCUMENT(R"(The swizzle applied to the texture.
:type: TextureSwizzle4
)");
TextureSwizzle4 swizzle;
};
DOCUMENT("Describes the contents of a framebuffer object.");
struct FBO
{
@@ -525,19 +485,19 @@ struct FBO
ResourceId resourceId;
DOCUMENT(R"(The framebuffer color attachments.
:type: List[GLAttachment]
:type: List[Descriptor]
)");
rdcarray<Attachment> colorAttachments;
rdcarray<Descriptor> colorAttachments;
DOCUMENT(R"(The framebuffer depth attachment.
:type: GLAttachment
:type: Descriptor
)");
Attachment depthAttachment;
Descriptor depthAttachment;
DOCUMENT(R"(The framebuffer stencil attachment.
:type: GLAttachment
:type: Descriptor
)");
Attachment stencilAttachment;
Descriptor stencilAttachment;
DOCUMENT(R"(The draw buffer indices into the :data:`colorAttachments` attachment list.
@@ -753,7 +713,6 @@ DECLARE_REFLECTION_STRUCT(GLPipe::RasterizerState);
DECLARE_REFLECTION_STRUCT(GLPipe::Rasterizer);
DECLARE_REFLECTION_STRUCT(GLPipe::DepthState);
DECLARE_REFLECTION_STRUCT(GLPipe::StencilState);
DECLARE_REFLECTION_STRUCT(GLPipe::Attachment);
DECLARE_REFLECTION_STRUCT(GLPipe::FBO);
DECLARE_REFLECTION_STRUCT(GLPipe::BlendState);
DECLARE_REFLECTION_STRUCT(GLPipe::FrameBuffer);
+10 -112
View File
@@ -1079,40 +1079,15 @@ Descriptor PipeState::GetDepthTarget() const
{
if(IsCaptureD3D11())
{
const D3D11Pipe::View &depthTarget = m_D3D11->outputMerger.depthTarget;
ret.resource = depthTarget.resourceResourceId;
ret.view = depthTarget.viewResourceId;
ret.firstMip = depthTarget.firstMip & 0xff;
ret.numMips = depthTarget.numMips & 0xff;
ret.firstSlice = depthTarget.firstSlice & 0xffff;
ret.numSlices = depthTarget.numSlices & 0xffff;
ret.format = depthTarget.viewFormat;
ret.textureType = depthTarget.type;
return m_D3D11->outputMerger.depthTarget;
}
else if(IsCaptureD3D12())
{
const D3D12Pipe::View &depthTarget = m_D3D12->outputMerger.depthTarget;
ret.resource = depthTarget.resourceId;
ret.firstMip = depthTarget.firstMip & 0xff;
ret.numMips = depthTarget.numMips & 0xff;
ret.firstSlice = depthTarget.firstSlice & 0xffff;
ret.numSlices = depthTarget.numSlices & 0xffff;
ret.format = depthTarget.viewFormat;
ret.textureType = depthTarget.type;
return m_D3D12->outputMerger.depthTarget;
}
else if(IsCaptureGL())
{
const GLPipe::Attachment &depthAttachment = m_GL->framebuffer.drawFBO.depthAttachment;
ret.resource = depthAttachment.resourceId;
ret.firstMip = depthAttachment.mipLevel & 0xff;
ret.numMips = 1;
ret.firstSlice = depthAttachment.slice & 0xffff;
ret.numSlices = depthAttachment.numSlices & 0xffff;
ret.swizzle = depthAttachment.swizzle;
ret.textureType = ret.numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
return m_GL->framebuffer.drawFBO.depthAttachment;
}
else if(IsCaptureVK())
{
@@ -1121,17 +1096,7 @@ Descriptor PipeState::GetDepthTarget() const
if(rp.depthstencilAttachment >= 0 && rp.depthstencilAttachment < fb.attachments.count())
{
const VKPipe::Attachment &depthAttachment = fb.attachments[rp.depthstencilAttachment];
ret.resource = depthAttachment.imageResourceId;
ret.view = depthAttachment.viewResourceId;
ret.firstMip = depthAttachment.firstMip & 0xff;
ret.numMips = depthAttachment.numMips & 0xff;
ret.firstSlice = depthAttachment.firstSlice & 0xffff;
ret.numSlices = depthAttachment.numSlices & 0xffff;
ret.format = depthAttachment.viewFormat;
ret.swizzle = depthAttachment.swizzle;
ret.textureType = ret.numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
return fb.attachments[rp.depthstencilAttachment];
}
}
}
@@ -1154,18 +1119,7 @@ Descriptor PipeState::GetDepthResolveTarget() const
if(rp.depthstencilResolveAttachment >= 0 &&
rp.depthstencilResolveAttachment < fb.attachments.count())
{
const VKPipe::Attachment &depthResolveAttachment =
fb.attachments[rp.depthstencilResolveAttachment];
ret.resource = depthResolveAttachment.imageResourceId;
ret.view = depthResolveAttachment.viewResourceId;
ret.firstMip = depthResolveAttachment.firstMip & 0xff;
ret.numMips = depthResolveAttachment.numMips & 0xff;
ret.firstSlice = depthResolveAttachment.firstSlice & 0xffff;
ret.numSlices = depthResolveAttachment.numSlices & 0xffff;
ret.format = depthResolveAttachment.viewFormat;
ret.swizzle = depthResolveAttachment.swizzle;
ret.textureType = ret.numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
return fb.attachments[rp.depthstencilResolveAttachment];
}
}
}
@@ -1181,36 +1135,11 @@ rdcarray<Descriptor> PipeState::GetOutputTargets() const
{
if(IsCaptureD3D11())
{
ret.resize(m_D3D11->outputMerger.renderTargets.count());
for(int i = 0; i < m_D3D11->outputMerger.renderTargets.count(); i++)
{
const D3D11Pipe::View &rt = m_D3D11->outputMerger.renderTargets[i];
ret[i].resource = rt.resourceResourceId;
ret[i].view = rt.viewResourceId;
ret[i].firstMip = rt.firstMip & 0xff;
ret[i].numMips = rt.numMips & 0xff;
ret[i].firstSlice = rt.firstSlice & 0xffff;
ret[i].numSlices = rt.numSlices & 0xffff;
ret[i].format = rt.viewFormat;
ret[i].textureType = rt.type;
}
return m_D3D11->outputMerger.renderTargets;
}
else if(IsCaptureD3D12())
{
ret.resize(m_D3D12->outputMerger.renderTargets.count());
for(int i = 0; i < m_D3D12->outputMerger.renderTargets.count(); i++)
{
const D3D12Pipe::View &rt = m_D3D12->outputMerger.renderTargets[i];
ret[i].resource = rt.resourceId;
ret[i].firstMip = rt.firstMip & 0xff;
ret[i].numMips = rt.numMips & 0xff;
ret[i].firstSlice = rt.firstSlice & 0xffff;
ret[i].numSlices = rt.numSlices & 0xffff;
ret[i].format = rt.viewFormat;
ret[i].textureType = rt.type;
}
return m_D3D12->outputMerger.renderTargets;
}
else if(IsCaptureGL())
{
@@ -1221,16 +1150,7 @@ rdcarray<Descriptor> PipeState::GetOutputTargets() const
if(db >= 0)
{
const GLPipe::Attachment &col = m_GL->framebuffer.drawFBO.colorAttachments[db];
ret[i].resource = col.resourceId;
ret[i].firstMip = col.mipLevel & 0xff;
ret[i].numMips = 1;
ret[i].firstSlice = col.slice & 0xffff;
ret[i].numSlices = col.numSlices & 0xffff;
ret[i].swizzle = col.swizzle;
ret[i].textureType =
ret[i].numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
ret[i] = m_GL->framebuffer.drawFBO.colorAttachments[db];
}
}
}
@@ -1246,18 +1166,7 @@ rdcarray<Descriptor> PipeState::GetOutputTargets() const
{
if(rp.colorAttachments[i] < (uint32_t)fb.attachments.count())
{
const VKPipe::Attachment &col = fb.attachments[rp.colorAttachments[i]];
ret[idx].resource = col.imageResourceId;
ret[idx].view = col.viewResourceId;
ret[idx].firstMip = col.firstMip & 0xff;
ret[idx].numMips = col.numMips & 0xff;
ret[idx].firstSlice = col.firstSlice & 0xffff;
ret[idx].numSlices = col.numSlices & 0xffff;
ret[idx].format = col.viewFormat;
ret[idx].swizzle = col.swizzle;
ret[idx].textureType =
ret[idx].numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
ret[idx] = fb.attachments[rp.colorAttachments[i]];
}
idx++;
@@ -1267,18 +1176,7 @@ rdcarray<Descriptor> PipeState::GetOutputTargets() const
{
if(rp.resolveAttachments[i] < (uint32_t)fb.attachments.count())
{
const VKPipe::Attachment &resolve = fb.attachments[rp.resolveAttachments[i]];
ret[idx].resource = resolve.imageResourceId;
ret[idx].view = resolve.viewResourceId;
ret[idx].firstMip = resolve.firstMip & 0xff;
ret[idx].numMips = resolve.numMips & 0xff;
ret[idx].firstSlice = resolve.firstSlice & 0xffff;
ret[idx].numSlices = resolve.numSlices & 0xffff;
ret[idx].format = resolve.viewFormat;
ret[idx].swizzle = resolve.swizzle;
ret[idx].textureType =
ret[idx].numSlices > 1 ? TextureType::Texture2DArray : TextureType::Texture2D;
ret[idx] = fb.attachments[rp.resolveAttachments[i]];
}
idx++;
-14
View File
@@ -1137,20 +1137,6 @@ rdcstr DoStringise(const ReplayOptimisationLevel &el)
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const D3DBufferViewFlags &el)
{
BEGIN_BITFIELD_STRINGISE(D3DBufferViewFlags);
{
STRINGISE_BITFIELD_CLASS_VALUE_NAMED(NoFlags, "");
STRINGISE_BITFIELD_CLASS_BIT(Raw);
STRINGISE_BITFIELD_CLASS_BIT(Append);
STRINGISE_BITFIELD_CLASS_BIT(Counter);
}
END_BITFIELD_STRINGISE();
}
template <>
rdcstr DoStringise(const DescriptorFlags &el)
{
-29
View File
@@ -4597,35 +4597,6 @@ enum class BufferCategory : uint32_t
BITMASK_OPERATORS(BufferCategory);
DECLARE_REFLECTION_ENUM(BufferCategory);
DOCUMENT(R"(A set of flags for D3D buffer view properties.
.. data:: NoFlags
The buffer will not be used for any of the uses below.
.. data:: Raw
The buffer is used as a raw (byte-addressed) buffer.
.. data:: Append
The buffer is used as a append/consume view.
.. data:: Counter
The buffer is used with a structured buffer with associated hidden counter.
)");
enum class D3DBufferViewFlags : uint8_t
{
NoFlags = 0x0,
Raw = 0x1,
Append = 0x2,
Counter = 0x4,
};
BITMASK_OPERATORS(D3DBufferViewFlags);
DECLARE_REFLECTION_ENUM(D3DBufferViewFlags);
DOCUMENT(R"(A set of flags for descriptor properties.
.. data:: NoFlags
+2 -62
View File
@@ -858,65 +858,6 @@ If the subpass is not internally multisampled, tileOnlyMSAASampleCount is set to
uint32_t tileOnlyMSAASampleCount = 0;
};
DOCUMENT("Describes a single attachment in a framebuffer object.");
struct Attachment
{
DOCUMENT("");
Attachment() = default;
Attachment(const Attachment &) = default;
Attachment &operator=(const Attachment &) = default;
bool operator==(const Attachment &o) const
{
return viewResourceId == o.viewResourceId && imageResourceId == o.imageResourceId &&
viewFormat == o.viewFormat && swizzle == o.swizzle && firstMip == o.firstMip &&
firstSlice == o.firstSlice && numMips == o.numMips && numSlices == o.numSlices;
}
bool operator<(const Attachment &o) const
{
if(!(viewResourceId == o.viewResourceId))
return viewResourceId < o.viewResourceId;
if(!(imageResourceId == o.imageResourceId))
return imageResourceId < o.imageResourceId;
if(!(viewFormat == o.viewFormat))
return viewFormat < o.viewFormat;
if(!(swizzle == o.swizzle))
return swizzle < o.swizzle;
if(!(firstMip == o.firstMip))
return firstMip < o.firstMip;
if(!(firstSlice == o.firstSlice))
return firstSlice < o.firstSlice;
if(!(numMips == o.numMips))
return numMips < o.numMips;
if(!(numSlices == o.numSlices))
return numSlices < o.numSlices;
return false;
}
DOCUMENT("The :class:`ResourceId` of the image view itself.");
ResourceId viewResourceId;
DOCUMENT("The :class:`ResourceId` of the underlying image that the view refers to.");
ResourceId imageResourceId;
DOCUMENT(R"(The format cast that the view uses.
:type: ResourceFormat
)");
ResourceFormat viewFormat;
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;
DOCUMENT("For 3D textures and texture arrays, the first slice used in the attachment.");
uint32_t firstSlice = 0;
DOCUMENT("The number of mip levels in the attachment.");
uint32_t numMips = 1;
DOCUMENT("For 3D textures and texture arrays, the number of array slices in the attachment.");
uint32_t numSlices = 1;
};
DOCUMENT("Describes a framebuffer object and its attachments.");
struct Framebuffer
{
@@ -930,9 +871,9 @@ struct Framebuffer
DOCUMENT(R"(The attachments of this framebuffer.
:type: List[VKAttachment]
:type: List[Descriptor]
)");
rdcarray<Attachment> attachments;
rdcarray<Descriptor> attachments;
DOCUMENT("The width of this framebuffer in pixels.");
uint32_t width = 0;
@@ -1229,7 +1170,6 @@ DECLARE_REFLECTION_STRUCT(VKPipe::MultiSample);
DECLARE_REFLECTION_STRUCT(VKPipe::ColorBlendState);
DECLARE_REFLECTION_STRUCT(VKPipe::DepthStencil);
DECLARE_REFLECTION_STRUCT(VKPipe::RenderPass);
DECLARE_REFLECTION_STRUCT(VKPipe::Attachment);
DECLARE_REFLECTION_STRUCT(VKPipe::Framebuffer);
DECLARE_REFLECTION_STRUCT(VKPipe::RenderArea);
DECLARE_REFLECTION_STRUCT(VKPipe::CurrentPass);