RT-STATE-AUDIT-FORMATS: reject mismatched RTV formats and support typeless 3D RTVs #2483
Closed
lixonik wants to merge 5 commits from
upstream-pr/2483 into main
pull from: upstream-pr/2483
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!2483
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2483"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-27T16:43:11Z.
Part of
RT-STATE-AUDIT-FORMATS(#2464; based on the format-state audit notes in #1608 by@kevincommitsand@Tauwni).Summary
desc->FormatinCreateRenderTargetView(runtime/shims/d3d12_vulkan_device.cpp) both for RGBA8-backedDXGI_FORMAT_B4G4R4A4_UNORMresources (missingelse view = {};) and for typed non-RGBA8 / non-cast-listed resources (which previously fell through leavingviewvalid).D3D12_RTV_DIMENSION_TEXTURE3Don*_TYPELESSTEXTURE3Dresources withALLOW_RENDER_TARGET):volume_rtvandCreateRenderTargetView(runtime/shims/d3d12_vulkan_device.cpp): allow typeless 3D textures with explicitD3D12_RTV_DIMENSION_TEXTURE3Dviews, validating family compatibility,COLOR_ATTACHMENTsupport, mip bounds, and mip-scaled W-slice bounds (std::max(1u, DepthOrArraySize >> mip)).detail::color_view_formatandprepare_draw(runtime/src/vulkan_replay.h): resolve family formats on 3D volume RTVs and pass the view's W-slice range (baseArrayLayer = first_layer,layerCount = layer_count) tovk.image_viewand draw layer clamping while keeping{mip, 1, 0, 1}for 3D layout transitions.Tests
runtime/test/d3d12_b4g4r4a4_target_test.cpp: verify mismatchedDXGI_FORMAT_R8G8B8A8_UNORMRTV on an RGBA8-backedB4G4R4A4_UNORMresource is rejected (ClearRenderTargetViewfailsClose()withE_INVALIDARG; skips with 77 whenA4R4G4B4is a native color attachment).runtime/test/d3d12_typeless_rtv_test.cpp: verify typed non-RGBA8 resources (R16G16B16A16_FLOAT,R8_UNORM,B8G8R8A8_UNORM,R8G8B8A8_SNORM) reject mismatched RTV formats, compare multi-mip/partial-W-slice typeless 3D RTV clears (UINT,UNORM_SRGB, sub-rectUNORM) against WARP, and verify invalid 3D RTVs (nullptrdesc,UNKNOWN,TYPELESS, wrong family, wrong dimension, out-of-range W slices, mismatched typed 3D) are rejected.runtime/test/typeless_rtv_test.cpp(CPU-only, no GPU required): verify typeless 3D volume RTVs across family formats, full and partial W-slice ranges, and rejection of omitted format, wrong family, and out-of-range W slices.Negative control & verification
main(ec91d695c):d3d12_b4g4r4a4_target_testfailed (line 225: bad_list->Close() == E_INVALIDARG) because mismatchedR8G8B8A8_UNORMwas accepted onB4G4R4A4_UNORM.d3d12_typeless_rtv_testfailed (line 263: list->Close() == E_INVALIDARG) because mismatchedR16G16B16A16_UINTwas accepted on typedR16G16B16A16_FLOAT.ctest -R "^(typeless_rtv|d3d12_typeless_rtv|d3d12_b4g4r4a4_target|d3d12_clear_formats|d3d12_b5g5r5a1_uav)$": 5/5 passed.python scripts/check_no_game_data.py: clean.python -m unittest tests/test_ctest_registration.py: 6/6 OK.git diff --check: clean.GPUs tested: NVIDIA GeForce RTX 5070 (Windows 11, native Vulkan + WARP;
VK_LAYER_KHRONOS_validationnot installed locally).AI-assisted (Antigravity, Gemini).
Independent RTX 3080 Vulkan validation: all three focused CTests passed, with 1,731 WARP readback matches. Four distinct format-pair diagnostics were observed on this head, and none on the parent. Test report.
Imported from ubiquitarianism/leonida. Originally posted by djrolfes on 2026-11-27T17:36:18Z.
Independent Linux/Wine + NVIDIA RTX 3070 Ti review/test at
c84384285(merged cleanly onorigin/mainc0201a806,wine-11.22, NVIDIA620.73.04). AI-assisted.volume_rtvandCreateRenderTargetViewenforce 3D typeless/non-typeless format matching and per-mipmax_slicesbounds, andprepare_drawpassestarget.first_layer/target.layer_countintovk.image_viewandshrinkfor volume targets.typeless_rtv(native Linux build): PASSED.d3d12_b4g4r4a4_target(Wine/Vulkan RTX 3070 Ti): PASSED (RGBA8 image, render-target clears 64x32 matched, SRV T# format 136, 0 validation errors, including mismatched RTV rejection).d3d12_typeless_rtv(Wine/Vulkan RTX 3070 Ti): skipped as expected under Wine (host D3D12 is Wine's, not Microsoft's).Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:13:52Z.
Merge test for the #2464 campaign on an 8 GB laptop (profile M), taken over from MoonEyes' card. Main
ec91d695cwas merged without conflict, in one tree together with #2482 and #2483. The numbers were recomputed from the raw logs. AI-assisted (Claude Code, Claude Opus 5.5).d3d12_b4g4r4a4_target_testOK,d3d12_typeless_rtv_testexit 0,typeless_rtv_test109 scenarios passed.ec91d695call three fail (exit 1):bad_list->Close() == E_INVALIDARG(line 225),list->Close() == E_INVALIDARG(line 263),run(vol_list, volume, vk) == ReplayResult::success(line 279). The fixes are shown.Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-27T20:11:09Z.
Tested on a Mac under Wine (Apple M3, macOS 26.5.1, Wine 11.0 with its MoltenVK 1.4.1), merged onto
main43a9d562d. Profile S, no game files. (MEASURED, 1 run each)maind3d12_b4g4r4a4_targetline 225: bad_list->Close() == E_INVALIDARG)typeless_rtvline 279: run(vol_list, volume, vk) == ReplayResult::success)d3d12_typeless_rtvAI-assisted (Claude Code). Report only.
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-28T01:55:28Z.
Review: COMMENTED
A review comment rather than a verdict, because the code itself checks out and others have run it (djrolfes, Tauwni, and OreoFR's game run reached the world as on main). One gap that none of those runs can see:
The new last branch of
CreateRenderTargetView,else if (desc && desc->Format != DXGI_FORMAT_UNKNOWN && desc->Format != rd.Format) view = {};, drops the view silently. It is reached by every typed resource outside the RGBA8/BGRA8 families (the only ones whose castable lists are honoured above it) when the RTV names another format. Before this PR such a view rendered in the resource's own format; now its draws are skipped with nothing in the log. That is the PC D3D12 rule for fully typed resources, but this layer serves the Xbox title, and if the title does create such views (an_SRGBview of a typed UNORM target without a castable list, say), the effect would be missing passes in the picture, not an error. OreoFR's RUN shows the world is still reached, but it cannot show whether any view was refused.Suggestion: give that branch the same
log_once("...", int(asked))the typeless branch has (with the resource format too), so the next game run says whether the title ever hits it. If it never does, this is safe as is; if it does, those formats probably want the castable/reinterpret path instead of a null view.Read only on this point; I did not rebuild this one, since three people already ran it. AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T02:02:08Z.
Reviewed at head
c84384285on Windows 11 (MSVC 202219.44) with dual-GPU Vulkan validation (LEONIDA_VK_VALIDATION=1, Vulkan SDK1.4.363.0).Verification
typeless_rtv_test,d3d12_typeless_rtv_test, andd3d12_b4g4r4a4_target_test.typeless_rtv_test: 109 scenarios passed.d3d12_typeless_rtv_test(LEONIDA_VK_VALIDATION=1): passed on both NVIDIA GeForce RTX 5080 (616.64) and AMD Radeon(TM) Graphics (25.10.30.02), 0 validation errors.d3d12_b4g4r4a4_target_test(LEONIDA_VK_VALIDATION=1): passed on RTX 5080 (RGBA8 fallback exercised, 0 validation errors); skipped (77) as expected on AMD Radeon (A4R4G4B4is natively supported as a color attachment).Notes (non-blocking)
d3d12_vulkan_device.cpp:2469-2527,18012-18101;vulkan_replay.h:1711-1724,2815-2827) all look clean.d3d12_typeless_rtv_test.cpp:460-500): The new 3D RTV cases test clear/readback and descriptor rejection, not the changedprepare_draw3D volume branch (vulkan_replay.h:2815-2827,5556-5562); adding a draw into a nonzeroFirstWSlice/ mip would exercise that path directly too.Approve.
AI-assisted review + local MSVC/dual-GPU verification.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T08:22:25Z.
@tiguan26 Good catch -- added a per-(resource, view) format pair
first_diagnosticlog in84d1f3c86([rt] d3d12: mismatched typed RTV format: view <asked> on resource <rd.Format>) on that branch so any future game run immediately flags if the title ever creates a mismatched typed RTV.Re-verified on Windows 11 + NVIDIA GeForce RTX 5070 12 GB (MSVC 19.44, Ninja Release;
VK_LAYER_KHRONOS_validationnot installed locally):d3d12_b4g4r4a4_target: passed (0.35 s)d3d12_typeless_rtv: passed (3.29 s, logged each of the 4 mismatched typed RTV test pairs once)typeless_rtv: passed (0.03 s, 109 scenarios)AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T20:58:40Z.
Independent native Windows check of
84d1f3c86a459289a87e22bf7e102eea6daee9d4and parentc843842853cffbfc8bb90b9cf4236bb352387298. RTX 3080 desktop, 10 GiB, driver 630.20, Windows 11 build 26340, MSVC 19.50.35717, Vulkan SDK 1.4.363.1 and Khronos validation enabled.Both revisions passed all three CTests (
d3d12_typeless_rtv,typeless_rtv,d3d12_b4g4r4a4_target) without skips. Each matched 1,731 WARP readbacks and rejected 38 unsupported or invalid views. The head emitted four new typed-RTV mismatch messages, one per format pair observed in the test. The parent emitted none. The packed RGBA8 fallback readback also passed. No Vulkan validation errors were reported in these runs.Synthetic fixtures. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-28T22:16:40Z.
Review: APPROVED
Approving now that
84d1f3c86adds the log I asked for:first_diagnostickeyed on the (resource format, view format) pair, so each mismatch prints once with both formats, and the next game run will show whether the title ever creates such a view. That was my only concern; the rest I had read before. I did not rebuild this head myself: the checks are yours on the RTX 5070 and Maticcm's on Windows, on top of djrolfes', Tauwni's and OreoFR's earlier runs. Whoever does the next game run on this branch: amismatched typed RTV formatline is the one to look for. AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:06:15Z.
Review: COMMENTED
I reviewed
84d1f3c86by static inspection only. No builds or GPU runs were performed. The 3D W-slice bounds use the selected mip’s depth, and replay keeps the attachment view range separate from the whole-mip layout range.runtime/shims/d3d12_vulkan_device.cpp:18099— Please preserve explicitly listed RTV casts outside RGBA8/BGRA8. A 2DR16G16B16A16_UNORMtarget created withR16G16B16A16_UINTin its castable list has a compatible mutable image, but the new fallback erases its UINT RTV. A matching UINT PSO previously drew through that view. Route the listed format through the castable RTV path and retain it on the descriptor.runtime/shims/d3d12_vulkan_device.cpp:18084— Please validate the actual image format list for typeless volumes. On anR8G8B8A8_TYPELESSvolume whose list names SRGB, a UINT RTV passes the family check even though the Vulkan list contains only SRGB and UNORM. Clearing through it requests an unlisted image view. The existingallows_view_formathelper can enforce the Vulkan list at descriptor creation.runtime/src/vulkan_replay.h:2824— Please check the resolved RTV format against the PSO before creating the draw view. An RGBA8 UINT RTV paired with an RGBA16 FLOAT PSO currently asks Vulkan for an incompatible image view. A PSO using RGBA8 UNORM silently changes the numeric interpretation.runtime/shims/d3d12_vulkan_device.cpp:18081— Please check DXGI family membership before treating shared Vulkan backing as a valid cast. The XR-bias display format currently passes as an ordinary 10:10:10:2 RTV on a typeless volume even though the shim’s format query grants it no render-target support.runtime/test/typeless_rtv_test.cpp:278andruntime/test/d3d12_typeless_rtv_test.cpp:906— Please add a draw into multiple W slices starting above slice 0 at mip 1. The clear cases exercise different replay code, so they would pass if the draw used the old slice-0 view.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T02:32:51Z.
@timbot103 I confirmed the listed RGBA16 cast and the draw-format mismatch on public head
84d1f3c86a459289a87e22bf7e102eea6daee9d4. With an explicit UINT castable list, the new fixture expects a clear through the UINT RTV on an RGBA16 UNORM resource to close successfully. The public head clears the descriptor and fails that assertion. In the replay mock, a UINT RTV with a FLOAT or UNORM pipeline can reach image-view creation in the pipeline's format.The local correction accepts listed compatible casts, checks the image's Vulkan view-format list and the DXGI family, and checks the descriptor's resolved format against the draw PSO before requesting the image view. The draw mock also verifies that mip 1 uses two W slices starting at slice 1, independently of the clear path.
On RTX 5070 (610.88), Windows 10, MSVC 19.29 with Agility headers, static CRT and Khronos validation,
d3d12_typeless_rtv,d3d12_b4g4r4a4_targetandtypeless_rtvall pass with the local correction. It is still local because GitHub rejected the configured author email on another branch in the same fork. The W-slice draw was checked in the replay mock.AI-assisted. Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T05:41:43Z.
Pushed the RTV cast validation and draw-format mismatch fix from the checks above as
9b6b89500e(re-committed with my GitHub noreply address so the fork accepts the push).python -I scripts/check_no_game_data.py: passed.git merge-tree --write-tree main HEAD: clean againstef32995848.AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T06:10:03Z.
Verified on this machine (Windows 11, MSVC 19.44.35226), and two of its three test binaries pass while the third does not compile - which is a real finding for whoever rebases this.
1. It applies textually.
merge-treeclean; the three commits cherry-pick ontomain0ae217cebwithout a conflict. Five files,317 insertions(+), 41 deletions(-).2. Two of the three tests build and pass, twice each:
3. The third does not compile, and the reason is
mainmoving under it:The cause, read in both trees:
mainadded a sixth parameter (const SamplePositions* pattern) todetail::prepare_drawafter this branch was cut. The merge is textually clean - the PR's own edits tovulkan_replay.hdo not touch that signature - so the branch arrives with a test that calls a function which no longer has that shape.This is the case my repository notes warn about: a clean merge can land a semantically broken tree, and
merge-treecannot see it because nothing conflicts.What the fix is, and it is small: rebase, and pass the pattern argument in those two calls (or
nullptrwhere the test means "no sample positions"). Everything else in the branch is unaffected - the other two tests pass on the same tree.What I did not test: the behaviour the commit adds (rejecting mismatched RTV formats, supporting typed cast formats). The two passing binaries exercise their paths against the shim; with the third not compiling, I would not call the set verified until it builds.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-11-30T07:05:29Z.
RTX 3090 / 621.40, validation on,
9b6b89500merged onto mainbbd45f5cc: typeless_rtv_test no longer builds because prepare_draw gained a SamplePositions* argument in27781f7f9; passing nullptr at lines 285 and 293 fixes it. With that, typeless_rtv_test passes 112 scenarios (main 100), and d3d12_b4g4r4a4_target_test and d3d12_typeless_rtv_test pass with no validation errors.Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-30T07:07:44Z.
@fiestorra Thanks for finding the missing argument. I merged
mainbbd45f5cc1929ec01817863680535c182da1e9c8and made both fixture calls pass an explicit null sample-position pattern in0421daca87caf20a62e98e063c4600a477d6f5f8.All three freshly rebuilt CTest targets passed on Windows 10 22H2, MSVC 19.44, RTX 5070 (NVIDIA 610.88), with Vulkan validation enabled for the GPU tests.
typeless_rtvran 112 cases, andd3d12_typeless_rtvreported 1,731 matching WARP readbacks and 39 invalid views rejected. The two 4x MSAA cases used the fixture's typeless host fallback because this host does not expose relaxed format casting there.d3d12_b4g4r4a4_targetpassed with zero validation errors. Synthetic fixtures only.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T12:35:49Z.
Independent Wine A/B for typeless 3D RTVs. I built head
882230bbmerged onto497bdd039in Win64 Release (clang-cl 23.1.5, Windows SDK 10.0.26100). The tested runtime sources match GitHub merge33a320bf. CachyOS, Wine 11.22, RTX 4070 SUPER (620.73.04) and Radeon 610M (RADV 26.3.1). Synthetic input only.main, the identical fixture hit the unsupported typeless RTV andClose()returnedE_INVALIDARGbefore readback.typeless_rtvtest passed all 112 scenarios. Transplanting it tomainfailed the requested mip/W-slice assertion on both runs. The B4G4R4A4 fallback test passed on NVIDIA and skipped on Radeon, which supports A4R4G4B4 as a color attachment. The stock WARP comparison skipped under Wine on both GPUs.01387, missing external-memory FD dependency). The logs showed no later validation errors.AI-assisted with OpenAI Codex. Results were independently checked against the raw logs.
Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-11-30T13:43:40Z.
RTX 3090 / 621.40, validation on,
882230bbfmerged onto mainf9f3ec4c6, no local patch: typeless_rtv_test 112 pass (main 100); d3d12_typeless_rtv_test 1731 match, 39 rejected (main 1730/27); b4g4r4a4 OK. No validation errors.Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-02T00:44:35Z.
Thank you for the careful work and thorough verification here. The legacy C++/Vulkan runtime/ directory is now frozen and deprecated as active development focuses on the d3d12/ and clean-room Rust vulkan/ tracks, so we are closing open legacy runtime/ PRs. We really appreciate the effort that went into this.
Pull request closed