Repository navigation
Conversation
|
Colour space 27 still differs from native DXGI at Run the new test from a configured build: cmake --build build --config RelWithDebInfo --target dxgi_swapchain_methods_test
$env:LEONIDA_PROBE = '1'
$env:LEONIDA_VK_DEVICE = 'RTX 4090'
build/RelWithDebInfo/dxgi_swapchain_methods_test.exeUse
The test exits 1 on each GPU. This is the only mismatch in 28 rows. The same test against the implementation from AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Built and ran dxgi_swapchain_methods_test at c8d3bd14 on Windows 11 25H2 (build 26200), RTX 5070 Ti, driver 621.24: exit 1, 28 rows compared with 2 host adapters, 1 differ.
The differing row is colour spaces: out-of-range values, and the detail shows it is exactly value 27:
layer: 27:0/1/0 (CheckColorSpaceSupport flags=1 PRESENT, SetColorSpace1 S_OK)
host: 27:0/0/80070057 (flags=0, E_INVALIDARG) -> both the hardware and WARP hosts agree
Every other colour space (26, 28-34, 40, 50, 64, 100, 255, 256, INT_MAX, -1, -2) and every other row of the 28 matched, including HDR metadata, rotation, background colour, GetDesc1, GetBuffer and GetLastPresentCount.
So the "27 is not in the SDK enum yet the host takes it" measurement does not hold on this host: DXGI (NVIDIA 621.24 and WARP) refuses it with E_INVALIDARG. The case 27 in color_space_presentable therefore makes the PR's own ctest fail on a machine whose host refuses it. Two ways out: make value 27 host-conditional in the test (exclude it from the strict comparison, and note in docs/d3d12_vulkan.md that the host accepts it on some devices and refuses it on others), or refuse 27 per the SDK enum and accept that the author's RTX 4080/UHD 770 measurement will then be the differing environment. Everything else can merge as-is once the row is resolved.
|
Tested
One line in the new test's output, for information only (it did not fail anything): |
|
Thanks, you are both right that 27 is not a stable answer. I probed Pushed cd21313: the layer is unchanged (it still accepts 27, matching the hosts measured here). The strict comparison no longer includes 27; a separate row, "colour spaces: value 27 is accepted or refused consistently", requires that the check and the set agree with each other and with one of the two host answers (flags 1 with S_OK, or flags 0 with E_INVALIDARG). The doc line and the code comment now say the host differs by device. Tested on Windows 11, MSVC 14.51, a worktree built from the new head, only the |
|
Tested head
AI-assisted (Devin). |
|
Re-tested the new head
No game files. AI-assisted (Claude Code). |
|
Tested d11edcd merged onto main de67135 on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Verified on Linux against main 3faac55: merges cleanly, compileall clean, docs guards and the CMake/CTest guards pass. The DXGI C++ tests cannot run here, so the host-answer claims (colour spaces per format, value 27 host-dependence) stand with the pending CI — good pivot to consistency-pinning in the test commit. Heads-up for the lander: #3634 no longer merges cleanly with main on its own (conflict verified here), though your prose edit adds no new collision zone in the same doc. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
…lour and GetDesc1 answer as the host does (D3D round 4b) CheckColorSpaceSupport and SetColorSpace1 follow the host's table per swap chain format instead of accepting every value; IDXGISwapChain4 and SetHDRMetaData exist (validated, discarded); SetRotation and SetBackgroundColor refuse what the host refuses with DXGI_ERROR_INVALID_CALL; GetDesc1 reports the creation AlphaMode, Scaling and Stereo and a 0/1 refresh rate. dxgi_swapchain_methods compares 28 rows with both host adapters.
…onsistency not one answer
|
Main moved under the branch: runtime/shims/dxgi_com.cpp conflicted in the swap chain members (main added source_size_ and dropped matrix_transform_ next to our scaling_, alpha_mode_ and stereo_). Rebased onto upstream/main 1cc6e3c keeping both sets; head is now e4e6302, 2 commits (docs/d3d12_vulkan.md, runtime/CMakeLists.txt, runtime/shims/dxgi_com.cpp, runtime/test/dxgi_swapchain_methods_test.cpp). Windows 11, MSVC 14.51, RelWithDebInfo: dxgi_swapchain_methods passes on the RTX 4080 SUPER and on the Intel UHD 770 (LEONIDA_VK_DEVICE=Intel with the NVIDIA ICD disabled). I built only that target and ran only that test on this rebase, not the full ctest suite, and no validation run since the layer is not installed on this PC. |
|
Independent native Windows check of e4e63020. RTX 3080 Ti, NVIDIA 621.35, MSVC 19.44, Vulkan SDK 1.4.363.0. All 10 focused AI-assisted. |
Claimed in #4421 (D3D round 4b): #4421 (comment)
What broke: the swap chain's colour and metadata calls accepted everything. Repro on
main:CheckColorSpaceSupportreturned the PRESENT flag for all 26 spaces and for values past the enum,SetColorSpace1returnedS_OKfor all of them,QueryInterface(IDXGISwapChain4)wasE_NOINTERFACE(so a title that callsSetHDRMetaDatacould not),SetRotation(DXGI_MODE_ROTATION_UNSPECIFIED)andSetBackgroundColorwith a component of 2.0 returnedS_OK, andGetDesc1always saidAlphaMode = IGNOREwhatever the creation asked for, with a 0/0 refresh rate. The host DXGI (RTX 4080 SUPER, Intel UHD 770, WARP: the same answers) differs on each.Fix, all in
dxgi_com.cpp:RGB_FULL_G10_NONE_P709) only; B8G8R8A8, R8G8B8A8 and R10G10B10A2 present the spaces 0, 2, 3, 12, 14, 17, 20, 21 and 27 (27 is not in the SDK enum and the host takes it).CheckColorSpaceSupportreports PRESENT only for those, andSetColorSpace1isE_INVALIDARGfor the rest (DXGI_COLOR_SPACE_CUSTOMincluded). An accepted colour space still changes nothing on screen.SwapChainimplementsIDXGISwapChain4.SetHDRMetaDatatakes type NONE with size 0 and no data, or oneDXGI_HDR_METADATA_HDR10of 40 bytes with any values, and isE_INVALIDARGotherwise (HDR10PLUS too); the block is discarded, as before (docs/d3d12_vulkan.md has the note).SetRotationtakesIDENTITYtoROTATE270only;SetBackgroundColorisDXGI_ERROR_INVALID_CALLfor a component outside 0..1.GetDesc1returns the creationAlphaMode,ScalingandStereo;GetDescandGetFullscreenDescreport refresh rate 0/1.Test: new
dxgi_swapchain_methods_test(ctestdxgi_swapchain_methods): 28 rows on the layer and on both host adapters, each on a fresh window and flip-model chain (colour spaces for the four formats, HDR metadata, rotation, background colour, the interface chain,GetDevice/GetParent,GetLastPresentCount, fullscreen state and description,GetDesc/GetDesc1,GetBuffer). Not compared, and found while writing it:GetCurrentBackBufferIndexcycles 0, 1, 2 on the host but follows the order Vulkan hands the images out on the layer (0 1 0 2 1 0 2 1 for three buffers in one run), andGetFrameStatisticscounts depend on the compositor.Tested: Windows 11, MSVC 14.51, worktree built from this commit.
dxgi_swapchain_methods,dxgi_swapchainandd3d12_compass on the RTX 4080 SUPER and on the Intel UHD 770 (VK_LOADER_DRIVERS_DISABLE=*nv*);d3d12_presentpasses on the RTX and fails on the Intel withscreen pixel at the window centre: 255,255,255, which it also does withdxgi_com.cppfrom upstream/main (not caused by this change). Negative control: withdxgi_com.cppfrom upstream/maindxgi_swapchain_methodsfails with 19 of 28 rows differing on both GPUs.Other open pull requests touch
dxgi_com.cpptoo (#3531, #2808, #4260, #4317, #4540); the edits here are in separate methods, so a rebase should only need the context lines. The CMake block goes before the ExecuteIndirect/CountBuffer test.AI-assisted.