From 84f8ebd95fc70bc3482a53f31d5ebcc5266bb4b7 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 5 Sep 2017 23:33:15 +1000 Subject: VideoBackends: Clear uid bits that are unused for the current backend Currently, this is only the logic op bit, but this will be extended to the framebuffer fetch/blend modes. In the future, when/if we move to VideoCommon pipelines, this state will be part of the pipeline UID anyway, and we can mask it out in the backend by using a two-level map, so the shaders/programs are shared. --- Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp') diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 6e91717ed5..5617a928a9 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -231,6 +231,7 @@ SHADER* ProgramShaderCache::SetShader(u32 primitive_type, const GLVertexFormat* uid.puid = GetPixelShaderUid(); uid.vuid = GetVertexShaderUid(); uid.guid = GetGeometryShaderUid(primitive_type); + ClearUnusedPixelShaderUidBits(APIType::OpenGL, &uid.puid); // Check if the shader is already set if (last_entry && uid == last_uid) @@ -298,6 +299,7 @@ SHADER* ProgramShaderCache::SetUberShader(u32 primitive_type, const GLVertexForm uid.puid = UberShader::GetPixelShaderUid(); uid.vuid = UberShader::GetVertexShaderUid(); uid.guid = GetGeometryShaderUid(primitive_type); + UberShader::ClearUnusedPixelShaderUidBits(APIType::OpenGL, &uid.puid); // We need to use the ubershader vertex format with all attributes enabled. // Otherwise, the NV driver can generate variants for the vertex shaders. -- cgit v1.2.3