Under Wine's macOS driver the test failed at its last step, the GDI read of the screen: GetPixel on the screen DC
returns CLR_INVALID there for every pixel, even one GDI painted itself (BitBlt from the screen DC fails too), and
the window's own DC holds Wine's GDI surface (white), not the image presented through the Metal layer. The
presenter itself was fine: all the injected-failure checks passed, MoltenVK made 320x240 and 400x300 swapchains
at contents scale 1.0, and the driver reported no out-of-date presents. The "present failed" lines in that log
(VkResult -1000001004 twice, then -1 = VK_ERROR_OUT_OF_HOST_MEMORY) are the test's own injections; markers around
them showed each line inside its injection.
The test now enables the presenter's capture and checks the whole presented image for the clear colour at the
swapchain's size after the first 60 frames, after the resize and at the end, on every platform. The screen check
stays where GDI can read the screen; a CLR_INVALID there is reported and skipped instead of failing. The test also
says on stderr that the next three "present failed" lines are expected, since they were read as faults twice.
Checked under CrossOver's Wine 11 with MoltenVK 1.4.3 on an Apple M3 Max: the test passes, and with the clear
colour changed the capture check fails at the first 60 frames.
Both SMEM ops only probe (prefetch) an address in the address translation
cache: no data comes back and nothing is written. They raised Unsupported;
they join NOOPS. test_sopp_noops.py covers them and the design row lists
them.
Mirrors the stable onboarding text (what Leonida is, the own-copy and
no-game-data rules, prerequisites, build commands, stage order, common
troubleshooting, contribution pointers) at synced commit 003e7812, following
the fr/pt-BR structure. The index row lists @NolanCotter as maintainer.
AI-assisted. Tested: test_i18n_index, test_docs_links.
Other Xbox Series compatibility-layer efforts have run the same package's
console DLLs, shader pack and retail titles. This folds their published
measurements into docs/d3d12_vulkan.md §7 — the CS root-argument packing, the
inline record opcodes, the mesh inputs, the OpenExistingHeapFromAddress UMA
recipe, 64 KiB physical pages, more command-list slot numbers and the console
export surface — each row paraphrased with its measurement basis noted.
The unimplemented-import classifier learns the console DLL names from that
surface (d3d12_xs!D3D12XboxCreateSyntheticDevice, xaudio2_9!XAudio2Create,
gameinput!GameInputCreate, dstorage_xs!DStorageGetFactory) so fail/stop
policies report E_NOTIMPL honestly instead of faking success; functions with
no measured return (xg_xs, AcpHal, D3D12XboxSetProcessDebugFlags) stay `other`.
Classification checks added to unimplemented_policy_test.
AI-assisted. Tested: test_i18n_index, test_docs_links, compileall. The
registry/test change is Windows-only C++ and was not compiled here.
Reduces redundant round barriers and OpSwitch cases under --wave64-emulate (Issue #884) via two exact CFG/dataflow passes in tools/wave64_emulate_opt.py: (1) backward SCC liveness skips scc_from_mask/scc_any_half votes when SCC is dead-out; (2) safe lane-local s_cbranch_execz/execnz region folding inlines single-entry/single-exit read-only regions with no cross-lane ops, no barriers, no EXEC-widening, and no live-out scalars behind if (%active) and chains single-predecessor continuations.
heap_desc_refusal now also refuses D3D12_HEAP_FLAG_ALLOW_DISPLAY and
HARDWARE_PROTECTED, which the D3D12_HEAP_FLAGS documentation says
CreateHeap does not support (review on #1820). Both are host-comparison
cases in compare_invalid_arguments, awaiting a host run, and direct
refusal checks on the standalone device.
CreateHeap1, its heap1 test cases and the heap_create1 helper are
removed: #1846 implements CreateHeap1 over CreateHeap and inherits these
checks. The docs keep #1846's CreateHeap1 line untouched and describe
the CreateHeap checks under the heap bullet instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layer keeps answering NOT_SUPPORTED (no CreateStateObject or DispatchRays),
although its XDXR acceleration structures are what the game's own traversal
shaders read. The first-boot trace shows whether the game asks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s_and_b32 s20, exec_lo, 1 put each lane's bit in s20, which lane_masks.py
classifies as data when the other operand is a constant, so s_bcnt1 of it
counted 32 / 0 instead of 1 (found by @Pierre-Kookis on #1792, reproduced
on AMD RDNA2 and an RTX 4070 Ti SUPER; main was right). The mask read is
now only for an EXEC / VCC destination; into a plain SGPR the op keeps the
data read. test_mask_src_sgpr_const.py has the case.
s_mov_b32 s20, 0x3ffffc00; s_and_saveexec_b32 s6, s20 left all lanes on:
mask_src read the SGPR's raw value, the same non-zero constant in every
invocation. The 32-bit bitwise SOP2 ops read constants raw too, so
s_and_b32 exec_lo, exec_lo, 0xff00 (inline or in an SGPR) kept every
lane, and s_mov_b32 exec_lo, sN did the same.
mask_src now takes bit L of an SGPR holds_lane_mask doesn't flag (the
high SGPR of a pair for lanes 32-63 in wave64). In wave32, a bitwise SOP2
on masks (EXEC/VCC destination or a mask source) reads both operands
through mask_src (sop2_b32_srcs), and s_mov_b32 exec_lo/hi from a non-mask
SGPR takes each lane's bit. A real mask is unchanged (0 / ~0 per lane).
tests/semantic/test_mask_src_sgpr_const.py covers saveexec, SOP2 on EXEC
(inline and SGPR), exec_lo from an SGPR, v_cndmask, a wave64 pair and
masks from compares. cf_diff (self-test, 800 runs) and salu_diff (500)
pass. docs/design.md row updated.
The rule took v_dot4_i32_i8 with a neg_lo or neg_hi field as the plain instruction. llvm-mc accepts those
fields on it for gfx1036 (not on v_dot4c_i32_i8), and on RDNA2 hardware they change the result: neg_lo flips
bit 15 and neg_hi bit 31 of S0 or S1, and on S2 neg_hi clears bit 31 before neg_lo flips it, as the fields do
to float operands.
Measured on gfx1036 through tools/hw_oracle: 5 operand sets under 8 forms plus the plain one, 45 words, all as
that model predicts. Nine of them are the table MEASURED_NEG of tests/semantic/test_alu_dot4_i8.py.
A set bit is now Unsupported, like clamp and op_sel; an all-zero field stays the plain instruction. No listing
of the 29 FSPX programs carries either field on these two instructions (0 lines), so what translates there
does not change.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Replay refused SetPredication, predicated buffer copies and D24/RGB96 footprint conversions while a
pipeline-statistics query was active (#1624 added the last), because their compute dispatches would count in the
application's CSInvocations. They now get the segment split #1519 gave resolves: the statistics query ends its
current physical segment right before the helper dispatch and begins the next right after it, and its result is
the per-counter sum of the segments. Query resolves and these helpers share one segment numbering. The markers for
non-query commands live on detail::Prepared, and emit() places them around capture_predicate,
emit_predicated_copy and the depth24 conversion parts, outside any rendering scope.
Without a statistics segment pool (the single-list replay(), or a queue without the summation helper), the three
commands are still refused while statistics are active, before any helper scratch is allocated (prepare() takes
statistics_helpers, false by default) and again in QueryReplay::plan.
Tests (Khronos validation on): vk_predicated_copy and depth24_convert run their helpers inside an otherwise empty
statistics query. Their results stay byte-exact and all 11 counters are 0. d3d12_predicated_copy compares with
WARP the same way. replay_query_predication checks the emitted order for a capture, a predicated copy, a footprint
copy and a resolve in one query, and the refusal without a pool. predicated_copy and typeless_rtv check both
preparation modes.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avoid O(N) OpSelectionMerge nesting and Python RecursionError on long sequential diamond/loop chains (e.g. unrolled ScreenProbes compute shaders): hoist each guarded member's dominated tail continuation out of its enclosing guard (exact by strict dominance) and make cfg_structure.structure, cfg_structure.run, and rdna2spirv.assemble's structured emitter iterative.
--wave64-emulate adds %x_buf (2L + 6W + 7 dwords) on top of the LDS
array, so a 64 KiB LDS made modules over maxComputeSharedMemorySize,
which spirv-val accepts and RADV dies on (#1721).
Translator: a 64 KiB hard cap (MAX_SHARED_BYTES, --max-shared-memory).
Over it, the pow2-rounded LDS array shrinks to the room left when the
program's need fits (indices wrap with OpUMod); otherwise the shader is
refused (Unsupported, with the byte counts). lds_bytes in index.json is
now the whole Workgroup total.
Runtime: the D3D12 shim's create_compute compares lds_bytes with the
device's maxComputeSharedMemorySize (32768 on AMD Windows and Intel)
and refuses the pipeline with a log line instead of creating it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured natively on an RDNA2 iGPU (gfx1036): v_cvt_pk_u8_f32 rounds to
nearest even, clamps to [0, 255] and gives 0 for NaN. The RoundEven rule
was right; NaN reached FClamp, which is undefined for a NaN operand, so it
is now replaced by +0 first.
cs_cvt_pk_u8.asm holds eight hardware words (four byte selects), checked
by check.py and run_gpu_tests.py, and bit-for-bit on the CPU by
tests/semantic/test_cvt_pk_u8.py. Contract-table row added.
Fixes#358