1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[dxvk] Check whether the vertex binding / attribute count is valid

This commit is contained in:
Philip Rebohle 2018-09-24 16:22:12 +02:00
parent 1e40a14a50
commit a950872c7c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -397,6 +397,11 @@ namespace dxvk {
if ((state.iaPatchVertexCount != 0) && (m_tcs == nullptr || m_tes == nullptr))
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
return true;
}