Skip to content

shader: read the wave size of slot 67 compute requests from .sa - #3006

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:wave-bit
Nov 28, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:wave-bit

Conversation

@Leyukaka

@Leyukaka Leyukaka commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2999. Part of #2935. Target branch main.

Change (src/shader_compute_request.*, src/gfx1013_compute_native.cpp, src/native_compute_output.h, src/direct_compute_cache.cpp, src/startup_stubs/d3d12_compute_dispatch.inl, tools/startup/compile_dxil.cpp):

  • read_compute_request sets ComputeRequest::wave32 from bit 20 of .sa dword 4: set means wave32, clear means wave64. A .sa that is not 28 bytes is still refused, as before.
  • The direct DXIL route of translate_compute compiles a wave64 request through the wave64 path that translate_compute_container already uses for a stage without wave32.
  • A wave64 request whose group has at most 32 threads stays on the wave32 model, as before this change. Its one guest wave only has lanes 0..31, so EXEC's high word is zero and v_mbcnt_hi adds nothing for its lanes. One known difference remains: a wave64 compare or carry-out also writes zero to the high word of an SGPR pair destination, and the wave32 model leaves that word as it was.
  • Request keys stay at 29cs, as on main, and revision-28 archives are still read. The bit's meaning is an inference from captured data, explained in shader: read the wave size of slot 67 compute requests (bit 20 of .sa dword 4) instead of assuming wave32 #2999 and in docs/experiments/native-slot67-wave-size.md.

Native output revision. A native compute manifest now ends with native <revision>, from native_compute_output_revision in src/native_compute_output.h.

  • The stand-in refuses, with a "rebuild it" reason:
    • a native manifest with another revision;
    • an unmarked manifest without the Python translator's <key>.cs.hlsl, which is a native output from before this change.
  • It looks again on the ManifestRetry schedule of an absent manifest: 1 s, doubling up to 32 s.
  • An unmarked manifest with a <key>.cs.hlsl is a Python output and is used as before.
  • compile_dxil --watch rebuilds stale native outputs. An unmarked output with a sidecar goes on to the usual bytecode check.
  • A native compile in either mode first removes a leftover <key>.cs.hlsl.
  • One case stays undetected: a directory where an earlier compile_dxil already republished a Python-translated key. That directory needs one --requests rerun.

Fixtures.

  • Source-built fixtures that relied on the wave32 default now set the bit, in 17 test files. That count includes native_dpp_row_check.py, added on main since the first version.
  • startup_compute_root_srv_dispatch_check.py now copies the Python sidecar along with the manifest and bytecode in its bad-manifest cases.

Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, on main 8cf9be9b plus this commit.

  • ctest -R "native_|startup_compute|startup_shader_cache_rekey|compile_dxil|startup_manifest_retry" passed 344 of 345, with five WARP capability skips (77).

  • native_scalar_lds_hardware fails with "native compute PSO creation failed", as it does on main without this change.

  • native_slot67_wave_size_hardware builds the same v_mbcnt_lo/v_mbcnt_hi program as three requests. The stored lane indices match a CPU reference, with every other buffer word untouched:

    Bit 20 Group size Expected lane index
    clear 64 threads tid % 64
    set 64 threads tid % 32
    clear 32 threads tid % 32
  • native_compile_dxil_watch, startup_compute_dispatch_warp/_hardware and native_startup_request_cache_check cover the stale-output paths. I described them in the earlier comment.

Mutation checks, run by hand on the earlier cpp-migration head and not rerun on this one:

  • for the wave size: ignoring the bit, inverting it, and dropping the 32-thread rule;
  • for stale outputs: letting the stand-in use an unmarked native output, letting --watch keep it, skipping the bytecode check for a Python output, and keeping the .cs.hlsl on a native publish.

Measured on a local capture (counts and instruction shape only), on cpp-migration e0d83759 before this was rebuilt on main, with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests. I have not re-measured on main, which has gained lowerings since.

Requests Compiled before Compiled after Newly compiled No longer compiled
Capture, 2,689 389 393 46 42
One start-up run, 2,718 402 406 46 42
  • The 46 newly compiled requests are wave64 programs with 64-thread groups.
  • The 42 that stopped compiling are wave64 programs that the wave32 model used to accept. They stop at "multi-wave64 exchange requires converged group control flow", a limit of the existing wave64 path.

AI-assisted.

@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.

The cold-cache lane-index fixture verifies the new wave-size decoding. Issue #2999 also calls for rebuilding cached translations on update. The PR documents that --watch and the stand-in can still reuse the old <key>.txt / <key>.cs.cso, so a warm native cache can keep running the old wave32 result for a wave64 request. Please add an upgrade control that prepopulates the old output, then show that the updated consumer refreshes or rejects that output. A native output compatibility check could preserve legacy Python request keys while doing this.

@Leyukaka

Copy link
Copy Markdown
Collaborator Author

Thanks, done in the new commits, without changing request keys. The branch also merges cpp-migration 999e17cd, since #3003 changed the same --watch check.

Native output revision. compile_dxil now ends each native compute manifest with native <revision>. The revision is a constant shared with the stand-in, native_compute_output_revision in src/native_compute_output.h, starting at 1. It is meant to be bumped whenever a native translation of an unchanged request can change meaning.

Stand-in. Before reading bindings or bytecode:

  • a manifest with another native revision is refused with "native translation from another compiler revision; rebuild it";
  • a manifest with no native line and no <key>.cs.hlsl is a native output from before this change. It is refused with "native translation without a revision; rebuild it";
  • an unmarked manifest with a <key>.cs.hlsl is the Python translator's output and is used as before;
  • both refusals use the one-second retry of an absent manifest, so a running process can pick up a rebuilt output. That reload follows from the code path; no test covers it, since each check starts a new process.

compile_dxil.

  • --watch treats a stale or unmarked native output as pending and rebuilds it.
  • An unmarked output that has a .cs.hlsl goes on to the existing bytecode check, so a Python output with incomplete bytecode is still rebuilt.
  • --requests already rebuilds every output.
  • A native compile in either mode now first removes a <key>.cs.hlsl left by the Python translator, so the new pair cannot pass as a Python output. An unreadable manifest goes on to the bytecode check instead of counting as complete.

One case stays undetected: a directory where an earlier compile_dxil already republished a Python-translated key. That key's old .cs.hlsl sits next to an unmarked native manifest, and nothing tells the two apart. Such a directory needs one --requests rerun; the doc says so.

Upgrade controls:

  • native_compile_dxil_watch seeds an unmarked native output and a native 0 output, each with a dummy .cs.cso. It checks that --watch replaces the manifest and the bytecode of both. An unmarked Python-style output with a .cs.hlsl keeps all three files byte for byte, with their timestamps. The same output with truncated bytecode is rebuilt, and its .cs.hlsl is removed.
  • startup_compute_dispatch_warp and _hardware check both refusal strings with the output untouched. They then check the output words for a native 1 manifest and for a Python-style one.
  • native_startup_request_cache_check checks the exact native manifest and that no .cs.hlsl is written.

On the RTX 5080 and WARP, after the merge, ctest -R "native_|startup_compute|startup_shader_cache_rekey|compile_dxil" passed 280 of 282. The two failures fail the same way on 999e17cd without this PR: native_scalar_lds_hardware with "native compute PSO creation failed", and native_cvt_pk_u8_hardware with words 8, 24, 40 and 56 reading 0xa5a5a501 where 0xa5a5a500 is expected. Four manual mutants each fail a new control:

  • letting the stand-in use an unmarked native output fails both dispatch checks;
  • letting --watch keep an unmarked native output fails the watch check;
  • skipping the bytecode check for a Python output fails the watch check;
  • keeping the .cs.hlsl on a native publish fails the watch check.

One interaction to handle on merge: the portable fixture of #2975 writes a hand-made manifest without a native line, and its HLSL as <key>.hlsl. Under this check, that fixture needs its HLSL saved as <key>.cs.hlsl. I will make that change in whichever of the two PRs lands second.

AI-assisted.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR #3006 by @Leyukaka — shader: read the wave size of slot 67 compute requests from .sa

What works

  • Clean extraction of bit 20 from sa[18] with correct little-endian dword mapping (byte 18 is d4[2], bit 4 of that byte = global bit 20)
  • Default wave32=true preserves backwards compatibility: old .sa files without the bit still get wave32 behavior
  • Wave64 with <=32 threads stays on wave32 model: good fallback since lane 0..31 is valid either way
  • The known difference (wave64 compare/carry-out writes zero to high word of SGPR pair) is documented transparently
  • Key revision stays 28cs: Python caches preserved, no key hash changes needed
  • native_compute_output.h provides a clean versioning mechanism for native translations
  • Manifest retry mechanism (incompatible/unmarked -> retry after 1 second) supports live rebuilds
  • native_compute_output_revision bump to 1 is correct for the new version scheme
  • Test covers all three cases: bit clear/64 threads, bit set/64 threads, bit clear/32 threads
  • Mutation checks (ignore bit, invert bit, drop 32-thread rule) all correctly fail
  • 275/276 tests pass; 4 WARP skips, 1 adapter limitation unrelated to this change
  • compile_dxil --watch test properly handles old manifests, unmarked manifests, and new manifests
  • 15 test files updated to set the wave32 bit in their fixtures

Issues

  • sa[18] index is fragile: if .sa file structure changes (e.g., dword 4 offset shifts), this silently reads the wrong bit. Consider adding a comment with the full bit position: sa dword 4 bit 20 = sa[18] bit 4 in little-endian.
  • The native_compute_output parser uses a simple line-based search which could match partial lines (e.g., "nativex" would match the substring check). The line != "native" guard helps but substr(0,7) check on "native " should also verify the char at position 7 is a digit or the line ends after position 7.
  • load_compute_translation sets tr.retry_manifest_at in the incompatible case but the caller needs to know the retry is for manifest version, not just absence. The comment in the struct was updated to "absent and stale manifests can become ready later" which is good.
  • The wave64 threads > 32 check in gfx1013_direct_compute.inl is duplicated logic: the same check appears in both translation paths (direct DXIL and container). Moving to a single decision point would be cleaner.

Recommendations

  • Add a static_assert on sizeof(sa) == 28 or sa.size() == 28 in read_compute_request to catch malformed files early.
  • In native_compute_output, add a check that line[7] is a digit: if (line.size() == 7 || !isdigit(line[7])) return incompatible.
  • Consider adding a debug assertion in translate_program: assert(wave64 || threads <= 32) to catch any edge cases where threads > 32 but wave64 is false on a direct_dxil path.
  • The 15 fixture files updated should include a note in each file linking back to the capture analysis (#2999).

Overall

Well-executed inference-driven addition. The bit extraction is correct, the wave32 model fallback for small groups is a good safety net, and the manifest versioning provides a clean path forward for future native translation changes. The key question for merge readiness is whether the capture analysis in #2999 has sufficient evidence to confirm bit 20 as the wave size marker.

@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.

Independent Release /O2 on exact head 5c49bbe38b803d13bdaccfd4e2584cc91aaffc34, Windows 11 build 26200.9974 and SDK 10.0.26100. I built startup_stream_consumer d3d12_xs_shim compile_dxil native_store_replay and ran native_compile_dxil_watch, native_startup_request_cache_controls, startup_compute_dispatch_(warp|hardware) and native_slot67_wave_size_hardware: 5 passed, no skips. WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 matched all 320 dispatch words for the current and Python-style manifests, preserving sentinels in the stale cases. RTX also matched 128/128/64 lane indices for the three slot-67 cases. The marker keeps the existing request key, but the .cs.hlsl heuristic still cannot identify an old native output over a prior Python publication; the documented one-time --requests rebuild still applies to mixed directories. Please keep the reported #2975 sidecar rename with whichever PR lands second.

R0Y00 commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Retargeted to main. A trial merge at 1ec2c938 conflicts in gfx1013_compute_native.cpp, shader_compute_request.cpp, d3d12_compute_dispatch.inl and startup_compute_dispatch_check.py. Please preserve the DPP changes from #3010, revision-29 request keys with revision-28 archive support, and ManifestRetry timing for both absent and stale manifests. Carry the #2975 sidecar naming resolution as discussed. #3014 still follows this PR because both touch the request reader and compile_dxil; we'll validate the wave-size and cache-rebuild path on the rebased head before requesting the rekey rebase.

Leyukaka added a commit to Leyukaka/Xbox2Windows that referenced this pull request Nov 27, 2026
…build stale native outputs

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.
@Leyukaka

Copy link
Copy Markdown
Collaborator Author

Rebuilt on current main (8cf9be9b) as one commit, e7a1e90f, which replaces the earlier branch history. The description is updated to match. Your four points:

One fixture added on main since the first version, native_dpp_row_check.py, built .sa without the wave32 bit and now sets it. #3022's permlane fixture sets it too, in that PR.

On this head (RTX 5080 and WARP, Release), ctest -R "native_|startup_compute|startup_shader_cache_rekey|compile_dxil|startup_manifest_retry" passed 344 of 345, with five WARP capability skips. native_scalar_lds_hardware fails with "native compute PSO creation failed", as on main without this change.

AI-assisted.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I tried to review e7a1e90f over current main 63fd6ea8. The trial merge (git merge-tree --write-tree origin/main review/3006) conflicts in one hunk of src/gfx1013_compute_native.cpp, just after the 0xc00 root-flag check. Since this PR's base 8cf9be9b, #3140 (673a9f2c) has turned the one-line if body there into a block that also sets initial[next + 1] = {Symbol::Type::table, compute_sampler_heap};. This PR replaces the const bool wave64 = stage && !stage->wave32; line that follows it. The resolution should keep #3140's block as it is, followed by this PR's comment and new wave64 expression. The other files merge cleanly.

One interaction to recheck after the rebase: #3180 (63fd6ea8) gates the wave32 VCC SMEM limit on !wave64. With this PR, wave64 requests over 32 threads would then keep the 106-SGPR limit. That is the intended behaviour. I haven't run it.

I'll review it once it is updated with main.

This reply was AI-assisted.

@pigalot

pigalot commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

One addition to my comment on e7a1e90f: as of main 22f38526 there is a second conflict, in tests/native_f16_alu_check.py. #3188 (698a057f) changed that GPU check into a loop over an alu and a dpp program, and this PR sets the wave32 bit (1 << 20) in the .sa dword 4 of that block. The rebased version should keep both programs and set the bit for both requests.

This reply was AI-assisted.

@Leyukaka

Copy link
Copy Markdown
Collaborator Author

Rebased on main 14d56502 as one commit (7e018ffe). The conflicts were:

15 test files now set the bit, down from 17, because main already does it in those two.

Tests. ctest -R "native_|startup_compute|startup_shader_cache_rekey|compile_dxil|startup_manifest_retry" passes 394 of 399 (RTX 5080 and WARP, Release). The 5 failures are the same on main 14d56502 without this change:

Measured on the 882 untranslated compute requests ranked in #3224, with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, main 14d56502 against this branch.

  • 144 programs change outcome, 2,272,681 dispatches of that run.
  • 100 of the 156 programs in the "unbound numeric SGPR" family move on: 1,930,892 of its 2,545,711 dispatches. That family is mostly the wave-size gap. The wave64 programs compare into an SGPR pair (v_cmp_*_e64 s10, ...), then read s[10:11], which the wave32 model leaves unbound.
  • 27 of them now compile (230,505 dispatches). Compiled programs go from 110 to 128.
  • 55 programs (1,150,184 dispatches) now stop at "multi-wave64 exchange requires converged group control flow". That is main's whole-program gate for wave64 groups of more than 64 threads.
  • 9 of them (55,551 dispatches) compiled on main with the wave32 model, although they are wave64 requests. They are refused now rather than translated with the wrong wave size.
  • The compute: accept vcc_lo and vcc_hi as wave32 SMEM offsets and destinations #3180 interaction you asked me to recheck: 17 programs now stop at "unsupported scalar memory destination range", against 0 on main. These are wave64 requests over 32 threads that keep the 106-SGPR SMEM limit, which is the behaviour you described.

The Tests and Measured sections of the description still describe the first version on 8cf9be9b. This comment replaces them.

AI-assisted.

Leyukaka added a commit to Leyukaka/Xbox2Windows that referenced this pull request Nov 28, 2026
…build stale native outputs

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.
@R0Y00

R0Y00 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Rechecked 7e018ff against main 350785e after #3227. The only merge conflict is the final compute manifest writer in direct_compute_cache.cpp. Keep main's program.stride_srvs loop before the SRV/UAV/sampler lines, then append the existing native revision line. The new native_descriptor_scc_check.py exact manifest list also needs its final native 1 line.

I tried just those two changes locally on the existing PR. Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656, Release /O2: native_descriptor_scc_hardware, startup_compute_descriptor_scc_hardware, native_compile_dxil_watch and native_slot67_wave_size_hardware all passed. Please carry those two changes in the existing PR on current main so CI and independent review can evaluate the new head. The reported #3224 compile counts remain separate from GPU readback.

…build stale native outputs

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.
@Leyukaka

Copy link
Copy Markdown
Collaborator Author

Rebased again on main 86beae95; head is now ecd2646a.

ctest -R "native_|startup_compute|startup_shader_cache_rekey|compile_dxil|startup_manifest_retry" ran before the test change (RTX 5080 and WARP, Release): 408 of 411 passed.

  • native_scalar_lds_hardware failed, as it does on main.
  • The two native_descriptor_scc tests failed on the manifest line.

After the change, -R "native_descriptor_scc|startup_compute_descriptor_scc" passes both _hardware tests, and the two _warp tests report the capability skip.

AI-assisted.

@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.

Independent review of ecd2646 integrated on main 86beae9, tree 3ab5553ad668f49086d4d81da40819b70dc725b8. The .sa bit selects the direct DXIL wave model for larger groups; stable request keys still load previous raw requests. Version-tagged native manifests and the watcher prevent stale DXIL reuse, and Python manifests with the existing sidecar are still accepted. The descriptor SCC entry is preserved. The small-group high-half limitation is documented and is outside this change.

Debug and Release /O2 each had six passes and three wave32 capability skips, no failures. Hardware verified the new wave-size reference, both descriptor SCC routes, native Dispatch and the legacy/retry controls. WARP was inbox 10.0.26100.9818. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656.

ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^(native_(slot67_wave_size_hardware|descriptor_scc_(warp|hardware)|compile_dxil_watch)|startup_(compute_descriptor_scc_(warp|hardware)|compute_dispatch_native_(warp|hardware)|manifest_retry))$'

This validates source-built requests and cache migration. The shader census totals are contributor measurements and do not establish title rendering.

@R0Y00
R0Y00 merged commit 7364e6a into R0Y00:main Nov 28, 2026
5 checks passed
R0Y00 pushed a commit that referenced this pull request Nov 28, 2026
)

* compute: accept EXEC as a 64-bit scalar operand in direct compute

EXEC (126) is accepted as the even source pair of s_bcnt0/s_bcnt1,
s_ff0/s_ff1 and s_flbit *_b64, and as the s_bfm_b64 destination. In the
wave64 model each host half holds both EXEC words: both are set at entry,
lane-mask writers publish both through the exchange, and scalar writes are
identical in both halves; VCC has no such guarantee and stays
refused as a source and as the s_bfm_b64 destination.

New test native_wave64_exec_salu (wave64 64 and 128 threads, wave32 32):
a sparse EXEC count, s_bfm_b64 exec, 16, 0 and exec, 32, 32, with three
refusal controls. Depends on #3006 for the wave64 model.

* docs: describe EXEC as a 64-bit SALU source and s_bfm_b64 destination

native-direct-salu-bitscan64 lists EXEC as a valid S0 and explains why
its source refusal control now uses exec_hi; native-salu64-ops lists
s_bfm_b64 into EXEC, keeps the s_cselect_b64 / s_not_b64 EXEC
destination refusal, and adds the native_wave64_exec_salu_hardware
command.
tedin7 added a commit to tedin7/Xbox2Windows that referenced this pull request Nov 28, 2026
JohnConnorNPC added a commit to JohnConnorNPC/Xbox2Windows that referenced this pull request Nov 28, 2026
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.
pigalot pushed a commit that referenced this pull request Nov 28, 2026
…nd, load_data) (#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 (#3119)

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

Since #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.
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.

shader: read the wave size of slot 67 compute requests (bit 20 of .sa dword 4) instead of assuming wave32

4 participants