1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Add range check for scissors and make failing it unlikely

This commit is contained in:
Philip Rebohle 2019-09-13 11:49:00 +02:00
parent e2808309a3
commit 160b684d5a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -2843,7 +2843,7 @@ namespace dxvk {
const D3D11_VIEWPORT* pViewports) {
D3D10DeviceLock lock = LockContext();
if (NumViewports > m_state.rs.viewports.size())
if (unlikely(NumViewports > m_state.rs.viewports.size()))
return;
bool dirty = m_state.rs.numViewports != NumViewports;
@ -2871,6 +2871,9 @@ namespace dxvk {
UINT NumRects,
const D3D11_RECT* pRects) {
D3D10DeviceLock lock = LockContext();
if (unlikely(NumRects > m_state.rs.scissors.size()))
return;
bool dirty = m_state.rs.numScissors != NumRects;
m_state.rs.numScissors = NumRects;