Add a stubbed out query for pulling descriptor contents out of a store

This commit is contained in:
baldurk
2024-04-10 15:01:26 +01:00
parent 7ef216ad35
commit b94e6ff90c
20 changed files with 324 additions and 0 deletions
+22
View File
@@ -143,6 +143,28 @@ void DummyDriver::SavePipelineState(uint32_t eventId)
{
}
rdcarray<Descriptor> DummyDriver::GetDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges)
{
size_t count = 0;
for(const DescriptorRange &r : ranges)
count += r.count;
rdcarray<Descriptor> ret;
ret.resize(count);
return ret;
}
rdcarray<SamplerDescriptor> DummyDriver::GetSamplerDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges)
{
size_t count = 0;
for(const DescriptorRange &r : ranges)
count += r.count;
rdcarray<SamplerDescriptor> ret;
ret.resize(count);
return ret;
}
FrameRecord DummyDriver::GetFrameRecord()
{
return m_FrameRecord;
+4
View File
@@ -60,6 +60,10 @@ public:
void SetPipelineStates(D3D11Pipe::State *d3d11, D3D12Pipe::State *d3d12, GLPipe::State *gl,
VKPipe::State *vk);
void SavePipelineState(uint32_t eventId);
rdcarray<Descriptor> GetDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
rdcarray<SamplerDescriptor> GetSamplerDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
FrameRecord GetFrameRecord();
+11
View File
@@ -1054,6 +1054,16 @@ void DoSerialise(SerialiserType &ser, ColorBlend &el)
SIZE_CHECK(32);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, DescriptorRange &el)
{
SERIALISE_MEMBER(offset);
SERIALISE_MEMBER(descriptorSize);
SERIALISE_MEMBER(count);
SIZE_CHECK(12);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, Descriptor &el)
{
@@ -2542,6 +2552,7 @@ INSTANTIATE_SERIALISE_TYPE(CounterValue)
INSTANTIATE_SERIALISE_TYPE(GPUDevice)
INSTANTIATE_SERIALISE_TYPE(ReplayOptions)
INSTANTIATE_SERIALISE_TYPE(DebugPixelInputs)
INSTANTIATE_SERIALISE_TYPE(DescriptorRange)
INSTANTIATE_SERIALISE_TYPE(Descriptor)
INSTANTIATE_SERIALISE_TYPE(SamplerDescriptor)
INSTANTIATE_SERIALISE_TYPE(D3D11Pipe::Layout)
+16
View File
@@ -123,6 +123,22 @@ const PipeState &ReplayController::GetPipelineState()
return m_PipeState;
}
rdcarray<Descriptor> ReplayController::GetDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges)
{
CHECK_REPLAY_THREAD();
return m_pDevice->GetDescriptors(m_pDevice->GetLiveID(descriptorStore), ranges);
}
rdcarray<SamplerDescriptor> ReplayController::GetSamplerDescriptors(
ResourceId descriptorStore, const rdcarray<DescriptorRange> &ranges)
{
CHECK_REPLAY_THREAD();
return m_pDevice->GetSamplerDescriptors(m_pDevice->GetLiveID(descriptorStore), ranges);
}
rdcarray<rdcstr> ReplayController::GetDisassemblyTargets(bool withPipeline)
{
CHECK_REPLAY_THREAD();
+4
View File
@@ -150,6 +150,10 @@ public:
const GLPipe::State *GetGLPipelineState();
const VKPipe::State *GetVulkanPipelineState();
const PipeState &GetPipelineState();
rdcarray<Descriptor> GetDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
rdcarray<SamplerDescriptor> GetSamplerDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
rdcarray<rdcstr> GetDisassemblyTargets(bool withPipeline);
rdcstr DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const rdcstr &target);
+5
View File
@@ -162,6 +162,11 @@ public:
GLPipe::State *gl, VKPipe::State *vk) = 0;
virtual void SavePipelineState(uint32_t eventId) = 0;
virtual rdcarray<Descriptor> GetDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges) = 0;
virtual rdcarray<SamplerDescriptor> GetSamplerDescriptors(
ResourceId descriptorStore, const rdcarray<DescriptorRange> &ranges) = 0;
virtual FrameRecord GetFrameRecord() = 0;
virtual RDResult ReadLogInitialisation(RDCFile *rdc, bool storeStructuredBuffers) = 0;