CNA-BUG-115: DIRECTX9 requests D3DPRESENT_INTERVAL_TWO without checking device support, and a failing Reset is then retried on every Present
Evidence basis: source-verified at the pinned commit; inferred from the source (the behaviour was not run); tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
PresentInterval::Two becomes D3DPRESENT_INTERVAL_TWO without a caps or windowed-mode check, and when Reset rejects it the renderer releases its default-pool resources and retries on every Present while still reporting Two.
- Identifier
CNA-BUG-115- Category
- Bug
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Inferred (probable): depends on a platform or toolchain step nobody executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- PresentationParameters.PresentationInterval = PresentInterval::Two on DIRECTX9
Expected behaviour
An unsupported interval should be clamped (and the applied value reported) or refused once.
Actual behaviour at TARGET
DirectX9Renderer.cpp's BuildPresentParameters switches on the interval with no caps check, so Two becomes D3DPRESENT_INTERVAL_TWO whatever the device or window mode. At construction a rejected value fails once and loudly (CreateDevice throws std::runtime_error). After construction, SetSwapInterval (reached from GraphicsDevice::Reset and SetPresentationParameters) marks the presentation dirty; EnsureDeviceSize (run from every Present) releases every D3DPOOL_DEFAULT resource, calls device_->Reset, and on failure keeps the previous size, leaves the requested interval and presentationDirty_ set and logs 'retrying next frame'. Direct3D 9 documents only DEFAULT, IMMEDIATE and ONE as valid for windowed swap chains, so a windowed device switched to Two after construction (for example by GraphicsDevice::Reset with new PresentationParameters; GraphicsDeviceManager only ever requests One or Immediate) can enter this loop: a warning per frame and default-pool resources released and recreated every frame, with PresentationParameters still claiming Two.
Source locations
modules/renderers/directx9/src/DirectX9Renderer.cpp— BuildPresentParameters, SetSwapInterval, EnsureDeviceSize failure branch
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. The windowed-mode restriction is Direct3D 9's documented behaviour, not re-checked on a device; whether Wine/DXVK reject it the same way was not observed.
Independent re-verification: Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. The windowed-mode restriction is Direct3D 9's documented behaviour (XNA's PresentInterval documentation likewise guarantees only One and Immediate for windowed swap chains and tells callers to check capabilities for Two), not re-checked on a device; whether Wine/DXVK reject it the same way was not observed, so the retry loop is inferred rather than verified. No DIRECTX9 test requests PresentInterval::Two; the DIRECTX9 tests exercise device creation and Present only.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
No DIRECTX9 test requests PresentInterval::Two.
Regression test
A DIRECTX9 test that requests Two in a window and asserts that Reset succeeds once (clamped to One, applied value written back) or fails once with a clear exception.
Blast radius
DIRECTX9 games that use PresentInterval::Two, especially windowed.
Workaround
Use PresentInterval::One with a fixed time step for 30 Hz pacing.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Deep dives
- Direct3D presentation: present interval
- Known issues
- Bug index