Add a structure and query for reporting descriptor accesses

This commit is contained in:
baldurk
2024-04-10 15:33:36 +01:00
parent c1d07f6bc3
commit 227842a295
25 changed files with 244 additions and 5 deletions
+5
View File
@@ -165,6 +165,11 @@ rdcarray<SamplerDescriptor> DummyDriver::GetSamplerDescriptors(ResourceId descri
return ret;
}
rdcarray<DescriptorAccess> DummyDriver::GetDescriptorAccess()
{
return {};
}
FrameRecord DummyDriver::GetFrameRecord()
{
return m_FrameRecord;
+1
View File
@@ -64,6 +64,7 @@ public:
const rdcarray<DescriptorRange> &ranges);
rdcarray<SamplerDescriptor> GetSamplerDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
rdcarray<DescriptorAccess> GetDescriptorAccess();
FrameRecord GetFrameRecord();
+16
View File
@@ -1121,6 +1121,21 @@ void DoSerialise(SerialiserType &ser, SamplerDescriptor &el)
SIZE_CHECK(72);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, DescriptorAccess &el)
{
SERIALISE_MEMBER(stage);
SERIALISE_MEMBER(type);
SERIALISE_MEMBER(index);
SERIALISE_MEMBER(arrayElement);
SERIALISE_MEMBER(descriptorStore);
SERIALISE_MEMBER(byteOffset);
SERIALISE_MEMBER(byteSize);
SERIALISE_MEMBER(staticallyUnused);
SIZE_CHECK(32);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, StencilFace &el)
{
@@ -2564,6 +2579,7 @@ INSTANTIATE_SERIALISE_TYPE(DebugPixelInputs)
INSTANTIATE_SERIALISE_TYPE(DescriptorRange)
INSTANTIATE_SERIALISE_TYPE(Descriptor)
INSTANTIATE_SERIALISE_TYPE(SamplerDescriptor)
INSTANTIATE_SERIALISE_TYPE(DescriptorAccess)
INSTANTIATE_SERIALISE_TYPE(D3D11Pipe::Layout)
INSTANTIATE_SERIALISE_TYPE(D3D11Pipe::InputAssembly)
INSTANTIATE_SERIALISE_TYPE(D3D11Pipe::View)
+7
View File
@@ -131,6 +131,13 @@ rdcarray<Descriptor> ReplayController::GetDescriptors(ResourceId descriptorStore
return m_pDevice->GetDescriptors(m_pDevice->GetLiveID(descriptorStore), ranges);
}
rdcarray<DescriptorAccess> ReplayController::GetDescriptorAccess()
{
CHECK_REPLAY_THREAD();
return m_pDevice->GetDescriptorAccess();
}
rdcarray<SamplerDescriptor> ReplayController::GetSamplerDescriptors(
ResourceId descriptorStore, const rdcarray<DescriptorRange> &ranges)
{
+1
View File
@@ -154,6 +154,7 @@ public:
const rdcarray<DescriptorRange> &ranges);
rdcarray<SamplerDescriptor> GetSamplerDescriptors(ResourceId descriptorStore,
const rdcarray<DescriptorRange> &ranges);
rdcarray<DescriptorAccess> GetDescriptorAccess();
rdcarray<rdcstr> GetDisassemblyTargets(bool withPipeline);
rdcstr DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const rdcstr &target);
+1
View File
@@ -166,6 +166,7 @@ public:
const rdcarray<DescriptorRange> &ranges) = 0;
virtual rdcarray<SamplerDescriptor> GetSamplerDescriptors(
ResourceId descriptorStore, const rdcarray<DescriptorRange> &ranges) = 0;
virtual rdcarray<DescriptorAccess> GetDescriptorAccess() = 0;
virtual FrameRecord GetFrameRecord() = 0;