Repository navigation
Runtime: link sparse mesh varyings at graphics pipeline creation (BUILD-1463) - #4954
jeremygold02 wants to merge 10 commits into
Conversation
…h (D3D-29) The device enables VK_EXT_mesh_shader (meshShader) where the GPU has it and reports MeshShaderTier 1 only then. ID3D12Device2::CreatePipelineState parses pipeline state streams in the d3dx12.h layout into the descriptions the existing PSO creators take, with the runtime's defaults for missing subobjects. Streams the PC runtime refuses are E_INVALIDARG; AS, depth bounds, split stencil masks and view instancing are E_NOTIMPL with a log. A mesh PSO is MS + PS with no vertex input or input assembly, and no dynamic topology or strides. Its output sizes and workgroup are checked against VkPhysicalDeviceMeshShaderPropertiesEXT. DispatchMesh records a Draw with mesh set and replays as vkCmdDrawMeshTasksEXT; a draw of the wrong kind for its pipeline fails with ReplayResult::invalid_draw. d3d12_mesh_test covers the refusals and checks a 2x2x1 and a 1x1x2 mesh grid plus a VS PSO from a stream, pixel by pixel. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates; mesh test skips without Vulkan The stream parser keyed its duplicate check on the raw subobject type, so DEPTH_STENCIL with DEPTH_STENCIL1 (either order) or RASTERIZER with RASTERIZER2 was accepted; D3D12_PIPELINE_STATE_STREAM_DESC counts versions of one subobject as the same one. The check now uses the base type, while the payload still follows the original type. d3d12_mesh_test covers both mixed orders, RASTERIZER + RASTERIZER2, and each description alone. Reported by Vonsek in review. d3d12_mesh_test failed on a machine without a Vulkan device (the Windows CI runner) instead of exiting 77; it now skips there like d3d12_draw_test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use both submitted FSSM tables and translated interface declarations to connect dense fragment inputs to native mesh exports. Keep the fragment module local to its pipeline and cover shared-fragment draws and unsupported layouts. Refs: ProjectLeonida#1712, ProjectLeonida#4816
A PerVertexKHR triangle array consumes the location of one vec4. Recognize this shape alongside ordinary inputs and keep plain arrays outside the supported mapping. Refs: ProjectLeonida#1712, ProjectLeonida#4816
|
Independent Windows/Vulkan check at Environment: Windows 11 build 26300, MSVC 19.51.36260.0, NVIDIA GeForce RTX 5070 driver 621.24, Vulkan SDK 1.4.363.0, RelWithDebInfo, Vulkan validation enabled.
Non-blocking: the test-only No game data; synthetic shaders and pixels only. AI-assisted. |
whattheflop
left a comment
There was a problem hiding this comment.
Independent Windows CPU verification, AI-assisted. The exact #1712 dependency and this head each dry-merged cleanly with 3faac557. MSVC 19.38 built spirv_mesh_inputs_test. In a separate valid synthetic harness, linking fresh copies of one fragment in A → B → A order remapped its input locations to (4, 2), (3, 5), and (4, 2). All three matched independently assembled expected modules. Exactly two words changed per call; render targets, FragCoord, the original fragment and the first linked result stayed intact. All eight modules passed spirv-val for Vulkan 1.2.
One docs detail: the runtime guide can mention that a nonidentity dense permutation is refused even when the tables agree, because its occupied location set cannot distinguish an already-linked interface. This check used no GPU or game inputs.
|
Linux check of effca4a (Arch, in a VM, GCC, Ninja, RelWithDebInfo, Mesa llvmpipe): the runtime builds, and the full Linux CTest passes 51 of 51, including the new |
|
Non-blocking addendum after reading the rest of the diff (tests and GPU result above still stand):
The branch also carries #1712 (4 commits, 1,251 insertions); the PR diff is only the last commit. AI-assisted review, no game data. |
|
Independent check of Environment: Windows 11, MSVC 19.44 (RelWithDebInfo, Ninja), NVIDIA GeForce RTX 5090 (driver 617.42), Vulkan SDK 1.4.363.0, Built
So sparse (vertex-indexed) fragment inputs now link at pipeline creation and rasterize correctly on the newest NVIDIA arch — previously the varyings were dropped/unbound. The wrong-kind-draw and oversized-grid refusal paths also verified live. Not run: negative control — the change is header-coupled across AI-assisted (Devin). |
|
Tested AI-assisted (Claude Code). Synthetic data only, no game files. |
…h (D3D-29) The device enables VK_EXT_mesh_shader (meshShader) where the GPU has it and reports MeshShaderTier 1 only then. ID3D12Device2::CreatePipelineState parses pipeline state streams in the d3dx12.h layout into the descriptions the existing PSO creators take, with the runtime's defaults for missing subobjects. Streams the PC runtime refuses are E_INVALIDARG; AS, depth bounds, split stencil masks and view instancing are E_NOTIMPL with a log. A mesh PSO is MS + PS with no vertex input or input assembly, and no dynamic topology or strides. Its output sizes and workgroup are checked against VkPhysicalDeviceMeshShaderPropertiesEXT. DispatchMesh records a Draw with mesh set and replays as vkCmdDrawMeshTasksEXT; a draw of the wrong kind for its pipeline fails with ReplayResult::invalid_draw. d3d12_mesh_test covers the refusals and checks a 2x2x1 and a 1x1x2 mesh grid plus a VS PSO from a stream, pixel by pixel. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates; mesh test skips without Vulkan The stream parser keyed its duplicate check on the raw subobject type, so DEPTH_STENCIL with DEPTH_STENCIL1 (either order) or RASTERIZER with RASTERIZER2 was accepted; D3D12_PIPELINE_STATE_STREAM_DESC counts versions of one subobject as the same one. The check now uses the base type, while the payload still follows the original type. d3d12_mesh_test covers both mixed orders, RASTERIZER + RASTERIZER2, and each description alone. Reported by Vonsek in review. d3d12_mesh_test failed on a machine without a Vulkan device (the Windows CI runner) instead of exiting 77; it now skips there like d3d12_draw_test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent pipeline was rebased upstream. The first parent carries the verified seven-file change on the refreshed dependency. Refs: ProjectLeonida#4954
Verify the sparse mesh input and shared vertex-stage pixel shader while retaining main's query checks around the same draws. Refs: ItsNotRexed#2359, ItsNotRexed#4954
|
Independent Windows check of 333ae0fb. RTX 3080 Ti, NVIDIA 621.35, MSVC 19.44, Vulkan SDK 1.4.363.0. In the focused AI-assisted. |
|
Tested 333ae0f merged with main 8575d36 on Linux (WSL2) / Python 3.12.16, g++ (C++20): pass |
|
Independent native Windows GPU check of I used the same three shader binaries and the same test object with the exact PR and The original full test also hits |
|
Combined validation follow-up on native Windows 11 with RTX 5090 (616.56) and Radeon gfx1036 (32.0.21042.62). The original, un-reordered pixel comparison now passes together with the statistics assertions. I started at #4954
AI-assisted (Codex). Synthetic inputs. |
…otRexed#4191 ItsNotRexed#4366 ItsNotRexed#4371 ItsNotRexed#4459 ItsNotRexed#4496 ItsNotRexed#4954 ItsNotRexed#5020 ItsNotRexed#5049 ItsNotRexed#5055 ItsNotRexed#5078 ItsNotRexed#5080 ItsNotRexed#5111 ItsNotRexed#5114 ItsNotRexed#8919 fork integration. Each parent after the first is an exact reviewed PR head. ItsNotRexed#3775 42f3708 ItsNotRexed#3775 (comment) ItsNotRexed#3797 b4f9cfd ItsNotRexed#3797 (comment) ItsNotRexed#4191 e07de94 ItsNotRexed#4191 (comment) ItsNotRexed#4366 441ccbe ItsNotRexed#4366 (comment) ItsNotRexed#4371 e51322e ItsNotRexed#4371 (comment) ItsNotRexed#4459 fb49010 ItsNotRexed#4459 (comment) ItsNotRexed#4496 31e1bb1 ItsNotRexed#4496 (comment) ItsNotRexed#4954 333ae0f ItsNotRexed#4954 (comment) ItsNotRexed#5020 0395106 ItsNotRexed#5020 (comment) ItsNotRexed#5049 38a103f ItsNotRexed#5049 (review) ItsNotRexed#5055 280730c ItsNotRexed#5055 (comment) ItsNotRexed#5078 041535a ItsNotRexed#5078 (review) ItsNotRexed#5080 8202506 ItsNotRexed#5080 (comment) ItsNotRexed#5111 9f9f749 ItsNotRexed#5111 (comment) ItsNotRexed#5114 af9740d ItsNotRexed#5114 (comment) AI-assisted integration.
BUILD-1463
The native mesh pipeline first reviewed in #1712 is present on main through #2359. The current diff against
f4cd3061contains seven linkage and test files. Linkage diff | ClaimAn ordinary mesh pipeline can compile successfully and still interpolate the wrong value. The translator numbers fragment attributes densely, while the mesh keeps native export numbers. When the fragment skips an export, two compatible
vec4outputs can both satisfy Vulkan's type check.At
CreatePipelineStatethe submitted mesh and fragment programs identify the pair. This change reads their existing FSSM tables, cross-checks both translated interfaces and edits only the fragment input Location operands for this PSO. It supports directvec4andPerVertexKHRtriangle-array inputs. Other pipelines sharing the fragment still receive their own original words. The offline utility remains independently usable. Offline linkerVerification
At
333ae0fb, both the CPU linkage test and the normal D3D12 mesh draw passed after a one-worker MSVC 19.44 rebuild. The synthetic mesh and vertex draws shared a pixel shader and matched all 4,096 pixels on the NVIDIA GeForce RTX 5070 (621.01, subgroup 32). The upstream pipeline-statistics assertions also ran and passed. Host: Intel Core Ultra 7 265K, Windows 11 Home 25H2.The new 64×64 synthetic fixture submits two graphics pipeline streams through the normal D3D12 device. The mesh writes distinct colors at locations 0 and 1. Its pixel shader requests the second export. The VS pipeline then reuses that pixel shader and supplies its color at location 0.
effca4a28b94b8c7d4234794f2d06750ac8cdb32, all 4,096 pixels matched (exit 0): 1,024 red and 512 green mesh pixels, 1,024 yellow VS-control pixels and 1,536 clear blue pixels. The three shader binaries had identical hashes for the two runs and all three passed Vulkan 1.3 SPIR-V validation. The runtime was built with MSVC 19.44 and CMake 3.31.6 in RelWithDebInfo./W4. They cover a sparse map, a render target sharing an input's original location, identity, malformed/contradictory rows, unsupported types, a dense permutation, repeated linkage, and a mix of ordinary and vertex-indexed inputs. The hand-written mesh, original mixed fragment, linked mixed fragment, and undecorated-array negative all passedspirv-val --target-env vulkan1.2.Run
ctest --test-dir <build> -C RelWithDebInfo -R "^(spirv_mesh_inputs|d3d12_mesh)$" --output-on-failurewith Vulkan headers, glslang and a mesh-capable GPU. This change covers native MeshEXT graphics pipeline creation. Compute fallback and decoded-half placement have separate interfaces.AI-assisted by GPT-6.2 Astra.