mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[d3d9] Use header back buffer limits during validation
Co-authored-by: Blisto91 <47954800+Blisto91@users.noreply.github.com>
This commit is contained in:
parent
4e07302cbf
commit
218b67dd0c
@ -418,11 +418,19 @@ namespace dxvk {
|
|||||||
// can not be higher than D3DSWAPEFFECT_FLIPEX.
|
// can not be higher than D3DSWAPEFFECT_FLIPEX.
|
||||||
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_FLIPEX))
|
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_FLIPEX))
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
|
// 30 is the highest supported back buffer count for Ex devices.
|
||||||
|
if (unlikely(pPresentationParameters->BackBufferCount > D3DPRESENT_BACK_BUFFERS_MAX_EX))
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
} else {
|
} else {
|
||||||
// The swap effect value on a non-Ex D3D9 device
|
// The swap effect value on a non-Ex D3D9 device
|
||||||
// can not be higher than D3DSWAPEFFECT_COPY.
|
// can not be higher than D3DSWAPEFFECT_COPY.
|
||||||
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_COPY))
|
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_COPY))
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
|
// 3 is the highest supported back buffer count for non-Ex devices.
|
||||||
|
if (unlikely(pPresentationParameters->BackBufferCount > D3DPRESENT_BACK_BUFFERS_MAX))
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The swap effect value can not be 0.
|
// The swap effect value can not be 0.
|
||||||
@ -438,10 +446,6 @@ namespace dxvk {
|
|||||||
&& pPresentationParameters->BackBufferCount > 1))
|
&& pPresentationParameters->BackBufferCount > 1))
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
// 3 is the highest supported back buffer count.
|
|
||||||
if (unlikely(pPresentationParameters->BackBufferCount > 3))
|
|
||||||
return D3DERR_INVALIDCALL;
|
|
||||||
|
|
||||||
// Valid fullscreen presentation intervals must be known values.
|
// Valid fullscreen presentation intervals must be known values.
|
||||||
if (unlikely(!pPresentationParameters->Windowed
|
if (unlikely(!pPresentationParameters->Windowed
|
||||||
&& !(pPresentationParameters->PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT
|
&& !(pPresentationParameters->PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT
|
||||||
|
Loading…
Reference in New Issue
Block a user