Skip to content

docs: clarify offline mode scope and warn without -FakeUser - #3

Open
SimSalabimse wants to merge 1349 commits into
mainfrom
cursor/startup-offline-fakeuser-warn-aae3
Open

SimSalabimse wants to merge 1349 commits into
mainfrom
cursor/startup-offline-fakeuser-warn-aae3

Conversation

@SimSalabimse

Copy link
Copy Markdown
Owner

Change

Implements proposals (1) and (2) from R0Y00#2075. Leaves proposal (3) (X2W_RUNTIME_LOCAL allow-list) for maintainer discussion.

  • Docs (docs/startup-runtime.md Run section): state that offline mode applies to the title process only; Gaming Services outside it can still service runtime calls and a signed-in Xbox/Store/Gaming Services account. Recommend an account-free Windows user/machine or the isolated VM in Iterating on start-up runs. Point at the existing live-log note under Startup memory accounting that the window does not establish that all network activity is blocked.
  • tools/startup/run.ps1: Write-Warning when -FakeUser is not passed, because user API calls then go to the host gaming runtime.
  • tests/startup_run_ps1_check.py: extend the text-only check (and its negative mutant) for that warning.

Refs R0Y00#2075

AI-assisted.

Verification

Commit 442a5d89 on Linux:

python3 -B tests/startup_run_ps1_check.py --text-only
python3 -B tests/docs_links_check.py

Results: both exited 0 (startup run.ps1 exit code: 0 failed (text only: requested); docs_links self-test passed, 18 Markdown files / 403 links). A local mutant that drops the FakeUser warning is reported as missing Write-Warning when -FakeUser is not passed.

Evidence and follow-up

No game files. Proposal (3) from R0Y00#2075 is intentionally out of scope.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.
Open in Web Open in Cursor 

Panam and others added 30 commits November 24, 2026 23:36
Answers the source-only follow-up in R0Y00#870: which producer last wrote the
range a draw binds, and whether that write was visible after its fence.
One committed buffer holds three RGBA32F ranges plus a fourth no window
reaches; A [0,64) is red through CopyBufferRegion, B [64,128) is green
through a pixel shader that stores a structured UAV, C [128,192) is never
written. The consumer samples one element per pixel through a
StructuredBuffer SRV whose FirstElement and NumElements select the range,
so the window alone decides what is read.

Five cases print the writer class, the relation of the window to that
write, the submission order with its fence values, and the sampled
colour: exact (red), neighbouring (green), stale (red, although a blue
rewrite is submitted afterwards), empty (zero) and cleared (zero). Two
mutants must mismatch: the exact case bound to the neighbouring range and
the stale case with its rewrite moved before the consumer.

On an RX 9070 XT (driver 32.0.32029.2010) and on WARP both tests pass,
0 of 64 sampled and 0 of 256 store mismatches in every case, and each
mutant mismatches 64 of 64. The cleared and empty cases sample the same
zero, which is the ambiguity the issue raises: the writer class and the
order, not the readback, classify a reported zero.
startup: lower binary32 class SDWA compares
…idation

ffx: harden ffx_working_set_delta validation and add unit suite
tooling: consume DPP extension dword in disassembled VOPC
startup: add a read-only --refusals census of gfx2hlsl refusal sites
…ason

normalize_refusal redacts a bare 0x literal with the generic rule at line
2130; the operand rule that follows only covers positions such as offset 0x10.
Removing the generic rule left the suite green, so the case it exists for was
unpinned.
…cli-validation

pe: harden pe_inventory changes and CLI validation with unit suite
…om-labels

tooling: skip BOM and commented labels in scan_unsupported_shaders assembly parsing
…lar-waits

shader: join pending loads at masked arm boundaries
…rtial-tile-rows


Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One of the refusals in the R0Y00#1723 census (2 pairs). Both VGPRs take the
other's old value: the swap reads both sources before writing either,
through a temporary, and keeps the uniform flag with the moved value.
The RDNA 2 ISA (VOP1 opcode 101) lists no input or output modifiers and
no DPP or SDWA form for it; LLVM 15 rejects those spellings, and the
translator refuses them. New device-free check startup_gfx2hlsl_swap.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build: compile four checks' shared sources once
startup: guard out-of-range descriptor heap type in slot 15 GetDescriptorHandleIncrementSize
…tion

test: pin the hex redaction outside operand positions in a refusal reason
# Conflicts:
#	CMakeLists.txt
…wa-movrel-pins

tests: pin the SDWA v_movrel* selections without a GPU
Decode a single VGPR operand (and flag fake NSA extensions) for 2D A16 image_sample and image_sample_lz in disasm_rdna2.py, unpack the low and high IEEE binary16 halves in gfx2hlsl.py, refuse unmodeled sample modifiers/empty dmask/wrong address counts, and advance the startup shader cache revision to x2w-startup-shader-6.

AI-assisted.
…tive times

Fixed script times drift when a run gets slower or faster: presses land
on the wrong screen. This adds items timed from an observed event.
Wait and mark items count toward the 256-entry limit with presses.

