From d2889786a224b4416d1223f6441cb4245fb32b1f Mon Sep 17 00:00:00 2001 From: vlj Date: Mon, 11 May 2015 19:18:02 +0200 Subject: [PATCH] d3d12: Some cleaning --- rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp | 3 +++ rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp index af1f7d9aa9..e7010aee3a 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp @@ -30,6 +30,9 @@ size_t getFPBinarySize(void *ptr) PipelineStateObjectCache::PipelineStateObjectCache() : currentShaderId(0) {} +PipelineStateObjectCache::~PipelineStateObjectCache() +{} + bool PipelineStateObjectCache::SearchFp(const RSXFragmentProgram& rsx_fp, Shader& shader) { binary2FS::const_iterator It = cacheFS.find(vm::get_ptr(rsx_fp.addr)); diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h index 81aca20d00..2b8edf061a 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h @@ -138,6 +138,10 @@ struct FragmentProgramCompare typedef std::unordered_map binary2VS; typedef std::unordered_map binary2FS; +/** + * Cache for shader blobs and Pipeline state object + * The class is responsible for creating the object so the state only has to call getGraphicPipelineState + */ class PipelineStateObjectCache { private: @@ -155,6 +159,7 @@ private: void Add(ID3D12PipelineState *prog, Shader& fp, Shader& vp); public: PipelineStateObjectCache(); + ~PipelineStateObjectCache(); ID3D12PipelineState *getGraphicPipelineState(ID3D12Device *device, RSXVertexProgram *vertexShader, RSXFragmentProgram *fragmentShader); };