Repository navigation
D3D-388: Bind packed vertex semantics separately - #3512
whattheflop wants to merge 913 commits into
Conversation
|
Automated test:
Same machine and setup as my earlier manual reports. AI-assisted (Claude Code). |
|
Code review and GPU probe of 147396b (AI-assisted; the diff from the merge base includes the #3403 dependency), on RTX 3090 (32-wide), driver 616.56, Windows 11 23H2, under
Two points:
Checked and found correct:
|
|
Tested 147396b on Windows 11, RTX 5080 (driver 616.92) and AMD Radeon iGPU gfx1036 (driver 26.10.1), MSVC RelWithDebInfo build of this head,
The synthetic packed-input D3D12 draw from the #166 report is not in the tree, so no packed draw was run on these GPUs. No negative control run. AI-assisted. |
# Conflicts: # docs/design.md
# Conflicts: # docs/design.md
# Conflicts: # docs/design.md
# Conflicts: # docs/character_skeleton.md
# Conflicts: # docs/design.md
# Conflicts: # docs/design.md
|
Tested 147396b (on its base
AI-assisted (Claude Code). |
- design.md: escape the literal pipes that split contract-table rows again, and merge the 76 repeated topics into one row each (sentence by sentence; no number dropped). - d3d12_vulkan.md: one milestone row per ID (the most complete of each), and LEONIDA_ARENA_LOG documented with the arena high-water report (D3D-55). - navmesh.md: one item 4 and 5 under Remaining unknowns (the +0xB8 footprint and octree-key wording). - sandbox.md: name vk_sandbox's source file; i18n index: one pt-BR row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up on the two review cases at |
|
Correction to my earlier comment (Tested 147396b): on this machine AI-assisted. |
|
Tested
Not covered here: the |
- replay_cpu_bench: ItsNotRexed#3693 moved a draw's render targets and vertex buffers into Draw::views (D3D-391); the bench builds a DrawViews block instead of writing the old inline arrays. - xgameruntime_user_test links file_system.cpp, which now defines rt::fs::game_dir that xgameruntime.cpp calls. - check_sparse_queue_family: a vkCreateInstance refused because the api_dump/validation layer is not installed is the documented "layer absent" skip (77), not a failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_bary_fallback: ItsNotRexed#3647 (BUILD-1046) made a missing input folder exit 2 with "does not exist"; the test from ItsNotRexed#1379 still expected exit 1. - test_format_decode_branch: the f16 reference uses the interpreter's pinned half_to_float (a NaN half widens to the canonical quiet NaN) instead of struct's '<e', whose NaN payload changed in Python 3.14 (CPython gh-130317). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges that each passed alone but clash together: - v_cmp_class_f64: the earlier cmp_class_f64 (685d16e) (operand-form checks, test_cmp_class_f64) and the later f64 branch in cmp_class both handled the opcode; f64 goes to cmp_class_f64 again, f16 stays in cmp_class. - rdna2spirv CLI tests: spirv-as/spirv-val now run in the output folder with the staging file's bare name, so the test doubles resolve it against cwd; assemble_spirv decodes the output only when it is bytes. (The doubles had been writing .spirv-*.tmp files into the repository root.) - ps_w64 fixtures (TEST-722): an 18th fixture (ps_w64_a_discard) landed; its killed lanes export nothing and keep the clear value. - first_light: a run without an OBJ removes mesh.bin, and harness_env reads manifest["files"]; batch_glb's stats name failures and dropped textures; run_gpu_tests reports a frame never written as a missing readback (TEST-837). - make_game TRANSLATION_SOURCES and runtime.yml's paths include spirv_opt.py and report_paths.py (and wave64_emulate_opt.py), which the translator imports. Repo rules: stdout guard on six tools; encoding on two opens (gen_gdk_runtime_classes' helper is read_utf8); newline on one write; anim_skeleton_match's joaat encodes like hashdict.joaat; test_feature_scan's new test is listed with the others its globals() runner reaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/runtime_imports.md # runtime/CMakeLists.txt # runtime/shims/xgameruntime.cpp # runtime/test/xmem_test.cpp # tools/rdna2spirv.py
- rdna2spirv: %fmt_size_tab (main's typed-load size table) registers its length and entry constants when a load
first uses it; created at assembly, %c128 came after the OpTypeArray naming it and spirv-val refused
buffer_store_format_d16 modules (test_u16_high_half).
- test_vs_packed_inputs matches main's wording of the same SHADER-644 rule ("mixed component types").
- test_mutations: the v_mul_legacy_f32 anchor follows the SHADER-340 flushes (it had stopped matching on main).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItsNotRexed#2887 added the fixture to the M2 build; with no entry in OTHER_HARNESS the GPU suite reported it as "no checker defined". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep per-semantic locations, inputless vertex shaders and shifted fetch masks while retaining round-43 translator and Vulkan changes. AI-assisted (Codex).
|
Round-43 reconciliation is up at Both full semantic runs exercised 6,245 tests and reproduced the same three loop-ballot failures and two errors, with four skips and one expected failure on each tree. The current |
|
Verified on Linux (CPU-only): merges cleanly with current main. All Python-side coverage passes — test_vs_packed_inputs (18 under pytest), the rewritten test_vertex_input_locations (5), and the full translator regression test_translate + test_rdna2spirv_pixelinput at 600 passed / 4 skipped; the guard passes and the fixture is a hand-written listing. Note the branch's first dedupe commit is what main shipped as SHADER-644 in 4c52ce2; your later map_vertex_inputs replaces it cleanly in the merged tree with every caller updated, so the history reads coherently. The C++ half (d3d12_vertex_layout_test, inputless-VS and shifted-mask handling) cannot be built on this Linux host — the GPU behaviour still needs a Windows run. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Flyander
left a comment
There was a problem hiding this comment.
One valid no-vertex-shader PSO path still reaches a null dereference.
| Stage& gs_stage = stages[1]; | ||
| Stage& ps_stage = stages[2]; | ||
| VertexLayout vertex_layout; | ||
| if (const HRESULT hr = build_vertex_layout(desc.InputLayout, *vs_stage.entry, |
There was a problem hiding this comment.
[P2] Handle a missing VS before building the input layout. Repro: call CreateGraphicsPipelineState with a valid descriptor whose shader bytecodes are all empty and whose input layout is empty. Microsoft’s D3D12 specification permits a graphics PSO with no shader objects (CPUEfficiency.md, CreatePipelineState validation). The stage loop skips the null VS at line 2790, leaving vs_stage.entry == nullptr; this dereference then crashes instead of returning an HRESULT. Please build an empty layout for that case or otherwise handle the missing vertex stage before dereferencing it.
There was a problem hiding this comment.
Thanks for raising the shaderless PSO case. On the reviewed head, the VS bytecode guard already returns before stage lookup and layout construction. D3D12 permits shaderless PSOs, and this Vulkan path builds a complete primitive pipeline with a required vertex stage. In ea871dcc an omitted VS now returns E_NOTIMPL before accessing Vulkan state. A nonzero bytecode length with a null pointer still returns E_INVALIDARG.
The native MSVC runtime, D3D12 shim and pipeline checker built, and all three focused CPU CTests passed. Source inspection confirmed the guard ordering. CPU-only verification, AI-assisted.
Distinguish an omitted vertex stage from nonempty bytecode with a null pointer. Keep the early guard before Vulkan work and retain optional geometry and pixel stages. AI-assisted (Codex).
|
Tested ea871dc 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. |
D3D-388 follows the coordination claim. Main already contains the SHADER-644 register deduplication in
4c52ce27.Give each independently bound semantic in a packed VS register its own typed Vulkan location. The ISG1 mask routes the attribute components to the logical VGPR columns. The runtime matches semantic name and index, preserves buffer slots and offsets, and validates attribute uniqueness and device limits. It retains upstream instance-divisor support.
The update at
1900cdb0addresses the inputless and shifted-mask review cases. An inputless vertex shader uses zero attributes even if ISG1 declares packed semantics. Ordinary legacy entries retain the register-location fallback. A legacy index with live packed inputs needs regeneration to provide unambiguous locations. Standalone shifted masks route the source components into the declared columns, while ordinary XYZ positions retain the Vulkan W default. The pipeline checker uses the physical locations fromvertex_inputs.Verification
1900cdb0on4c52ce27passed 743 targeted translator tests (five skips), both native MSVC CPU CTests, and six translated-interface checks with Vulkan 1.2 SPIR-V validation. The full 7,456-test semantic run had seven failures and two errors, all reproduced on exact main.aa2988ccpassed all 23 focused packed and vertex-location tests. These follow-up checks were CPU-only.147396bd, an RTX 3080 (NVIDIA 616.64) synthetic packed float draw matched all 4,096 pixels in each of two runs with zero Khronos core or synchronization validation warnings/errors. GPU reportAI-assisted.