mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Improve the shader UID debugging stuff and merge it to VideoCommon, effectively enabling it in D3D9 and D3D11 as well.
This commit is contained in:
@ -205,6 +205,7 @@ bool VertexShaderCache::SetShader(u32 components)
|
||||
if (uid == last_vertex_shader_uid && vshaders[uid].frameCount == frameCount)
|
||||
{
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
|
||||
ValidateVertexShaderIDs(API_D3D11, vshaders[uid].safe_uid, vshaders[uid].code, components);
|
||||
return (vshaders[uid].shader != NULL);
|
||||
}
|
||||
|
||||
@ -218,6 +219,7 @@ bool VertexShaderCache::SetShader(u32 components)
|
||||
last_entry = &entry;
|
||||
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
|
||||
ValidateVertexShaderIDs(API_D3D11, entry.safe_uid, entry.code, components);
|
||||
return (entry.shader != NULL);
|
||||
}
|
||||
|
||||
@ -235,10 +237,17 @@ bool VertexShaderCache::SetShader(u32 components)
|
||||
g_vs_disk_cache.Append(uid, pbytecode->Data(), pbytecode->Size());
|
||||
g_vs_disk_cache.Sync();
|
||||
|
||||
bool result = InsertByteCode(uid, pbytecode);
|
||||
bool success = InsertByteCode(uid, pbytecode);
|
||||
pbytecode->Release();
|
||||
|
||||
if (success)
|
||||
{
|
||||
vshaders[uid].code = code;
|
||||
GetSafeVertexShaderId(&vshaders[uid].safe_uid, components);
|
||||
}
|
||||
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
|
||||
return result;
|
||||
return success;
|
||||
}
|
||||
|
||||
bool VertexShaderCache::InsertByteCode(const VERTEXSHADERUID &uid, D3DBlob* bcodeblob)
|
||||
|
Reference in New Issue
Block a user