mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 16:36:31 +00:00
If any list executed contains an ExecuteIndirect, ref all buffers
* Since buffers can be referenced indirectly on the GPU by their GPU address, there's no feasible way to know if the buffer is actually used or not. If an ExecuteIndirect is seen at all we just have to pessimistically include all buffers. * Generally textures take up the bulk of VRAM usage, so this likely won't be too bad.
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
|
||||
std::vector<GPUAddressRange> WrappedID3D12Resource::m_Addresses;
|
||||
std::map<ResourceId, WrappedID3D12Resource *> WrappedID3D12Resource::m_List;
|
||||
|
||||
std::map<WrappedID3D12PipelineState::DXBCKey, WrappedID3D12PipelineState::ShaderEntry *>
|
||||
WrappedID3D12PipelineState::m_Shaders;
|
||||
|
||||
@@ -373,6 +372,13 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12Resource::WriteToSubresource(UINT DstSubr
|
||||
return m_pReal->WriteToSubresource(DstSubresource, pDstBox, pSrcData, SrcRowPitch, SrcDepthPitch);
|
||||
}
|
||||
|
||||
void WrappedID3D12Resource::RefBuffers(D3D12ResourceManager *rm)
|
||||
{
|
||||
// only buffers go into m_Addresses
|
||||
for(size_t i = 0; i < m_Addresses.size(); i++)
|
||||
rm->MarkResourceFrameReferenced(m_Addresses[i].id, eFrameRef_Read);
|
||||
}
|
||||
|
||||
WrappedID3D12DescriptorHeap::WrappedID3D12DescriptorHeap(ID3D12DescriptorHeap *real,
|
||||
WrappedID3D12Device *device,
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC &desc)
|
||||
|
||||
Reference in New Issue
Block a user