Repository navigation
Conversation
The shared scalar ALU already lowers all three, SCC included. The mesh frontend refused them with "unsupported mesh instruction or EXEC state". They now join s_bfe_u32 and s_min_u32 on the shared path, with the same EXEC and VCC destination refusals. On a native Mesh86 capture (1,569 distinct slot 86 programs), these were the first refusal for 555 of them, and 122 more now translate fully. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up on R0Y00#3708. After s_cmp_eq_u32 s20, 0, an s_cselect_b32 behind s_brev_b32 still selects on the compare's SCC, and behind s_not_b32 on (result != 0). Both selects reach the exported X. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adopt the existing committed desktop backing for a placed material view, refresh it from title memory at submit, and copy only changed runs. Keep the existing backing and its fences; a submitted GPU write stops refreshes. Add a source-built two-SRV fixture with range, token, stale, budget and mutant controls. Refs R0Y00#3640, R0Y00#3638, R0Y00#3545.
Both are already lowered by the shared ALU (the reciprocal as v_rcp_f32, the shift as an arithmetic right shift by src0 & 31). The mesh lane ALU list now admits them, so the full_exec || exec_skip rule and the partial-write merge apply unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up on R0Y00#3709: v-rcp-iflag-f32 now checks that the reciprocal's bits reach the exported X, as v-ashrrev-i32 already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the mesh frontend The mesh frontend narrowed EXEC only for v_cmpx_eq_u32, ne_u32 and lt_u32, and for v_cmpx_gt_u32 only in the lane-linear count form. Mesh86 programs also use v_cmpx_lg_f32, v_cmpx_gt_f32 and a per-lane v_cmpx_gt_u32. They now get the same EXEC-only narrowing through the shared compare: lg is an ordered fcmp one and gt_f32 an ordered ogt, so a NaN lane leaves EXEC, and gt_u32 is icmp ugt. The count form of v_cmpx_gt_u32 is still matched first. Float abs/neg, SDWA, DPP, clamp and omod stay refused. Part of R0Y00#3703. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re the guard Inside the vertex skip, skinned mesh programs save EXEC, narrow it with one v_cmpx_ne_u32 and no EXECZ, run straight-line VALU work and restore the saved vertex mask. The restore was refused as "mesh EXEC write inside a lane-skip block". When the CMPX runs, every register is exact for the skip's guard lanes. A write under the narrowed mask whose old value is still that exact value (unchanged since the CMPX, or itself merged) is now merged per lane with it, so it stays exact for the guard. A restore of the guard's saved mask keeps every register that is unchanged since the CMPX or merged, and clears the rest, such as a register first written under the narrowed mask. A second narrowing, or a restore of a mask saved under the narrowed EXEC, stays refused. Part of R0Y00#3703. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at the same restore The R0Y00#3671 lane-limit proof tags partial VGPRs with the vertex skip's lane count when the skip closes, so an export under the same count may read them after full EXEC returns. It required the closing skip's guard to be the current lane mask. When a nested CMPX skip inside the vertex skip exits to the same EXEC restore, the nested mask is still current at the outer close, so the proof was skipped and the restore erased the position VGPRs ("graphics register undefined on an incoming path"). A nested per-lane skip now records the parent guard when it opens directly after a single CMPX that narrowed it. Nothing ran under the narrowed mask outside that skip, and the skip branches per thread, so after it closes every register is exact for each of the parent's lanes. If the parent then closes at the same instruction, its lane limit applies as before. Any other narrowing, a write between the CMPX and the EXECZ, or another path arriving at the restore keeps the previous behavior. Part of R0Y00#3703 (item 6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…estore A chain of per-lane skips, each opened straight after a CMPX that narrows the skip around it, merges every register per lane when it closes. R0Y00#3710 carried that fact from one nested skip to its parent only, and only when the parent closed at the same instruction. Skinned mesh programs nest three such skips inside the vertex skip and close all of them at a restore of the vertex mask, after which the vertex skip goes on. The restore then treated every register written since the mask was saved as stale and cleared it, so the next read refused with "graphics register undefined on an incoming path". The carried lane set now passes through any depth of skips closing at one pc, and an EXEC restore at that pc keeps the register file when the restored mask is the carried guard of the enclosing skip. The set is tied to its pc so it never describes a later instruction. A write between the innermost CMPX and its EXECZ, or a narrowing that is not a CMPX, still breaks the chain. Part of R0Y00#3703. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…able V# The mesh frontend accepted buffer_load_format_x only from a resource heap slot. Skinned slot 86 programs read the V# whole from a bound descriptor table instead and were refused with "formatted mesh load lacks an R32_UINT resource heap contract". Translator: a format load whose V# comes from a bound table goes through the shared typed-buffer SRV path, as in vertex and pixel shaders, which checks the table binding and all four descriptor words. The R0Y00#3720 control that kept this route refused under heap tokens now checks that it compiles without a token view. Runtime: slot 86 accepts a one-dword typed_buffer_srv from a descriptor table and binds it as an R32_UINT buffer view through the same checks as a typed heap slot (R32_UINT token view, or a raw V# with the identity component map and a 4-byte stride). A raw table V# must also name a 32-bit format (32_UINT, 32_SINT or 32_FLOAT), so the view returns the dword the guest load would. Those word 3 checks live in mesh86_typed_vsharp.h with unit tests and two mutation controls. Part of R0Y00#3703. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A merged value is exact for the guard's lanes only in the register it was merged into. Keying the merges by value let a copy of a merged value into another register pass the restore as exact. Record the merged value per register instead, and add the copy fixture from review plus a second merge into the same register. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A raw V# with SWIZZLE_ENABLE (word 1 bit 31) or ADD_TID_ENABLE (word 3 bit 23) set addresses elements differently from the linear R32_UINT view slot 86 binds, so refuse it on both the heap and the table route. Add a linear_addressing unit case with two header mutation controls, and run the mesh86_typed_vsharp tests in the pr preset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pr test filter runs mesh86_typed_vsharp_*, but the pr build preset only builds its listed targets, so CI reported the tests as not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inside a SAVEEXEC then arm the compiler often copies EXEC, runs some vector work, narrows EXEC with one CMPX, skips with EXECZ and restores the copy. Each lane runs the work and then the skipped instructions only if the compare holds: the same if-only region s_and_saveexec_b64 would open on the compare. The then-arm scan now registers it as a child region and the mesh frontend lowers it as a nested diamond on the shared compare, through the existing nested SAVEEXEC join and restore. The region needs its own restore of the copied register inside the arm; anything else stays an EXEC read of the then arm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The compiler also narrows the rest of an if-only SAVEEXEC then arm with a CMPX whose EXECZ skips to the arm's end, leaving the EXEC copy unrestored. The rest of the arm is then the region, and the SAVEEXEC restore ends both. Accept that form when the enclosing arm has no else arm (its inverse would read the narrowed EXEC), and visit the join address again after the region closes so the enclosing arm ends there too. Regions chain the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The then-arm scan recorded every scalar destination as a register pair, so a 32-bit write such as s_lshl_b32 s7 also marked s8 as written. At the join s8 was clobbered, and a lane mask kept there was lost; the else arm also could not read the neighbour. Record the pair only for 64-bit SALU forms and for non-SALU writes (compare masks, readlane), as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A buffer_load_dword, or a buffer_load_format_x from a descriptor-table V#, without OFFEN, with a uniform IDXEN index if any and a constant or uniform SOFFSET, reads the same address in every lane. Until the shader stores to memory it returns the same dwords in every lane, so mark them uniform under the same conditions as the heap typed load and let a following v_readfirstlane read them. The address is checked before the load, whose destination may be its own index register. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the scalar bit operations, the forced slot 86 mesh path refused v_cvt_f16_f32 in 357 requests and v_and_or_b32 in 331, ahead of the control-flow, heap-provenance and pixel blocks. - v_and_or_b32 (VOP3 0x371) joins the mesh vector list that already handles v_or3_b32 and v_add3_u32, so it takes the three-source alu_rules entry and lowers to (S0 & S1) | S2. The shared operand gate still refuses abs, neg, clamp and omod. - v_cvt_f16_f32 (VOP1 0x0A) joins the same list and reuses the compute frontend's integer round-to-nearest-even narrowing: the sign comes from bit 31, binary32 subnormals become signed zeros, binary16 subnormals are kept, overflow including the 65520 tie gives 0x7c00, and a NaN keeps its quiet bit. The encoding goes into the low half and the reaching destination value keeps the high half, as the compute frontend does, so an unproven destination still refuses and the merged word is not treated as uniform. tests/native_direct_mesh_check.py adds source-built programs with the run helper: v_and_or_b32 with s20 = 0x0000ffff and s21 = 0x00ff0000 exports (and v0, 65535) | 0x00ff0000, and v_cvt_f16_f32 exports the narrowed word for 1.0f, 0.0f and -2.0f. Controls reject an unbound third source and an unproven conversion source or destination. Observed IR: - %t8 = and i32 %v0, 65535 ; %t9 = or i32 %t8, 16711680 - v_cvt_f16_f32: lshr <bits>, 16 / and ... 32768 for the sign, and <bits>, 2147483647, lshr ... 23, and ... 8388607, the nearest-even narrowing with icmp ugt %exp, 142 -> 31744 and icmp ugt %mag, 2139095040 -> 32256 | quiet bits, then or %narrow, %sign, and %destination, -65536 and the final or. Verified: - cmake --build --preset release --target compile_dxil (7/7 steps, compile_dxil.exe linked) - python -B tests/native_direct_mesh_check.py <compile_dxil.exe> <dxc dir>: exit 0, "mesh allocation, indexed outputs, group exchange and negative controls passed" - ctest --preset release --no-tests=error -R '^native_direct' 2/2 passed: native_direct_container 15.04 s, native_direct_mesh 13.78 s - python -B tests/docs_links_check.py: 210 files, 807 links Refs R0Y00#3703
…codex/m1-slot86-evidence
…of' into codex/m1-slot86-evidence # Conflicts: # CMakePresets.json # docs/experiments/mesh86-pixel-execz.md
… codex/m1-slot86-evidence # Conflicts: # CMakePresets.json
# Conflicts: # CMakePresets.json
# Conflicts: # src/gfx1013_direct_mesh.inl # tests/native_direct_mesh_check.py
Request 062d66b9e013f28e loads a raw V# from root parameter 1, descriptor record 2 (SRV t20 space1). The record has NUM_RECORDS zero, so every load is out of bounds and reads zero on the hardware. The Mesh86 input resolver now binds a 16-byte zero view for a zero-record descriptor and logs the guest table, record and descriptor once; the ordinary compute input path still refuses zero records. The new source-built fixture publishes a PS-less mesh profile with an 8-byte descriptor-table SRV and writes a raw V#: a nonzero buffer must write depth 0.5, a zero-record null must read zeros, and an unmapped base must keep its named refusal. WARP currently fails startup_mesh86_input_stream_warp with a device removal after DispatchMesh (map argument readback 0x887a0005); the hardware run is still pending.
The hardware fixture now prints the raw V# base, stride and record count, and the check requires them beside the depth proof.
startup_mesh86_input_stream_warp now returns 77 only when the dispatch removes the WARP device with 0x887a0005, the same failure the existing startup_mesh86_psless_warp fixture has. Any other failure still fails the check; the RX 9060 XT run proves the bind.
The prologue request 062d66b9e013f28e binds root parameter 1 record 2 (t20 space1) with NUM_RECORDS zero. Document the null-view binding, the source-built controls, the RX 9060 XT pass and the WARP device-removal skip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The Mesh86 input path now treats a zero-record buffer descriptor as an empty
view: every element is out of bounds, so the hardware reads zero. The resolver
binds a 16-byte zero view and records the guest table, record and descriptor
once. The ordinary compute input path is unchanged and still refuses zero
records.
Request 062d66b9e013f28e reaches bind_native_mesh86 with:
0x40 is descriptor record 2. The guest root signature parameter 1 table
declares t12 space1, t69 space1, t20 space1, t6 space1 and b0 space1, so the
empty record is SRV t20 space1. The captured mesh shader has an empty input
signature and only emits SV_Position; its guest code loads that V# with
s_load_dwordx4 s[32:35], s[10:11], 0x40 and reads from it on one branch.
NUM_RECORDS is zero, which is an empty view rather than a missing backing.
Tests
tests/startup_indirect_mesh_input_stream.hlsl is a source-built PS-less mesh
stage with a descriptor-table ByteAddressBuffer at t0 that reads two DWORDs and
emits one triangle. tests/startup_mesh86_input_stream_check.py publishes the
desktop profile and runs three cases:
1.0;
named "an input is in title memory outside any placed buffer" refusal.
Exact commands from the worktree:
Hardware RX 9060 XT: passed. The fixture printed its nonzero V# and the shader
wrote depth 0.5; the zero-record and unmapped controls also passed.
WARP: startup_mesh86_input_stream_warp returns 77 only when the dispatch
removes the WARP device with 0x887a0005. The existing
startup_mesh86_psless_warp fixture has the same device removal on this driver,
so the skip is a documented adapter limitation, not a silent pass. Any other
WARP failure still fails the check.
Title replay: the isolated 420 s run was stopped when the integration run took
over the title proof. Its earlier 360 s attempt did not reach the prologue mesh
bind; its compute census showed 0 translated dispatches and refusals with
"an input is in a placed buffer that does not alias title memory" before the
mesh path. The key 062d66b9e013f28e therefore has not yet been observed after
this change in a title run.
Stack
Stacked on #3803 and #3725; the branch starts at de12a89.
Refs #3763
Refs #3641