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

@ -527,12 +527,10 @@ void PixelShaderCache::Shutdown()
bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode)
{
PixelShaderUid uid;
GetPixelShaderUid(uid, dstAlphaMode, API_D3D);
PixelShaderUid uid = GetPixelShaderUid(dstAlphaMode, API_D3D);
if (g_ActiveConfig.bEnableShaderDebugging)
{
ShaderCode code;
GeneratePixelShaderCode(code, dstAlphaMode, API_D3D);
ShaderCode code = GeneratePixelShaderCode(dstAlphaMode, API_D3D);
pixel_uid_checker.AddToIndexAndCheck(code, uid, "Pixel", "p");
}
@ -561,8 +559,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode)
}
// Need to compile a new shader
ShaderCode code;
GeneratePixelShaderCode(code, dstAlphaMode, API_D3D);
ShaderCode code = GeneratePixelShaderCode(dstAlphaMode, API_D3D);
D3DBlob* pbytecode;
if (!D3D::CompilePixelShader(code.GetBuffer(), &pbytecode))