mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-16 07:11:40 +00:00
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.
This commit is contained in:
parent
6d32cce2f5
commit
84f8ebd95f
7 changed files with 30 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue