d3d12: realize console streams with their depth-bounds flag and back-face stencil masks (RT-DEPTHBOUNDS-STREAM-EXTRAS) #1695
Closed
leonida/mandy
thiefyzheng wants to merge 0 commits from
fix/depthbounds-stream-extras into main
pull from: fix/depthbounds-stream-extras
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!1695
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/depthbounds-stream-extras"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
RT-DEPTHBOUNDS-STREAM-EXTRAS — Depends on: #815
Claimed on #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156944266). This fixes @djrolfes' integration finding on #815 (https://github.com/ubiquitarianism/leonida/pull/815#issuecomment-7156015786). @kotekompotek: happy to have this folded into #815 instead of a stacked PR — say so and I'll drop it.
Note: the diff includes #815's commit until it merges, since this branches from its head
efea97331.What
PipelineState::resolve_type'sstd::call_onceblock (runtime/shims/d3d12_vulkan_device.cpp:7059) realized a console stream withcreate_graphics(stream.graphics, &stream.ms, &stream.as), silently droppingstream.extras(the depth-bounds flag, #815'sGraphicsStreamExtras) andstream.back_stencil(DEPTH_STENCIL2 back-face masks, whichparse_pipeline_streamfills right next to the front ones). The eagerCreatePipelineStatebranch passes both. It now passesstream.back_masks?&stream.back_stencil:nullptrand&stream.extras— argument-for-argument identical to the eager call at ~12104.prepare_console_stream(~10367) set the pipeline cache key frompipeline_key(stream.graphics)alone; the plainD3D12_DEPTH_STENCIL_DESCthe key hashes cannot see the depth-bounds flag or back-face masks, so two console PSOs differing only in those would collide. The key now post-mixesback_masks,back_stencil.read/.writeandextras.depth_bounds_testwith the samecached_pso::KeyBuilder/sha256_hexidiompipeline_keyitself uses.runtime/test/d3d12_mesh_test.cpp: a console stream (device slot 86, mesh-shader subobject 24) carrying DEPTH_STENCIL1 withDepthBoundsTestEnableand a D32_FLOAT DSV, drawn once insideOMSetDepthBounds(0, 1)(red — depth 0 is inside) and once insideOMSetDepthBounds(0.5, 1)(blue — the discard only happens if the flag reached the pipeline). Without the source fix both draws come out red.What was run
create_graphicssignature match (7119–7123), thePipelineStreamfields and their parse fill, every identifier the test uses in scope with types lined up, fence values (the newbounds_fencepre-increments from 3, first Signal is 4 — no collision with the earlier Signals 1–3), the readback footprint/offset parity with the file's existing usage, slot 86 = consoleCreatePipelineState, and subobject 24 = the console mesh shader (consistent with the existing stream test at line 341 and the console→PC remap ind3d12_xs_pso_stream.h:31). That review caught two real defects, both fixed here: the test's second-frame depth barrier indicated a COMMON→DEPTH_WRITE transition from a buffer already in DEPTH_WRITE (now conditional onfirst_frame), and the cache-key collision above.d3d12_mesh_testwith the one-line source change reverted and show the bounds case fails) needs a depth-bounds-capable Vulkan device, which the author host does not have. The test skips cleanly whenDepthBoundsTestSupportedis FALSE or inpc_onlybuilds.Attribution
AI-assisted: implementation (Claude Sonnet 5.5 worker), independent review and follow-up fixes (GLM 5.3 Flash worker), orchestration and verification by the contributor. No game files were used or are needed; no game data in this PR.
Tested
766c6c42emerged ontomainbcaa13dad(clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060 (depthBounds and mesh shaders supported), driver 621.14, VS 2022 RelWithDebInfo + Ninja.ctest -j 6: 409 of 409 passed, same asmain; that includesd3d12_mesh,d3d12_bundle_forbidden,d3d12_close_parity,d3d12_comandd3d12_vulkan_device.d3d12_mesh_testwithLEONIDA_VK_VALIDATION=1: exit 0, 0 VUIDs, "DispatchMesh over X, Y and Z and a stream VS draw matched all 4096 pixels".run_gpu_tests.py: 209/263 passed, 53 skipped, identical tomain.AI-assisted testing (non-developer tester).
Tested
766c6c42eapplied ontomain42537e7b6on AMD: Radeon RX 7900 XT (RDNA3,depthBounds = true), AMD driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, VS 2022 RelWithDebInfo. No game files.Tests:
LEONIDA_VK_VALIDATION=1(no messages):d3d12_mesh,d3d12_com,d3d12_close_parity,d3d12_bundle_forbidden,d3d12_vulkan_device,pso_stream,d3d12_draw,d3d12_pso_validation,d3d12_depth24_draw,d3d12_geometry,d3d12_multi_viewport,d3d12_rect_list,d3d12_quad_index,d3d12_translated_draw.ctest -j 6: 399 of 402, with the same three failures asmain.Three things in the code:
1.
OMSetDepthBoundswith a NaN. The D3D12 reference says of bothMinandMax: "NaN values silently convert to 0". At replay the PR makes any NaN an empty range ((mn != mn) || (mx != mx)→set_depth_bounds(1, 0)), so every pixel is discarded.OMSetDepthBounds(NaN, 0.5)should test[0, 0.5].(0.2, NaN)happens to come out right, because D3D12's[0.2, 0]is empty too. Mapping NaN to 0 first and then applying the existing clamp/empty rules would match D3D12.2. The extra cache-key mix is dropped.
pipeline->set_cache_key(pipeline_key(stream.graphics) + leonida::sha256_hex(extra.data()))appends a second 64-character hash to a key that is already a 64-charactersha256_hex.cached_pso::encode()/check()dopadded.resize(key_bytes)withkey_bytes = 64, so the back-face masks and the depth-bounds flag never reach the cached blob. So two console streams that differ only in those return byte-identicalGetCachedBlobblobs, and the mix has no effect. Hashing the two parts together, for example by feedingextra's bytes into the sameKeyBuilderbefore thesha256_hex, would keep the key at 64 characters.3. The new
d3d12_meshcase doesn't go through the newresolve_typepath. ctest runs it withoutLEONIDA_PIPELINE_COMPILE=on-demand, so slot 86 goes to the eagerCreatePipelineStatepath, which this PR also changes to pass&stream.extras. The test would pass without theresolve_typechange.I tried it with
LEONIDA_PIPELINE_COMPILE=on-demand.d3d12_meshthen fails, but it fails the same way onmainwithout this PR: the console stream from slot 86 isn't created (SUCCEEDED(console_hr) && console_pso.p, line 353 with the PR, line 344 onmain). So the test can't cover the on-demand path at the moment. That failure is separate and predates this PR.@adrianmjim — thank you for the 7900 XT run and the three review points. Both code findings are fixed in
6f710e57(a fast-forward on the tested766c6c42, so your results still describe the base):1. Cache-key mix truncated away — fixed.
cached_psoresizing the key to 64 chars means the appended second hash never reached the blob.pipeline_key(graphics overload) now takes an optionalconst KeyBuilder* extrahashed into the same builder before its singlesha256_hex;prepare_console_streampasses the back-masks/back-stencil/depth-bounds builder. All otherpipeline_keycall sites keep byte-identical keys (defaultnullptr, no bytes appended): the trace print at ~7285, the compute overload at ~10371,shared_native_graphicsat ~10388,CreateComputePipelineStateat ~11967,CreateGraphicsPipelineStateat ~11984 (eagerCreatePipelineStatedoesn't callpipeline_keyat all).2. NaN depth bounds — fixed on this branch, with a note for @kotekompotek. Replay now maps NaN to 0 first (
vulkan_replay.h~4893), then the existing clamp/inverted-is-empty rules unchanged — so(NaN, 0.5)behaves as[0, 0.5]and(0.2, NaN)as[0.2, 0](empty). Record-time acceptance and bundles are untouched. This is replay-side code that came in with #815; kotekompotek, if you would rather carry it in #815 itself, say so and I'll drop the hunk here and rebase on your fix.3. Test covers only the eager slot-86 path — acknowledged. Under plain ctest
LEONIDA_PIPELINE_COMPILEisn't on-demand, soCreatePipelineState(~12090-12122, eagercreate_graphicsat 12118) is what the mesh case exercises; theresolve_typelazy realization at ~7055/7063 is not covered, because on-demand mode fails earlier — console stream from slot 86 not created (the SUCCEEDED(console_hr) bail atd3d12_mesh_test.cpp:349/~353), identically onmain. I have not touched that pre-existing failure; the case still guards the eager path plus the replay-side bounds, and theresolve_typechange remains a code-path-observation fix for now.New commit is again not compiled and not GPU-confirmed on the author host (no Vulkan SDK / MSVC here); it needs one more hardware look like yours when convenient.
Rechecked
6f710e574on the RX 7900 XT (driver 32.0.32029.2010, Windows 11 26300, VS 2022 RelWithDebInfo). Both points are fixed:KeyBuilder, so the key stays one 64-character hash.OMSetDepthBounds(NaN, 0.5)is in the state sweep and gives the same result as host D3D12 here (0x00000000 | 0x00000000 | match).The 14 related tests pass with
LEONIDA_VK_VALIDATION=1and no VUIDs. Wholectest -j 6: 398 of 402 pass or skip. The failures ared3d12_texture_tiles,d3d12_clearandd3d12_geometry_views, which fail onmainhere too, plusd3d12_api_descriptor_copy, which failed once under-j 6and passes 3 of 3 alone.@adrianmjim — thank you for the recheck on
6f710e57. Recording the state for whoever merges: the head now carries an independent hardware verification on RDNA3 covering all three of your original points (single 64-char key, NaN→0 matching host D3D12, eager-path suite green withLEONIDA_VK_VALIDATION=1, 0 VUIDs), with the only ctest failures being the three pre-existingmainbaseline ones plus one-j 6flake that passes alone.Open item unchanged: @kotekompotek, whether the NaN hunk stays here or you carry it in #815 — the default assumed here is that it stays unless you'd rather have it; a maintainer can also drop it at merge. Everything else on this PR is reviewer-verified. AI-assisted.
Rebased onto #815's new head
a635392c6(post its71a769d7drebase) — our two commits are now6b7bf490andbb8e1131, conflict-free (this PR never touchesd3d12_com.cpp, where #815's own conflict was). The commit contents are unchanged from the previously verified766c6c42/6f710e57, so the hardware receipts above (RTX 4060 full suite, RX 7900 XT recheck of both review fixes) carry over modulo the new base; one more spot-check on the new head is welcome when convenient — @potatoe0100, @adrianmjim, either of you has the fastest boots for this.The NaN hunk stays in this branch as agreed default unless @kotekompotek moves it into #815 — say the word and I'll drop it here. AI-assisted (orchestrator).
Ran #1695 at head
bb8e11314on a depth-bounds-capable GPU.Config: Windows 11 (26300), RTX 4060 desktop, NVIDIA 610.88 (
depthBounds= true), MSVC 19.44, RelWithDebInfo, Vulkan SDK 1.4.363.0. Test targets only, no game files.d3d12_mesh_test,d3d12_vulkan_device_test,d3d12_com_test,d3d12_close_parity_test,d3d12_bundle_forbidden_test(0 errors).ctest:d3d12_mesh,d3d12_vulkan_device,d3d12_com,d3d12_close_parity,d3d12_bundle_forbiddenall pass. The new depth-bounds case does run here (not skipped): red insideOMSetDepthBounds(0, 1), clear blue inside(0.5, 1).resolve_typeline put back tocreate_graphics(stream.graphics,&stream.ms,&stream.as)andd3d12_mesh_testrebuilt, the test still passes. So under plain ctest the new case does not catch the dropped flag; slot 86 takes the eager path, as in your finding 7161103050.LEONIDA_PIPELINE_COMPILE=on-demand: fails atline 353: SUCCEEDED(console_hr) && console_pso.p, the same with and without the fix, before the depth-bounds case. That is consistent with 7161103050 on NVIDIA (I compared the PR head with and without the fix line, not main).So: it compiles and nothing regresses in these 5 tests, but the lazy-path fix itself is not exercised by any test I ran. Not covered: full runtime build, full ctest, AMD/Intel.
AI-assisted: yes (Claude Code ran the tests)
@thiefyzheng heads-up from RT-STATE-AUDIT-PIPELINE (issue #2464, part B): this PR is listed there for depth bounds and back-face stencil, but it carries needs rebase and conflicts with
main(2859d0c9b). Once it's updated, I can run it on a Mac (Apple M3, under Wine) and report here. One thing worth knowing for it: MoltenVK and KosmicKrisp both lackdepthBounds, so on Macsd3d12_vulkan_device.cpp:12096refuses every depth-bounds PSO, and carrying the flag on more paths would turn more PSOs into refusals there (finding: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7216500497).AI-assisted (Claude Code, Claude Opus 5.5).
Status for @Tauwni and whoever tests this next: #1695 is stacked on #815 (our two commits sit on #815 head
a635392c6), and #815 itself is currentlydirtyagainstmain(ec91d695c). Rebasing this PR first would not build without #815's changes, so it waits for #815's own rebase; once that lands we rebase onto it and re-run the 14 related tests. No change to the commits (6b7bf490d,bb8e11314) until then.AI-assisted (Claude Code).
Hi @thiefyzheng, thanks for this pull request. It currently conflicts with
main(conflicting file(s):runtime/shims/d3d12_com.cpp,runtime/shims/d3d12_com.h,runtime/shims/d3d12_vulkan_device.cpp,runtime/src/vulkan_backend.h,runtime/src/vulkan_replay.h,runtime/test/d3d12_mesh_test.cpp,runtime/test/d3d12_vulkan_device_test.cpp), so it carries theneeds rebaselabel. CONTRIBUTING.md asks authors to rebase their branch onmain; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.AI-assisted (Claude Code, Claude Opus 5.5).
Run of #1695 on a native Windows GPU (NVIDIA RTX 3090, depthBounds supported). Synthetic tests only, no game files.
Heads: PR
bb8e11314, main8fb974878.Merged or head-only: head-only.
git merge --no-ffof the PR into main conflicts inruntime/shims/d3d12_com.cpp,runtime/shims/d3d12_com.h,runtime/shims/d3d12_vulkan_device.cpp,runtime/src/vulkan_backend.h,runtime/src/vulkan_replay.h,runtime/test/d3d12_mesh_test.cpp,runtime/test/d3d12_vulkan_device_test.cpp, so everything below ran on the PR head itself (detached atbb8e11314, which carries #815's commit).Commands:
Green (all Passed, none skipped):
d3d12_mesh,d3d12_vulkan_device,d3d12_com,d3d12_close_parity,d3d12_bundle_forbidden.Red:
6b7bf490dandbb8e11314, reverted ind3d12_vulkan_device.cppandvulkan_replay.h, tests kept): not red. All five tests still pass, includingd3d12_mesh. The new case's console stream carries a mesh shader, so it is created through the eagerCreatePipelineStatebranch, notPipelineState::resolve_type, and theresolve_typechange is not what the case measures. To check that the case is live, I passednullptrfor the extras in the eager call only:d3d12_meshthen fails atbounded_pixel(0.5f, 1.0f) == clear_blue. So the case guards the eager path (already in #815's commit) and does not fail for theresolve_type/ cache-key / NaN changes in this PR. The cache-key and NaN changes have no red here either.runtime/test, plus the docs) reverted to the merge base71a769d7d, tests kept: build failure only,d3d12_com_test.cppdoes not compile (rt::d3d12::depth_boundsmissing).d3d12_mesh,d3d12_close_parityandd3d12_vulkan_devicebuild and pass in that state, most likely because the depth-bounds block ofd3d12_meshis skipped there (DepthBoundsTestSupportedis only reported with #815's changes); I did not trace that.Link: no new imports vs the merge base
71a769d7d(gta6rt.exe built at both). Against current main8fb974878the only difference isapi-ms-win-crt-stdio-l1-1-0.dll!__stdio_common_vswscanf, which the merge-base build already has, so it is not from this PR (main's own build does not import it).Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, RelWithDebInfo, Ninja, Vulkan SDK 1.4.363.1.
Could you add a case that reaches
PipelineState::resolve_type(a stream that is not created eagerly), so the PR's own change has a red/green? And the branch conflicts with current main in the 7 files above: could you merge main into it? Thanks.Follow-up investigation of @enlight3d's deferred-path request (local only; no branch change):
The existing mesh case is the wrong vehicle for the on-demand case because its earlier slot-86 mesh stream fails first. A clean test shape appears to be the existing synthetic VS harness in
runtime/test/d3d12_depth24_draw_test.cpp, withVulkanDeviceInfo::prepare_on_bind = true, a valid slot-86 VS stream usingD3D12_DEPTH_STENCIL_DESC1.DepthBoundsTestEnable, then reset/bind/draw so realization necessarily goes throughPipelineState::resolve_type.Suggested assertions on the existing depth triangle:
[0.5,1]at depth 0.25 must produce 0/4096 passes (shows deferred extras arrived);[NaN,0.5]must produce 4096/4096 (shows NaN maps to zero);Independent controls: drop
&stream.extrasonly inresolve_typefor the first red; revert only the single-key cache expression for the second; revert only NaN mapping for the third.I have not implemented or claimed this green: this Linux host has no Windows compiler/Wine and CMake omits the D3D12 targets (
No rule to make target 'd3d12_depth24_draw_test'). No replay-only test is being offered as a substitute. Dependency #815 is unchanged and this branch has not been rebased or pushed. AI-assisted source-path investigation.Rebased the two #1695 commits onto current canonical main
da56079c9eplus a local rebase of dependency #815 (171c85b41b). New head:651a3c21d8a72263c9d674869e5d2c56f23b14a3(f746816544+ this commit).The resolution preserves main's order-key/prewarm handling and
ReplayStateCache, #815's clamp/empty-range rules, and this PR's deferred extras/back-stencil path, single-key cache hashing and D3D12 NaN-to-zero conversion. Range-diff maps both original commits one-to-one.Focused portable checks (CPU-only, no game data):
replay_state_cache_testandvk_command_replay_testbuild and pass 2/2;git diff --checkand no-game-data checks pass. #815's separately verified stack had 6,721 semantic + 69 viewer tests passing and one CTest failure reproduced identically on main (vk_predicated_copy).The requested deferred
PipelineState::resolve_typeVS regression is still NOT implemented here, because the native Windows/D3D12 target cannot compile or run on this host. No new off-target replay test is substituted. Native Windows/MSVC and depth-bounds GPU behavior remain unverified on this rebased head; the earlier deferred-VS design and three controls remain the next test step.AI-assisted (Kimi K3.1 Pro).
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.