diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index ecc80420f..771fdcfd8 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -366,8 +366,7 @@ bool D3D12CommandProcessor::SetupContext() { return false; } - pipeline_cache_ = - std::make_unique(this, register_file_, context); + pipeline_cache_ = std::make_unique(this, register_file_); return true; } diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index 08a0dcaa7..1a50c75cb 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -25,11 +25,8 @@ namespace gpu { namespace d3d12 { PipelineCache::PipelineCache(D3D12CommandProcessor* command_processor, - RegisterFile* register_file, - ui::d3d12::D3D12Context* context) - : command_processor_(command_processor), - register_file_(register_file), - context_(context) { + RegisterFile* register_file) + : command_processor_(command_processor), register_file_(register_file) { shader_translator_.reset(new HlslShaderTranslator()); // Set pipeline state description values we never change. @@ -633,7 +630,8 @@ PipelineCache::Pipeline* PipelineCache::GetPipeline(uint64_t hash_key) { // TODO(Triang3l): Cache create pipelines using CachedPSO. - auto device = context_->GetD3D12Provider()->GetDevice(); + auto device = + command_processor_->GetD3D12Context()->GetD3D12Provider()->GetDevice(); ID3D12PipelineState* state; if (FAILED(device->CreateGraphicsPipelineState(&update_desc_, IID_PPV_ARGS(&state)))) { diff --git a/src/xenia/gpu/d3d12/pipeline_cache.h b/src/xenia/gpu/d3d12/pipeline_cache.h index 56c158a73..5f4cded64 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.h +++ b/src/xenia/gpu/d3d12/pipeline_cache.h @@ -18,7 +18,6 @@ #include "xenia/gpu/register_file.h" #include "xenia/gpu/shader_translator.h" #include "xenia/gpu/xenos.h" -#include "xenia/ui/d3d12/d3d12_context.h" namespace xe { namespace gpu { @@ -35,7 +34,7 @@ class PipelineCache { }; PipelineCache(D3D12CommandProcessor* command_processor, - RegisterFile* register_file, ui::d3d12::D3D12Context* context); + RegisterFile* register_file); ~PipelineCache(); void Shutdown(); @@ -80,7 +79,6 @@ class PipelineCache { D3D12CommandProcessor* command_processor_; RegisterFile* register_file_; - ui::d3d12::D3D12Context* context_; // Reusable shader translator. std::unique_ptr shader_translator_ = nullptr;