mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-03 10:57:52 +00:00
Add a stubbed out query for pulling descriptor contents out of a store
This commit is contained in:
@@ -259,6 +259,26 @@ public:
|
||||
return ret;
|
||||
}
|
||||
void SavePipelineState(uint32_t eventId) {}
|
||||
rdcarray<Descriptor> 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> 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;
|
||||
}
|
||||
DriverInformation GetDriverInfo()
|
||||
{
|
||||
DriverInformation ret = {};
|
||||
|
||||
@@ -97,6 +97,9 @@ rdcstr DoStringise(const ReplayProxyPacket &el)
|
||||
|
||||
STRINGISE_ENUM_NAMED(eReplayProxy_ContinueDebug, "ContinueDebug");
|
||||
STRINGISE_ENUM_NAMED(eReplayProxy_FreeDebugger, "FreeDebugger");
|
||||
|
||||
STRINGISE_ENUM_NAMED(eReplayProxy_GetDescriptors, "GetDescriptors");
|
||||
STRINGISE_ENUM_NAMED(eReplayProxy_GetSamplerDescriptors, "GetSamplerDescriptors");
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
@@ -1836,6 +1839,73 @@ void ReplayProxy::SavePipelineState(uint32_t eventId)
|
||||
PROXY_FUNCTION(SavePipelineState, eventId);
|
||||
}
|
||||
|
||||
template <typename ParamSerialiser, typename ReturnSerialiser>
|
||||
rdcarray<Descriptor> ReplayProxy::Proxied_GetDescriptors(ParamSerialiser ¶mser,
|
||||
ReturnSerialiser &retser,
|
||||
ResourceId descriptorStore,
|
||||
const rdcarray<DescriptorRange> &ranges)
|
||||
{
|
||||
const ReplayProxyPacket expectedPacket = eReplayProxy_GetDescriptors;
|
||||
ReplayProxyPacket packet = eReplayProxy_GetDescriptors;
|
||||
rdcarray<Descriptor> ret;
|
||||
|
||||
{
|
||||
BEGIN_PARAMS();
|
||||
SERIALISE_ELEMENT(descriptorStore);
|
||||
SERIALISE_ELEMENT(ranges);
|
||||
END_PARAMS();
|
||||
}
|
||||
|
||||
{
|
||||
REMOTE_EXECUTION();
|
||||
if(paramser.IsReading() && !paramser.IsErrored() && !m_IsErrored)
|
||||
ret = m_Remote->GetDescriptors(descriptorStore, ranges);
|
||||
}
|
||||
|
||||
SERIALISE_RETURN(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
rdcarray<Descriptor> ReplayProxy::GetDescriptors(ResourceId descriptorStore,
|
||||
const rdcarray<DescriptorRange> &ranges)
|
||||
{
|
||||
PROXY_FUNCTION(GetDescriptors, descriptorStore, ranges);
|
||||
}
|
||||
|
||||
template <typename ParamSerialiser, typename ReturnSerialiser>
|
||||
rdcarray<SamplerDescriptor> ReplayProxy::Proxied_GetSamplerDescriptors(
|
||||
ParamSerialiser ¶mser, ReturnSerialiser &retser, ResourceId descriptorStore,
|
||||
const rdcarray<DescriptorRange> &ranges)
|
||||
{
|
||||
const ReplayProxyPacket expectedPacket = eReplayProxy_GetSamplerDescriptors;
|
||||
ReplayProxyPacket packet = eReplayProxy_GetSamplerDescriptors;
|
||||
rdcarray<SamplerDescriptor> ret;
|
||||
|
||||
{
|
||||
BEGIN_PARAMS();
|
||||
SERIALISE_ELEMENT(descriptorStore);
|
||||
SERIALISE_ELEMENT(ranges);
|
||||
END_PARAMS();
|
||||
}
|
||||
|
||||
{
|
||||
REMOTE_EXECUTION();
|
||||
if(paramser.IsReading() && !paramser.IsErrored() && !m_IsErrored)
|
||||
ret = m_Remote->GetSamplerDescriptors(descriptorStore, ranges);
|
||||
}
|
||||
|
||||
SERIALISE_RETURN(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
rdcarray<SamplerDescriptor> ReplayProxy::GetSamplerDescriptors(ResourceId descriptorStore,
|
||||
const rdcarray<DescriptorRange> &ranges)
|
||||
{
|
||||
PROXY_FUNCTION(GetSamplerDescriptors, descriptorStore, ranges);
|
||||
}
|
||||
|
||||
template <typename ParamSerialiser, typename ReturnSerialiser>
|
||||
void ReplayProxy::Proxied_ReplayLog(ParamSerialiser ¶mser, ReturnSerialiser &retser,
|
||||
uint32_t endEventID, ReplayLogType replayType)
|
||||
@@ -2906,6 +2976,8 @@ bool ReplayProxy::Tick(int type)
|
||||
break;
|
||||
}
|
||||
case eReplayProxy_SavePipelineState: SavePipelineState(0); break;
|
||||
case eReplayProxy_GetDescriptors: GetDescriptors(ResourceId(), {}); break;
|
||||
case eReplayProxy_GetSamplerDescriptors: GetSamplerDescriptors(ResourceId(), {}); break;
|
||||
case eReplayProxy_GetUsage: GetUsage(ResourceId()); break;
|
||||
case eReplayProxy_GetLiveID: GetLiveID(ResourceId()); break;
|
||||
case eReplayProxy_GetFrameRecord: GetFrameRecord(); break;
|
||||
|
||||
@@ -105,6 +105,9 @@ enum ReplayProxyPacket
|
||||
eReplayProxy_FreeDebugger,
|
||||
|
||||
eReplayProxy_FatalErrorCheck,
|
||||
|
||||
eReplayProxy_GetDescriptors,
|
||||
eReplayProxy_GetSamplerDescriptors,
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_ENUM(ReplayProxyPacket);
|
||||
@@ -478,6 +481,10 @@ public:
|
||||
|
||||
IMPLEMENT_FUNCTION_PROXIED(void, SavePipelineState, uint32_t eventId);
|
||||
IMPLEMENT_FUNCTION_PROXIED(void, ReplayLog, uint32_t endEventID, ReplayLogType replayType);
|
||||
IMPLEMENT_FUNCTION_PROXIED(rdcarray<Descriptor>, GetDescriptors, ResourceId descriptorStore,
|
||||
const rdcarray<DescriptorRange> &ranges);
|
||||
IMPLEMENT_FUNCTION_PROXIED(rdcarray<SamplerDescriptor>, GetSamplerDescriptors,
|
||||
ResourceId descriptorStore, const rdcarray<DescriptorRange> &ranges);
|
||||
|
||||
IMPLEMENT_FUNCTION_PROXIED(rdcarray<uint32_t>, GetPassEvents, uint32_t eventId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user