Second merge round: main added rgb96 views, the device filter, the
present source-rect path and its own ctest registration of
d3d12_present_test. bind_image keeps both defaulted parameters and the
rgb96 view fallback; image_descriptor runs main's 96-bit family check
before the castable-list check; Resource keeps main's rgb96_ member;
register_samplers and the presentation plumbing follow main's positions,
and the duplicated d3d12_present_test block and stale 'surfaces' local
are dropped in favour of main's.
compare_allocation_info required the host's answer for two totals that
overflow 2^64 (two 2^63 buffers; the largest buffer plus one). WARP and
the hosts of #1204 saturate at 0xFFFFFFFFFFFF0000, but the Intel Raptor
Lake-S (101.7092) and RTX 5060 Laptop (621.24) hosts on Windows
26300.9974 (D3D12Core 10.0.26100.9818) wrap, to 0 and 65536, while WARP
on the same PC saturates. d3d12_vulkan_device_test failed there on both
GPUs.
Ours is now pinned to the saturated answer, which can't make a caller
allocate less than one of its resources. A host whose total is below its
largest resource has wrapped and is reported, not compared. Any other
host answer is still a mismatch.
fma_f16_odd multiplies with a NoContraction OpFMul, so v_fma_f16,
v_fmac_f16 and v_pk_fma_f16 return +0 for a -0 product plus -0 on
MoltenVK 1.4.2 (valu_fuzz seed 330: 49/50 with the two multiply
skips, 50/50 with SPIRV-Cross 300681bb). The skip recipe now names
all five ops, and the KosmicKrisp line gives the manifest path.
Re-read the BVH builder's command-list call sites in the console order of section 3.5a:
+0x108 is SetComputeRootSignature, +0x138 SetComputeRoot32BitConstants and +0x168
SetComputeRootUnorderedAccessView (the PC-order readings SetComputeRoot32BitConstant,
SetComputeRootShaderResourceView and SOSetTargets do not fit the argument registers or the
inline writes). RDX at the +0xc8 call is the pipeline. +0x490 (console slot 146) is the
public enhanced Barrier with one global compute-to-compute UAV barrier.
New section 3.3a: slots 37/39/43/45 at other sites, 148 (upload allocator whose pointer is
used as the GPU address), 80 (dispatch with an extra word), 71/73 (label write/wait,
unreachable in the shipping DLL) and the second Barrier site.
Current main now preserves an odd load's leftover VGPR half. Apply the signed or unsigned range conversion before that shared half-word write so both behaviors survive the integration.
main gained 117 commits since f85582e, among them #119 itself (through #908,
which is built on its head and adds PresentX on top), so both sides now
carry the presentation path: this branch as #119's own commits merged with
main at 426023a, main as #908's integration of them. Eleven hunks in six
files conflicted.
runtime/src/vulkan_present.h (2 hunks):
- present's blit: main's structure (a blank present, the source rectangle)
with both locks of the branch. record() reads and updates the context's
layout tracker, which ExecuteCommandLists guards with tracker_mutex_ (it
copies the tracker, emits, and commits the copy after the submit); under
the resource lock alone a present between that copy and that commit would
lose its update. Order as in the context: resource -> tracker -> submit.
- presentable(): identical code, main's comment.
runtime/shims/d3d12_vulkan_device.cpp (3 hunks):
- includes: shader_library.h stays (pipelines read the translator's index);
- Resource's fields: the branch's arena fields and main's rgb96_ (D3D-62);
- standalone device: info.presentation is set once, where the swapchain
extension is pushed (the branch's order); main set the same value later.
runtime/shims/d3d12_com.h (2 hunks): the union of the includes; the
branch's VulkanDeviceInfo::features and shader_dir stay.
runtime/CMakeLists.txt: main now builds and registers d3d12_present_test
next to xbox_present_test, so the branch's copy of that block goes; the
compute and draw tests keep theirs. d3d12_present_test keeps returning 77
without a Vulkan device, which main's registration (c2967a5) relies on but
main's test does not do yet.
README.md, docs/d3d12_vulkan.md (3 hunks): the branch's text. main's side
is what the branch had already merged at f85582e, unchanged since.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The RPF9 TOC is encrypted, but each pack's CDataFileMgr__ContentChangeSetDef
mount list names its videos, and the archive stores them in the list's
lowercase-path order. bink_names.py aligns the sorted list with the streams
from bink_index.py (a monotone DP that may skip list entries held by other
packs), scores header facts (resolution hints, portrait snapmatic, family
siblings sharing a shape), and labels each row verified / anchored /
bracketed / positional. Mount lists are read from an archive or an
rpf9_carve.py directory through gamedata_index, so a list split over two
zlib streams stays whole.
On 1.0.2.1 it names all 797 streams in movies.rpf, story000.rpf,
story000_restofworld.rpf and core_restofworld.rpf. Tests are synthetic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
asm.py keeps main's lds/vgprs validation, lists in metadata and the 1024 workgroup size and adds sgprs per kernel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nearest sampling an integer image through a float view violates Vulkan's numeric-type rule. For D16 the subsequent float-to-half conversion also destroys the sampled integers, including every texel in the synthetic signed/unsigned sum.
main is at c2967a5e, 120 commits past the branch's base. Two conflicts, both
sides kept:
- docs/design.md: main added a third "Typed image loads" row at the place
where this branch adds its "Image atomics, size and LOD queries" row. Main's
row first, then this branch's.
- tests/test_shader_checks.py: main counts one more check (cs_fmt_xy_xyz,
TEST-185: 2 -> 3) on the line next to this branch's comment change. Main's
count with this branch's comment; the STORE_WORDS and GET_LOD_TESTS terms
stay.
Nothing from main overlaps the new fixtures: TEST-185 and cs_w64x_andn2_exec
run through vk_compute_test's dump mode, and vk_store_test, vk_texture_test
and vk_compute_test are unchanged on main.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Both sides extended the same spots: the PR's castable-format flag and main's
R9G9B9E5-as-R32_UINT view emulation meet in bind_image (two extra defaulted
parameters), image_descriptor's view format (resource_format + castable list),
create_texture (TextureCreateInfo carries the VkImageFormatListCreateInfo the
castable list fills) and the device init (arena creation plus main's predication
configuration). Main's hardened CopyBuffer preparation and predicate capture
keep the PR's arena-buffer offsets; the PR's old emit-side offset math is
superseded by main's prepare-side buffer_offset handling.
The previous merge omitted the corrected T# and was reverted after ps_gather_wrap selected the UINT path for an UNORM image. Restore the translation only after integrating the real view format into the harness.
Corpus (scripts/vs_input_survey.py, all 2,236 VS): no exp prim, no s_sendmsg, no v_mbcnt, every
VS exports pos0/param, so the console runs them as legacy hardware VS. Their input VGPRs are
Mesa's GFX10 legacy layout (radv_shader_args.c, declare_vs_input_vgprs, not is_ngg): v0 vertex
id, v1 unused, v2 primitive id, v3 instance id; no VS reads v1/v2 on entry, 788 start with the
fetch call and read attributes from v4.
Those ids are zero-based on the hardware (ac_nir_lower_intrinsics_to_args.c: vertex_id is
load_vertex_id_zero_base, instance_id is load_instance_id; the bases come in SGPRs), while
Vulkan's VertexIndex/InstanceIndex include firstVertex|vertexOffset/firstInstance. The
translator now seeds v0 = VertexIndex - BaseVertex and v3 = InstanceIndex - BaseInstance
(DrawParameters; feature shaderDrawParameters in every VS's metadata).
GPU test vs_base_ids.asm, drawn with VKH_DRAW=16,7 (new vk_harness option): 0x101 on every
pixel, where before it was 0x7111. Run by check.py and run_gpu_tests.py. vk_harness,
vk_pipeline_check, vk_bindless_test, vk_texture_test and the runtime's Vulkan device enable
shaderDrawParameters. design.md's "Inputs and outputs" row replaces the "unverified" note.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A byte search for the class and interface GUIDs xgameruntime-docs lists: XCurl.dll references XThreading,
XError and XNetworking (IXNetworkingImpl2); libHttpClient.GDK.dll holds all 24 class ids once (a linked
table), and its highest interface ids date the GDK. No other package DLL references any.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package's GDK modules don't import xgameruntime.dll. libHttpClient.GDK.dll and XCurl.dll have no import
entry for it, but both carry the wide string "xgameruntime.dll" and the names InitializeApiImpl[Ex|Ex2],
QueryApiImpl and UninitializeApiImpl next to a statically linked XGameRuntimeInitialize: xgameruntime.lib's
thunks LoadLibraryW the runtime and GetProcAddress those names. Bound to the host, that bypasses the offline
shim. The executable is very likely built the same way.
- library_loader.cpp: LoadLibrary*/GetModuleHandle*/GetProcAddress/FreeLibrary for kernel32, kernelbase and the
api-ms-win-core-libraryloader sets. A module the registry owns (rt::shims::owns_dll) gets a pseudo-handle and
GetProcAddress resolves through the registry; an unserved name is NULL with ERROR_PROC_NOT_FOUND. Every other
module goes to the host.
- xgameruntime.cpp: the five entry points, with the signatures and the unknown-class error documented by
xodus-gaming/xgameruntime-docs (GPL-3.0, facts only). QueryApiImpl logs the class and interface ids and refuses
them, so the first boot with the executable names the COM interfaces to implement.
- xgameruntime_test drives the path through XCurl.dll's api-set binding; docs/runtime_imports.md records the
measurement and the new dry-run counts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The instruction format overrides a bound descriptor. Native gfx1036 returns zeros for FORMAT=INVALID even when its address and extent are otherwise usable. Gate the existing guarded load before reading memory.
Review of #1338: the runtime-windows artifact holds Windows executables,
so say to use it on Windows or under Wine, note GitHub's 7-day expiry,
and use <unzipped runtime-windows> instead of a ~/Downloads path that
reads like Linux or macOS.
Council review: MoltenVK main at 5189f8de is affected too, the
translator claim is narrowed (SignedZeroInfNanPreserve is #664), the
counts carry their flags, and the known-problems row gives the
--skip-op and KosmicKrisp workarounds, both measured on an M3 Max.
The pl-PL merge (#1305) was branched before #1286 updated the zh-CN row,
so the merge kept the old 0d61c357 row next to the synced e7584c5 one.
Drop the stale row and add tests/test_i18n_index.py so the table cannot
list a language twice, point at a missing quickstart, or carry a
malformed row.
Docs and a test only, no game data.
The translator handles the image atomics, image_get_resinfo, image_get_lod
and the 32-bit image_bvh_intersect_ray, but no test ran them. Six hand-written
fixtures now do, with the expected words derived in each header from the
RDNA2 ISA definition of the instruction:
- cs_imgatomic: add, sub, and, or, xor, smin, smax, umin, umax and cmpswap on
a 2D r32 uint image. 0xfffffff0 tells the signed min/max from the unsigned
ones, each with a case that goes the other way; cmpswap hits and misses; one
op runs without glc; 63 lanes are off; 64 threads add to one texel.
- cs_imgatomic3d: six cases on a 4x4x4 volume, the 3D path of the translator.
- cs_resinfo: a 16x4 image with five levels: levels 0, 1 and 3 in full, then
dmask 0x3, 0xa and 0x8.
- ps_get_lod, ps_get_lod_array: calculated LOD 1 and 3 on the two-mip
texture, the clamped LOD held by the last level and by the sampler's
MAX_LOD; 2 and -3 on the one-level 2D array.
- cs_bvh32: the scene of cs_bvh through the 11-dword address form.
vk_store_test gets a "words" mode for the compute ones: it also binds the
uint image and a small volume as r32ui storage images (bindings 4 and 7) and
a 16x4 five-level image behind its real T#, fills the images and prints them;
check.py holds the expected words. The other two run on vk_texture_test and
vk_compute_test as they are.
All pass on an RX 7900 XTX and a Ryzen 9 7950X3D integrated GPU (RADV, Mesa
26.3.1) and on llvmpipe, natively and with LEONIDA_W64_EMULATE=1, and are
clean under the validation layer. No translator change was needed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#1363 picks the fetch type of explicit-LOD gathers (image_gather4_l) from the T#. With it, ps_gather_wrap fails in
both GPU runs on an RTX 4060 Ti (4096 pixels differ from the expected (5090733.0, 14942181.0, 258623.0,
9702309.0)), on main and on the PR's own branch; it passes just before the merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On top of the merge candidate 70178d3 (Ryx69/Leonida#6, which merged main at
426023a): the 219 commits main gained since. Three hunks conflicted, in two
files; both follow the notes on #291 (ItsNotRexed 08:27 UTC, Vonsek 09:58 UTC
on 2026-11-22).
runtime/shims/d3d12_vulkan_device.cpp, device setup after the VulkanContext:
- the branch's GPU address arena is created first, as before;
- main's block that configures predication and the predicated byte copy
(#1277) follows it;
- one load_host_image_copy call and main's lazy D24 converter (enabled only
where D24_UNORM_S8_UINT is not usable) replace the branch's unconditional
enable_depth24, which was the same code before main changed it.
runtime/src/vulkan_replay.h:
- CopyBuffer: main's version. It already adds ResourceBinding::buffer_offset
to both offsets, as the branch did, and adds the overflow and overlap
checks and the predicated copy. With the arena, source and destination are
often the same VkBuffer; the overlap check compares the adjusted ranges.
- Predication: main's version. prepare() passes buffer_offset + the command's
offset to prepare_predicate, so a default-heap buffer inside the arena is
read at its own range; emit() captures the word and tests the capture's
scratch slot, not the application's buffer.
Everything else merged without conflicts. Nothing in main's 219 commits adds
a caller that takes a buffer's Vulkan device address for its GPU VA.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MoltenVK 1.4.2's SPIRV-Cross lowers a NoContraction OpFMul to
spvFMul, which returns fma(l, r, T(0)). A -0 product plus +0 is +0, so
valu_fuzz --family f16 reports +0 where the model wants -0 on Apple
GPUs (#1203). The translator's SPIR-V is correct. SPIRV-Cross 300681bb
fixes the helper; MoltenVK main still pins its parent.
Record the cause and the A/B measurement in the translator contract,
and add the symptom with a workaround to the known problems in
docs/testing.md.
LLVM 23 writes code object v6, which amdhip64_6.dll refuses with error
209: retry the probe as v5 and keep that version for the run.
LLVM 23 also wants v8.l for 16-bit operands on GFX11: ask the assembler
once, and use that spelling for the f16 ops the oracle's tools run.
Tested on a Radeon 780M (gfx1103), driver 32.0.11020.1002.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts with main's DPP and TEST-175 entries in check.py,
run_gpu_tests.py and regen_fixtures.py: main's lists with
cs_w32_mask_imm / cs_w64_mask_imm added back.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>