Array resource queries need the array at the descriptor index so the third component reports the view's layer count. Check the returned dimensions through a draw against the existing 12-layer texture.
main is at 41f44826. Two conflicts, both sides kept:
- docs/design.md: both sides edited the one-line "Ray tracing" row. Main's
row (the triangle node types and their vertex slots), with this branch's
sentence about cs_bvh32 where it stood.
- tests/test_shader_checks.py: main counts ps_ssharp (9 -> 10) and patches
sampler_test on the lines next to this branch's STORE_WORDS / GET_LOD_TESTS
terms and its get_lod_test patch. All four lines.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
D = SGPR[S0 + M0] (the b64 form the pair at S0 + M0): a dynamic load
from the SGPR array, as v_movrels is for VGPRs. Every SGPR write stores
into that array, all reads come before the destination is written, and
the index wraps to the 128 slots so the lane-mask parking slots past them
stay out of reach. s_movreld (relative writes) stays Unsupported: the
translator keeps translate-time SGPR knowledge a dynamic write would
invalidate.
tests/semantic/test_salu_movrels.py covers M0 values, M0 from a register,
the b64 pair, an overlapping destination, SCC kept and the rejected
forms. docs/design.md row added.
awc_opus.py exports streams with an empty OpusTags header, so players show
only the stream id. opus_tags.py fills that header in place from the
awc_names.py CSV (TITLE) and the text_tables.py dialogue CSV (LABEL,
SPEAKER, SUBTITLE and SUBTITLE_<LANG>). Only page 1 is rewritten; the audio
pages stay byte for byte. Synthetic tests only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
write_target cleared the delete marker before the host CreateFileW ran, and copied a package file up
without looking at the marker, so a write-open of a deleted name could make it readable again: an
OPEN_EXISTING open succeeded on the copy-up, and one that failed left the marker gone with the package
file visible behind it.
The marker is now never removed, and a tombstoned name is never copied up. Reads and listings prefer an
overlay copy, so a re-created file is visible without clearing anything, while an open that keeps the
contents (OPEN_EXISTING, TRUNCATE_EXISTING) fails with ERROR_FILE_NOT_FOUND and leaves the name deleted.
file_system asserts that sequence: the failed write-open, no overlay copy, and the name still gone.
Review pass over the rest of the shim: Target loses the two fields nothing read, FindFirstFile no longer
parses its pattern twice, collect drops its unreachable non-console branch, and the enumeration states are
unique_ptr entries looked up under the lock instead of raw pointers handed out of it.
Add docs/character_models.md and link it from the docs index and models.md.
The page records what the character export actually contains, so a preview
cannot quietly present a proxy or a placeholder as Lucia's hero asset:
- 26,585 manifest rows / 11,335 unique names: 23,720 drawables, 2,865 fragments.
- Every fragment exports as a 25-vertex bounds cube with Embedded: null; child
drawables are not walked.
- Lucia's 22 named records and the 13 decoded parts, with vertex/triangle counts
and albedo keys. The head drawable has no texture reference.
- The only Lucia full body is cs_lucia_legacypedcs (874/640-vertex rows,
1,748/1,816 decoded): a clothed legacy ped, not a base body.
- player_story000_00 is 104 unique names = 63 drawables + 41 bounds fragments.
- Slot-token counts, with the explicit caveat that they are a name heuristic.
- Texture coverage 184/215; only 0xC8E8C282 is sRGB albedo; hands/feet keys
unresolved.
- Not decoded: fragment children, a ped-variation table (the two common.rpf
managers are height/shape and gameplay components, not appearance),
Lucia's hair (3-vertex placeholders), levels.rpf names, and bind pose.
NVIDIA gives VK_FORMAT_D32_SFLOAT and D16_UNORM STORAGE_IMAGE, so the
layer reported typed UAVs (and now typed loads) for D32_FLOAT and
D16_UNORM on an RTX 3070 where native D3D12 reports none (found by
@Parakeet-Wheat, review by @Flyander). The depth cleanup clears the
typed-UAV bit and every Support2 bit, and the host comparison's depth
check now covers TYPED_UNORDERED_ACCESS_VIEW and Support2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From two reviews of #1511:
- Depth formats drop TEXTURE1D: the layer refuses 1D depth-stencil
resources (native D3D12 allows them).
- The depth MULTISAMPLE_RENDERTARGET query uses the same usages as
MULTISAMPLE_QUALITY_LEVELS and resource creation.
- R9G9B9E5's emulated UAV reports typed load with store, like the rest.
- Comments and docs say what works today: typed UAV texture reads go
through the sampled binding; typed buffer UAVs share the store side's
gaps (no buffer UAV views, rdna2spirv FORMATS); R32_UINT atomics work
on 2D UAVs only.
- compare_format_support only runs against a host on the same adapter,
lists the formats the layer answers with no uses instead of skipping
them silently, needs at least 40 compared formats, and checks
over-claims: MIP and atomics the host lacks, atomics outside
R32_UINT/R32_SINT, sampling integer formats, and multisample render
targets that disagree with MULTISAMPLE_QUALITY_LEVELS. A layer with
injected atomics, multisample and integer-sampling over-claims fails
it with 128 mismatches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vk_compute_test from an older commit still runs every shader, so a newer
translator rule that the old program does not set up (the raw V# in pc[2..3],
which drops every store when stride is 0) shows up as the untouched 0xEEEEEEEE
fill on every compute test, indistinguishable from a translator regression.
Measured on an RTX 5090 / 621.24: main 99f99890 with an exe from earlier the
same day gave 69/141, every compute test on the fill pattern; rebuilt from the
same commit, 141/141.
CreateCommittedResource, CreateDescriptorHeap, CreateCommandQueue, CreateFence
and Map now return the host PC runtime's HRESULTs for invalid arguments.
compare_invalid_arguments in d3d12_vulkan_device_test checks the invalid
descriptions and their valid neighbours, plus ALLOW_RENDER_TARGET and
ALLOW_DEPTH_STENCIL on every format both devices create, against the host
device.
On main the new test found 25 mismatches in its first 55 cases (invalid
heap properties and flags, buffer layouts, upload/readback states, clear
values and texture flags accepted; two access violations, on a zero-width
buffer and a zero-size texture array), then the process died creating a
2049-layer texture. main also refused zero-descriptor heaps and answered
E_POINTER where the host treats a null output as a capability check.
CreateDescriptorHeap answers a null output before its flag, type and node
rules, as the host does; committed resources and fences check their
arguments first. A GPU_UPLOAD heap is refused, matching the layer's
OPTIONS16.GPUUploadHeapSupported FALSE; the test compares that case only on
a host without GPU upload heaps (Resizable BAR off).
CreateCommittedResource accepts a sample quality on a single-sampled texture
and the two standard MSAA patterns, as the host does.
The flag and format rules were measured on an RX 9070 XT, an integrated Radeon
GPU and WARP. Answers that differ between them, or that the layer can't follow,
are not compared and are listed in docs/d3d12_vulkan.md. Each new refusal is
logged once with its reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game's translated ray-tracing shaders read the console's BVH records
themselves (docs/d3d12_vulkan.md 4.8), so the layer has to write them. This
adds the GPU builder, checked against tools/xdxr_bvh.py:
- src/xdxr_build.comp: one pipeline, one dispatch per step. Triangle leaves
(any of R32G32B32/R32G32 vertices, none/R16/R32 indices, a stride, an
optional 3x4 transform) or 128-byte INSTANCE records with world-to-object
inverses; Morton keys and a bitonic sort; BOX32 nodes four consecutive
children at a time, level by level, with the parent table; the header.
Buffer device addresses as uvec2: needs bufferDeviceAddress, not
shaderInt64. NaN triangles, mask-0 instances, instances without a BLAS and
singular transforms get empty boxes.
- src/xdxr_build.h: XdxrLayout (exact result and scratch sizes from the
element count, for the prebuild info too) and XdxrBuilder (records the
dispatches). A bias maps the application's 40-bit BLAS addresses to device
addresses.
- test/vk_xdxr_build_test.cpp: nine synthetic cases built on the GPU and
dumped; ctest `xdxr_build` + `xdxr_build_check`, which runs
`tools/xdxr_bvh.py check-build`: validate, then trace 1000 rays per case
against brute force.
- vk_test_device.h: opt-in bufferDeviceAddress (request_buffer_device_address,
device_address()).
- tools/xdxr_bvh.py: check-build; trace takes the bias; instances without a
BLAS and inactive triangles are valid.
Not wired to BuildRaytracingAccelerationStructure yet: that path builds a
VkAccelerationStructureKHR today (#743), and which one the layer uses is a
maintainer decision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SHADER-260 measured on gfx1036 that a VOP3 `neg` on this instruction is a
plain sign flip of the 16-bit half that operand contributes, before any
quieting (0x7c01 -> 0xfc01 under IEEE mode 0 and -> 0xfe01 under mode 1), in
either half and with op_sel. The translator refused every modifier, so any
shader using it failed to translate. `abs` stays refused because its rule on
this instruction is unmeasured, and the mode-1 signalling-NaN quieting is left
out until SHADER-190 settles which mode the game's shaders run in.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
sampler_descriptor() already encodes D3D12_FILTER_REDUCTION_TYPE_MINIMUM and MAXIMUM into the S# filter_mode and gfx10_descriptors.h already provides vulkan_reduction_mode(), but bind_sampler() ignored it and logged that minimum/maximum samplers blend for now.
Enable Vulkan 1.2 samplerFilterMinmax in device creation and vk_test_device.h, chain VkSamplerReductionModeCreateInfo in bind_sampler() when supported and not combined with compareEnable (falling back to blend with a log otherwise), update docs/d3d12_vulkan.md, and add a synthetic 2x2 GPU sampling test in d3d12_descriptor_test comparing MINIMUM, MAXIMUM, and STANDARD (negative control) linear filters.
Runs the same texel fetches as raw compute kernels on the AMD GPU through tools/hw_oracle/: a linear texture the
kernel carries in its own code (256-byte aligned, found with s_getpc_b64), a T# built in s[8:15] for the GPU's family
(hw_oracle/tsharp.py: GFX11 on gfx11xx, GFX10 on gfx103x/gfx10xx), image_load with every dmask for one texel per lane,
all four result registers stored and compared word for word with the CPU model. --oracle translator,hw runs both on
the same textures; --negative-control checks seven wrong models and a wrong T# FORMAT are caught. Exit 77 without the
tools. gfx1150 is RDNA3.5, not RDNA2: the docs say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reads AMD's machine-readable RDNA2 ISA spec (path given with --isa, not vendored), scans
tools/rdna2spirv.py statically with ast and reports, per encoding, which instructions have a
rule, are refused or are unknown, plus every matched name that is not an RDNA2 instruction.
Tests use a small hand-written fixture; the real-XML test skips without LEONIDA_RDNA2_ISA_XML.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The valu_fuzz hardware oracle (#1365) had not run on RDNA2, and the
v_pack_b32_f16 row said "RDNA2 not measured". On a gfx1036 iGPU (AMD Windows
driver 32.0.21044.64, HIP backend, AMD clang 23):
- f16 and mem, seeds 101-105 x 2000 x wave32/wave64: 40,000 of 40,000 match,
0 assembler rejections; every negative-control perturbation caught.
- translator,hw at seed 3: mem 200/200, f16 199/200; the difference is an AMD
Vulkan driver mismatch of the #1506 kind.
- v_pack_b32_f16 quiets a signaling-NaN half under IEEE mode 1 and moves it
unchanged under IEEE mode 0; neg flips the sign first.
BUILD-422. Docs only. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The models.md re-count item was still open. Re-run rpf9dump models over
the same archives at e293917 and record the rows: 39,454 excluding
levels.rpf, +3,206 over 917e9b9, almost all recovered fragments (2,551
in packs.rpf, 594 in data.rpf). Split each archive by IsFragment and
update the packs.rpf paragraph and the README line.
levels.rpf and the triangle totals were not re-run; the table says so.
Texture3D SRVs already encode ResourceMinLODClamp into the T# descriptor, but image_descriptor() rejected non-zero clamps and bind_image() only applied VK_EXT_image_view_min_lod / empty-mip-set swizzle zeroing to 2D, 2D-array and cube colour views.
Allow non-zero ResourceMinLODClamp on sampled 3D colour views, forward the T# clamp to Vulkan in bind_image(), update docs/d3d12_vulkan.md, and add synthetic GPU sampling and negative-control checks in d3d12_descriptor_test.
A mapped title names its files on the console's drives, but nothing mapped them: the file calls went
straight to the host and --game-dir was only used to find modules, so the first file a title opens at boot
would fail. New shims for CreateFile*, FindFirstFile*/FindNextFile*/FindClose, GetFileAttributes*/
GetFileAttributesEx* and DeleteFile* (kernel32, kernelbase and the api-ms-win-core-file sets) map a GAME:
path under --game-dir, and send every open that can write and every delete to --overlay (default
<game-dir>\overlay), which reads and listings prefer. A write-open copies the package file into the overlay
first, so OPEN_EXISTING keeps its bytes, and a delete of a package file leaves a marker instead of removing
it, so the package is never modified. A path that climbs above GAME: with ".." or names another drive is
refused with ERROR_INVALID_NAME. A path without the prefix is still a host path.
The prefixes and the overlay come from ivall/xcl (GPL-2.0-only), as facts only, no code.
file_system ctest: 43 checks over folders in %TEMP%, covering mapping and case, copy-up and read
preference, a new file in folders the package lacks, delete and re-create, the merged listing, host-path
passthrough, the escape refusal and the narrow variants.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
docs/descriptor_lookup_intel.md (added in 49c6e0ed) was missing from the
Runtime, GPU and validation table. The "Other languages" paragraph
appeared twice, a stale copy from each concurrent i18n merge, so fr and
pl-PL never appeared together and tr (just merged) was missing; make it
one line naming every language. tests/test_i18n_index.py now requires
exactly one such line naming every language in docs/i18n/README.md once,
so a stale concurrent merge cannot reintroduce it.
Docs and a test only, no game data.
main is at 99f99890. One conflict, both sides kept:
- tests/test_shader_checks.py: main shortened the comment above TOTAL and
counts a fourth vk_store_test shader (cs_sample_lz_int_d16: 3 -> 4) on the
lines this branch's comment change touches. Main's comment with a clause
for the "words" fixtures and the image_get_lod draws, main's count, and
this branch's STORE_WORDS and GET_LOD_TESTS terms.
The automatic merges were read as well: check.py and run_gpu_tests.py run
cs_sample_lz_int_d16 through vk_store_test's "load-d16" mode next to the
"words" fixtures, and gfx10_descriptors.h still encodes the T# of the 16x4
image the same way.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>