Multithreadded Shadergen: Second pass over Pixel Shadergen.

Note: It's not 100% perfect, as some of the GPU capablities leak into the
pixel shader UID.

Currently our UIDs don't get exported, so there is no issue. But someone
might want to fix this in the future.
This commit is contained in:
Scott Mansell
2016-01-17 01:41:26 +13:00
parent 1a831cfc7d
commit 24e5d21780
6 changed files with 238 additions and 188 deletions

View File

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