mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 22:55:41 +00:00
Defer creating RT internal resources until after creation
* This will allow us to wrap the resources which can be useful for self- introspection
This commit is contained in:
@@ -4045,6 +4045,8 @@ void WrappedID3D12Device::CreateInternalResources()
|
||||
}
|
||||
}
|
||||
|
||||
GetResourceManager()->GetRaytracingResourceAndUtilHandler()->CreateInternalResources();
|
||||
|
||||
// we don't want replay-only shaders added in WrappedID3D12Shader to pollute the list of resources
|
||||
WrappedID3D12Shader::InternalResources(true);
|
||||
|
||||
|
||||
@@ -694,6 +694,10 @@ D3D12RaytracingResourceAndUtilHandler::D3D12RaytracingResourceAndUtilHandler(Wra
|
||||
m_gpuFence(NULL),
|
||||
m_gpuSyncHandle(NULL),
|
||||
m_gpuSyncCounter(0u)
|
||||
{
|
||||
}
|
||||
|
||||
void D3D12RaytracingResourceAndUtilHandler::CreateInternalResources()
|
||||
{
|
||||
if(m_wrappedDevice)
|
||||
{
|
||||
@@ -1238,7 +1242,7 @@ void D3D12RaytracingResourceAndUtilHandler::InitRayDispatchPatchingResources()
|
||||
(void **)&m_RayPatchingData.rootSig);
|
||||
|
||||
if(!SUCCEEDED(result))
|
||||
RDCERR("Unable to create root signature for patching the BLAS");
|
||||
RDCERR("Unable to create root signature for dispatch patching");
|
||||
|
||||
// PipelineState
|
||||
ID3DBlob *shader = NULL;
|
||||
@@ -1259,7 +1263,11 @@ void D3D12RaytracingResourceAndUtilHandler::InitRayDispatchPatchingResources()
|
||||
&pipeline, __uuidof(ID3D12PipelineState), (void **)&m_RayPatchingData.pipe);
|
||||
|
||||
if(!SUCCEEDED(result))
|
||||
RDCERR("Unable to create pipeline for patching the BLAS");
|
||||
RDCERR("Unable to create pipeline for dispatch patching");
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Failed to get shader for dispatch patching");
|
||||
}
|
||||
|
||||
SAFE_RELEASE(rootSig);
|
||||
|
||||
@@ -1084,6 +1084,8 @@ class D3D12RaytracingResourceAndUtilHandler
|
||||
public:
|
||||
D3D12RaytracingResourceAndUtilHandler(WrappedID3D12Device *device);
|
||||
|
||||
void CreateInternalResources();
|
||||
|
||||
ID3D12GraphicsCommandListX *GetCmd() const { return m_cmdList; }
|
||||
ID3D12CommandAllocator *GetCmdAlloc() const { return m_cmdAlloc; }
|
||||
ID3D12CommandQueue *GetCmdQueue() const { return m_cmdQueue; }
|
||||
|
||||
Reference in New Issue
Block a user