mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
VideoCommon: return code/uid from shader gens
rather than passing in non-const references
This commit is contained in:
parent
c04358fbe2
commit
71d1eb3c31
10 changed files with 48 additions and 60 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue