mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-21 06:51:35 +00:00
Give little tag structs unique names so we don't violate the ODR
This commit is contained in:
@@ -33,10 +33,10 @@
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct VBIBTag
|
||||
struct D3D11VBIBTag
|
||||
{
|
||||
VBIBTag() { offset = 0; }
|
||||
VBIBTag(ResourceId i, uint64_t offs)
|
||||
D3D11VBIBTag() { offset = 0; }
|
||||
D3D11VBIBTag(ResourceId i, uint64_t offs)
|
||||
{
|
||||
id = i;
|
||||
offset = offs;
|
||||
@@ -46,9 +46,9 @@ struct VBIBTag
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VBIBTag);
|
||||
Q_DECLARE_METATYPE(D3D11VBIBTag);
|
||||
|
||||
struct ViewTag
|
||||
struct D3D11ViewTag
|
||||
{
|
||||
enum ResType
|
||||
{
|
||||
@@ -58,14 +58,14 @@ struct ViewTag
|
||||
OMDepth,
|
||||
};
|
||||
|
||||
ViewTag() {}
|
||||
ViewTag(ResType t, int i, const D3D11Pipe::View &r) : type(t), index(i), res(r) {}
|
||||
D3D11ViewTag() {}
|
||||
D3D11ViewTag(ResType t, int i, const D3D11Pipe::View &r) : type(t), index(i), res(r) {}
|
||||
ResType type;
|
||||
int index;
|
||||
D3D11Pipe::View res;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ViewTag);
|
||||
Q_DECLARE_METATYPE(D3D11ViewTag);
|
||||
|
||||
D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
|
||||
PipelineStateViewer &common, QWidget *parent)
|
||||
@@ -480,7 +480,7 @@ bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &vie
|
||||
return false;
|
||||
}
|
||||
|
||||
void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const ViewTag &view,
|
||||
void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D11ViewTag &view,
|
||||
TextureDescription *tex)
|
||||
{
|
||||
if(tex == NULL)
|
||||
@@ -501,7 +501,7 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
viewdetails = true;
|
||||
}
|
||||
|
||||
if(view.type == ViewTag::OMDepth)
|
||||
if(view.type == D3D11ViewTag::OMDepth)
|
||||
{
|
||||
if(m_Ctx.CurD3D11PipelineState().m_OM.DepthReadOnly)
|
||||
text += tr("Depth component is read-only\n");
|
||||
@@ -549,7 +549,7 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
}
|
||||
}
|
||||
|
||||
void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const ViewTag &view,
|
||||
void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D11ViewTag &view,
|
||||
BufferDescription *buf)
|
||||
{
|
||||
if(buf == NULL)
|
||||
@@ -579,14 +579,15 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
}
|
||||
|
||||
void D3D11PipelineStateViewer::addResourceRow(const ViewTag &view, const ShaderResource *shaderInput,
|
||||
void D3D11PipelineStateViewer::addResourceRow(const D3D11ViewTag &view,
|
||||
const ShaderResource *shaderInput,
|
||||
RDTreeWidget *resources)
|
||||
{
|
||||
const D3D11Pipe::View &r = view.res;
|
||||
|
||||
bool viewDetails = false;
|
||||
|
||||
if(view.type == ViewTag::OMDepth)
|
||||
if(view.type == D3D11ViewTag::OMDepth)
|
||||
viewDetails = m_Ctx.CurD3D11PipelineState().m_OM.DepthReadOnly ||
|
||||
m_Ctx.CurD3D11PipelineState().m_OM.StencilReadOnly;
|
||||
|
||||
@@ -595,11 +596,11 @@ void D3D11PipelineStateViewer::addResourceRow(const ViewTag &view, const ShaderR
|
||||
|
||||
// if a target is set to RTVs or DSV, it is implicitly used
|
||||
if(filledSlot)
|
||||
usedSlot = usedSlot || view.type == ViewTag::OMTarget || view.type == ViewTag::OMDepth;
|
||||
usedSlot = usedSlot || view.type == D3D11ViewTag::OMTarget || view.type == D3D11ViewTag::OMDepth;
|
||||
|
||||
if(showNode(usedSlot, filledSlot))
|
||||
{
|
||||
QString slotname = view.type == ViewTag::OMDepth ? tr("Depth") : QString::number(view.index);
|
||||
QString slotname = view.type == D3D11ViewTag::OMDepth ? tr("Depth") : QString::number(view.index);
|
||||
|
||||
if(shaderInput && !shaderInput->name.empty())
|
||||
slotname += lit(": ") + ToQStr(shaderInput->name);
|
||||
@@ -656,14 +657,14 @@ void D3D11PipelineStateViewer::addResourceRow(const ViewTag &view, const ShaderR
|
||||
|
||||
if(r.Flags & D3DBufferViewFlags::Raw)
|
||||
{
|
||||
typeName =
|
||||
QFormatStr("%1ByteAddressBuffer").arg(view.type == ViewTag::UAV ? lit("RW") : QString());
|
||||
typeName = QFormatStr("%1ByteAddressBuffer")
|
||||
.arg(view.type == D3D11ViewTag::UAV ? lit("RW") : QString());
|
||||
}
|
||||
else if(r.ElementSize > 0)
|
||||
{
|
||||
// for structured buffers, display how many 'elements' there are in the buffer
|
||||
typeName = QFormatStr("%1StructuredBuffer[%2]")
|
||||
.arg(view.type == ViewTag::UAV ? lit("RW") : QString())
|
||||
.arg(view.type == D3D11ViewTag::UAV ? lit("RW") : QString())
|
||||
.arg(buf->length / r.ElementSize);
|
||||
}
|
||||
|
||||
@@ -887,7 +888,7 @@ void D3D11PipelineStateViewer::setShaderState(const D3D11Pipe::Shader &stage, QL
|
||||
}
|
||||
}
|
||||
|
||||
addResourceRow(ViewTag(ViewTag::SRV, i, stage.SRVs[i]), shaderInput, resources);
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::SRV, i, stage.SRVs[i]), shaderInput, resources);
|
||||
}
|
||||
resources->clearSelection();
|
||||
resources->setUpdatesEnabled(true);
|
||||
@@ -1336,8 +1337,8 @@ void D3D11PipelineStateViewer::setState()
|
||||
new RDTreeWidgetItem({tr("Index"), name, draw ? draw->indexByteWidth : 0,
|
||||
state.m_IA.ibuffer.Offset, (qulonglong)length, QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
D3D11VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
if(!ibufferUsed)
|
||||
setInactiveRow(node);
|
||||
@@ -1355,8 +1356,8 @@ void D3D11PipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{tr("Index"), tr("No Buffer Set"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
D3D11VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -1402,7 +1403,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
node =
|
||||
new RDTreeWidgetItem({i, tr("No Buffer Set"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(v.Buffer, v.Offset)));
|
||||
node->setTag(QVariant::fromValue(D3D11VBIBTag(v.Buffer, v.Offset)));
|
||||
|
||||
if(!filledSlot)
|
||||
setEmptyRow(node);
|
||||
@@ -1451,7 +1452,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
}
|
||||
}
|
||||
|
||||
addResourceRow(ViewTag(ViewTag::UAV, i, state.m_CS.UAVs[i]), shaderInput, ui->csUAVs);
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::UAV, i, state.m_CS.UAVs[i]), shaderInput, ui->csUAVs);
|
||||
}
|
||||
ui->csUAVs->clearSelection();
|
||||
ui->csUAVs->setUpdatesEnabled(true);
|
||||
@@ -1586,7 +1587,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
{
|
||||
for(int i = 0; i < state.m_OM.RenderTargets.count; i++)
|
||||
{
|
||||
addResourceRow(ViewTag(ViewTag::OMTarget, i, state.m_OM.RenderTargets[i]), NULL,
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::OMTarget, i, state.m_OM.RenderTargets[i]), NULL,
|
||||
ui->targetOutputs);
|
||||
|
||||
if(state.m_OM.RenderTargets[i].Resource != ResourceId())
|
||||
@@ -1618,10 +1619,12 @@ void D3D11PipelineStateViewer::setState()
|
||||
}
|
||||
}
|
||||
|
||||
addResourceRow(ViewTag(ViewTag::UAV, i, state.m_OM.UAVs[i]), shaderInput, ui->targetOutputs);
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::UAV, i, state.m_OM.UAVs[i]), shaderInput,
|
||||
ui->targetOutputs);
|
||||
}
|
||||
|
||||
addResourceRow(ViewTag(ViewTag::OMDepth, 0, state.m_OM.DepthTarget), NULL, ui->targetOutputs);
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::OMDepth, 0, state.m_OM.DepthTarget), NULL,
|
||||
ui->targetOutputs);
|
||||
}
|
||||
ui->targetOutputs->clearSelection();
|
||||
ui->targetOutputs->setUpdatesEnabled(true);
|
||||
@@ -1828,9 +1831,9 @@ void D3D11PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
tex = m_Ctx.GetTexture(id);
|
||||
buf = m_Ctx.GetBuffer(id);
|
||||
}
|
||||
else if(tag.canConvert<ViewTag>())
|
||||
else if(tag.canConvert<D3D11ViewTag>())
|
||||
{
|
||||
ViewTag view = tag.value<ViewTag>();
|
||||
D3D11ViewTag view = tag.value<D3D11ViewTag>();
|
||||
tex = m_Ctx.GetTexture(view.res.Resource);
|
||||
buf = m_Ctx.GetBuffer(view.res.Resource);
|
||||
}
|
||||
@@ -1855,9 +1858,9 @@ void D3D11PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
}
|
||||
else if(buf)
|
||||
{
|
||||
ViewTag view;
|
||||
if(tag.canConvert<ViewTag>())
|
||||
view = tag.value<ViewTag>();
|
||||
D3D11ViewTag view;
|
||||
if(tag.canConvert<D3D11ViewTag>())
|
||||
view = tag.value<D3D11ViewTag>();
|
||||
|
||||
uint64_t offs = 0;
|
||||
uint64_t size = buf->length;
|
||||
@@ -1898,7 +1901,7 @@ void D3D11PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
// in multiple places. Most likely the bindings are equivalent anyway.
|
||||
// The main point is that it allows us to pick up the binding if it's not
|
||||
// bound in the PS but only in an earlier stage.
|
||||
if(view.type == ViewTag::UAV && stage->stage != ShaderStage::Compute)
|
||||
if(view.type == D3D11ViewTag::UAV && stage->stage != ShaderStage::Compute)
|
||||
{
|
||||
const D3D11Pipe::State &state = m_Ctx.CurD3D11PipelineState();
|
||||
const D3D11Pipe::Shader *nonCS[] = {&state.m_VS, &state.m_DS, &state.m_HS, &state.m_GS,
|
||||
@@ -1925,8 +1928,8 @@ void D3D11PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
if(stage->ShaderDetails)
|
||||
{
|
||||
const rdctype::array<ShaderResource> &resArray =
|
||||
view.type == ViewTag::SRV ? stage->ShaderDetails->ReadOnlyResources
|
||||
: stage->ShaderDetails->ReadWriteResources;
|
||||
view.type == D3D11ViewTag::SRV ? stage->ShaderDetails->ReadOnlyResources
|
||||
: stage->ShaderDetails->ReadWriteResources;
|
||||
|
||||
for(const ShaderResource &res : resArray)
|
||||
{
|
||||
@@ -2076,9 +2079,9 @@ void D3D11PipelineStateViewer::on_iaBuffers_itemActivated(RDTreeWidgetItem *item
|
||||
{
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(tag.canConvert<VBIBTag>())
|
||||
if(tag.canConvert<D3D11VBIBTag>())
|
||||
{
|
||||
VBIBTag buf = tag.value<VBIBTag>();
|
||||
D3D11VBIBTag buf = tag.value<D3D11VBIBTag>();
|
||||
|
||||
if(buf.id != ResourceId())
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class D3D11PipelineStateViewer;
|
||||
|
||||
class RDTreeWidget;
|
||||
class RDTreeWidgetItem;
|
||||
struct ViewTag;
|
||||
struct D3D11ViewTag;
|
||||
class PipelineStateViewer;
|
||||
|
||||
class D3D11PipelineStateViewer : public QFrame, public ILogViewer
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
void setShaderState(const D3D11Pipe::Shader &stage, QLabel *shader, RDTreeWidget *tex,
|
||||
RDTreeWidget *samp, RDTreeWidget *cbuffer, RDTreeWidget *classes);
|
||||
|
||||
void addResourceRow(const ViewTag &view, const ShaderResource *shaderInput,
|
||||
void addResourceRow(const D3D11ViewTag &view, const ShaderResource *shaderInput,
|
||||
RDTreeWidget *resources);
|
||||
|
||||
void clearShaderState(QLabel *shader, RDTreeWidget *tex, RDTreeWidget *samp,
|
||||
@@ -103,8 +103,8 @@ private:
|
||||
bool HasImportantViewParams(const D3D11Pipe::View &view, TextureDescription *tex);
|
||||
bool HasImportantViewParams(const D3D11Pipe::View &view, BufferDescription *buf);
|
||||
|
||||
void setViewDetails(RDTreeWidgetItem *node, const ViewTag &view, TextureDescription *tex);
|
||||
void setViewDetails(RDTreeWidgetItem *node, const ViewTag &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);
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct VBIBTag
|
||||
struct D3D12VBIBTag
|
||||
{
|
||||
VBIBTag() { offset = 0; }
|
||||
VBIBTag(ResourceId i, uint64_t offs)
|
||||
D3D12VBIBTag() { offset = 0; }
|
||||
D3D12VBIBTag(ResourceId i, uint64_t offs)
|
||||
{
|
||||
id = i;
|
||||
offset = offs;
|
||||
@@ -46,22 +46,22 @@ struct VBIBTag
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VBIBTag);
|
||||
Q_DECLARE_METATYPE(D3D12VBIBTag);
|
||||
|
||||
struct CBufTag
|
||||
struct D3D12CBufTag
|
||||
{
|
||||
CBufTag()
|
||||
D3D12CBufTag()
|
||||
{
|
||||
idx = ~0U;
|
||||
space = reg = 0;
|
||||
}
|
||||
CBufTag(uint32_t s, uint32_t r)
|
||||
D3D12CBufTag(uint32_t s, uint32_t r)
|
||||
{
|
||||
idx = ~0U;
|
||||
space = s;
|
||||
reg = r;
|
||||
}
|
||||
CBufTag(uint32_t i)
|
||||
D3D12CBufTag(uint32_t i)
|
||||
{
|
||||
idx = i;
|
||||
space = reg = 0;
|
||||
@@ -70,9 +70,9 @@ struct CBufTag
|
||||
uint32_t idx, space, reg;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(CBufTag);
|
||||
Q_DECLARE_METATYPE(D3D12CBufTag);
|
||||
|
||||
struct ViewTag
|
||||
struct D3D12ViewTag
|
||||
{
|
||||
enum ResType
|
||||
{
|
||||
@@ -82,8 +82,9 @@ struct ViewTag
|
||||
OMDepth,
|
||||
};
|
||||
|
||||
ViewTag() {}
|
||||
ViewTag(ResType t, int s, int r, const D3D12Pipe::View &rs) : type(t), space(s), reg(r), res(rs)
|
||||
D3D12ViewTag() {}
|
||||
D3D12ViewTag(ResType t, int s, int r, const D3D12Pipe::View &rs)
|
||||
: type(t), space(s), reg(r), res(rs)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@ struct ViewTag
|
||||
D3D12Pipe::View res;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ViewTag);
|
||||
Q_DECLARE_METATYPE(D3D12ViewTag);
|
||||
|
||||
D3D12PipelineStateViewer::D3D12PipelineStateViewer(ICaptureContext &ctx,
|
||||
PipelineStateViewer &common, QWidget *parent)
|
||||
@@ -511,7 +512,7 @@ bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &vie
|
||||
return false;
|
||||
}
|
||||
|
||||
void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const ViewTag &view,
|
||||
void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D12ViewTag &view,
|
||||
TextureDescription *tex)
|
||||
{
|
||||
if(tex == NULL)
|
||||
@@ -541,7 +542,7 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
viewdetails = true;
|
||||
}
|
||||
|
||||
if(view.space == ViewTag::OMDepth)
|
||||
if(view.space == D3D12ViewTag::OMDepth)
|
||||
{
|
||||
if(m_Ctx.CurD3D12PipelineState().m_OM.DepthReadOnly)
|
||||
text += tr("Depth component is read-only\n");
|
||||
@@ -589,7 +590,7 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const ViewTag &view,
|
||||
void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D12ViewTag &view,
|
||||
BufferDescription *buf)
|
||||
{
|
||||
if(buf == NULL)
|
||||
@@ -634,11 +635,11 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const View
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pipe::Shader *stage,
|
||||
RDTreeWidget *resources)
|
||||
void D3D12PipelineStateViewer::addResourceRow(const D3D12ViewTag &view,
|
||||
const D3D12Pipe::Shader *stage, RDTreeWidget *resources)
|
||||
{
|
||||
const D3D12Pipe::View &r = view.res;
|
||||
bool uav = view.type == ViewTag::UAV;
|
||||
bool uav = view.type == D3D12ViewTag::UAV;
|
||||
|
||||
// consider this register to not exist - it's in a gap defined by sparse root signature elements
|
||||
if(r.RootElement == ~0U)
|
||||
@@ -675,7 +676,7 @@ void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pi
|
||||
|
||||
bool viewDetails = false;
|
||||
|
||||
if(view.space == ViewTag::OMDepth)
|
||||
if(view.space == D3D12ViewTag::OMDepth)
|
||||
viewDetails = m_Ctx.CurD3D12PipelineState().m_OM.DepthReadOnly ||
|
||||
m_Ctx.CurD3D12PipelineState().m_OM.StencilReadOnly;
|
||||
|
||||
@@ -687,7 +688,8 @@ void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pi
|
||||
|
||||
// if a target is set to RTVs or DSV, it is implicitly used
|
||||
if(filledSlot)
|
||||
usedSlot = usedSlot || view.space == ViewTag::OMTarget || view.space == ViewTag::OMDepth;
|
||||
usedSlot =
|
||||
usedSlot || view.space == D3D12ViewTag::OMTarget || view.space == D3D12ViewTag::OMDepth;
|
||||
|
||||
if(showNode(usedSlot, filledSlot))
|
||||
{
|
||||
@@ -696,7 +698,7 @@ void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pi
|
||||
if(shaderInput && !shaderInput->name.empty())
|
||||
regname += lit(": ") + ToQStr(shaderInput->name);
|
||||
|
||||
if(view.space == ViewTag::OMDepth)
|
||||
if(view.space == D3D12ViewTag::OMDepth)
|
||||
regname = tr("Depth");
|
||||
|
||||
uint32_t w = 1, h = 1, d = 1;
|
||||
@@ -965,8 +967,8 @@ void D3D12PipelineStateViewer::setShaderState(const D3D12Pipe::Shader &stage, QL
|
||||
{
|
||||
for(int reg = 0; reg < stage.Spaces[space].SRVs.count; reg++)
|
||||
{
|
||||
addResourceRow(ViewTag(ViewTag::SRV, space, reg, stage.Spaces[space].SRVs[reg]), &stage,
|
||||
resources);
|
||||
addResourceRow(D3D12ViewTag(D3D12ViewTag::SRV, space, reg, stage.Spaces[space].SRVs[reg]),
|
||||
&stage, resources);
|
||||
}
|
||||
}
|
||||
resources->clearSelection();
|
||||
@@ -980,7 +982,8 @@ void D3D12PipelineStateViewer::setShaderState(const D3D12Pipe::Shader &stage, QL
|
||||
{
|
||||
for(int reg = 0; reg < stage.Spaces[space].UAVs.count; reg++)
|
||||
{
|
||||
addResourceRow(ViewTag(ViewTag::UAV, space, reg, stage.Spaces[space].UAVs[reg]), &stage, uavs);
|
||||
addResourceRow(D3D12ViewTag(D3D12ViewTag::UAV, space, reg, stage.Spaces[space].UAVs[reg]),
|
||||
&stage, uavs);
|
||||
}
|
||||
}
|
||||
uavs->clearSelection();
|
||||
@@ -1140,14 +1143,14 @@ void D3D12PipelineStateViewer::setShaderState(const D3D12Pipe::Shader &stage, QL
|
||||
{
|
||||
bind = &bm;
|
||||
shaderCBuf = &res;
|
||||
tag = QVariant::fromValue(CBufTag(i));
|
||||
tag = QVariant::fromValue(D3D12CBufTag(i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!tag.isValid())
|
||||
tag = QVariant::fromValue(CBufTag(space, reg));
|
||||
tag = QVariant::fromValue(D3D12CBufTag(space, reg));
|
||||
|
||||
QString rootel;
|
||||
|
||||
@@ -1365,8 +1368,8 @@ void D3D12PipelineStateViewer::setState()
|
||||
{tr("Index"), name, draw ? draw->indexByteWidth : 0,
|
||||
(qulonglong)state.m_IA.ibuffer.Offset, (qulonglong)length, QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
D3D12VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
if(!ibufferUsed)
|
||||
setInactiveRow(node);
|
||||
@@ -1384,8 +1387,8 @@ void D3D12PipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{tr("Index"), tr("No Buffer Set"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
D3D12VBIBTag(state.m_IA.ibuffer.Buffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -1431,7 +1434,7 @@ void D3D12PipelineStateViewer::setState()
|
||||
node =
|
||||
new RDTreeWidgetItem({i, tr("No Buffer Set"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(v.Buffer, v.Offset)));
|
||||
node->setTag(QVariant::fromValue(D3D12VBIBTag(v.Buffer, v.Offset)));
|
||||
|
||||
if(!filledSlot)
|
||||
setEmptyRow(node);
|
||||
@@ -1578,14 +1581,15 @@ void D3D12PipelineStateViewer::setState()
|
||||
{
|
||||
for(int i = 0; i < state.m_OM.RenderTargets.count; i++)
|
||||
{
|
||||
addResourceRow(ViewTag(ViewTag::OMTarget, 0, i, state.m_OM.RenderTargets[i]), NULL,
|
||||
addResourceRow(D3D12ViewTag(D3D12ViewTag::OMTarget, 0, i, state.m_OM.RenderTargets[i]), NULL,
|
||||
ui->targetOutputs);
|
||||
|
||||
if(state.m_OM.RenderTargets[i].Resource != ResourceId())
|
||||
targets[i] = true;
|
||||
}
|
||||
|
||||
addResourceRow(ViewTag(ViewTag::OMDepth, 0, 0, state.m_OM.DepthTarget), NULL, ui->targetOutputs);
|
||||
addResourceRow(D3D12ViewTag(D3D12ViewTag::OMDepth, 0, 0, state.m_OM.DepthTarget), NULL,
|
||||
ui->targetOutputs);
|
||||
}
|
||||
ui->targetOutputs->clearSelection();
|
||||
ui->targetOutputs->setUpdatesEnabled(true);
|
||||
@@ -1747,9 +1751,9 @@ void D3D12PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
tex = m_Ctx.GetTexture(id);
|
||||
buf = m_Ctx.GetBuffer(id);
|
||||
}
|
||||
else if(tag.canConvert<ViewTag>())
|
||||
else if(tag.canConvert<D3D12ViewTag>())
|
||||
{
|
||||
ViewTag view = tag.value<ViewTag>();
|
||||
D3D12ViewTag view = tag.value<D3D12ViewTag>();
|
||||
tex = m_Ctx.GetTexture(view.res.Resource);
|
||||
buf = m_Ctx.GetBuffer(view.res.Resource);
|
||||
}
|
||||
@@ -1774,9 +1778,9 @@ void D3D12PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
}
|
||||
else if(buf)
|
||||
{
|
||||
ViewTag view;
|
||||
if(tag.canConvert<ViewTag>())
|
||||
view = tag.value<ViewTag>();
|
||||
D3D12ViewTag view;
|
||||
if(tag.canConvert<D3D12ViewTag>())
|
||||
view = tag.value<D3D12ViewTag>();
|
||||
|
||||
uint64_t offs = 0;
|
||||
uint64_t size = buf->length;
|
||||
@@ -1811,12 +1815,12 @@ void D3D12PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
if(stage->ShaderDetails)
|
||||
{
|
||||
const rdctype::array<ShaderResource> &resArray =
|
||||
view.space == ViewTag::SRV ? stage->ShaderDetails->ReadOnlyResources
|
||||
: stage->ShaderDetails->ReadWriteResources;
|
||||
view.space == D3D12ViewTag::SRV ? stage->ShaderDetails->ReadOnlyResources
|
||||
: stage->ShaderDetails->ReadWriteResources;
|
||||
|
||||
const rdctype::array<BindpointMap> &bindArray =
|
||||
view.space == ViewTag::SRV ? stage->BindpointMapping.ReadOnlyResources
|
||||
: stage->BindpointMapping.ReadOnlyResources;
|
||||
view.space == D3D12ViewTag::SRV ? stage->BindpointMapping.ReadOnlyResources
|
||||
: stage->BindpointMapping.ReadOnlyResources;
|
||||
|
||||
for(int i = 0; i < bindArray.count; i++)
|
||||
{
|
||||
@@ -1948,10 +1952,10 @@ void D3D12PipelineStateViewer::cbuffer_itemActivated(RDTreeWidgetItem *item, int
|
||||
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(!tag.canConvert<CBufTag>())
|
||||
if(!tag.canConvert<D3D12CBufTag>())
|
||||
return;
|
||||
|
||||
CBufTag cb = tag.value<CBufTag>();
|
||||
D3D12CBufTag cb = tag.value<D3D12CBufTag>();
|
||||
|
||||
if(cb.idx == ~0U)
|
||||
{
|
||||
@@ -1979,9 +1983,9 @@ void D3D12PipelineStateViewer::on_iaBuffers_itemActivated(RDTreeWidgetItem *item
|
||||
{
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(tag.canConvert<VBIBTag>())
|
||||
if(tag.canConvert<D3D12VBIBTag>())
|
||||
{
|
||||
VBIBTag buf = tag.value<VBIBTag>();
|
||||
D3D12VBIBTag buf = tag.value<D3D12VBIBTag>();
|
||||
|
||||
if(buf.id != ResourceId())
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class D3D12PipelineStateViewer;
|
||||
|
||||
class RDTreeWidget;
|
||||
class RDTreeWidgetItem;
|
||||
struct ViewTag;
|
||||
struct D3D12ViewTag;
|
||||
class PipelineStateViewer;
|
||||
|
||||
class D3D12PipelineStateViewer : public QFrame, public ILogViewer
|
||||
@@ -81,7 +81,8 @@ private:
|
||||
void setShaderState(const D3D12Pipe::Shader &stage, QLabel *shader, RDTreeWidget *tex,
|
||||
RDTreeWidget *samp, RDTreeWidget *cbuffer, RDTreeWidget *uavs);
|
||||
|
||||
void addResourceRow(const ViewTag &view, const D3D12Pipe::Shader *stage, RDTreeWidget *resources);
|
||||
void addResourceRow(const D3D12ViewTag &view, const D3D12Pipe::Shader *stage,
|
||||
RDTreeWidget *resources);
|
||||
|
||||
void clearShaderState(QLabel *shader, RDTreeWidget *tex, RDTreeWidget *samp,
|
||||
RDTreeWidget *cbuffer, RDTreeWidget *uavs);
|
||||
@@ -99,8 +100,8 @@ private:
|
||||
bool HasImportantViewParams(const D3D12Pipe::View &view, TextureDescription *tex);
|
||||
bool HasImportantViewParams(const D3D12Pipe::View &view, BufferDescription *buf);
|
||||
|
||||
void setViewDetails(RDTreeWidgetItem *node, const ViewTag &view, TextureDescription *tex);
|
||||
void setViewDetails(RDTreeWidgetItem *node, const ViewTag &view, BufferDescription *buf);
|
||||
void setViewDetails(RDTreeWidgetItem *node, const D3D12ViewTag &view, TextureDescription *tex);
|
||||
void setViewDetails(RDTreeWidgetItem *node, const D3D12ViewTag &view, BufferDescription *buf);
|
||||
|
||||
bool showNode(bool usedSlot, bool filledSlot);
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct VBIBTag
|
||||
struct GLVBIBTag
|
||||
{
|
||||
VBIBTag() { offset = 0; }
|
||||
VBIBTag(ResourceId i, uint64_t offs)
|
||||
GLVBIBTag() { offset = 0; }
|
||||
GLVBIBTag(ResourceId i, uint64_t offs)
|
||||
{
|
||||
id = i;
|
||||
offset = offs;
|
||||
@@ -46,16 +46,16 @@ struct VBIBTag
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VBIBTag);
|
||||
Q_DECLARE_METATYPE(GLVBIBTag);
|
||||
|
||||
struct ReadWriteTag
|
||||
struct GLReadWriteTag
|
||||
{
|
||||
ReadWriteTag()
|
||||
GLReadWriteTag()
|
||||
{
|
||||
bindPoint = 0;
|
||||
offset = size = 0;
|
||||
}
|
||||
ReadWriteTag(uint32_t b, ResourceId id, uint64_t offs, uint64_t sz)
|
||||
GLReadWriteTag(uint32_t b, ResourceId id, uint64_t offs, uint64_t sz)
|
||||
{
|
||||
bindPoint = b;
|
||||
ID = id;
|
||||
@@ -68,7 +68,7 @@ struct ReadWriteTag
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ReadWriteTag);
|
||||
Q_DECLARE_METATYPE(GLReadWriteTag);
|
||||
|
||||
GLPipelineStateViewer::GLPipelineStateViewer(ICaptureContext &ctx, PipelineStateViewer &common,
|
||||
QWidget *parent)
|
||||
@@ -1013,7 +1013,7 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, QLabel *
|
||||
|
||||
name = ToQStr(buf->name);
|
||||
|
||||
tag = QVariant::fromValue(ReadWriteTag(i, id, offset, length));
|
||||
tag = QVariant::fromValue(GLReadWriteTag(i, id, offset, length));
|
||||
}
|
||||
|
||||
if(!filledSlot)
|
||||
@@ -1258,7 +1258,8 @@ void GLPipelineStateViewer::setState()
|
||||
new RDTreeWidgetItem({tr("Element"), name, draw ? draw->indexByteWidth : 0, 0, 0,
|
||||
(qulonglong)length, QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(state.m_VtxIn.ibuffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(
|
||||
QVariant::fromValue(GLVBIBTag(state.m_VtxIn.ibuffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
if(!ibufferUsed)
|
||||
setInactiveRow(node);
|
||||
@@ -1276,7 +1277,8 @@ void GLPipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{tr("Element"), tr("No Buffer Set"), lit("-"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(state.m_VtxIn.ibuffer, draw ? draw->indexOffset : 0)));
|
||||
node->setTag(
|
||||
QVariant::fromValue(GLVBIBTag(state.m_VtxIn.ibuffer, draw ? draw->indexOffset : 0)));
|
||||
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -1318,7 +1320,7 @@ void GLPipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{i, name, v.Stride, (qulonglong)offset, v.Divisor, (qulonglong)length, QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(v.Buffer, v.Offset)));
|
||||
node->setTag(QVariant::fromValue(GLVBIBTag(v.Buffer, v.Offset)));
|
||||
|
||||
if(!filledSlot)
|
||||
setEmptyRow(node);
|
||||
@@ -2027,9 +2029,9 @@ void GLPipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, int c
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(tag.canConvert<ReadWriteTag>())
|
||||
else if(tag.canConvert<GLReadWriteTag>())
|
||||
{
|
||||
ReadWriteTag buf = tag.value<ReadWriteTag>();
|
||||
GLReadWriteTag buf = tag.value<GLReadWriteTag>();
|
||||
|
||||
const ShaderResource &shaderRes = stage->ShaderDetails->ReadWriteResources[buf.bindPoint];
|
||||
|
||||
@@ -2108,9 +2110,9 @@ void GLPipelineStateViewer::on_viBuffers_itemActivated(RDTreeWidgetItem *item, i
|
||||
{
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(tag.canConvert<VBIBTag>())
|
||||
if(tag.canConvert<GLVBIBTag>())
|
||||
{
|
||||
VBIBTag buf = tag.value<VBIBTag>();
|
||||
GLVBIBTag buf = tag.value<GLVBIBTag>();
|
||||
|
||||
if(buf.id != ResourceId())
|
||||
{
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
Q_DECLARE_METATYPE(SamplerData);
|
||||
|
||||
struct VBIBTag
|
||||
struct VulkanVBIBTag
|
||||
{
|
||||
VBIBTag() { offset = 0; }
|
||||
VBIBTag(ResourceId i, uint64_t offs)
|
||||
VulkanVBIBTag() { offset = 0; }
|
||||
VulkanVBIBTag(ResourceId i, uint64_t offs)
|
||||
{
|
||||
id = i;
|
||||
offset = offs;
|
||||
@@ -47,12 +47,12 @@ struct VBIBTag
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VBIBTag);
|
||||
Q_DECLARE_METATYPE(VulkanVBIBTag);
|
||||
|
||||
struct CBufferTag
|
||||
struct VulkanCBufferTag
|
||||
{
|
||||
CBufferTag() { slotIdx = arrayIdx = 0; }
|
||||
CBufferTag(uint32_t s, uint32_t i)
|
||||
VulkanCBufferTag() { slotIdx = arrayIdx = 0; }
|
||||
VulkanCBufferTag(uint32_t s, uint32_t i)
|
||||
{
|
||||
slotIdx = s;
|
||||
arrayIdx = i;
|
||||
@@ -61,17 +61,17 @@ struct CBufferTag
|
||||
uint32_t arrayIdx;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(CBufferTag);
|
||||
Q_DECLARE_METATYPE(VulkanCBufferTag);
|
||||
|
||||
struct BufferTag
|
||||
struct VulkanBufferTag
|
||||
{
|
||||
BufferTag()
|
||||
VulkanBufferTag()
|
||||
{
|
||||
rwRes = false;
|
||||
bindPoint = 0;
|
||||
offset = size = 0;
|
||||
}
|
||||
BufferTag(bool rw, uint32_t b, ResourceId id, uint64_t offs, uint64_t sz)
|
||||
VulkanBufferTag(bool rw, uint32_t b, ResourceId id, uint64_t offs, uint64_t sz)
|
||||
{
|
||||
rwRes = rw;
|
||||
bindPoint = b;
|
||||
@@ -86,7 +86,7 @@ struct BufferTag
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(BufferTag);
|
||||
Q_DECLARE_METATYPE(VulkanBufferTag);
|
||||
|
||||
VulkanPipelineStateViewer::VulkanPipelineStateViewer(ICaptureContext &ctx,
|
||||
PipelineStateViewer &common, QWidget *parent)
|
||||
@@ -866,7 +866,7 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
|
||||
descriptorLen = len - descriptorBind->offset;
|
||||
|
||||
tag = QVariant::fromValue(
|
||||
BufferTag(isrw, bindPoint, buf->ID, descriptorBind->offset, descriptorLen));
|
||||
VulkanBufferTag(isrw, bindPoint, buf->ID, descriptorBind->offset, descriptorLen));
|
||||
|
||||
isbuf = true;
|
||||
}
|
||||
@@ -1207,7 +1207,7 @@ void VulkanPipelineStateViewer::addConstantBlockRow(ShaderReflection *shaderDeta
|
||||
RDTreeWidgetItem *node =
|
||||
new RDTreeWidgetItem({QString(), setname, slotname, name, vecrange, sizestr});
|
||||
|
||||
node->setTag(QVariant::fromValue(CBufferTag(slot, (uint)idx)));
|
||||
node->setTag(QVariant::fromValue(VulkanCBufferTag(slot, (uint)idx)));
|
||||
|
||||
if(!filledSlot)
|
||||
setEmptyRow(node);
|
||||
@@ -1404,7 +1404,7 @@ void VulkanPipelineStateViewer::setShaderState(const VKPipe::Shader &stage,
|
||||
new RDTreeWidgetItem({QString(), QString(), ToQStr(cblock.name), tr("Push constants"),
|
||||
QString(), tr("%1 Variable(s)", "", cblock.variables.count)});
|
||||
|
||||
node->setTag(QVariant::fromValue(CBufferTag(cb, 0)));
|
||||
node->setTag(QVariant::fromValue(VulkanCBufferTag(cb, 0)));
|
||||
|
||||
ubos->addTopLevelItem(node);
|
||||
}
|
||||
@@ -1552,8 +1552,8 @@ void VulkanPipelineStateViewer::setState()
|
||||
{tr("Index"), name, tr("Index"), (qulonglong)state.IA.ibuffer.offs,
|
||||
draw != NULL ? draw->indexByteWidth : 0, (qulonglong)length, QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.IA.ibuffer.buf, draw != NULL ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
VulkanVBIBTag(state.IA.ibuffer.buf, draw != NULL ? draw->indexOffset : 0)));
|
||||
|
||||
if(!ibufferUsed)
|
||||
setInactiveRow(node);
|
||||
@@ -1571,8 +1571,8 @@ void VulkanPipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{tr("Index"), tr("No Buffer Set"), tr("Index"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(
|
||||
QVariant::fromValue(VBIBTag(state.IA.ibuffer.buf, draw != NULL ? draw->indexOffset : 0)));
|
||||
node->setTag(QVariant::fromValue(
|
||||
VulkanVBIBTag(state.IA.ibuffer.buf, draw != NULL ? draw->indexOffset : 0)));
|
||||
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -1641,8 +1641,8 @@ void VulkanPipelineStateViewer::setState()
|
||||
node = new RDTreeWidgetItem(
|
||||
{i, tr("No Binding"), lit("-"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(vbuff != NULL ? vbuff->buffer : ResourceId(),
|
||||
vbuff != NULL ? vbuff->offset : 0)));
|
||||
node->setTag(QVariant::fromValue(VulkanVBIBTag(vbuff != NULL ? vbuff->buffer : ResourceId(),
|
||||
vbuff != NULL ? vbuff->offset : 0)));
|
||||
|
||||
if(!filledSlot || bind == NULL || vbuff == NULL)
|
||||
setEmptyRow(node);
|
||||
@@ -1663,7 +1663,7 @@ void VulkanPipelineStateViewer::setState()
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{i, tr("No Binding"), lit("-"), lit("-"), lit("-"), lit("-"), QString()});
|
||||
|
||||
node->setTag(QVariant::fromValue(VBIBTag(ResourceId(), 0)));
|
||||
node->setTag(QVariant::fromValue(VulkanVBIBTag(ResourceId(), 0)));
|
||||
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -2041,9 +2041,9 @@ void VulkanPipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, i
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(tag.canConvert<BufferTag>())
|
||||
else if(tag.canConvert<VulkanBufferTag>())
|
||||
{
|
||||
BufferTag buf = tag.value<BufferTag>();
|
||||
VulkanBufferTag buf = tag.value<VulkanBufferTag>();
|
||||
|
||||
const ShaderResource &shaderRes = buf.rwRes
|
||||
? stage->ShaderDetails->ReadWriteResources[buf.bindPoint]
|
||||
@@ -2105,10 +2105,10 @@ void VulkanPipelineStateViewer::ubo_itemActivated(RDTreeWidgetItem *item, int co
|
||||
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(!tag.canConvert<CBufferTag>())
|
||||
if(!tag.canConvert<VulkanCBufferTag>())
|
||||
return;
|
||||
|
||||
CBufferTag cb = tag.value<CBufferTag>();
|
||||
VulkanCBufferTag cb = tag.value<VulkanCBufferTag>();
|
||||
|
||||
IConstantBufferPreviewer *prev = m_Ctx.ViewConstantBuffer(stage->stage, cb.slotIdx, cb.arrayIdx);
|
||||
|
||||
@@ -2124,9 +2124,9 @@ void VulkanPipelineStateViewer::on_viBuffers_itemActivated(RDTreeWidgetItem *ite
|
||||
{
|
||||
QVariant tag = item->tag();
|
||||
|
||||
if(tag.canConvert<VBIBTag>())
|
||||
if(tag.canConvert<VulkanVBIBTag>())
|
||||
{
|
||||
VBIBTag buf = tag.value<VBIBTag>();
|
||||
VulkanVBIBTag buf = tag.value<VulkanVBIBTag>();
|
||||
|
||||
if(buf.id != ResourceId())
|
||||
{
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "Widgets/FindReplace.h"
|
||||
#include "ui_ShaderViewer.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
struct CBufferTag
|
||||
{
|
||||
CBufferTag() {}
|
||||
@@ -50,6 +52,7 @@ struct ResourceTag
|
||||
ResourceTag(uint32_t r) : reg(r) {}
|
||||
uint32_t reg = 0;
|
||||
};
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(CBufferTag);
|
||||
Q_DECLARE_METATYPE(ResourceTag);
|
||||
|
||||
Reference in New Issue
Block a user