1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 13:08:50 +01:00

[dxvk] Fix spec constant selector test for compute shaders

This isn't supported on compute.
This commit is contained in:
Philip Rebohle 2022-08-08 18:53:41 +02:00
parent 7789fd53ff
commit c392308e6f
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -213,9 +213,13 @@ namespace dxvk {
&& !m_flags.test(DxvkShaderFlag::ExportsPosition))
return false;
// Ignore shaders that have user-defined spec constants
// and no selector to read their contents from elsewhere
return !m_specConstantMask || (m_specConstantMask & (1u << MaxNumSpecConstants));
// Spec constant selectors are only supported in graphics
if (m_specConstantMask & (1u << MaxNumSpecConstants))
return m_info.stage != VK_SHADER_STAGE_COMPUTE_BIT;
// Always late-compile shaders with spec constants
// that don't use the spec constant selector
return !m_specConstantMask;
}