Syntax (src/startup_stubs/input_script.h), three additions only:
  wait[=<settle>[/<timeout>[/stop|/go]]][@<s>]
      takes the picture when it begins, waits for a change, then for
      <settle> s without change (default 1); after <timeout> s (default
      120) logs a timeout and goes on or stops
  mark[=<label>][@<s>]   logs script time and present number
  @+<s>                  on any timed item: <s> after the previous timed
                         item started, or after a wait completed
"wait,80@+2,4@+0.5" is "new screen, pause 2 s, down, pause 0.5 s, A".
wait/mark reuse the name=value token form; @+ reuses the time field, so
no new separator is needed. A wait defaults to @+0: it begins when the
previous press starts, before the picture can react to it. Items after
a wait are shifted by the time it blocked and never start before it
completes. Scripts without wait, mark or @+ take the old code path.

Signal: in render mode the D3D12 stand-in copies 18 one-texel rows of
the presented surface every X2W_PRESENT_SIGNATURE_EVERY presents
(default 4) on the presenting queue, reads them back on a later present
without waiting, reduces them to 32x18 mean-luma cells and publishes
them with a seqlock in the named block
Local\x2w_present_signature_<pid> (present_signature.h). The GameInput
stand-in opens it by its own process id; without it, waits time out
and say so. Two pictures differ when 16 cells differ by more than 12
levels. The existing full readback for the window is unchanged.

Tests: timeline cases with a controllable clock and signal (settle,
picture that keeps changing, timeout go/stop, no presenter, two waits,
marks, rejections, equality with play() for scripts without waits),
two cases through the stand-in with the check publishing pictures, and
a WARP check of the sampler (grid equals the CPU reduction; A,A,B,B
changes once; identical pictures never change).

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

First real use showed two gaps in per-step verification of scripted
navigation. Both additions leave fb00dbb2 scripts unchanged.

1. Sensitivity. A wait's change test (16 of 32x18 cells, more than 12
   levels) missed small changes such as a list highlight moving. Options
   after ';' set it per wait:
     wait=<settle>/<timeout>;cells=<n>;level=<n>;region=<x0>:<y0>:<x1>:<y1>;fine
   (or wait;<option> with no settle/timeout). The defaults are the old
   values. The region is normalised, so it means the same on both grids.
   The 32x18 grid samples one row per 5.6 % of the height: the WARP check
   shows a 1 % bar between two rows gives 0 changed cells. "fine" compares
   a 64x72 grid (72 rows, one per 1.4 %) that sees the same bar in 40
   cells. The presenter copies the fine rows only after a script asked
   for them: the GameInput stand-in sets a request field in the signature
   block (block layout extended after the existing fields). Measured on
   WARP at 3840x2160, release: 0.16 ms per sampled present with the
   default grid, 0.56 ms with the fine one; sampling is every 4th present.

2. Groups: group[=<label>] ... end. A wait that times out inside a group
   skips the rest of that group; the script time jumps to the group's
   end, so the items after "end" are timed from the timeout. Later groups
   run. A /stop wait still stops the script. Nested, unmatched or
   unclosed groups are rejected with a reason; an unclosed group's items
   run ungrouped. The timeout line names the group, and a new line names
   the group, its items and the failing step.

Tests: timeline cases for a sub-threshold change (ignored by default,
seen with cells=3 or level=5), region inside/outside and a flickering
band outside the region, fine-only change and a fine wait that begins
before fine samples arrive, group skipped from the failing step with the
next items and a later group still running, stop inside a group,
rejections; a stand-in case with the fine request and a group skip; WARP
checks for the 1 % bar, fine cells against the CPU reduction, no fine
grid when not asked, and the cost printout.

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

gpu: add a range provenance fixture for bound-range writers
binary <llvm-mc> reassembles all six programs for gfx1013 wave64 and requires
the encoder's words; a deliberately wrong encoder word must be reported. Added
to the LLVM 15 job list.

