mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-13 19:49:21 +00:00
Polish shader uid checking.
This commit is contained in:
parent
77dae3496a
commit
02afec5076
13 changed files with 120 additions and 43 deletions
|
@ -25,6 +25,7 @@ namespace DX11 {
|
|||
VertexShaderCache::VSCache VertexShaderCache::vshaders;
|
||||
const VertexShaderCache::VSCacheEntry *VertexShaderCache::last_entry;
|
||||
VertexShaderUid VertexShaderCache::last_uid;
|
||||
UidChecker<VertexShaderUid,VertexShaderCode> VertexShaderCache::vertex_uid_checker;
|
||||
|
||||
static ID3D11VertexShader* SimpleVertexShader = NULL;
|
||||
static ID3D11VertexShader* ClearVertexShader = NULL;
|
||||
|
@ -174,6 +175,7 @@ void VertexShaderCache::Clear()
|
|||
for (VSCache::iterator iter = vshaders.begin(); iter != vshaders.end(); ++iter)
|
||||
iter->second.Destroy();
|
||||
vshaders.clear();
|
||||
vertex_uid_checker.Invalidate();
|
||||
|
||||
last_entry = NULL;
|
||||
}
|
||||
|
@ -197,6 +199,13 @@ bool VertexShaderCache::SetShader(u32 components)
|
|||
{
|
||||
VertexShaderUid uid;
|
||||
GetVertexShaderUid(uid, components, API_D3D11);
|
||||
if (g_ActiveConfig.bEnableShaderDebugging)
|
||||
{
|
||||
VertexShaderCode code;
|
||||
GenerateVertexShaderCode(code, components, API_D3D11);
|
||||
vertex_uid_checker.AddToIndexAndCheck(code, uid, "Vertex", "v");
|
||||
}
|
||||
|
||||
if (last_entry)
|
||||
{
|
||||
if (uid == last_uid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue