Skip to content

shader: merge current main into the native shader module stack - #3241

Merged
R0Y00 merged 99 commits into
R0Y00:codex/native-shader-modulesfrom
lambirou:merge/native-shader-main-current
Nov 28, 2026
Merged

R0Y00 merged 99 commits into
R0Y00:codex/native-shader-modulesfrom
lambirou:merge/native-shader-main-current

Conversation

@lambirou

@lambirou lambirou commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Updates #3091's codex/native-shader-modules branch to current main 7e5c378d, on top of the current base 71e23baf, without modifying either target branch. This is a merge-only PR; R0Y00 can merge it to refresh #3091. Conflict resolutions: - Base merge (#3138/#3308): keep #3138's sidecar_changed invalidation together with the branch's compute dependency_changed/lost checks in the watch gate; keep #3308's reviewed address-only mesh pixel inputs. - src/shader_compute_request.cpp: use the shared graphics_request_key/compute_request_key helpers, and keep read_pixel_inputs so both .psin and .ps57in records are read. - src/gfx1013_direct_compute.inl: keep the BCNT64 block alongside main's combine_scalar_mask, both output shapes (virtual waves 64x1x1, flat compute-derivative quads x*y*z), the exact_store/indexed gates, WREXEC and the virtual-wave derivative refusal. - src/gfx1013_compute_native.cpp: accept main's raw-store cache-policy naming while keeping the branch's direct-compute paths. - tools/startup/compile_dxil.cpp: keep both --rekey and --prepare-compute-pack in the usage text, and both watch invalidations. Validation at 48b2027c, Windows 11 build 26300, WARP 10.0.26100.10068 and RX 9060 XT 32.0.32029.2010: Debug: 18/18 selected controls pass, zero skips. Release /O2: 18/19; the only failure is native_ldexp_f16_hardware on this RX 9060 XT, and unmodified main 3926a289 fails it identically (got beef7c00, expected beef0200), so it is upstream #3123. The set covers direct container/mesh, pack/frozen, the compile watcher, interface/WQM, request cache, SALU shift64, image cache flags, WREXEC64, #3262 EXEC/VCC and the packed virtual-wave derivative control. The (8,4,1) native_compute_implicit_lod_hardware mismatch also still reproduces on unmodified main and remains #3255. The D3D12 debug layer is unavailable (0x887a002d). This does not change the flag fix in #3139; it only refreshes the compiler base and keeps both merged features.

pigalot and others added 12 commits November 26, 2026 15:17
A Texture3D description in the 4 KiB standard layout with one mip and an uncompressed format is now detiled from its thick blocks (GFX10_SW_4K_S3_PATINFO rows) instead of refused. The XG-size hold counts a volume as one slice, since its footprints already span every depth layer.
A Texture3D description in the 4 KiB standard layout with a mip chain is now detiled instead of refused. Each layer of thick blocks holds that layer of every mip: the shared tail block, then the mips from the smallest to the largest, with the tail mips at the origins addrlib gives them. The mip-count check counts a volume's depth.
A Texture3D description in 0x105 with a BC1 to BC7 format was refused as
unsupported_description. addrlib rounds the texel width and height of a
block-compressed surface up to whole 4x4 blocks before laying it out and
does not divide the depth, so a BC volume takes the thick layout of the
volume of its blocks. Layout::thick now sizes the mips, the tail and the
blocks from those element sides.

startup_gfx10_volume checks two BC volumes against the volumes of their
blocks and round-trips seven more; the new bc control sizes them by
texels and must fail. The addrlib run compares 501 volumes (13,205,290
addresses, 0 mismatches), and startup_address_console draws three BC1
volume mips. startup_gfx10_layout's two BC-volume refusals now use
0x109, which stays refused.
Main now holds the volume mip chain change as a squashed commit; its files
replace the old copies here and only the block-compressed volume change remains.
…0Y00#3231)

The runtime writes <cache>/revision.txt with its first request. Two native-path
checks still compare the whole cache directory, so a release build that reaches
that write reports the metadata file as a published shader.

