Repository navigation
DXGI: validate flip-model swapchain formats - #1801
Conversation
|
Tested 083e502 on NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24, Windows 11): pass — built runtime with MSVC 19.44 (Ninja, RelWithDebInfo, Vulkan validation layer not installed; LEONIDA_GAME_DIR unset). Ran:
Note: d3d12_present_test passed with on-screen GDI colour check skipped (window not in front). |
|
Tested
This is the first NVIDIA data point for the combined count+format checks; no game data used. AI-assisted. |
|
Tested 083e502 on RTX 4070 SUPER (NVIDIA 616.64) and Intel UHD 770 (101.7092), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363.0: pass
|
|
Tested this PR's diff on main 003e781 on RTX 5070 Ti, NVIDIA 621.24, Windows 11, MSVC 14.44: pass
No game data used. AI-assisted: yes. |
|
Tested 083e502 on NVIDIA GeForce RTX 3070 Ti (driver 617.42) and AMD Radeon Graphics, Ryzen 7 7800X3D iGPU (driver 32.0.21045.29003), Windows 11 build 26300, MSVC 19.44, Ninja, RelWithDebInfo: pass.
Code read: Synthetic inputs only. AI-assisted. |
Depends on: #1766
Claimed as a new D3D item in the coordination thread. The format change is the top commit.
Limit flip-model swapchain creation and explicit resize formats to BGRA8 UNORM, RGBA8 UNORM, RGB10A2 UNORM, and RGBA16 FLOAT. Reject invalid formats with the native HRESULT for each API before touching swapchain images. A resize with
DXGI_FORMAT_UNKNOWNstill preserves the current format. Microsoft’s flip-model format requirements.Verification
CreateSwapChainForHwnd,ResizeBuffers, andResizeBuffers1. The four supported formats succeeded. Explicit sRGB, typeless, and R32 UINT formats returnedDXGI_ERROR_INVALID_CALLon creation andE_INVALIDARGon resize. UNKNOWN returnedDXGI_ERROR_INVALID_CALLon creation and preserved the format on resize.89b047cdbecause the shim accepts a disallowed resize format. With the patch, an invalid format leaves the descriptors and back buffers usable, while a valid preserve-format resize still passes GPU readback.dxgi_swapchainandd3d12_presenton Windows 11 Pro build 26300, MSVC 19.51, RX 9070 XT driver 32.0.32029.2010, and Vulkan-Headers 1.4.363. Both passed with the count and format changes combined on upstream003e7812. The window color was confirmed on screen. Vulkan validation was off. Synthetic inputs only.AI-assisted.