mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[dxso] Don't create shader object for redundant PS permutations
This commit is contained in:
parent
76ddd2a35a
commit
0eaad2eb5b
@ -90,7 +90,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
pDevice->GetDXVKDevice()->registerShader(m_shaders[0]);
|
pDevice->GetDXVKDevice()->registerShader(m_shaders[0]);
|
||||||
|
|
||||||
if (m_shaders[1] != nullptr)
|
if (m_shaders[1] != nullptr && m_shaders[1] != m_shaders[0])
|
||||||
pDevice->GetDXVKDevice()->registerShader(m_shaders[1]);
|
pDevice->GetDXVKDevice()->registerShader(m_shaders[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +236,10 @@ namespace dxvk {
|
|||||||
if (m_ps.specularColorIn)
|
if (m_ps.specularColorIn)
|
||||||
m_module.decorate(m_ps.specularColorIn, spv::DecorationFlat);
|
m_module.decorate(m_ps.specularColorIn, spv::DecorationFlat);
|
||||||
|
|
||||||
permutations[D3D9ShaderPermutations::FlatShade] = compileShader();
|
if (m_ps.diffuseColorIn || m_ps.specularColorIn)
|
||||||
|
permutations[D3D9ShaderPermutations::FlatShade] = compileShader();
|
||||||
|
else
|
||||||
|
permutations[D3D9ShaderPermutations::FlatShade] = permutations[D3D9ShaderPermutations::None];
|
||||||
}
|
}
|
||||||
|
|
||||||
return permutations;
|
return permutations;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user