Filter revision.txt from the request-set assertion and from the publication
check. The other native checks already do this.
…00#3227)

Co-authored-by: RonLogic <307541314+RonLogic@users.noreply.github.com>
)

Add packed_f16_inline_constant() in DirectCompute and share it between packed_f16_alu() (v_pk_add_f16, v_pk_mul_f16, v_pk_fma_f16) and packed_minmax() (v_pk_min_f16, v_pk_max_f16, v_pk_min_{i,u}16, v_pk_max_{i,u}16). Inline binary16 float constants 240..248 decode with bits [31:16] zeroed per gfx1013 hardware, inline integers 128..208 decode to 32-bit sign-extended values, and vcc/m0/exec/scc/float-on-int/clamp refusals stay intact.

Fixes R0Y00#3226

Refs R0Y00#2935

Refs R0Y00#3224

AI-assisted.

Co-authored-by: legacy-code-archaeologist <359844974+legacy-code-archaeologist@users.noreply.github.com>
Port of R0Y00#3006 onto main.

Bit 20 of .sa dword 4 now sets ComputeRequest::wave32 (set: wave32,
clear: wave64). The direct DXIL route compiles a wave64 request with
more than 32 threads per group through the existing wave64 path; a
wave64 group of at most 32 threads stays on the wave32 model. Request
keys and the revision-29 / revision-28 archive handling are unchanged.

Native compute manifests end with 'native <revision>'
(src/native_compute_output.h). The stand-in refuses a native manifest
from another revision, or an unmarked one without the Python
translator's <key>.cs.hlsl, and looks again on the ManifestRetry
schedule of an absent manifest. compile_dxil --watch rebuilds both, and
a native publish removes a leftover <key>.cs.hlsl.

Source-built fixtures that relied on the wave32 default now set the
bit, and fixtures that copy a Python translation also copy its
sidecar.

AI-assisted.
* runtime: name each refused condition of a compute output buffer

The refusal "an output is not an aliased placed buffer range with unordered
access" covered nine conditions. Each now has its own reason in the log and
the census: a view token, zero records, a range over 16 MiB or not whole
dwords, a range crossing a placed buffer's end, memory outside any placed
buffer, a copied placement, a resource not created in the common state, an
offset not 16-byte aligned, and no unordered access. What is bound and what
is refused do not change.

tests/startup_compute_dispatch_output_check.py produces each condition on
case A and checks its reason, the census line and an untouched output.
dispatch-swapped now expects "an output buffer has no unordered access".

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: copy the output texture token into its table entry

Creating the view at heap byte 16, which is not a descriptor of the heap,
ends the consumer; the view is created at byte 64 and its token words copied.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: record the output reason fixture results

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: per-reason counts from one start-up run

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: the token keys with R0Y00#2961 merged

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: label start-up counts as first-refusal buckets

The census keeps one first refusal per key and counts all of the key's
untranslated dispatches under it, so the run tables are first-refusal
buckets, not counts per condition.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Source op_sel bits 0-2 read the high half [31:16] of a VGPR source;
op_sel bit 3 writes the binary16 result to D[31:16] and keeps D[15:0].
Without bit 3 the result still goes to D[15:0] with D[31:16] kept.
op_sel on an SGPR or constant source, with clamp, on v_fmac_f16, DPP and
SDWA stay refused.

New test native_fma_f16_opsel (IR and hardware) covers the six source and
destination selections against tests/f16_packed_model.py, with a
sentinel in the kept half, plus three refusal controls.
Bring main 57e9466 into R0Y00#3091's 247530b head. Resolve the five overlapping
areas by retaining both features:

- keep compute request shape validation and derive wave32 from the packed state;
- serialize both sampler_heap and stride_srvs in the compute frontend cache;
- keep the current wave-size selection plus the packed-state virtual-wave path;
- prepare descriptor strides once and keep a single initialize call;
- keep the sidecar dependency retry and the native compute manifest revision check.
The SDWA decoder refused clamp on v_cvt_f32_f16 because the op is in
neither the float ALU nor the conversion list. The SDWA form now takes
clamp with the integer clamp v_ldexp uses: a set sign bit or NaN gives
+0, values above 1.0 give 1.0. The direct VOP3 form, omod and the other
SDWA modifiers stay refused.

native_sdwa_f16_hardware reads back the clamped conversion from both
halves for negative, above-one, NaN, -0.0, denormal and in-range inputs.

AI-assisted.
DPP8 was decoded only for graphics, and only for quad-local selections.
Direct compute now takes DPP8 (src0 233, and 234 with FI) on the VOP1/
VOP2 ops the DPP16 path accepts: lane L reads src0 from lane
(L & ~7) | sel[L & 7] with waveReadLaneAt, within the 32-lane wave or
the physical half of a split wave64. An inactive source lane gives zero
unless FI is set (assumed rule: DPP8 has no BOUND_CTRL; checked against
the test's CPU model only). Binary16 ops keep refusing DPP8.

native_dpp8_hardware reads back min/add/max with the [4,5,6,7,0,1,2,3]
swap, a mov with an asymmetric pattern, and sparse-EXEC add with and
without FI and min without FI, against a CPU reference.

AI-assisted.
@lambirou

Copy link
Copy Markdown
Contributor Author

@R0Y00 this is the merge-only refresh of #3091 onto main 57e94668. It is ready to merge into codex/native-shader-modules.

Validation at cead019e: 12/12 selected compiler/compute/sampler tests in Debug and 12/12 in Release, zero skips. No source changes beyond the conflict resolution. AI was used.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for preparing the merge-only PR. I found one correctness issue at cead019. In read_compute_request(), sa[18] is evaluated before validate_compute_request_shape() enforces the 28-byte .sa. check_compute_extents() only checks that the companion length agrees with the descriptor, so an internally consistent short request can reach that access. #3006 validated the length first.

Please construct ComputeRequest with its default wave32 value, call validate_compute_request_shape(request), then read request.sa[18] into request.wave32. A source-built request with correctly keyed, short state A should return the existing “compute state block A is not 28 bytes” diagnostic in Debug and Release. The other reconciliations match the intended sampler, stride, and manifest revision behavior.

…Y00#3240)

The binary16 SDWA VOP2 arithmetic (add, sub, subrev, mul) accepts an
SGPR or an inline constant as src0/src1, as GFX10 SDWA allows (extension
bits 23 and 31). The source selection applies to the 32-bit scalar
word; an inline float is materialized as its binary16 value first. A
WORD_1 selection of an inline constant stays refused because its other
half is not modelled here. Literals stay refused (SDWA has none).

New test native_sdwa_f16_scalar (IR and hardware): SGPR DWORD/WORD_1,
inline 1.0 and integer 0, with distinct halves in every source and the
preserved/padded destination half, plus refusal controls.
read_compute_request indexed state block A for the wave-size bit before validate_compute_request_shape enforced its 28-byte length. Build the request with the default wave32 value, run the shape check, and only then decode the bit.

Add a source-built request with a correctly keyed 24-byte state A to native_compute_clear and require the existing shape diagnostic.
@lambirou

lambirou commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed at cf19be3. read_compute_request() now constructs ComputeRequest with its default wave32, calls validate_compute_request_shape(), and only then decodes request.sa[18].

Added the requested regression to native_compute_clear_check.py: a source-built request with a correctly keyed 24-byte state A must return compute state block A is not 28 bytes and write no shader.

Validation, Debug and Release, 5/5 each (no skips):

native_compute_clear
native_compute_pack
startup_compute_request_warp
startup_compute_translate_requests
startup_compute_request_offline

The other reconciliations are unchanged.

…3239)

Fixes R0Y00#3238

Refs R0Y00#2935

AI-assisted.

Co-authored-by: legacy-code-archaeologist <359844974+legacy-code-archaeologist@users.noreply.github.com>

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed cf19be3. The state length is now validated before the first access to byte 18. The new correctly keyed 24-byte fixture preserves the existing diagnostic and prevents publishing a shader. I also ran a correctly keyed 16-byte state through both builds, so the request ends before byte 18. Both refused it with the expected shape diagnostic.

I independently tested on main 50e4f76, with cf19be3 integrated in trial tree 0d0868d58b43ad9bd1f5cd696ef2984ef41b00ee:

ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^(native_(compute_clear|compute_pack|frozen_request|direct_(container|mesh)|graphics_(interface_library|wqm_ir|sampler_heap_.*)|compile_dxil_watch|startup_request_cache_controls|rtv_variant_controls)|startup_compute_(request_warp|translate_requests|request_offline|dispatch_native_hardware))$"

Debug and Release /O2 each passed 16/16, zero skips. Windows 11 26200.9974, RTX 4060 Laptop (32.0.16.1656), and inbox WARP 10.0.26100.9818. The selected suite exercised the WARP and hardware graphics paths and hardware slot-67 Dispatch.

This review covers the compiler-branch refresh. #3091 is the main integration PR and still needs its own review and required Windows check on the resulting head.

Leyukaka and others added 5 commits November 28, 2026 10:09
D = old EXEC, EXEC = old EXEC | S0, SCC = (EXEC != 0), like
s_and_saveexec_b32 with OR. As with s_mov_b32 exec_lo, EXEC keeps every
bit, including bits past the group; a lane runs only if its own bit is
set. An EXEC destination is refused.

native_or_saveexec_hardware covers -1, an SGPR aliasing the destination,
a literal, vcc_lo, an empty mask and a bit past the group, in 8- and
32-thread groups, with the saved EXEC, the new EXEC, SCC and a restore.

AI-assisted.
Co-authored-by: sm5 <sm5@x>
Co-authored-by: lewisalex86 <pigalot@gmail.com>
…ute (R0Y00#3243)

Non-D16 image_store with dmask 0x1, 0x3 or 0x7 (2D, 2D array, 3D) is
lowered as a typed UAV store of float, float2 or float3 with every
component written, as the D16 path already does for masks 1 and 3. The
manifest carries the channel count (`channels 1|2|3`, plus tex3d), and
the runtime refuses the dispatch unless the bound texture has exactly
that many channels ("an exact-width image store requires a matching
output texture channel count") and supports typed UAV stores. No channel
is left unwritten, so there is no read-modify-write and no race between
invocations. Non-prefix masks stay refused.

New test native_image_store_exact_width (WARP and hardware): R32_FLOAT,
R32G32_FLOAT and R11G11B10_FLOAT readbacks in 2D, a 2D array and 3D, with
sentinel texels, through the published manifest and the native route;
an RGBA8 texture with a 0x7 store is refused at run time and a 0x9 mask
by the translator. The native pass runs first, so an adapter without
32-lane waves (inbox WARP) reports the capability skip.
Change const void* const* vtbl to void* const* vtbl in COM interface structs across 5 GameInput test files (13 occurrences). MSVC rejects reinterpret_cast from const void* through vtable function pointers.

Add static_cast<UINT> for sizeof expressions in rectlist_draw_check.cpp and startup_indirect_draw_indexed.cpp to fix C++11 narrowing errors.

Store D3D12_TEXTURE_COPY_LOCATION temporaries in named locals before passing their addresses to CopyTextureRegion in startup_resource_retire_*.cpp, fixing address-of-temporary warnings that MSVC treats as errors.

Co-authored-by: Kelbo <kelbo@users.noreply.github.com>
Compile a supported VS/PS pair in process through the ordinary draw path when the native compiler is enabled. Preserve an existing published disk pair and allow a later publication to recover after a native manifest refusal.

The source-built fixture verifies cold and warm cache, actual readback after draw submission, disk precedence, and independent early and late failures on WARP and hardware.

Refs R0Y00#2978.
@R0Y00

R0Y00 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

After #3243 and #2981 landed, integrating cf19be3 onto main c827d8b now conflicts in four files. The original short-state fix remains correct. I checked this reconciliation locally (tree 91399a6f3e12cd06062928ae111abb48cfdd976e):

  • In CMakeLists.txt keep both the exact-width texture cases and the compiler stack's new cases.
  • In gfx1013_compute_native.h keep main's three exact-width kinds in their current numeric positions, append packed_d16_x_uav and indexed_raw_srv, and keep both exact_texture_uav_channels and accepts_cbv_window. Use indexed_raw_srv for the decode upper bound in direct_compute_cache.cpp. The generated native shader revision already hashes the two source files.
  • In gfx1013_direct_compute.inl keep both exact_store and indexed. The store gate needs the exact_store exception and the descriptor gate needs the indexed exception.

The local Release /O2 trial gives 9/9, no skips. This includes pack/frozen request, direct mesh compilation, exact-width RGB and R store plus RGBA/sparse refusals on RTX, and #2981's now-main cold/warm and retry paths on WARP and RTX. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, WARP 10.0.26100.9818, debug layer enabled for the graphics/texture fixtures.

ctest --test-dir <release-build> --no-tests=error --output-on-failure -j 1 -R "^(native_(compute_pack|frozen_request|direct_mesh|image_store_exact_width_hardware_(r|rgb|rgba|sparse))|startup_native_graphics_draw_(warp|hardware))$"

Please carry the current-main reconciliation on the refresh PR's source branch so #3091 can use it in its next review. The local trial did not change either target branch.

@JohnConnorNPC

Copy link
Copy Markdown
Collaborator

Thanks for working through both change requests. cf19be3 moves the sa[18] read after validate_compute_request_shape, cd746f6 refuses implicit derivatives in virtual wave64 groups, and the review list (gh api repos/R0Y00/Xbox2Windows/pulls/3241/reviews) shows APPROVED at cd746f6.

The base moved after that approval. #3138 landed on codex/native-shader-modules at 0b505c1, and the branch no longer merges: git merge-tree --write-tree 0b505c1c cd746f6a → rc=1, CONFLICT (content): Merge conflict in tools/startup/compile_dxil.cpp.

Could you merge the current base and push? I think is_stale resolves like this:

  • keep the base's bool sidecar_changed = false; and if (has_manifest && !sidecar_changed) {;
  • keep this branch's if (req.compute) { ... x2w::native_compute_output(manifest) ... } block inside that if;
  • drop the auto-merged lost = !psin_mtime.has_value() && fs::is_regular_file(psdep_path, ec); line. With the base's declarations lost no longer exists, so the merged file would not compile.
    After that, re-running native_compile_dxil_watch* from shader: invalidate watch manifests when sidecar content changes with an older mtime #3138 along with this PR's 13 tests would cover both sides.

Two smaller points, neither a blocker:

  • The CR1 fixture does not pin the fix. struct.pack("<6I", ...) is 24 bytes, so sa[18] is in range. With the old order the request still fails with compute state block A is not 28 bytes and the test stays green. A state A of 16 bytes or fewer would turn the reverted order into an out-of-range std::string read, which Debug iterator checks abort on. This is from reading the code: I did not build that mutant.
  • git grep -E 'virtual wave64 groups|native_wave_virtual_derivative' cd746f6a -- docs README.md finds nothing. One line in docs/experiments/native-compute-implicit-derivatives.md would document the new refusal.

This comment was AI-assisted.

JohnConnorNPC and others added 17 commits November 28, 2026 08:02
…nd, load_data) (R0Y00#3119)

* tooling: refuse a patch manifest nested too deeply for tomllib

* tooling: define the shader patch kind, checked for shape only

* tooling: gate a patch manifest on input bytes the caller already read

* tooling: check the shader revision's form, not the runtime's current number

* tooling: a shader patch names its files by bare file name

* tests: pin the shader patch files to what the runtime reads

* tests: set the recursion limit in the patch manifest nesting case

* docs: list the shader patch mutations and controls

* docs: record the patch manifest loader measurements

* tests: pin patch manifest geometry, trailing text, empty bytes and the CLI's OSError

Four memory patches in descending RVA, three adjacent and one at RVA 0, load; a one-byte overlap is refused in either order. A hash or key with trailing text and an empty bytes are refused, the bound patch is compared field by field, and a missing input file reaches the CLI as a diagnostic. Each kills one of the eight mutations that survived the fixture.

* docs: list the patch manifest cases and mutations added for the fixture audit

* tests: give the side-by-side patches ids out of step with their addresses

A sort of the spans by id instead of by address passed the fixture, because
the accept case listed ids that followed the addresses. Use ids that follow
neither the addresses nor their reverse, and list the mutation.

* loader: refuse Windows-invalid manifest file names (R0Y00#3119)

* loader: accept the .cs.hlsl a compute key may need (R0Y00#3119)

Since R0Y00#3006 the runtime's compute loader also looks for <key>.cs.hlsl when the
key's .txt has no native line, and refuses the translation without it. List it
as a compute translation file, optional like mesh86's .ps.cso, since the loader
does not read the .txt. Pin it beside the runtime's unmarked-manifest check.
…ompute (R0Y00#3306)

The published compute manifest now carries `srv N tex1d|tex3d|tex2da table R B`
for texture SRVs of those dimensions (cube and multisampled ones keep their
named refusal). The Dispatch reader takes the name as the slot's dimension; for
1D, 2D-array and 3D it needs the title's described view of that dimension that
fits its texture (address_view_fits: same or typeless-family format, mips and
slices inside, no LOD clamp), otherwise the Dispatch is refused by name.

An accepted tex2d line binds as before. The refusal text for an srv line that
is not read now names the new dimensions.


Claude-Session: https://claude.ai/code/session_01EF3hKGcUDvQ6pxjDDMrvbn

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: lewisalex86 <pigalot@gmail.com>
…a debugger

precheck_enabled() returned IsDebuggerPresent() || <X2W_PROBE_PRECHECK set and
not 0>, so the variable could only turn the pre-check on. Title runs always
start under debug_launch.py, where the VirtualQuery before each probe and
guarded copy now runs on every call. An explicit setting now decides (0 off,
anything else on); unset keeps the debugger check.

startup_local_log_precheck_off_debugger sets the PEB's BeingDebugged byte and
checks with X2W_PROBE_PRECHECK=0 that a free range is refused by the touch,
with one first-chance fault and nothing counted as avoided. With the old
condition it fails on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runtime: compare the GDK runtime with the shim
tooling: report GDK knowledge coverage
…h-final

'fix: prevent undefined behavior in unpin_slot when slot is not pinned'
startup: read block-compressed 0x105 volumes in slot 70
shader: add a GDK shader corpus harness
…irect-cvt-norm-f16

shader: lower v_cvt_norm_i16_f16 and v_cvt_norm_u16_f16 in direct DXIL
…irect-saveexec-wrexec

shader: lower remaining SOP1 *_saveexec_* and *_wrexec_* ops in direct Compute DXIL
…t-cli

shader: harden compile_lds_request CLI, path guards, and replay checks with offline unit suite
…-env

startup: let X2W_PROBE_PRECHECK=0 turn the probe pre-check off under a debugger
…ot_devices with CLI suite (R0Y00#2889)

* shader: harden directory, symlink, and output path guards in probe_root_devices with CLI suite

* shader: address review feedback on probe_root_devices regressive guards

---------

Co-authored-by: Ammar Abdelfattah <241957358+Ammmae0x@users.noreply.github.com>
Co-authored-by: R0D4X <R0D4X@users.noreply.github.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>
Keep R0Y00#3138's sidecar_changed invalidation and the branch's compute dependency_changed/lost checks in the watch request gate.
Keep the shared graphics/compute request key helpers and pixel-input reader, including the .ps57in sidecar. Keep the BCNT64 compute block alongside the shared scalar-mask combiner. Accept main's raw-store cache-policy naming. Keep both --rekey and --prepare-compute-pack in the usage text.
@lambirou

Copy link
Copy Markdown
Contributor Author

Refreshed #3241 at 86cf5aa8: it now merges both the current base 71e23baf (#3138, #3308) and current main 3926a289.

  • The watch gate keeps shader: invalidate watch manifests when sidecar content changes with an older mtime #3138's sidecar_changed and the branch's compute dependency_changed/lost checks.
  • Request reading uses the shared graphics_request_key/compute_request_key helpers while keeping .psin/.ps57in pixel inputs.
  • Direct compute keeps the BCNT64 block alongside main's combine_scalar_mask, both output shapes, the exact_store/indexed gates, WREXEC and the packed virtual-wave derivative refusal.
  • The usage text keeps both --rekey and --prepare-compute-pack.

Debug: 18/18 selected controls, zero skips. Release /O2: 18/19; only native_ldexp_f16_hardware fails on this RX 9060 XT, and unmodified main 3926a289 fails it identically (got beef7c00, expected beef0200), so it is upstream #3123. The (8,4,1) implicit-LOD mismatch remains #3255. The core compiler, WREXEC, #3262 and packed virtual-wave controls all pass.

#3241 is CLEAN/MERGEABLE and approved at 86cf5aa8; it is ready to merge into codex/native-shader-modules for #3091.

@lambirou

Copy link
Copy Markdown
Contributor Author

Additional runtime check on the approved head 86cf5aa8:

ctest --preset {dev,release} --no-tests=error --output-on-failure -j 1 -R '^(startup_native_graphics_draw_(warp|hardware)|startup_mrt_dxc_(warp|hardware)|startup_compute_dispatch_native_(warp|hardware)|startup_stream_draw_(warp|hardware))$'

Debug and Release each gave 7 passes and one capability skip (startup_compute_dispatch_native_warp, 32-lane waves). The WARP and RX 9060 XT paths cover first-draw native graphics, MRT late-manifest recovery, stream draw, and hardware native Dispatch. This is the tree #3091 receives when #3241 fast-forwards codex/native-shader-modules.

)

* startup: lower v_dot2_i32_i16 and v_dot2_u32_u16 in gfx2hlsl

* tests: add zero-product signed-clamp lanes for v_dot2_i32_i16

---------

Co-authored-by: R0D4X <R0D4X@users.noreply.github.com>
Co-authored-by: lewisalex86 <pigalot@gmail.com>
@lambirou

Copy link
Copy Markdown
Contributor Author

Full Release build on 86cf5aa8 also completes with 0 errors (cmake --build --preset release, all targets). This is on top of the 18/19 targeted controls and the 7/8 runtime set already reported.

Leyukaka and others added 2 commits November 28, 2026 12:01
…3314)

transfer() records the symbol of EXEC in s[126]/s[127], for example a
constant after s_mov_b64 exec, <literal>. The wave32 saveexec/wrexec
branch clears s[126], but the 64-bit *_saveexec_b64 and *_wrexec_b64
fell into the generic SOP1 branch, which clears only the destination
pair. The analysis then kept the old EXEC constant, and a later
s_mov_b32 sN, exec_lo copied it, so the constant-sampler path could
fold a value the program no longer had. These ops now clear the
destination pair and both EXEC words.

New test native_exec_symbol_b64_controls: a sampler word taken from
exec_lo compiles while EXEC is a known constant, and is refused with
"nonconstant sampler" after s_and_saveexec_b64 or s_andn2_wrexec_b64
with an unknown source.

AI-assisted.

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>
@lambirou

Copy link
Copy Markdown
Contributor Author

Refreshed again to 48b2027c: clean merge of main 7e5c378d (#3314, #3036).

  • native_exec_symbol_b64_controls passes; gfx1013_compute_native.cpp takes main's EXEC-symbol forgetting without breaking the branch's compute paths.
  • startup_gfx2hlsl_v_dot2_controls passes with main's dot2 lowering.
  • native_compute_pack passes after relinking the checker against the new compiler (the earlier failure was the known stale-checker symptom).

#3241 is CLEAN/MERGEABLE and remains approved at 48b2027c.

@lambirou

Copy link
Copy Markdown
Contributor Author

Runtime checks on 48b2027c (the tree #3091 receives): 7 passes and one capability skip in Release. The WARP and RX 9060 XT paths cover native graphics draw, MRT late-manifest recovery, stream draw and hardware native Dispatch. No failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.