mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-15 02:56:50 +00:00
Display space and register for root parameters in root signature viewer
This commit is contained in:
@@ -997,6 +997,12 @@ public:
|
||||
if(row == 0)
|
||||
return col == 0 ? lit("Visibility") : ToQStr(param.visibility);
|
||||
|
||||
if(row == 1)
|
||||
return col == 0 ? lit("Register Space") : Formatter::Format(param.space);
|
||||
|
||||
if(row == 2)
|
||||
return col == 0 ? lit("Register") : Formatter::Format(param.reg);
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
@@ -1178,7 +1184,7 @@ private:
|
||||
// the number of rows in a range before the descriptors: category, table offset, count
|
||||
static const int RangeFixedRowCount = 3;
|
||||
// visibility only
|
||||
static const int DescParameterFixedRowCount = 1;
|
||||
static const int DescParameterFixedRowCount = 3;
|
||||
// visibility, and 3 forms of interpretation of constants (float, decimal, hex)
|
||||
static const int ConstParameterFixedRowCount = 4;
|
||||
// 3 for space/reg/visibility, plus sampler properties
|
||||
|
||||
@@ -625,13 +625,18 @@ struct RootParam
|
||||
|
||||
bool operator==(const RootParam &o) const
|
||||
{
|
||||
return visibility == o.visibility && heap == o.heap && heapByteOffset == o.heapByteOffset &&
|
||||
tableRanges == o.tableRanges && descriptor == o.descriptor && constants == o.constants;
|
||||
return visibility == o.visibility && space == o.space && reg == o.reg && heap == o.heap &&
|
||||
heapByteOffset == o.heapByteOffset && tableRanges == o.tableRanges &&
|
||||
descriptor == o.descriptor && constants == o.constants;
|
||||
}
|
||||
bool operator<(const RootParam &o) const
|
||||
{
|
||||
if(!(visibility == o.visibility))
|
||||
return visibility < o.visibility;
|
||||
if(!(space == o.space))
|
||||
return space < o.space;
|
||||
if(!(reg == o.reg))
|
||||
return reg < o.reg;
|
||||
if(!(heap == o.heap))
|
||||
return heap < o.heap;
|
||||
if(!(heapByteOffset == o.heapByteOffset))
|
||||
@@ -651,6 +656,18 @@ struct RootParam
|
||||
)");
|
||||
ShaderStageMask visibility;
|
||||
|
||||
DOCUMENT(R"(For a root parameter, the register space of the binding.
|
||||
|
||||
:type: int
|
||||
)");
|
||||
uint32_t space = 0;
|
||||
|
||||
DOCUMENT(R"(For a root parameter, the register of the binding.
|
||||
|
||||
:type: int
|
||||
)");
|
||||
uint32_t reg = 0;
|
||||
|
||||
DOCUMENT(R"(For a root constant parameter, the words defined.
|
||||
|
||||
:type: bytes
|
||||
|
||||
@@ -1409,6 +1409,8 @@ void D3D12Replay::SavePipelineState(uint32_t eventId)
|
||||
case D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
|
||||
{
|
||||
dst.constants.resize(src.Constants.Num32BitValues * 4);
|
||||
dst.space = src.Constants.RegisterSpace;
|
||||
dst.reg = src.Constants.ShaderRegister;
|
||||
|
||||
if(i < rootElems.size())
|
||||
{
|
||||
@@ -1421,27 +1423,32 @@ void D3D12Replay::SavePipelineState(uint32_t eventId)
|
||||
case D3D12_ROOT_PARAMETER_TYPE_CBV:
|
||||
{
|
||||
dst.descriptor.type = DescriptorType::ConstantBuffer;
|
||||
dst.space = src.Descriptor.RegisterSpace;
|
||||
dst.reg = src.Descriptor.ShaderRegister;
|
||||
|
||||
if(i < rootElems.size())
|
||||
FillRootDescriptor(dst.descriptor, rootElems[i]);
|
||||
break;
|
||||
}
|
||||
case D3D12_ROOT_PARAMETER_TYPE_SRV:
|
||||
{
|
||||
dst.descriptor.type = DescriptorType::Buffer;
|
||||
dst.space = src.Descriptor.RegisterSpace;
|
||||
dst.reg = src.Descriptor.ShaderRegister;
|
||||
|
||||
case D3D12_ROOT_PARAMETER_TYPE_SRV:
|
||||
{
|
||||
dst.descriptor.type = DescriptorType::Buffer;
|
||||
if(i < rootElems.size())
|
||||
FillRootDescriptor(dst.descriptor, rootElems[i]);
|
||||
break;
|
||||
}
|
||||
case D3D12_ROOT_PARAMETER_TYPE_UAV:
|
||||
{
|
||||
dst.descriptor.type = DescriptorType::ReadWriteBuffer;
|
||||
dst.space = src.Descriptor.RegisterSpace;
|
||||
dst.reg = src.Descriptor.ShaderRegister;
|
||||
|
||||
if(i < rootElems.size())
|
||||
FillRootDescriptor(dst.descriptor, rootElems[i]);
|
||||
break;
|
||||
}
|
||||
case D3D12_ROOT_PARAMETER_TYPE_UAV:
|
||||
{
|
||||
dst.descriptor.type = DescriptorType::ReadWriteBuffer;
|
||||
|
||||
if(i < rootElems.size())
|
||||
FillRootDescriptor(dst.descriptor, rootElems[i]);
|
||||
break;
|
||||
}
|
||||
if(i < rootElems.size())
|
||||
FillRootDescriptor(dst.descriptor, rootElems[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1616,7 +1616,7 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::RootParam &el)
|
||||
SERIALISE_MEMBER(heapByteOffset);
|
||||
SERIALISE_MEMBER(tableRanges);
|
||||
|
||||
SIZE_CHECK(152);
|
||||
SIZE_CHECK(160);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
|
||||
Reference in New Issue
Block a user