Refs R0Y00#1723

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R0Y00 and others added 30 commits November 25, 2026 09:47
shader: lower compute v_sub_co_u32 / v_subrev_co_u32 and their carry-in forms
The racing cases now fail when the reader never reached the store read seam, and for slot 20 when
it never stopped between two blob reads, so a read path that bypasses the hook cannot pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
shader: lower s_sext_i32_i8/i16, s_cmov_b32/b64 and s_cmovk_i32 in gfx2hlsl (Part of R0Y00#1723)
storage: implement next DirectStorage/BCPack slice (Part of R0Y00#1198)
shader: lower compute v_dot2_u32_u16 and v_dot4_u32_u8
…port

debug_launch.py arms the runtime and movie-player call hooks together with
the file hooks, so with file tracing off (--offline 0 without
--trace-files 1) --trace-calls 1 arms nothing. The summary already printed
"call tracing: off" in that case, but gave no reason, so the flag looked
ignored. It now says that --trace-calls 1 needs file tracing.

The hooked export names move into RUNTIME_CALL_HOOKS and MOVIE_CALL_HOOKS.
startup_debug requires its fixture's module and export to be in that list
(with a control that the guard rejects the export once it is dropped), so
the call-count case cannot pass with nothing hooked, and adds a case:
--trace-calls 1 with file tracing off counts no call and prints the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under the declared wave32 guest profile (lower(..., wave_size=32)),
s_and_saveexec_b32 sN, vcc_lo|sM opens the same structured masked region
as s_and_saveexec_b64. A wave32 guest's EXEC is exec_lo, so the
following forms work on the one saved SGPR, with the wave64 arm, join,
skip, wait, scalar-load and scalar-ALU rules unchanged:

- s_mov_b32 exec_lo, sN and s_or_b32 exec_lo, exec_lo, sN close the
  region;
- s_andn2_b32 exec_lo, sN, exec_lo switches it once to its else arm;
- s_cbranch_execz targets the wave32 close or else.

A region accepts only the close and else spellings of its own width, so
a wave32 form in a wave64 region keeps its old refusal message. The
opener is refused without the profile, with any other operand spelling,
when it saves into the condition register, when the save register is
pending or out of range, when the condition is untracked or spans two
registers, and outside the entry mask.

check_wave32_region_controls derives each wave32 fixture from a wave64
fixture by replacing its exec lines. The fixtures are the plain,
complementary and skip regions, every saveexec if/else shape, and the
saveexec wait, scalar-ALU, scalar-load and body families. Each wave32
fixture must lower to identical HLSL, and every refusal is pinned with
its message.

The exec_regions draws and the LLVM 15 round trip (+wavefrontsize32)
include the wave32 twins. tests/form_coverage_check.py no longer lists
s_and_saveexec_b32 as rejected and asserts that it is covered.

Fixes R0Y00#2137

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

Review follow-up. A resolve that covered a never-begun index, or one ended
with the other occlusion type, could reach ResolveQueryData and read
uninitialized query data.

- A resolve is forwarded only if every index in its range has an observed
  EndQuery of the same type on the current recording. A new BeginQuery on
  the index clears its completion; Close clears all of them with the rest of
  the recording state.
- The query slots refuse every command-list type other than DIRECT.
- Which console methods sit at slots 28 to 30 is still a hypothesis, so the
  bindings are now a diagnostic opt-in, X2W_D3D12_QUERY_SLOTS=1 (render
  mode). Unset, the three slots stay no-ops as before. The test-only
  X2W_TEST_QUERY_IGNORE is removed.
- startup_list_queries sets the opt-in and keeps both successful readbacks.
  New untouched-sentinel cases cover a never-begun index, a range with a
  hole and the wrong type. The control is now
  startup_list_queries_default_{warp,hardware}_control: it runs without the
  switch and must report the untouched sentinel in the first word.
- Known limit: a resolve recorded on a later list than the EndQuery calls it
  covers is refused.

Refs R0Y00#870

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…y-semantic

startup: link stream pixel attributes to vertex parameters by semantic
Following the review on R0Y00#2022, a descriptor-format load is valid only
when its opcode reads exactly the format's channel count, the format is
handled, and the fixed bits are an identity value. load_descriptor_format
now reports that validity, and every load is staged before the first
store. If any load is invalid, the invocation returns before storing, so
no placeholder result is published and zero data from a valid read stays
distinguishable. The format words are uniform constants, so the whole
dispatch leaves u0 unwritten.

The fixture now uses matching widths only (32_32_32_UINT and
32_32_FLOAT replace the narrower and wider reads). Four invalid-format
runs (8_SNORM, a narrower and a wider opcode, a non-identity DST_SEL)
must leave all 320 words at the sentinel. Zero-filled and D3D-fill
references must fail on them, as must sources with the refusal removed,
either width accepted, or the selectors ignored. A control also checks
that the gfx1030 caller-format loads are unchanged.

Refs R0Y00#2022 (item A, first slice)

AI-assisted (Claude Code); reviewed and run locally.

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

startup: return the failed call's error from the stand-in's File::GetFileInformation
…med-root

startup: refuse a malformed root signature blob per request in gfx2hlsl
…ries

startup: forward occlusion queries on command-list slots 28 to 30
startup: say why --trace-calls 1 armed nothing, and pin the hooked export
…ave32-regions

shader: lower wave32 masked regions (s_and_saveexec_b32) in pixel_aot
Review nits on R0Y00#2150: descriptor_snorm16_load no longer names its
parameter half, which is an HLSL type name, and the two lower() argument
lines in main() are indented like the rest of the call. No behaviour
change.

Refs R0Y00#2022

AI-assisted (Claude Code); reviewed and run locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
startup: discover and read committed save containers synchronously
…lane-scalar-def

startup: prove v_cvt_f32_u32 results uniform for v_readfirstlane_b32
…wide-width

shader: keep s_bfe_u32 wide fields in gfx2hlsl
…iptor-format

compute: lower gfx1013 buffer_load_format from the descriptor format
Offline mode covers the title process only; document that Gaming Services
outside it can still service runtime calls, and warn from run.ps1 when
-FakeUser is omitted so user APIs hit the host runtime.

Refs R0Y00#2075

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Address review nit on R0Y00#2167: warn only when -FakeUser is unset and the
caller has not already set X2W_FAKE_USER=1.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
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.