Rename RT manager to be less of a mouthful

This commit is contained in:
baldurk
2024-09-20 13:30:33 +01:00
parent 40d0b8088c
commit a882efef66
13 changed files with 67 additions and 86 deletions
@@ -803,8 +803,7 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
// Here, we are uploading the old BLAS addresses, and comparing the BLAS
// addresses in the TLAS and patching it with the corresponding new address.
D3D12RaytracingResourceAndUtilHandler *rtHandler =
GetResourceManager()->GetRaytracingResourceAndUtilHandler();
D3D12RTManager *rtManager = GetResourceManager()->GetRTManager();
// Create a resource for patched instance desc; we don't
// need a resource of same size but of same number of instances in the TLAS with uav
@@ -864,7 +863,7 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
patchRaytracing->m_patchedInstanceBuffer->Offset(),
instanceResource, instanceResOffset, totalInstancesSize);
D3D12AccStructPatchInfo patchInfo = rtHandler->GetAccStructPatchInfo();
D3D12AccStructPatchInfo patchInfo = rtManager->GetAccStructPatchInfo();
{
rdcarray<D3D12_RESOURCE_BARRIER> resBarriers;
@@ -1481,8 +1480,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DispatchRays(SerialiserType &se
// a reference to the lookup buffer used as well as a reference to the scratch buffer
// containing the patched shader records.
PatchedRayDispatch patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchRayDispatch(
Unwrap4(list), state.heaps, Desc);
GetResourceManager()->GetRTManager()->PatchRayDispatch(Unwrap4(list), state.heaps, Desc);
// restore state that would have been mutated by the patching process
Unwrap4(list)->SetComputeRootSignature(
@@ -1507,9 +1505,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DispatchRays(SerialiserType &se
// this call will copy the specified buffers containing shader records and patch them. We get
// a reference to the lookup buffer used as well as a reference to the scratch buffer
// containing the patched shader records.
PatchedRayDispatch patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchRayDispatch(
Unwrap4(pCommandList), state.heaps, Desc);
PatchedRayDispatch patchedDispatch = GetResourceManager()->GetRTManager()->PatchRayDispatch(
Unwrap4(pCommandList), state.heaps, Desc);
// restore state that would have been mutated by the patching process
Unwrap4(pCommandList)
@@ -1545,9 +1542,8 @@ void WrappedID3D12GraphicsCommandList::DispatchRays(_In_ const D3D12_DISPATCH_RA
// this call will copy the specified buffers containing shader records and patch them. We get a
// reference to the lookup buffer used as well as a reference to the scratch buffer containing the
// patched shader records.
PatchedRayDispatch patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchRayDispatch(
m_pList4, m_CaptureComputeState.heaps, *pDesc);
PatchedRayDispatch patchedDispatch = GetResourceManager()->GetRTManager()->PatchRayDispatch(
m_pList4, m_CaptureComputeState.heaps, *pDesc);
// restore state that would have been mutated by the patching process
m_pList4->SetComputeRootSignature(Unwrap(GetResourceManager()->GetCurrentAs<ID3D12RootSignature>(
@@ -4214,10 +4214,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
if(comSig->sig.raytraced)
{
PatchedRayDispatch patchedDispatch = {};
patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchIndirectRayDispatch(
Unwrap(pCommandList), state.heaps, comSig, MaxCommandCount, patched.first,
patched.second, pCountBuffer, CountBufferOffset);
patchedDispatch = GetResourceManager()->GetRTManager()->PatchIndirectRayDispatch(
Unwrap(pCommandList), state.heaps, comSig, MaxCommandCount, patched.first,
patched.second, pCountBuffer, CountBufferOffset);
argBuffer = patchedDispatch.resources.argumentBuffer->Resource();
argOffset = patchedDispatch.resources.argumentBuffer->Offset();
@@ -4315,10 +4314,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
if(comSig->sig.raytraced)
{
PatchedRayDispatch patchedDispatch = {};
patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchIndirectRayDispatch(
Unwrap(list), state.heaps, comSig, MaxCommandCount, patched.first, patched.second,
pCountBuffer, CountBufferOffset);
patchedDispatch = GetResourceManager()->GetRTManager()->PatchIndirectRayDispatch(
Unwrap(list), state.heaps, comSig, MaxCommandCount, patched.first, patched.second,
pCountBuffer, CountBufferOffset);
argBuffer = patchedDispatch.resources.argumentBuffer->Resource();
argOffset = patchedDispatch.resources.argumentBuffer->Offset();
@@ -4426,10 +4424,9 @@ void WrappedID3D12GraphicsCommandList::ExecuteIndirect(ID3D12CommandSignature *p
PatchedRayDispatch patchedDispatch = {};
if(((WrappedID3D12CommandSignature *)pCommandSignature)->sig.raytraced)
{
patchedDispatch =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PatchIndirectRayDispatch(
m_pList, m_CaptureComputeState.heaps, pCommandSignature, MaxCommandCount,
pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset);
patchedDispatch = GetResourceManager()->GetRTManager()->PatchIndirectRayDispatch(
m_pList, m_CaptureComputeState.heaps, pCommandSignature, MaxCommandCount, pArgumentBuffer,
ArgumentBufferOffset, pCountBuffer, CountBufferOffset);
argBuffer = patchedDispatch.resources.argumentBuffer->Resource();
argOffset = patchedDispatch.resources.argumentBuffer->Offset();
@@ -776,8 +776,8 @@ void WrappedID3D12CommandQueue::ExecuteCommandListsInternal(UINT NumCommandLists
// results are available, since we could submit a build on one queue and then a dependent
// build on another queue later once it's finished without any intermediate submissions on the
// first queue. For that reason we pass these to the RT handler to hold onto, and tick it
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->AddPendingASBuilds(
fence, m_RayFenceValue, pendingASBuildCallbacks);
GetResourceManager()->GetRTManager()->AddPendingASBuilds(fence, m_RayFenceValue,
pendingASBuildCallbacks);
// add the signal for those callbacks to wait on
HRESULT hr = m_pReal->Signal(fence, m_RayFenceValue++);
@@ -786,7 +786,7 @@ void WrappedID3D12CommandQueue::ExecuteCommandListsInternal(UINT NumCommandLists
}
// check AS builds now
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->CheckPendingASBuilds();
GetResourceManager()->GetRTManager()->CheckPendingASBuilds();
}
if(IsCaptureMode(m_State))
+4 -5
View File
@@ -2565,8 +2565,7 @@ bool WrappedID3D12Device::Serialise_BeginCaptureFrame(SerialiserType &ser)
m_InitialResourceStates = m_ResourceStates;
GetDebugManager()->PrepareExecuteIndirectPatching(m_OrigGPUAddresses);
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->PrepareRayDispatchBuffer(
&m_OrigGPUAddresses);
GetResourceManager()->GetRTManager()->PrepareRayDispatchBuffer(&m_OrigGPUAddresses);
}
std::map<ResourceId, SubresourceStateVector> initialStates;
@@ -2662,7 +2661,7 @@ void WrappedID3D12Device::StartFrameCapture(DeviceOwnedWindow devWnd)
GPUSyncAllQueues();
// wait until we've synced all queues to check for these
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->CheckPendingASBuilds();
GetResourceManager()->GetRTManager()->CheckPendingASBuilds();
GetResourceManager()->PrepareInitialContents();
@@ -4177,7 +4176,7 @@ void WrappedID3D12Device::CreateInternalResources()
}
}
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->CreateInternalResources();
GetResourceManager()->GetRTManager()->CreateInternalResources();
// we don't want replay-only shaders added in WrappedID3D12Shader to pollute the list of resources
WrappedID3D12Shader::InternalResources(true);
@@ -4276,7 +4275,7 @@ void WrappedID3D12Device::CreateInternalResources()
m_Replay->CreateResources();
WrappedID3D12Shader::InternalResources(false);
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->InitInternalResources();
GetResourceManager()->GetRTManager()->InitInternalResources();
}
void WrappedID3D12Device::DestroyInternalResources()
+2 -4
View File
@@ -1180,8 +1180,7 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(SerialiserType &ser, UIN
if(wrapped->sig.Flags & D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE)
wrapped->localRootSigIdx =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->RegisterLocalRootSig(
wrapped->sig);
GetResourceManager()->GetRTManager()->RegisterLocalRootSig(wrapped->sig);
{
StructuredSerialiser structuriser(ser.GetStructuredFile().chunks.back(), &GetChunkName);
@@ -1250,8 +1249,7 @@ HRESULT WrappedID3D12Device::CreateRootSignature(UINT nodeMask, const void *pBlo
if(wrapped->sig.Flags & D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE)
wrapped->localRootSigIdx =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->RegisterLocalRootSig(
wrapped->sig);
GetResourceManager()->GetRTManager()->RegisterLocalRootSig(wrapped->sig);
if(!m_BindlessResourceUseActive)
{
@@ -129,8 +129,7 @@ bool WrappedID3D12Device::Serialise_CreateRootSignatureFromSubobjectInLibrary(
if(wrapped->sig.Flags & D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE)
wrapped->localRootSigIdx =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->RegisterLocalRootSig(
wrapped->sig);
GetResourceManager()->GetRTManager()->RegisterLocalRootSig(wrapped->sig);
{
StructuredSerialiser structuriser(ser.GetStructuredFile().chunks.back(), &GetChunkName);
@@ -201,8 +200,7 @@ HRESULT WrappedID3D12Device::CreateRootSignatureFromSubobjectInLibrary(
if(wrapped->sig.Flags & D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE)
wrapped->localRootSigIdx =
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->RegisterLocalRootSig(
wrapped->sig);
GetResourceManager()->GetRTManager()->RegisterLocalRootSig(wrapped->sig);
if(!m_BindlessResourceUseActive)
{
@@ -175,8 +175,8 @@ bool WrappedID3D12Device::Serialise_CreateStateObject(SerialiserType &ser,
WrappedID3D12StateObject *wrapped = new WrappedID3D12StateObject(
GetResourceManager()->CreateDeferredHandle<ID3D12StateObject>(), true, this);
wrapped->exports = new D3D12ShaderExportDatabase(
pStateObject, GetResourceManager()->GetRaytracingResourceAndUtilHandler());
wrapped->exports =
new D3D12ShaderExportDatabase(pStateObject, GetResourceManager()->GetRTManager());
// TODO: Apply m_GlobalEXTUAV, m_GlobalEXTUAVSpace for processing extensions in the DXBC files?
@@ -286,8 +286,8 @@ WrappedID3D12Device::CreateStateObject(const D3D12_STATE_OBJECT_DESC *pDesc, REF
SCOPED_SERIALISE_CHUNK(D3D12Chunk::Device_CreateStateObject);
Serialise_CreateStateObject(ser, pDesc, riid, (void **)&wrapped);
wrapped->exports = new D3D12ShaderExportDatabase(
wrapped->GetResourceID(), GetResourceManager()->GetRaytracingResourceAndUtilHandler());
wrapped->exports = new D3D12ShaderExportDatabase(wrapped->GetResourceID(),
GetResourceManager()->GetRTManager());
wrapped->exports->SetObjectProperties(wrapped->GetProperties());
@@ -134,8 +134,8 @@ bool WrappedID3D12Device::Serialise_AddToStateObject(SerialiserType &ser,
// TODO: Apply m_GlobalEXTUAV, m_GlobalEXTUAVSpace for processing extensions in the DXBC files?
wrapped->exports = new D3D12ShaderExportDatabase(
pNewStateObject, GetResourceManager()->GetRaytracingResourceAndUtilHandler());
wrapped->exports =
new D3D12ShaderExportDatabase(pNewStateObject, GetResourceManager()->GetRTManager());
AddResource(pNewStateObject, ResourceType::PipelineState, "State Object");
DerivedResource(pStateObjectToGrowFrom, pNewStateObject);
@@ -250,8 +250,8 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12Device::AddToStateObject(
SCOPED_SERIALISE_CHUNK(D3D12Chunk::Device_AddToStateObject);
Serialise_AddToStateObject(ser, pAddition, pStateObjectToGrowFrom, riid, (void **)&wrapped);
wrapped->exports = new D3D12ShaderExportDatabase(
wrapped->GetResourceID(), GetResourceManager()->GetRaytracingResourceAndUtilHandler());
wrapped->exports = new D3D12ShaderExportDatabase(wrapped->GetResourceID(),
GetResourceManager()->GetRTManager());
wrapped->exports->SetObjectProperties(wrapped->GetProperties());
+3 -3
View File
@@ -409,7 +409,7 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res)
// get the size
{
D3D12GpuBuffer *ASQueryBuffer = GetRaytracingResourceAndUtilHandler()->ASQueryBuffer;
D3D12GpuBuffer *ASQueryBuffer = GetRTManager()->ASQueryBuffer;
list4 = Unwrap4(m_Device->GetInitialStateList());
@@ -440,7 +440,7 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res)
ASQueryBuffer->Unmap();
// no other copies are in flight because of the above sync so we can resize this
GetRaytracingResourceAndUtilHandler()->ResizeSerialisationBuffer(desc.Width);
GetRTManager()->ResizeSerialisationBuffer(desc.Width);
}
ID3D12Resource *copyDst = NULL;
@@ -456,7 +456,7 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res)
if(SUCCEEDED(hr))
{
D3D12GpuBuffer *ASSerialiseBuffer = GetRaytracingResourceAndUtilHandler()->ASSerialiseBuffer;
D3D12GpuBuffer *ASSerialiseBuffer = GetRTManager()->ASSerialiseBuffer;
list4->CopyRaytracingAccelerationStructure(
ASSerialiseBuffer->Address(), r->GetVirtualAddress(),
+19 -20
View File
@@ -691,8 +691,8 @@ D3D12Descriptor *DescriptorFromPortableHandle(D3D12ResourceManager *manager, Por
#define BARRIER_ASSERT(...)
#endif
D3D12RaytracingResourceAndUtilHandler::D3D12RaytracingResourceAndUtilHandler(
WrappedID3D12Device *device, D3D12GpuBufferAllocator &gpuBufferAllocator)
D3D12RTManager::D3D12RTManager(WrappedID3D12Device *device,
D3D12GpuBufferAllocator &gpuBufferAllocator)
: m_wrappedDevice(device),
m_cmdList(NULL),
m_cmdAlloc(NULL),
@@ -704,7 +704,7 @@ D3D12RaytracingResourceAndUtilHandler::D3D12RaytracingResourceAndUtilHandler(
{
}
void D3D12RaytracingResourceAndUtilHandler::CreateInternalResources()
void D3D12RTManager::CreateInternalResources()
{
if(m_wrappedDevice)
{
@@ -756,7 +756,7 @@ void D3D12RaytracingResourceAndUtilHandler::CreateInternalResources()
}
}
void D3D12RaytracingResourceAndUtilHandler::SyncGpuForRtWork()
void D3D12RTManager::SyncGpuForRtWork()
{
m_gpuSyncCounter++;
@@ -771,7 +771,7 @@ void D3D12RaytracingResourceAndUtilHandler::SyncGpuForRtWork()
WaitForSingleObject(m_gpuSyncHandle, 10000);
}
void D3D12RaytracingResourceAndUtilHandler::InitInternalResources()
void D3D12RTManager::InitInternalResources()
{
if(IsReplayMode(m_wrappedDevice->GetState()))
{
@@ -780,7 +780,7 @@ void D3D12RaytracingResourceAndUtilHandler::InitInternalResources()
InitRayDispatchPatchingResources();
}
void D3D12RaytracingResourceAndUtilHandler::ResizeSerialisationBuffer(UINT64 size)
void D3D12RTManager::ResizeSerialisationBuffer(UINT64 size)
{
if(!ASSerialiseBuffer || size > ASSerialiseBuffer->Size())
{
@@ -791,8 +791,8 @@ void D3D12RaytracingResourceAndUtilHandler::ResizeSerialisationBuffer(UINT64 siz
}
}
void D3D12RaytracingResourceAndUtilHandler::AddPendingASBuilds(
ID3D12Fence *fence, UINT64 waitValue, const rdcarray<std::function<bool()>> &callbacks)
void D3D12RTManager::AddPendingASBuilds(ID3D12Fence *fence, UINT64 waitValue,
const rdcarray<std::function<bool()>> &callbacks)
{
SCOPED_LOCK(m_PendingASBuildsLock);
for(const std::function<bool()> &cb : callbacks)
@@ -802,7 +802,7 @@ void D3D12RaytracingResourceAndUtilHandler::AddPendingASBuilds(
}
}
void D3D12RaytracingResourceAndUtilHandler::CheckPendingASBuilds()
void D3D12RTManager::CheckPendingASBuilds()
{
std::map<ID3D12Fence *, UINT64> fenceValues;
SCOPED_LOCK(m_PendingASBuildsLock);
@@ -828,9 +828,9 @@ void D3D12RaytracingResourceAndUtilHandler::CheckPendingASBuilds()
m_PendingASBuilds.removeIf([](const PendingASBuild &build) { return build.fence == NULL; });
}
PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchRayDispatch(
ID3D12GraphicsCommandList4 *unwrappedCmd, rdcarray<ResourceId> heaps,
const D3D12_DISPATCH_RAYS_DESC &desc)
PatchedRayDispatch D3D12RTManager::PatchRayDispatch(ID3D12GraphicsCommandList4 *unwrappedCmd,
rdcarray<ResourceId> heaps,
const D3D12_DISPATCH_RAYS_DESC &desc)
{
PatchedRayDispatch ret = {};
@@ -1005,7 +1005,7 @@ PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchRayDispatch(
return ret;
}
PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchIndirectRayDispatch(
PatchedRayDispatch D3D12RTManager::PatchIndirectRayDispatch(
ID3D12GraphicsCommandList *unwrappedCmd, rdcarray<ResourceId> heaps,
ID3D12CommandSignature *pCommandSignature, UINT MaxCommandCount, ID3D12Resource *pArgumentBuffer,
UINT64 ArgumentBufferOffset, ID3D12Resource *pCountBuffer, UINT64 CountBufferOffset)
@@ -1162,8 +1162,7 @@ PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchIndirectRayDispat
return ret;
}
void D3D12RaytracingResourceAndUtilHandler::PrepareRayDispatchBuffer(
const GPUAddressRangeTracker *origAddresses)
void D3D12RTManager::PrepareRayDispatchBuffer(const GPUAddressRangeTracker *origAddresses)
{
SCOPED_LOCK(m_LookupBufferLock);
if(m_LookupBufferDirty || origAddresses)
@@ -1266,7 +1265,7 @@ void D3D12RaytracingResourceAndUtilHandler::PrepareRayDispatchBuffer(
}
}
void D3D12RaytracingResourceAndUtilHandler::InitRayDispatchPatchingResources()
void D3D12RTManager::InitRayDispatchPatchingResources()
{
D3D12ShaderCache *shaderCache = m_wrappedDevice->GetShaderCache();
@@ -1560,7 +1559,7 @@ void D3D12RaytracingResourceAndUtilHandler::InitRayDispatchPatchingResources()
}
}
void D3D12RaytracingResourceAndUtilHandler::InitReplayBlasPatchingResources()
void D3D12RTManager::InitReplayBlasPatchingResources()
{
// Root Signature
rdcarray<D3D12_ROOT_PARAMETER1> rootParameters;
@@ -1641,7 +1640,7 @@ void D3D12RaytracingResourceAndUtilHandler::InitReplayBlasPatchingResources()
}
}
uint32_t D3D12RaytracingResourceAndUtilHandler::RegisterLocalRootSig(const D3D12RootSignature &sig)
uint32_t D3D12RTManager::RegisterLocalRootSig(const D3D12RootSignature &sig)
{
rdcarray<uint32_t> patchOffsets;
uint32_t offset = D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES;
@@ -1686,7 +1685,7 @@ uint32_t D3D12RaytracingResourceAndUtilHandler::RegisterLocalRootSig(const D3D12
return idx;
}
void D3D12RaytracingResourceAndUtilHandler::RegisterExportDatabase(D3D12ShaderExportDatabase *db)
void D3D12RTManager::RegisterExportDatabase(D3D12ShaderExportDatabase *db)
{
SCOPED_LOCK(m_LookupBufferLock);
m_ExportDatabases.push_back(db);
@@ -1694,7 +1693,7 @@ void D3D12RaytracingResourceAndUtilHandler::RegisterExportDatabase(D3D12ShaderEx
m_LookupBufferDirty = true;
}
void D3D12RaytracingResourceAndUtilHandler::UnregisterExportDatabase(D3D12ShaderExportDatabase *db)
void D3D12RTManager::UnregisterExportDatabase(D3D12ShaderExportDatabase *db)
{
SCOPED_LOCK(m_LookupBufferLock);
m_ExportDatabases.removeOne(db);
+7 -12
View File
@@ -1025,11 +1025,10 @@ struct PatchedRayDispatch
struct D3D12ShaderExportDatabase;
class D3D12RaytracingResourceAndUtilHandler
class D3D12RTManager
{
public:
D3D12RaytracingResourceAndUtilHandler(WrappedID3D12Device *device,
D3D12GpuBufferAllocator &gpuBufferAllocator);
D3D12RTManager(WrappedID3D12Device *device, D3D12GpuBufferAllocator &gpuBufferAllocator);
void CreateInternalResources();
@@ -1040,7 +1039,7 @@ public:
D3D12AccStructPatchInfo GetAccStructPatchInfo() const { return m_accStructPatchInfo; }
void SyncGpuForRtWork();
~D3D12RaytracingResourceAndUtilHandler()
~D3D12RTManager()
{
SAFE_RELEASE(m_cmdList);
SAFE_RELEASE(m_cmdAlloc);
@@ -1152,11 +1151,10 @@ public:
D3D12ResourceManager(CaptureState &state, WrappedID3D12Device *dev)
: ResourceManager(state), m_Device(dev), m_GPUBufferAllocator(dev)
{
m_raytracingResourceManager =
new D3D12RaytracingResourceAndUtilHandler(m_Device, m_GPUBufferAllocator);
m_RTManager = new D3D12RTManager(m_Device, m_GPUBufferAllocator);
}
~D3D12ResourceManager() { SAFE_DELETE(m_raytracingResourceManager); }
~D3D12ResourceManager() { SAFE_DELETE(m_RTManager); }
template <class T>
T *GetLiveAs(ResourceId id, bool optional = false)
@@ -1184,10 +1182,7 @@ public:
void ApplyBarriers(BarrierSet &barriers, std::map<ResourceId, SubresourceStateVector> &states);
D3D12RaytracingResourceAndUtilHandler *GetRaytracingResourceAndUtilHandler() const
{
return m_raytracingResourceManager;
}
D3D12RTManager *GetRTManager() const { return m_RTManager; }
D3D12GpuBufferAllocator &GetGPUBufferAllocator() { return m_GPUBufferAllocator; }
@@ -1218,7 +1213,7 @@ private:
void Apply_InitialState(ID3D12DeviceChild *live, const D3D12InitialContents &data);
WrappedID3D12Device *m_Device;
D3D12RaytracingResourceAndUtilHandler *m_raytracingResourceManager;
D3D12RTManager *m_RTManager;
D3D12GpuBufferAllocator m_GPUBufferAllocator;
// dummy handle to use - starting from near highest valid pointer to minimise risk of overlap with real handles
+1 -2
View File
@@ -839,8 +839,7 @@ void WrappedID3D12PipelineState::ProcessDescriptorAccess()
}
}
D3D12ShaderExportDatabase::D3D12ShaderExportDatabase(ResourceId id,
D3D12RaytracingResourceAndUtilHandler *rayManager)
D3D12ShaderExportDatabase::D3D12ShaderExportDatabase(ResourceId id, D3D12RTManager *rayManager)
: RefCounter12(NULL), objectOriginalId(id), m_RayManager(rayManager)
{
m_RayManager->RegisterExportDatabase(this);
+2 -2
View File
@@ -1036,7 +1036,7 @@ typedef WrappedID3D12PipelineState::ShaderEntry WrappedID3D12Shader;
struct D3D12ShaderExportDatabase : public RefCounter12<IUnknown>
{
public:
D3D12ShaderExportDatabase(ResourceId id, D3D12RaytracingResourceAndUtilHandler *rayManager);
D3D12ShaderExportDatabase(ResourceId id, D3D12RTManager *rayManager);
~D3D12ShaderExportDatabase();
void SetObjectProperties(ID3D12StateObjectProperties *obj) { m_StateObjectProps = obj; }
@@ -1085,7 +1085,7 @@ private:
rdcarray<D3D12ShaderExportDatabase *> parents;
ID3D12StateObjectProperties *m_StateObjectProps = NULL;
D3D12RaytracingResourceAndUtilHandler *m_RayManager = NULL;
D3D12RTManager *m_RayManager = NULL;
struct ExportLookup
{