Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd96fa54

Browse files
WinterSnowfallBlisto91
authored andcommitted
[d3d9] Use header back buffer limits during validation
Co-authored-by: Blisto91 <47954800+Blisto91@users.noreply.github.com>
1 parentb276c60 commitd96fa54

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/d3d9/d3d9_interface.cpp‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,19 @@ namespace dxvk {
413413
// can not be higher than D3DSWAPEFFECT_FLIPEX.
414414
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_FLIPEX))
415415
return D3DERR_INVALIDCALL;
416+
417+
// 30 is the highest supported back buffer count for Ex devices.
418+
if (unlikely(pPresentationParameters->BackBufferCount > D3DPRESENT_BACK_BUFFERS_MAX_EX))
419+
return D3DERR_INVALIDCALL;
416420
}else {
417421
// The swap effect value on a non-Ex D3D9 device
418422
// can not be higher than D3DSWAPEFFECT_COPY.
419423
if (unlikely(pPresentationParameters->SwapEffect > D3DSWAPEFFECT_COPY))
420424
return D3DERR_INVALIDCALL;
425+
426+
// 3 is the highest supported back buffer count for non-Ex devices.
427+
if (unlikely(pPresentationParameters->BackBufferCount > D3DPRESENT_BACK_BUFFERS_MAX))
428+
return D3DERR_INVALIDCALL;
421429
}
422430

423431
// The swap effect value can not be 0.
@@ -436,10 +444,6 @@ namespace dxvk {
436444
&& pPresentationParameters->BackBufferCount >1))
437445
return D3DERR_INVALIDCALL;
438446

439-
// 3 is the highest supported back buffer count.
440-
if (unlikely(pPresentationParameters->BackBufferCount >3))
441-
return D3DERR_INVALIDCALL;
442-
443447
// Valid fullscreen presentation intervals must be known values.
444448
if (unlikely(!pPresentationParameters->Windowed
445449
&& !(pPresentationParameters->PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp