mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Expose queries for descriptor stores and D3D12 root signature range
* This will allow a UI viewer or consumer of the replay API to more easily query 'all' descriptors for a given store.
This commit is contained in:
@@ -32,6 +32,7 @@ DummyDriver::DummyDriver(IReplayDriver *original, const rdcarray<ShaderReflectio
|
||||
|
||||
m_Props = original->GetAPIProperties();
|
||||
m_Resources = original->GetResources();
|
||||
m_DescriptorStores = original->GetDescriptorStores();
|
||||
m_Buffers = original->GetBuffers();
|
||||
m_Textures = original->GetTextures();
|
||||
m_FrameRecord = original->GetFrameRecord();
|
||||
@@ -70,6 +71,11 @@ rdcarray<ResourceDescription> DummyDriver::GetResources()
|
||||
return m_Resources;
|
||||
}
|
||||
|
||||
rdcarray<DescriptorStoreDescription> DummyDriver::GetDescriptorStores()
|
||||
{
|
||||
return m_DescriptorStores;
|
||||
}
|
||||
|
||||
rdcarray<BufferDescription> DummyDriver::GetBuffers()
|
||||
{
|
||||
return m_Buffers;
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
|
||||
rdcarray<ResourceDescription> GetResources();
|
||||
|
||||
rdcarray<DescriptorStoreDescription> GetDescriptorStores();
|
||||
|
||||
rdcarray<BufferDescription> GetBuffers();
|
||||
BufferDescription GetBuffer(ResourceId id);
|
||||
|
||||
@@ -193,6 +195,7 @@ private:
|
||||
|
||||
APIProperties m_Props;
|
||||
rdcarray<ResourceDescription> m_Resources;
|
||||
rdcarray<DescriptorStoreDescription> m_DescriptorStores;
|
||||
rdcarray<BufferDescription> m_Buffers;
|
||||
rdcarray<TextureDescription> m_Textures;
|
||||
FrameRecord m_FrameRecord;
|
||||
|
||||
@@ -475,6 +475,17 @@ void DoSerialise(SerialiserType &ser, BufferDescription &el)
|
||||
SIZE_CHECK(32);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, DescriptorStoreDescription &el)
|
||||
{
|
||||
SERIALISE_MEMBER(resourceId);
|
||||
SERIALISE_MEMBER(descriptorByteSize);
|
||||
SERIALISE_MEMBER(firstDescriptorOffset);
|
||||
SERIALISE_MEMBER(descriptorCount);
|
||||
|
||||
SIZE_CHECK(24);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, APIProperties &el)
|
||||
{
|
||||
@@ -1579,12 +1590,59 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::ResourceData &el)
|
||||
SIZE_CHECK(32);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, D3D12Pipe::RootTableRange &el)
|
||||
{
|
||||
SERIALISE_MEMBER(category);
|
||||
SERIALISE_MEMBER(space);
|
||||
SERIALISE_MEMBER(baseRegister);
|
||||
SERIALISE_MEMBER(count);
|
||||
SERIALISE_MEMBER(tableByteOffset);
|
||||
SERIALISE_MEMBER(appended);
|
||||
|
||||
SIZE_CHECK(24);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, D3D12Pipe::RootParam &el)
|
||||
{
|
||||
SERIALISE_MEMBER(visibility);
|
||||
SERIALISE_MEMBER(constants);
|
||||
SERIALISE_MEMBER(descriptor);
|
||||
SERIALISE_MEMBER(heap);
|
||||
SERIALISE_MEMBER(heapByteOffset);
|
||||
SERIALISE_MEMBER(tableRanges);
|
||||
|
||||
SIZE_CHECK(152);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, D3D12Pipe::StaticSampler &el)
|
||||
{
|
||||
SERIALISE_MEMBER(visibility);
|
||||
SERIALISE_MEMBER(space);
|
||||
SERIALISE_MEMBER(reg);
|
||||
SERIALISE_MEMBER(descriptor);
|
||||
|
||||
SIZE_CHECK(88);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, D3D12Pipe::RootSignature &el)
|
||||
{
|
||||
SERIALISE_MEMBER(resourceId);
|
||||
SERIALISE_MEMBER(parameters);
|
||||
SERIALISE_MEMBER(staticSamplers);
|
||||
|
||||
SIZE_CHECK(56);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, D3D12Pipe::State &el)
|
||||
{
|
||||
SERIALISE_MEMBER(pipelineResourceId);
|
||||
SERIALISE_MEMBER(rootSignatureResourceId);
|
||||
SERIALISE_MEMBER(descriptorHeaps);
|
||||
SERIALISE_MEMBER(rootSignature);
|
||||
|
||||
SERIALISE_MEMBER(inputAssembly);
|
||||
|
||||
@@ -1605,7 +1663,7 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::State &el)
|
||||
|
||||
SERIALISE_MEMBER(resourceStates);
|
||||
|
||||
SIZE_CHECK(728);
|
||||
SIZE_CHECK(776);
|
||||
}
|
||||
|
||||
#pragma endregion D3D12 pipeline state
|
||||
@@ -2254,6 +2312,7 @@ INSTANTIATE_SERIALISE_TYPE(ShaderDebugTrace)
|
||||
INSTANTIATE_SERIALISE_TYPE(ResourceDescription)
|
||||
INSTANTIATE_SERIALISE_TYPE(TextureDescription)
|
||||
INSTANTIATE_SERIALISE_TYPE(BufferDescription)
|
||||
INSTANTIATE_SERIALISE_TYPE(DescriptorStoreDescription)
|
||||
INSTANTIATE_SERIALISE_TYPE(APIProperties)
|
||||
INSTANTIATE_SERIALISE_TYPE(DriverInformation)
|
||||
INSTANTIATE_SERIALISE_TYPE(DebugMessage)
|
||||
|
||||
@@ -481,6 +481,13 @@ const rdcarray<BufferDescription> &ReplayController::GetBuffers()
|
||||
return m_Buffers;
|
||||
}
|
||||
|
||||
const rdcarray<DescriptorStoreDescription> &ReplayController::GetDescriptorStores()
|
||||
{
|
||||
CHECK_REPLAY_THREAD();
|
||||
|
||||
return m_DescriptorStores;
|
||||
}
|
||||
|
||||
const rdcarray<TextureDescription> &ReplayController::GetTextures()
|
||||
{
|
||||
CHECK_REPLAY_THREAD();
|
||||
@@ -2207,6 +2214,8 @@ RDResult ReplayController::PostCreateInit(IReplayDriver *device, RDCFile *rdc)
|
||||
FatalErrorCheck();
|
||||
m_Resources = m_pDevice->GetResources();
|
||||
FatalErrorCheck();
|
||||
m_DescriptorStores = m_pDevice->GetDescriptorStores();
|
||||
FatalErrorCheck();
|
||||
|
||||
m_FrameRecord = m_pDevice->GetFrameRecord();
|
||||
FatalErrorCheck();
|
||||
|
||||
@@ -188,6 +188,7 @@ public:
|
||||
CounterDescription DescribeCounter(GPUCounter counterID);
|
||||
const rdcarray<TextureDescription> &GetTextures();
|
||||
const rdcarray<BufferDescription> &GetBuffers();
|
||||
const rdcarray<DescriptorStoreDescription> &GetDescriptorStores();
|
||||
const rdcarray<ResourceDescription> &GetResources();
|
||||
rdcarray<DebugMessage> GetDebugMessages();
|
||||
ResultDetails GetFatalErrorStatus()
|
||||
@@ -283,6 +284,7 @@ private:
|
||||
|
||||
rdcarray<ResourceDescription> m_Resources;
|
||||
rdcarray<BufferDescription> m_Buffers;
|
||||
rdcarray<DescriptorStoreDescription> m_DescriptorStores;
|
||||
rdcarray<TextureDescription> m_Textures;
|
||||
|
||||
IReplayDriver *m_pDevice;
|
||||
|
||||
@@ -140,6 +140,8 @@ public:
|
||||
|
||||
virtual rdcarray<ResourceDescription> GetResources() = 0;
|
||||
|
||||
virtual rdcarray<DescriptorStoreDescription> GetDescriptorStores() = 0;
|
||||
|
||||
virtual rdcarray<BufferDescription> GetBuffers() = 0;
|
||||
virtual BufferDescription GetBuffer(ResourceId id) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user