mirror of https://github.com/RPCS3/rpcs3.git
d3d12: Some cleaning
This commit is contained in:
parent
c6e2f070ee
commit
d2889786a2
|
@ -30,6 +30,9 @@ size_t getFPBinarySize(void *ptr)
|
||||||
PipelineStateObjectCache::PipelineStateObjectCache() : currentShaderId(0)
|
PipelineStateObjectCache::PipelineStateObjectCache() : currentShaderId(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
PipelineStateObjectCache::~PipelineStateObjectCache()
|
||||||
|
{}
|
||||||
|
|
||||||
bool PipelineStateObjectCache::SearchFp(const RSXFragmentProgram& rsx_fp, Shader& shader)
|
bool PipelineStateObjectCache::SearchFp(const RSXFragmentProgram& rsx_fp, Shader& shader)
|
||||||
{
|
{
|
||||||
binary2FS::const_iterator It = cacheFS.find(vm::get_ptr<void>(rsx_fp.addr));
|
binary2FS::const_iterator It = cacheFS.find(vm::get_ptr<void>(rsx_fp.addr));
|
||||||
|
|
|
@ -138,6 +138,10 @@ struct FragmentProgramCompare
|
||||||
typedef std::unordered_map<void *, Shader, HashVertexProgram, VertexProgramCompare> binary2VS;
|
typedef std::unordered_map<void *, Shader, HashVertexProgram, VertexProgramCompare> binary2VS;
|
||||||
typedef std::unordered_map<void *, Shader, HashFragmentProgram, FragmentProgramCompare> binary2FS;
|
typedef std::unordered_map<void *, Shader, HashFragmentProgram, FragmentProgramCompare> 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
|
class PipelineStateObjectCache
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -155,6 +159,7 @@ private:
|
||||||
void Add(ID3D12PipelineState *prog, Shader& fp, Shader& vp);
|
void Add(ID3D12PipelineState *prog, Shader& fp, Shader& vp);
|
||||||
public:
|
public:
|
||||||
PipelineStateObjectCache();
|
PipelineStateObjectCache();
|
||||||
|
~PipelineStateObjectCache();
|
||||||
ID3D12PipelineState *getGraphicPipelineState(ID3D12Device *device, RSXVertexProgram *vertexShader, RSXFragmentProgram *fragmentShader);
|
ID3D12PipelineState *getGraphicPipelineState(ID3D12Device *device, RSXVertexProgram *vertexShader, RSXFragmentProgram *fragmentShader);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue