mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
d3d12: Some cleaning
This commit is contained in:
parent
c6e2f070ee
commit
d2889786a2
2 changed files with 8 additions and 0 deletions
|
@ -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<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, 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
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue