mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
rsx/util: Add simple consistent hash function
rsx/vk/shaders_cache: Move vp control mask to dynamic state rsx/vk/gl: adds a shader cache for GL. Also Separates pipeline storage for each backend rsx: Add more texture state variables to the cache
This commit is contained in:
parent
c7dca1dbef
commit
00c6a589a5
13 changed files with 150 additions and 66 deletions
|
@ -73,4 +73,32 @@ struct GLTraits
|
|||
|
||||
class GLProgramBuffer : public program_state_cache<GLTraits>
|
||||
{
|
||||
public:
|
||||
|
||||
u64 get_hash(void*&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 get_hash(RSXVertexProgram &prog)
|
||||
{
|
||||
return program_hash_util::vertex_program_hash()(prog);
|
||||
}
|
||||
|
||||
u64 get_hash(RSXFragmentProgram &prog)
|
||||
{
|
||||
return program_hash_util::fragment_program_hash()(prog);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void add_pipeline_entry(RSXVertexProgram &vp, RSXFragmentProgram &fp, void* &props, Args&& ...args)
|
||||
{
|
||||
vp.skip_vertex_input_check = true;
|
||||
getGraphicPipelineState(vp, fp, props, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
bool check_cache_missed() const
|
||||
{
|
||||
return m_cache_miss_flag;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue