Repository navigation
Conversation
|
Tested Built with MSVC 19.44 / Ninja / Windows SDK 10.0.26100.0 / Vulkan SDK 1.4.363.0 (
(Note: both GPUs on this machine expose AI-assisted (Antigravity / Gemini); no game files used. |
|
Tested d20e9d6 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). |
d20e9d6 to
7813e90
Compare
ItsNotRexed#2402's user_data_layout call took {stages[0], stages[1]}, written when a graphics PSO's stages were {vs, ps}. Since ItsNotRexed#2109 they are {vs, gs, ps}, so on main stages[1] is the (usually empty) GS slot: the PS's pc_tail never reached the pipeline layout, set 1 was left out, and a --pc-tail-ubo PS failed VUID-VkGraphicsPipelineCreateInfo-layout-07988 and drew nothing (d3d12_draw_test line 358, d3d12_bundle's twin run). All three stages are passed now; user_data_layout skips the absent ones. This is the same slip 81ec7f7 fixed for the f16 halves link. Found rebasing ItsNotRexed#3106 onto main f847748. With it, d3d12_draw_test, d3d12_bundle, d3d12_typeless_families, d3d12_ia_bounds and d3d12_compute pass with LEONIDA_VK_VALIDATION=1 and no validation error on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
Radeon 610M, the twins alone:
RTX 4060, both layouts: Before: the parent Not tested: the new head No game files. AI-assisted. |
|
Tested 7813e90 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 on a 256-byte device; conflicts with #2981, #3023 and #3013 The branch already contains main 1628210 through its own merge of main, so the tree tested is the PR head.
AI-assisted (Claude). |
|
Code read of
Read with AI-assisted code read (Claude). |
|
Correction to my earlier read of AI-assisted code read (Claude). |
7813e90 to
809612d
Compare
ItsNotRexed#2402's user_data_layout call took {stages[0], stages[1]}, written when a graphics PSO's stages were {vs, ps}. Since ItsNotRexed#2109 they are {vs, gs, ps}, so on main stages[1] is the (usually empty) GS slot: the PS's pc_tail never reached the pipeline layout, set 1 was left out, and a --pc-tail-ubo PS failed VUID-VkGraphicsPipelineCreateInfo-layout-07988 and drew nothing (d3d12_draw_test line 358, d3d12_bundle's twin run). All three stages are passed now; user_data_layout skips the absent ones. This is the same slip 81ec7f7 fixed for the f16 halves link. Found rebasing ItsNotRexed#3106 onto main f847748. With it, d3d12_draw_test, d3d12_bundle, d3d12_typeless_families, d3d12_ia_bounds and d3d12_compute pass with LEONIDA_VK_VALIDATION=1 and no validation error on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 809612d on Windows 11 (MSVC BuildTools 2022, Ninja, RelWithDebInfo, -j 4; no Vulkan validation layer installed), one GPU at a time, device line confirmed: AMD Radeon RDNA2 iGPU (driver 26.10.1) and NVIDIA RTX 5080 (driver 616.92). Ran AI-assisted. |
809612d to
de58371
Compare
ItsNotRexed#2402's user_data_layout call took {stages[0], stages[1]}, written when a graphics PSO's stages were {vs, ps}. Since ItsNotRexed#2109 they are {vs, gs, ps}, so on main stages[1] is the (usually empty) GS slot: the PS's pc_tail never reached the pipeline layout, set 1 was left out, and a --pc-tail-ubo PS failed VUID-VkGraphicsPipelineCreateInfo-layout-07988 and drew nothing (d3d12_draw_test line 358, d3d12_bundle's twin run). All three stages are passed now; user_data_layout skips the absent ones. This is the same slip 81ec7f7 fixed for the f16 halves link. Found rebasing ItsNotRexed#3106 onto main f847748. With it, d3d12_draw_test, d3d12_bundle, d3d12_typeless_families, d3d12_ia_bounds and d3d12_compute pass with LEONIDA_VK_VALIDATION=1 and no validation error on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tch folder After ItsNotRexed#3023 the test's own library is a testfiles::ScratchDir, and the twin's fixed %TEMP% folder (copied with an `overwrite` constant that no longer exists) would have brought back the race ItsNotRexed#3023 removed for parallel runs. The tail library is a ScratchDir too, copied with testfiles::copy_file. From @iurysf's read of ItsNotRexed#3106: creating the 128-byte-limited layer device now says why it failed instead of returning 1 silently, and the header says that no stage of this test's twin has a pc_tail, so it narrows the push-constant range only; the set-1 block is covered by d3d12_draw_test and d3d12_bundle. Tested with LEONIDA_VK_VALIDATION=1 on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2): 16 of 16 draws equal the host, no validation error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@iurysf thanks for the read. Both
On stacking: agreed. The PR description now says that whichever of #2402/#3013 is rebased first should fold in the stage fix (now AI-assisted (Claude Code). |
|
Tested de58371 on NVIDIA GeForce RTX 4080, driver 617.42, Windows 11 (clang-cl cross-build): d3d12_bundle_test exits 0 ("bundles: 10 scenarios on the layer with 144-byte push constants and the --pc-tail-ubo twins, 20 host comparisons, 0 failures"), d3d12_typeless_families_test exits 0 ("82 clears compared with NVIDIA GeForce RTX 4080, 0 differ" and "16 draws compared with NVIDIA GeForce RTX 4080 (the 144-byte VS and its --pc-tail-ubo twin), 0 differ"), and d3d12_ia_bounds_test exits 0 ("9 cases match the host, 0 informational (144-byte push constants)"). d3d12_draw_test, d3d12_compute_test and shader_library_test also exit 0. This GPU reports a 256-byte push-constant limit, so the 128-byte device case was not exercised. AI-assisted. |
…ush-constant devices A device whose maxPushConstantsSize is 128 (AMD Windows driver on RDNA2 iGPUs, some Intel Arc drivers; D3D-14's push_constants_need_fallback) cannot hold the 144-byte ShaderUserData push-constant block, so previously every D3D12 PSO was refused there with E_NOTIMPL. With --pc-tail-ubo (PR ItsNotRexed#2046), translated shaders keep s0..s31 in 128 push-constant bytes and move the 16-byte tail (heap base, code base) to a uniform block at set 1, binding 0 when a stage reads it. This wires that path through the D3D12 -> Vulkan layer: - runtime/src/shader_library.h: ShaderEntry parses pc_tail.bytes into pc_tail_bytes (tested in shader_library_test). - runtime/src/vulkan_replay.h: ComputePipeline and GraphicsPipeline carry push_bytes, tail_set and tail_offset; detail::bind_user_data binds set 0 (if present), set 1 with dynamic offset (if present), and pushes push_bytes at all three push sites (ExecuteIndirect dispatch, Dispatch, Draw); the three unsupported checks cover tail_set. - runtime/shims/d3d12_vulkan_device.cpp: DeviceState::pc_tail creates one UNIFORM_BUFFER_DYNAMIC descriptor over the arena (range 16) plus an empty set-0 layout once per device. PipelineState::user_data_layout sizes the push-constant range from each stage's push_constant_bytes / pc_tail_bytes (so a --pc-tail-ubo stage that reads neither heap nor code base still fits 128 bytes), adds set 1 when any stage has pc_tail, writes the 16-byte tail once into the arena, and releases it on destruction. 144-byte shaders remain refused on <144-byte devices with a log pointing to --pc-tail-ubo. - Tests: d3d12_compute_test and d3d12_draw_test verify 144-byte refusal and --pc-tail-ubo dispatch/draw (including VS without pc_tail + PS with set-1 tail) on both simulated 128-byte devices and the host GPU, and skip the 144-byte passes when run on a real 128-byte device. - Docs: docs/d3d12_vulkan.md (sections 3.2, 5.2, Q13) and d3d12_com.h comment updated. Step 3 of the uniform-buffer tail claimed in ItsNotRexed#1902. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Gemini 4 Neon <noreply@google.com>
…fines The index buffer was bound without a size into the GPU address arena, so an index past the view read whatever followed it there, and a draw with no index buffer read past the zero page. D3D12 reads such an index as 0. Where the device has VK_KHR_maintenance5 and robustBufferAccess2, the index buffer is now bound with vkCmdBindIndexBuffer2 and the view's size (the zero page with its own size when none is bound), and robustBufferAccess2 is enabled at device creation. Both are needed for the read to be defined, so with either missing the old unsized bind is kept, with a log line. d3d12_ia_bounds compares nine cases with the PC runtime: indices past R16 and R32 views, vertices past a view, a view ending inside a vertex, no index buffer with a count past the zero page, and in-range controls. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The test's two stages declared one 144-byte push-constant range, so a device whose maxPushConstantsSize is the 128-byte Vulkan minimum refused the PSO (E_NOTIMPL at make_context) and none of the nine input-assembler bounds cases ran there; the AMD Windows driver reports 128 bytes on RDNA2 iGPUs. The fixtures now also come as a --pc-tail-ubo twin: the same GLSL compiled with -DPC_TAIL, whose stages declare s0..s31 alone (128 bytes) and no set-1 tail, since neither stage reads a root argument. A device with room for both layouts runs both and their probes must agree; one whose maxPushConstantsSize is below 144 runs the twin alone, which is where the cases were measured on RDNA2 hardware. Case E is information only where the bounded and the unbounded layer pass draw alike and the host differs: AMD's driver reads a vertex attribute past its view instead of zeroing it, so the case is not the layer's to decide there. A16, A32 and C keep their pass/fail condition on that device. Stacked on ItsNotRexed#2402's head (d230040) with ItsNotRexed#2676 applied, because the test and the layer path it needs are not on main yet. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…sh-constant devices Both tests' shaders declared 144 push-constant bytes, so a device whose maxPushConstantsSize is the 128-byte Vulkan minimum refused their PSOs and neither reached its checks (d3d12_bundle_test.cpp:130 via make_pso). d3d12_bundle reuses d3d12_draw_test's --pc-tail-ubo twins (vs_draw/ps_draw compiled with -DPC_TAIL) from a second library folder, and runs every scenario and the layer-only checks on a layer device limited to 128 bytes as well as with the 144-byte shaders. d3d12_typeless_families gets a -DPC_TAIL build of vs_fullscreen.vert (its pixel shaders declare no push constants) and draws each case on both. A device below 144 bytes runs the twins alone. Both layouts are held to the same grids or host bytes. Tested with LEONIDA_VK_VALIDATION=1 on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2): bundles 10 scenarios with both layouts, 20 host comparisons, 0 failures; typeless draws 16 of 16 equal the host; d3d12_draw_test still passes. Both devices report 256 bytes, so the 128-byte limit is simulated; a real 128-byte device has not run it. Stacked on ItsNotRexed#3013 (and ItsNotRexed#2402), which add the fallback the twins need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItsNotRexed#2402's user_data_layout call took {stages[0], stages[1]}, written when a graphics PSO's stages were {vs, ps}. Since ItsNotRexed#2109 they are {vs, gs, ps}, so on main stages[1] is the (usually empty) GS slot: the PS's pc_tail never reached the pipeline layout, set 1 was left out, and a --pc-tail-ubo PS failed VUID-VkGraphicsPipelineCreateInfo-layout-07988 and drew nothing (d3d12_draw_test line 358, d3d12_bundle's twin run). All three stages are passed now; user_data_layout skips the absent ones. This is the same slip 81ec7f7 fixed for the f16 halves link. Found rebasing ItsNotRexed#3106 onto main f847748. With it, d3d12_draw_test, d3d12_bundle, d3d12_typeless_families, d3d12_ia_bounds and d3d12_compute pass with LEONIDA_VK_VALIDATION=1 and no validation error on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tch folder After ItsNotRexed#3023 the test's own library is a testfiles::ScratchDir, and the twin's fixed %TEMP% folder (copied with an `overwrite` constant that no longer exists) would have brought back the race ItsNotRexed#3023 removed for parallel runs. The tail library is a ScratchDir too, copied with testfiles::copy_file. From @iurysf's read of ItsNotRexed#3106: creating the 128-byte-limited layer device now says why it failed instead of returning 1 silently, and the header says that no stage of this test's twin has a pc_tail, so it narrows the push-constant range only; the set-1 block is covered by d3d12_draw_test and d3d12_bundle. Tested with LEONIDA_VK_VALIDATION=1 on an RTX 5090 (NVIDIA 621.35) and an AMD Radeon iGPU (AMD 26.5.2): 16 of 16 draws equal the host, no validation error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
de58371 to
13f3c38
Compare
|
Tested 13f3c38 on Intel UHD Graphics 770, driver 32.0.101.7088, with the Khronos validation layer loaded by the loader: d3d12_bundle_test exits 0 with "bundles: 14 scenarios on the layer with 144-byte push constants and the --pc-tail-ubo twins, 25 host comparisons, 0 failures". d3d12_typeless_families_test exits 0 with "82 clears compared with Intel(R) UHD Graphics 770, 0 differ" and "32 draws compared with Intel(R) UHD Graphics 770 (the 144-byte VS and its --pc-tail-ubo twin), 0 differ". d3d12_draw_test exits 0 and prints "--pc-tail-ubo graphics: a 128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched there and on this GPU". All three report 0 validation errors. This device's bundle and typeless runs took the 144-byte path (no "below 144" line), so a real 128-byte device was not exercised in those two tests. AI-assisted. |
TEST-613 (finding by @whoalin1 in #2891).
d3d12_bundleandd3d12_typeless_familiesdeclared 144 push-constant bytes in their shaders, so on a device whosemaxPushConstantsSizeis the 128-byte Vulkan minimum (AMD RDNA2 iGPUs on older drivers, RX 580, Intel Arc) their PSOs were refused and neither test reached its checks. This gives both a--pc-tail-ubotwin, as #3013 did ford3d12_ia_bounds.d3d12_bundle: reusesd3d12_draw_test's-DPC_TAILbuilds ofvs_draw/ps_drawfrom a second library folder (VS 128 bytes, no set 1; PS 128 bytes with the heap base in the set-1 block). Every scenario and the layer-only checks run with the 144-byte shaders where the device has room, and with the twins on a layer device limited to 128 bytes. Both are held to the same expected grids.d3d12_typeless_families:vs_fullscreen.vertleaves outheap_base/code_baseunder-DPC_TAIL(the pixel shaders declare no push constants). Each draw runs on both layouts and is compared with the host. The clears are unchanged.docs/d3d12_vulkan.md: one sentence for each test.Rebased on main 561b65a
The stack (#2402, #2981, #3013 and this PR) was rebased again. #2402, #2981 and #3013 still haven't been rebased by their authors, so their conflicts are resolved here:
d3d12_vulkan_device.cpp:main's built-in depth-only fragment shader (for a PSO without a PS) and Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402'suser_data_layoutcall are both kept. From the previous rebase: the set-1 tail is booked asarena_shader, teardown keepsreport_arena()and the tail cleanup, the geometry stage is added only where the device supports it, and the layout goes throughcreate_layout().vulkan_replay.h(previous rebase): Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's tail binding and TEST-544: let d3d12_ia_bounds run at 128 push-constant bytes #2981's sized index bind read frommain's per-drawd.graphics/d.pipeline.remove_allcalls are gone, and its tail libraries ind3d12_draw_testandd3d12_compute_test, plus this PR's ind3d12_bundleandd3d12_typeless_families, are now per-processtestfiles::ScratchDirs copied withtestfiles::copy_file. With fixed%TEMP%names they would have brought back the parallel-run race Tests: per-process temp folders for shader libraries; d3d12_compute skips the CachedPSO host comparison under Wine #3023 fixed.d3d12_ia_boundsalready puts the process id in its folder names.d3d12_compute_test.cpp: Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's scoped slot-67 / cached-blob block, withmain's newer SKIP message andblob_bytesname.main's buffer-SRV checks are verified inside the 144-byte block where their dispatches run.d3d12_draw_test.cpp: Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's early return for devices below 144 bytes is kept.cs_user_data.comp: D3D-448 moved the compute root arguments to s4 onward. Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's-DPC_TAILvariant now reads s4/s5 like the 144-byte one, and its comment ind3d12_compute_testsays s4..s8.vulkan_replay.h:mainnow bindsvk.bindless_setin place of the pipeline's own set 0 when there is one. Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's shareddetail::bind_user_datadoes the same, so the three bind sites keep that behavior.d3d12_compute_test.cpp:main's arena-size block runs before the 144-byte-only result block.d3d12_draw_testCMake and#errorlist:main'sps_draw_uintsits beside Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices (3/3) #2402's tail shaders. TEST-544: let d3d12_ia_bounds run at 128 push-constant bytes #2981'sd3d12_ia_boundstarget sits besidemain's conservative-raster tier 2/3 targets.d3d12_typeless_families:mainadded 1D draws through aTEXTURE1DRTV. Each shape now runs with both layouts, so the test does 32 draws instead of 16, and the doc says so.f6404d63fixes a bug in #2402 that the first rebase exposed. #2402 built the graphics user-data layout from{stages[0], stages[1]}, but since #2109 the stages are{vs, gs, ps}. That madestages[1]the empty GS slot, so a--pc-tail-uboPS got no set 1 in its layout (VUID-07988) and drew nothing. It passes all three stages now. As @iurysf noted, whichever of #2402/#3013 is rebased first should fold it in.13f3c380covers @iurysf's two points aboutd3d12_typeless_families. Creating the 128-byte-limited device now prints why it failed. The header now says its twin has nopc_tailstage, so it narrows the push-constant range only, and set 1 is covered byd3d12_draw_testandd3d12_bundle. It also includes theScratchDirchange above.After the rebase,
d3d12_draw_test,d3d12_bundle,d3d12_typeless_families,d3d12_ia_bounds,d3d12_compute,d3d12_conservative_rasterandshader_libraryall pass on both GPUs below, with zero validation errors.Tested
With
LEONIDA_VK_VALIDATION=1, Windows 11, MSVC 14.44, zero validation errors:d3d12_bundled3d12_typeless_familiesd3d12_draw_test(sharesvs_fullscreen.vert)Both devices report 256 push-constant bytes, so the 128-byte case ran on the simulated limit (
max_push_constants_size = 128,push_constants_need_fallback), the wayd3d12_draw_testchecks its own twin. A run on a real 128-byte device would be welcome.Dependencies
Depends on: #3013
Depends on: #2402
This branch is stacked on #3013's head, so the diff against
mainincludes #2402, #2981 and #3013's commits until they land. Only the last three commits are this PR (the TEST-613 twins, the stage fix and the typeless follow-up). #2912 has merged and is included.AI-assisted (Claude Code). No game data.
🤖 Generated with Claude Code