VideoCommon: return code/uid from shader gens

rather than passing in non-const references
This commit is contained in:
Tillmann Karras
2015-11-03 03:47:05 +01:00
parent c04358fbe2
commit 71d1eb3c31
10 changed files with 48 additions and 60 deletions

View File

@ -186,12 +186,10 @@ void VertexShaderCache::Shutdown()
bool VertexShaderCache::SetShader()
{
VertexShaderUid uid;
GetVertexShaderUid(uid, API_D3D);
VertexShaderUid uid = GetVertexShaderUid(API_D3D);
if (g_ActiveConfig.bEnableShaderDebugging)
{
ShaderCode code;
GenerateVertexShaderCode(code, API_D3D);
ShaderCode code = GenerateVertexShaderCode(API_D3D);
vertex_uid_checker.AddToIndexAndCheck(code, uid, "Vertex", "v");
}
@ -216,8 +214,7 @@ bool VertexShaderCache::SetShader()
return (entry.shader != nullptr);
}
ShaderCode code;
GenerateVertexShaderCode(code, API_D3D);
ShaderCode code = GenerateVertexShaderCode(API_D3D);
D3DBlob* pbytecode = nullptr;
D3D::CompileVertexShader(code.GetBuffer(), &pbytecode);