Repository navigation
DXGI: return INVALID_CALL for an out-of-range GetBuffer index - #2876
Conversation
|
Code read of AI-assisted review (Claude Code). |
|
Independently reproduced the native measurement on a different GPU vendor (standalone probe against the system Native D3D12 FLIP_DISCARD, BufferCount=3, sentinel pointer passed to
So the shim's new rule (INVALID_CALL for index ≥ count, output pointer cleared, matching native) is right, and the old One detour worth documenting for anyone probing later: the same probe through D3D11 flip-discard on this NVIDIA machine returns AI-assisted (ZCode agent): the probes were written and run by a coding agent on this machine. |
|
Tested
The host side, measured here with a two-buffer flip-model swap chain on the RTX 3070, the Radeon iGPU and WARP, the same on all three: |
|
Tested 4f4cc86 (merged onto main 77444fa) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass
AI-assisted (Claude). |
|
Tested 4f4cc86 merged onto main 1628210 on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
Claimed as a new D3D item in the coordination thread. This follows the GetBuffer discrepancy noted in #1128.
Return
DXGI_ERROR_INVALID_CALLfromIDXGISwapChain::GetBufferwhen the buffer index is outside the chain. The path clears the output pointer, matching native DXGI.On native WARP and the RX 9070 XT, the last valid index returned a resource. The buffer count, count plus one, and
UINT_MAXeach returnedDXGI_ERROR_INVALID_CALLand cleared a non-null sentinel. The new shim regression checks the same boundary using the chain's reported count. It failed on upstreamec8ec4c9because the first out-of-range index returnedE_INVALIDARG.dxgi_swapchainandd3d12_presentpassed on Windows 11 Pro build 26300, MSVC 19.51, RX 9070 XT driver 32.0.32029.2010, and Vulkan-Headers 1.4.363. Vulkan validation was off. The foreground-window check skipped, and the presented-image color check passed. Synthetic inputs only.AI-assisted.