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

@ -190,12 +190,10 @@ void GeometryShaderCache::Shutdown()
bool GeometryShaderCache::SetShader(u32 primitive_type)
{
GeometryShaderUid uid;
GetGeometryShaderUid(uid, primitive_type, API_D3D);
GeometryShaderUid uid = GetGeometryShaderUid(primitive_type, API_D3D);
if (g_ActiveConfig.bEnableShaderDebugging)
{
ShaderCode code;
GenerateGeometryShaderCode(code, primitive_type, API_D3D);
ShaderCode code = GenerateGeometryShaderCode(primitive_type, API_D3D);
geometry_uid_checker.AddToIndexAndCheck(code, uid, "Geometry", "g");
}
@ -231,8 +229,7 @@ bool GeometryShaderCache::SetShader(u32 primitive_type)
}
// Need to compile a new shader
ShaderCode code;
GenerateGeometryShaderCode(code, primitive_type, API_D3D);
ShaderCode code = GenerateGeometryShaderCode(primitive_type, API_D3D);
D3DBlob* pbytecode;
if (!D3D::CompileGeometryShader(code.GetBuffer(), &pbytecode))