mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxvk] Check whether the vertex binding / attribute count is valid
This commit is contained in:
parent
1e40a14a50
commit
a950872c7c
@ -397,6 +397,11 @@ namespace dxvk {
|
|||||||
if ((state.iaPatchVertexCount != 0) && (m_tcs == nullptr || m_tes == nullptr))
|
if ((state.iaPatchVertexCount != 0) && (m_tcs == nullptr || m_tes == nullptr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Prevent unintended out-of-bounds access to the IL arrays
|
||||||
|
if (state.ilAttributeCount > DxvkLimits::MaxNumVertexAttributes
|
||||||
|
|| state.ilBindingCount > DxvkLimits::MaxNumVertexBindings)
|
||||||
|
return false;
|
||||||
|
|
||||||
// No errors
|
// No errors
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user