[D3D12] Fix render target reference leak
This commit is contained in:
parent
ec41dfc995
commit
51c2c9e5f2
|
@ -149,9 +149,7 @@ class D3D12RenderTargetCache final : public RenderTargetCache {
|
||||||
descriptor_load_separate_(std::move(descriptor_load_separate)),
|
descriptor_load_separate_(std::move(descriptor_load_separate)),
|
||||||
descriptor_srv_(std::move(descriptor_srv)),
|
descriptor_srv_(std::move(descriptor_srv)),
|
||||||
descriptor_srv_stencil_(std::move(descriptor_srv_stencil)),
|
descriptor_srv_stencil_(std::move(descriptor_srv_stencil)),
|
||||||
resource_state_(resource_state) {
|
resource_state_(resource_state) {}
|
||||||
resource_->AddRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
ID3D12Resource* resource() const { return resource_.Get(); }
|
ID3D12Resource* resource() const { return resource_.Get(); }
|
||||||
const ui::d3d12::D3D12CpuDescriptorPool::Descriptor& descriptor_draw()
|
const ui::d3d12::D3D12CpuDescriptorPool::Descriptor& descriptor_draw()
|
||||||
|
|
Loading…
Reference in New Issue