mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Add range check for scissors and make failing it unlikely
This commit is contained in:
parent
e2808309a3
commit
160b684d5a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user