mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-01 04:10:58 +00:00
Update D3D11 pipeline state viewer to use new descriptor access
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -92,15 +92,19 @@ private:
|
||||
void setShaderState(const D3D11Pipe::Shader &stage, RDLabel *shader, RDTreeWidget *tex,
|
||||
RDTreeWidget *samp, RDTreeWidget *cbuffer, RDTreeWidget *classes);
|
||||
|
||||
void addResourceRow(const D3D11ViewTag &view, const ShaderResource *shaderInput,
|
||||
const Bindpoint *map, RDTreeWidget *resources);
|
||||
void addResourceRow(const D3D11ViewTag &view, const ShaderResource *shaderBind, bool usedSlot,
|
||||
RDTreeWidget *resources);
|
||||
void addSamplerRow(const SamplerDescriptor &s, uint32_t reg, const ShaderSampler *shaderBind,
|
||||
bool usedSlot, RDTreeWidget *samplers);
|
||||
void addCBufferRow(const Descriptor &b, uint32_t reg, const ConstantBlock *shaderBind,
|
||||
bool usedSlot, RDTreeWidget *cbuffers);
|
||||
|
||||
void clearShaderState(RDLabel *shader, RDTreeWidget *tex, RDTreeWidget *samp,
|
||||
RDTreeWidget *cbuffer, RDTreeWidget *classes);
|
||||
void setState();
|
||||
void clearState();
|
||||
|
||||
QVariantList exportViewHTML(const D3D11Pipe::View &view, int i, ShaderReflection *refl,
|
||||
QVariantList exportViewHTML(const Descriptor &view, uint32_t reg, ShaderReflection *refl,
|
||||
const QString &extraParams);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::InputAssembly &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::Shader &sh);
|
||||
@@ -114,14 +118,21 @@ private:
|
||||
|
||||
const D3D11Pipe::Shader *stageForSender(QWidget *widget);
|
||||
|
||||
bool HasImportantViewParams(const D3D11Pipe::View &view, TextureDescription *tex);
|
||||
bool HasImportantViewParams(const D3D11Pipe::View &view, BufferDescription *buf);
|
||||
const Descriptor &FindDescriptor(ShaderStage stage, DescriptorCategory category, uint32_t reg);
|
||||
bool HasAccess(ShaderStage stage, DescriptorCategory category, uint32_t index);
|
||||
|
||||
bool HasImportantViewParams(const Descriptor &view, TextureDescription *tex);
|
||||
bool HasImportantViewParams(const Descriptor &view, BufferDescription *buf);
|
||||
|
||||
void setViewDetails(RDTreeWidgetItem *node, const D3D11ViewTag &view, TextureDescription *tex);
|
||||
void setViewDetails(RDTreeWidgetItem *node, const D3D11ViewTag &view, BufferDescription *buf);
|
||||
|
||||
bool showNode(bool usedSlot, bool filledSlot);
|
||||
|
||||
rdcarray<DescriptorLogicalLocation> m_Locations;
|
||||
rdcarray<Descriptor> m_Descriptors;
|
||||
rdcarray<SamplerDescriptor> m_SamplerDescriptors;
|
||||
|
||||
// keep track of the VB nodes (we want to be able to highlight them easily on hover)
|
||||
QList<RDTreeWidgetItem *> m_VBNodes;
|
||||
// list of empty VB nodes that shouldn't be highlighted on hover
|
||||
|
||||
@@ -4803,6 +4803,29 @@ constexpr inline ShaderStageMask MaskForStage(ShaderStage stage)
|
||||
return ShaderStageMask(1 << uint32_t(stage));
|
||||
}
|
||||
|
||||
DOCUMENT(R"(For a shader stage mask that only covers one shader stage, return the shader stage.
|
||||
|
||||
.. note::
|
||||
If the shader stage mask covers multiple stages, only the first matching stage will be returned.
|
||||
If the mask is empty, :data:`ShaderStage.Count` will be returned.
|
||||
|
||||
:param ShaderStageMask stageMask: The shader stage mask.
|
||||
:return: The first shader stage covered by the mask.
|
||||
:rtype: ShaderStage
|
||||
)");
|
||||
constexpr inline ShaderStage FirstStageForMask(ShaderStageMask stageMask)
|
||||
{
|
||||
return (stageMask & ShaderStageMask::Vertex) ? ShaderStage::Vertex
|
||||
: (stageMask & ShaderStageMask::Hull) ? ShaderStage::Hull
|
||||
: (stageMask & ShaderStageMask::Domain) ? ShaderStage::Domain
|
||||
: (stageMask & ShaderStageMask::Geometry) ? ShaderStage::Geometry
|
||||
: (stageMask & ShaderStageMask::Pixel) ? ShaderStage::Pixel
|
||||
: (stageMask & ShaderStageMask::Compute) ? ShaderStage::Compute
|
||||
: (stageMask & ShaderStageMask::Task) ? ShaderStage::Task
|
||||
: (stageMask & ShaderStageMask::Mesh) ? ShaderStage::Mesh
|
||||
: ShaderStage::Count;
|
||||
}
|
||||
|
||||
DOCUMENT(R"(A set of flags for events that may occur while debugging a shader
|
||||
|
||||
.. data:: NoEvent
|
||||
|
||||
Reference in New Issue
Block a user