mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxvk] Validate primitive topology in pipeline state
This commit is contained in:
parent
f38cfd592e
commit
e8055f81df
@ -490,7 +490,12 @@ namespace dxvk {
|
|||||||
|
|
||||||
// If there are no tessellation shaders, we
|
// If there are no tessellation shaders, we
|
||||||
// obviously cannot use tessellation patches.
|
// obviously cannot use tessellation patches.
|
||||||
if ((state.iaPatchVertexCount != 0) && (m_shaders.tcs == nullptr || m_shaders.tes == nullptr))
|
if ((state.iaPrimitiveTopology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST)
|
||||||
|
&& (m_shaders.tcs == nullptr || m_shaders.tes == nullptr))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Filter out undefined primitive topologies
|
||||||
|
if (state.iaPrimitiveTopology == VK_PRIMITIVE_TOPOLOGY_MAX_ENUM)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Prevent unintended out-of-bounds access to the IL arrays
|
// Prevent unintended out-of-bounds access to the IL arrays
|
||||||
|
Loading…
x
Reference in New Issue
Block a user