mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-04 10:25:17 +02:00
[dxvk] Don't create GPL pipeline if we need to patch the vertex shader
Works around a game bug in Kingdom Come Deliverance and silences a validation error.
This commit is contained in:
parent
3453732bba
commit
9573c389de
@ -1176,6 +1176,17 @@ namespace dxvk {
|
||||
&& !state.rs.depthClipEnable())
|
||||
return false;
|
||||
|
||||
// If the vertex shader uses any input locations not provided by
|
||||
// the input layout, we need to patch the shader.
|
||||
uint32_t vsInputMask = m_shaders.vs->info().inputMask;
|
||||
uint32_t ilAttributeMask = 0u;
|
||||
|
||||
for (uint32_t i = 0; i < state.il.attributeCount(); i++)
|
||||
ilAttributeMask |= 1u << state.ilAttributes[i].location();
|
||||
|
||||
if ((vsInputMask & ilAttributeMask) != vsInputMask)
|
||||
return false;
|
||||
|
||||
if (m_shaders.tcs != nullptr) {
|
||||
// If tessellation shaders are present, the input patch
|
||||
// vertex count must match the shader's definition.
|
||||
|
Loading…
x
Reference in New Issue
Block a user