From 88784101c872f2cf72b98bd713af75808e74676a Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 22 May 2022 14:56:22 +0300 Subject: [PATCH] [D3D12] Remove PipelineCache::ClearCache leftovers --- src/xenia/gpu/d3d12/d3d12_command_processor.cc | 18 ++---------------- src/xenia/gpu/d3d12/d3d12_command_processor.h | 3 --- src/xenia/gpu/d3d12/pipeline_cache.cc | 1 - 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index 8f7f6d7b2..81f7c4c28 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -744,18 +744,6 @@ void D3D12CommandProcessor::SetPrimitiveTopology( } } -void D3D12CommandProcessor::NotifyShaderBindingsLayoutUIDsInvalidated() { - if (bindless_resources_used_) { - cbuffer_binding_descriptor_indices_vertex_.up_to_date = false; - cbuffer_binding_descriptor_indices_pixel_.up_to_date = false; - } else { - bindful_textures_written_vertex_ = false; - bindful_textures_written_pixel_ = false; - bindful_samplers_written_vertex_ = false; - bindful_samplers_written_pixel_ = false; - } -} - std::string D3D12CommandProcessor::GetWindowTitleText() const { std::ostringstream title; title << "Direct3D 12"; @@ -3045,10 +3033,8 @@ bool D3D12CommandProcessor::EndSubmission(bool is_swap) { texture_cache_->ClearCache(); - for (auto it : root_signatures_bindful_) { - it.second->Release(); - } - root_signatures_bindful_.clear(); + // Not clearing the root signatures as they're referenced by pipelines, + // which are not destroyed. primitive_processor_->ClearCache(); diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.h b/src/xenia/gpu/d3d12/d3d12_command_processor.h index 0b1e8fa53..24d23cce9 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.h +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.h @@ -197,9 +197,6 @@ class D3D12CommandProcessor : public CommandProcessor { void SetStencilReference(uint32_t stencil_ref); void SetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY primitive_topology); - // For the pipeline cache to call when binding layout UIDs may be reused. - void NotifyShaderBindingsLayoutUIDsInvalidated(); - // Returns the text to display in the GPU backend name in the window title. std::string GetWindowTitleText() const; diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index 9b6cd845b..a42c4e9fb 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -203,7 +203,6 @@ void PipelineCache::Shutdown() { COUNT_profile_set("gpu/pipeline_cache/pipelines", 0); // Destroy all shaders. - command_processor_.NotifyShaderBindingsLayoutUIDsInvalidated(); if (bindless_resources_used_) { bindless_sampler_layout_map_.clear(); bindless_sampler_layouts_.clear();