Skip to content

test: texture tiles NOTE only for the measured CopyTiles offset rounding on AMD and Intel (D3D-TILES-AMD-BYTE-OFFSET) - #964

Open
adrianmjim wants to merge 4 commits into
ProjectLeonida:mainfrom
adrianmjim:fix/texture-tiles-row-major-offset
Open

adrianmjim wants to merge 4 commits into
ProjectLeonida:mainfrom
adrianmjim:fix/texture-tiles-row-major-offset

Conversation

@adrianmjim

@adrianmjim adrianmjim commented Nov 24, 2026 •

Copy link
Copy Markdown

Claimed in the coordination issue as: D3D-TILES-AMD-BYTE-OFFSET

What and why

d3d12_texture_tiles fails on AMD Windows (RX 7900 XT, AMD 26.11.2 / 32.0.32029.2010): row-major alias tile 0 at (0,0): got 0x20000cc, expected 0xcc020000. It is one of the five ctest failures #787 lists for RDNA3 on Windows.

The half that fails is native D3D12, not the Vulkan layer. The layer's 256 x 240, linear offset 1 replay had already passed. Buffered stdout printed its progress line after the native failure on stderr, which made it look like the layer's failure.

AMD's driver behaves as if CopyTiles rounded BufferStartOffsetInBytes down to a multiple of 4, in both directions:

  • Offsets 1, 2, 3, 5, 6 and 7 diverge; offsets 4 and 8 match.
  • Every divergent texel fits that model. That includes the reported 0x020000cc, which is the bytes at offset 0 instead of offset 1, and the texels that straddle a tile seam.

The other implementations disagree with AMD:

  • CopyTiles documents no alignment for that offset.
  • WARP meets the test's expectations at every offset tried (1-8).
  • The layer meets them too. It stages unaligned offsets through transfer scratch, and the validation layer reports nothing.

This is inferred from the texel values. I did not run the D3D12 debug layer (not installed on this machine).

Update: an Intel Iris Xe host (Intel 32.0.101.7092), measured in this PR by @MalexAson, rounds the offset only in the tiles-to-buffer copies; its upload honours the offset. The test now accepts that pattern as a second model.

Change (test and docs only, no runtime change):

  • At a byte-unaligned offset, the native run reads every texel and produces a NOTE (on stdout) only if every checked read equals one of two CPU models of CopyTiles from modelled_readback(). Both round the offset down to a multiple of 4: AMD's in both directions, Intel's only in the tiles-to-buffer copies. The NOTE names the model, and every diverging case on a device must match the same one. Any other divergence still fails and prints, for each model, how many reads it leaves unexplained and the first one. Every byte-offset case first checks that the model with the true offset reproduces the test's expectations. The precedent for a NOTE on a measured driver divergence is d3d12_bundle_test.
  • WARP runs at those offsets to confirm the expectations. Without WARP, the test says that nothing confirms them.
  • The layer is held to the expectations at every offset, as before.
  • New cases 256x240 and 240x240 at offset 4: native stays strict on clipped tiles on every GPU.
  • Under Wine/Proton neither the hardware adapter nor WARP is compared (host_wine.h), as in the other host-comparison tests. stdout is unbuffered.
  • docs/testing.md: new Known problems row. docs/d3d12_vulkan.md: describes the driver behaviour.

Tested

AMD Radeon RX 7900 XT, driver 32.0.32029.2010, Windows 11, MSVC (VS 2022), Vulkan SDK 1.4.363.0, base 23c459644.

Still intermittent on AMD, separate issue: the native half of the COPY-to-DIRECT case (offset 4) sometimes reads zeros through the aliased tiles on this GPU. It failed 5 of 30 runs under a parallel ctest and once in 3 single-test runs.

  • On main this case is never reached on AMD, because the offset-1 case fails first. This PR therefore turns a deterministic red into an occasional one on AMD.
  • It also fails with the unchanged test code when only that case is run, and in a native-only probe with no Vulkan layer in the process (7 of 30 under load, 0 of 15 for the same work on one queue).
  • I did not loosen it. Details are in the coordination issue as a finding.

GPUs tested: AMD Radeon RX 7900 XT (RDNA3), AMD driver 26.11.2 (32.0.32029.2010), Windows 11; Intel Iris Xe (Raptor Lake-P), Intel 32.0.101.7092, Windows 11 24H2 (by @MalexAson)

AI-assisted: yes (Claude Code; the change went through three independent review passes before opening)

Checklist

  • Based on current main and merges cleanly (written on 23c459644, merges cleanly onto a28927849).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

…-TILES-AMD-BYTE-OFFSET)

d3d12_texture_tiles failed on AMD Windows (RX 7900 XT, driver
32.0.32029.2010 / 26.11.2) with "row-major alias tile 0 at (0,0):
got 0x20000cc, expected 0xcc020000". The half that failed was native
D3D12, not the Vulkan layer: the layer's 256 x 240 replay at linear
offset 1 had already passed, and buffered stdout printed its progress
line after the native failure on stderr.

AMD's driver behaves as if CopyTiles rounded BufferStartOffsetInBytes
down to a multiple of 4, in both directions: the row-major
CopyTextureRegion finds each texel 1-3 bytes early, and texels that
straddle a tile seam differ in the CopyTiles reads too. Offsets 1, 2,
3, 5, 6 and 7 diverge; 4 and 8 match. CopyTiles documents no alignment
for that offset, WARP meets the test's expectations at every offset
tried (1-8), and so does the layer, which stages unaligned offsets
through transfer scratch so Vulkan only sees texel-aligned
bufferOffsets (the validation layer reports nothing). The mechanism is
inferred from the texel values: the D3D12 debug layer is not installed
here and was not run.

At a byte-unaligned offset the native run now reads every texel
quietly and is a NOTE (on stdout) only when every checked read equals
modelled_readback(), the CPU model of CopyTiles moving whole 64 KiB
tiles with the offset rounded down to 4. Any other divergence fails
and names the first read off the model, and every byte-offset case
first checks that the model with the true offset reproduces the
expectations. In local runs with extra cases (not committed), native
on this GPU matches the model at every texel for offsets 1-3 and 5-7
on 256x256, 240x240, 130x129 and 129x250, and a deliberately wrong
model (a multiple of 2) fails. WARP runs at those offsets to confirm
the expectations; without WARP the output says nothing confirms them.
The layer is held to the expectations at every offset, as before.

256x240 and 240x240 at offset 4 are new cases, so native stays strict
on clipped tiles on every GPU. Under Wine and Proton neither the
hardware adapter nor WARP is compared (host_wine.h), as in the other
host-comparison tests. stdout is unbuffered so progress lines stay in
order with failures. docs/testing.md gets a Known problems row and
docs/d3d12_vulkan.md describes the driver behaviour.

Not addressed here, and still red now and then on AMD: the native
half of the COPY-to-DIRECT case (offset 4) sometimes reads zeros
through the aliased tiles on this GPU (5 of 30 runs under a parallel
ctest, and once in 3 single-test runs). On 23c4596 that case is never
reached on AMD, because the offset-1 case fails first; it also fails
with the unchanged test code when only that case is run, and in a
native-only probe without the layer. It is a separate finding.

Tested on AMD Radeon RX 7900 XT, driver 32.0.32029.2010, Windows 11,
Vulkan SDK 1.4.363.0: the test from 23c4596 fails 6/6 runs at offset 1;
this one passed 6/6 in a row (3 with LEONIDA_VK_VALIDATION=1, no
validation messages), apart from the handoff case above;
full ctest: only the 4 failures main already has on this GPU
(vk_queue_query_sync, d3d12_execute_indirect_validation, d3d12_clear,
d3d12_pipeline_library_host). AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open issues
What changed in this PR

Updates the d3d12_texture_tiles test to treat a specific AMD Windows CopyTiles byte-offset divergence as a non-fatal NOTE (when it matches a CPU model), and documents the behavior.

Changes:

  • Refactors the test’s readback verification into shared helpers and adds a CPU model to classify AMD’s rounded-offset behavior.
  • Adds optional WARP verification for byte-unaligned offsets and skips native/WARP comparisons under Wine/Proton.
  • Documents the known AMD driver behavior in testing and D3D12/Vulkan docs.
File Description
runtime/​test/​d3d12_texture_tiles_test.cpp Adds CPU model + advisory reporting for byte-unaligned CopyTiles offsets; adds WARP confirmation; skips native/WARP comparisons under Wine; unbuffers stdout
docs/​testing.md Adds a Known problems entry describing the NOTE and the AMD CopyTiles rounding behavior
docs/​d3d12_vulkan.md Documents the test’s behavior and the inferred AMD driver rounding behavior

Review effort: Lite

bool for_each_checked(UINT width, UINT height, UINT64 tile_copy_offset, Visit&& visit) {
for (UINT tile = 0; tile < tiles; ++tile) {
const UINT first_y = (tile / 2) * tile_height, first_x = (tile % 2) * tile_width;
const UINT rows = std::min(tile_height, height - first_y), columns = std::min(tile_width, width - first_x);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in e4f040332: the loop skips a tile whose first row or column is outside the texture (if (first_y >= height || first_x >= width) continue;) before the subtractions.

D3D12_RESOURCE_STATE_COPY_DEST, readback));
const D3D12_RANGE empty{0, 0};
void* mapped = nullptr;
EXPECT(SUCCEEDED(upload->Map(0, &empty, &mapped)));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in e4f040332: the upload range before tile_copy_offset is zeroed (std::memset(mapped, 0, tile_copy_offset)) before fill_tiles(), so the rounded-down model reads known bytes.

Comment thread docs/testing.md Outdated
| With `--wave64-emulate` (or `LEONIDA_W64_EMULATE=1`) on an NVIDIA RTX 5080 with Windows driver 32.0.16.1692 (616.92), `crosslane_fuzz.py --seed 91001 --dpp --no-maskdata` reports a hard mismatch for `cs_xl64_9100373886`: after `s_xor_b64 s[16:17], vcc, vcc` (0 in every lane), the second of two nested `v_cndmask_b32_e64 … s[16:17]` returns the old register instead of the lane id | An NVIDIA driver miscompile, not the translator (SHADER-720). The same SPIR-V (spirv-val clean) matches the model on an RTX 3060 with 616.64, an RTX 5060 Ti (Blackwell) with 621.14, an RTX 5070 Ti with 621.24 and an RTX 5080 with the Linux 580.65.06 driver. Hand edits narrow it to a value selected through the `%active` gate of a store; on the Linux 580 driver a similar pattern, a subgroup shuffle selected by an `%active` that is false, still fails in three wave32 `v_permlane16`/`v_permlanex16` programs of the same seed (#3796, #3918) | Update the NVIDIA driver to 621.14 or newer on Windows. If a crosslane mismatch only shows on one driver, check another driver or GPU before changing the translator |
| `lds_fuzz.py --wave 64` (native, not `--emulate`) reports a `ds_bpermute_b32` mismatch on an AMD GPU on Windows, e.g. `cs_ldsfuzz_s7031_496_w64` (seed 7031): small values like `0x14` where the model wants another lane's data, while `--oracle hw` and `--emulate` on another GPU agree with the model | The AMD Windows driver (32.0.21042.62, gfx1036) miscompiles a native wave64 compute shader with two subgroup shuffles; a reduced SPIR-V module is in #4613 | Not a translator regression: check the same seed with `--oracle hw` and with `--emulate`. Native wave64 results on that driver need that cross-check |
| On AMD's Windows driver a compute pipeline creation takes tens of minutes: `vk_pipeline_check` prints `still compiling <name> after ...s` with one busy thread, or a compute PSO creation through the D3D12 layer seems never to return | The driver's compiler on one module in the dispatch-loop form (`"control_flow": "dispatch loop"` in the translated `index.json`). Measured on a Radeon gfx1036 iGPU, driver 32.0.21042.62 (SHADER-995): `XboxBvhBuilder.dll`'s `LeafRehydration` in that form (a 581-case switch in a loop) was created after 34 minutes of one busy thread (XXTESTING), while its structured module is created in 2.9 s and an RTX 3070 (NVIDIA 610.74) created the dispatch-loop one in 11 s. It is not every such module: ten other programs of that DLL compile in that form on the Radeon in 0.4 to 40 s ([embedded_shaders.md](embedded_shaders.md), section 7). Not tried on another AMD GPU or driver branch | Translate with current `main`. Since SHADER-427 only a tree nested deeper than 64, a graph that cannot be made reducible or `--dispatch-loop` gives that form, and none of that DLL's programs has it; the shaders stage translates again by itself when the translator changed. A wave64 compute shader that still has it comes out in another form with `--wave64-emulate on` (12.4 s for this program on that driver), which that driver can crash on for other programs (#857) |
| `d3d12_texture_tiles` passes but prints `NOTE: native D3D12 broke the expectations at N of M checked reads, every read as CopyTiles would with linear offset 1 rounded down to 0 in both directions` (and the same at offset 3) | AMD's Windows D3D12 driver (RX 7900 XT, 26.11.2, `32.0.32029.2010`) runs `CopyTiles` at a byte-unaligned `BufferStartOffsetInBytes` as if the offset were rounded down to a multiple of 4, in both directions. That is inferred from the texel values; the D3D12 debug layer was not run. `CopyTiles` documents no alignment, WARP meets the test's expectations at every offset tried (1-8), and so does the layer, which stages such offsets through aligned scratch | Nothing: the note is harmless. The test still fails when a native run diverges in any other way, or at a 4-byte offset |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in e4f040332: the row now quotes the note with placeholders (linear offset X rounded down to Y), says Y is X rounded down to a multiple of 4, and that the test runs X = 1 and 3.

Comment on lines +309 to +312
if (actual != modelled && !advisory->unmodelled++)
std::snprintf(advisory->first_unmodelled, sizeof(advisory->first_unmodelled),
"%s tile %u at (%u,%u): got %#x, expected %#x, modelled %#x", read, tile, x, y, actual,
expected, modelled);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in e4f040332: it is now an explicit if (... unmodelled == 0) { ... } followed by the increment on its own line (the field is model.unmodelled since the second driver model was added).

- for_each_checked skips a tile that starts past the texture's edge, so
  a case smaller than the tile grid cannot underflow `height - first_y`.
- The upload buffer is zeroed before the CopyTiles offset:
  modelled_readback() reads those bytes when it rounds the offset down,
  and the model should not rely on the committed resource starting
  zeroed.
- The first-unmodelled capture and the counter are written out
  explicitly instead of `!advisory->unmodelled++`.
- docs/testing.md quotes the NOTE with placeholders (offset X rounded
  down to Y) instead of offset 1 only.

Tested on AMD Radeon RX 7900 XT, driver 32.0.32029.2010: builds without
warnings, d3d12_texture_tiles passes 3/3 (one with
LEONIDA_VK_VALIDATION=1, no validation messages). AI-assisted.

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

Copy link
Copy Markdown
Author

Addressed the four review comments in e4f040332:

  • Unsigned underflow (:102): for_each_checked now skips a tile that starts past the texture edge. No current case reaches it, but a case smaller than the tile grid can no longer underflow.
  • Bytes before the CopyTiles offset (:201): the upload buffer is now zeroed over [0, tile_copy_offset) before fill_tiles. Those bytes were already zero in practice, since it is a committed resource without D3D12_HEAP_FLAG_CREATE_NOT_ZEROED. The model reads them when it rounds the offset down, though, so it should not depend on that.
  • !advisory->unmodelled++: now an explicit if with a separate increment.
  • docs/testing.md: the NOTE is quoted with placeholders (offset X rounded down to Y).

Re-run on the RX 7900 XT (driver 32.0.32029.2010): builds without warnings, d3d12_texture_tiles passes 3/3, one of them with LEONIDA_VK_VALIDATION=1 (no validation messages). AI-assisted.

@MalexAson

Copy link
Copy Markdown

Tested e4f0403 applied on main 6293c1c, on Intel Iris Xe (Raptor Lake-P, 8086:a7a0), Intel 32.0.101.7092, Windows 11 24H2 (26100.6584): d3d12_texture_tiles still fails. This driver breaks the expectations too, but in a different pattern from the AMD one.

The native device the test picks here is the Iris Xe (tiled resources tier 3). The result is the same with the layer on the Iris Xe and on the RTX 4060 Laptop GPU (NVIDIA 616.92). The three offset-4 cases match natively, the layer passes every case and WARP is found (tier 3). Then:

Native D3D12 failed: 256 x 240, linear offset 1: 94208 of 245760 checked reads break the expectations, and 155648 differ from the rounded-down model; first: alias tile 0 at (0,0): got 0x1cc0200, expected 0xcc020000, modelled 0xcc020000

On unchanged main the same run stops at line 239 with alias tile 0 at (0,0): got 0x1cc0200, expected 0xcc020000.

What this driver does, measured with a temporary local edit of modelled_readback (not something to merge): it rounds BufferStartOffsetInBytes down to a multiple of 4 only in the tiles-to-buffer direction, and honours it in the buffer-to-tiles direction. With the model rounding only the three readback copies, every diverging read is explained, 94208 of 245760 at offset 1 and 84480 of 222720 at offset 3, and the test passes with its NOTE on both layer GPUs. Rounding only the upload direction leaves the same 155648 reads unexplained as rounding both.

So a second accepted model, rounded in the readback direction only, would cover this driver. I can rerun here if you push one.

Built with MSVC 19.50 + Ninja, RelWithDebInfo. AI-assisted: this run was made with a coding agent.

…ding (D3D-TILES-AMD-BYTE-OFFSET)

An Intel Iris Xe host (Intel 32.0.101.7092, Windows 11 26100) still
failed d3d12_texture_tiles at linear offset 1: 94208 of 245760 checked
reads broke the expectations, and 155648 differed from the AMD model.
Measured there, that driver rounds BufferStartOffsetInBytes down to a
multiple of 4 only when CopyTiles writes the buffer (tiles to buffer);
the upload (buffer to tiles) honours the offset.

modelled_readback() now takes the upload and the readback offsets
separately, and a native run at a byte-unaligned offset is a NOTE when
every checked read matches one of two measured models: rounded in both
directions (AMD) or only in the tiles-to-buffer copies (Intel). The
NOTE names the model that matched, and every diverging case on a
device must match the same model, or the test fails. Anything else
still fails too, and the failure prints how many reads each model
leaves unexplained, with the first one. 4-byte offsets stay strict,
and the layer is still held to the expectations. docs/testing.md and
docs/d3d12_vulkan.md describe the Intel pattern, measured on that host
in ProjectLeonida#964.

On the AMD Radeon RX 7900 XT (32.0.32029.2010) the test still passes
with the both-directions NOTE (4 runs, one with LEONIDA_VK_VALIDATION=1).
A temporary local probe (not committed) checked the models against each
other: the readback-only model breaks the expectations at 94208 of
245760 reads at offset 1 and 84480 of 222720 at offset 3, and differs
from the both-directions model at 155648 reads at offset 1, the counts
measured on the Iris Xe. On the AMD GPU it leaves 155648 and 138240
reads unexplained, so the two models do not overlap, and an upload-only
model or one rounding to a multiple of 2 fails there too. A probe that
pretended an earlier case had matched the Intel model made the AMD run
fail on the model mismatch, as intended. Full ctest (-j 6):
d3d12_texture_tiles passes; the other failures are the four main
already has on this GPU, plus xmem once (its working-set charge check,
under parallel load; it passed 3 of 3 runs alone, and this change does
not touch it). Not run on Intel here.
@adrianmjim adrianmjim changed the title test: texture tiles NOTE only for AMD's rounded CopyTiles offset (D3D-TILES-AMD-BYTE-OFFSET) test: texture tiles NOTE only for the measured CopyTiles offset rounding on AMD and Intel (D3D-TILES-AMD-BYTE-OFFSET) Nov 24, 2026
@adrianmjim

Copy link
Copy Markdown
Author

@MalexAson thanks, that was exactly what was missing. Pushed 83aea690a: a second accepted model, rounded only in the tiles-to-buffer copies.

  • modelled_readback() now takes the upload and the readback offsets separately. A native run at a byte-unaligned offset is a NOTE when every checked read matches one of the two models: both directions (AMD) or tiles-to-buffer only (Intel). The NOTE says which one matched.
  • Every diverging case on one device has to match the same model, so a driver can't pass by matching AMD at one offset and Intel at another.
  • Anything else still fails, and the failure now prints how many reads each model leaves unexplained, with the first one.
  • 4-byte offsets stay strict, and the layer is still held to the expectations.

Checked on the RX 7900 XT, without Intel hardware:

  • The test still passes with the both-directions NOTE, 4/4 runs (one with LEONIDA_VK_VALIDATION=1).
  • A temporary probe (not committed) compared the models on the CPU. The readback-only model breaks the expectations at 94208 of 245760 reads at offset 1 and 84480 of 222720 at offset 3. It differs from the both-directions model at 155648 reads. Those are the counts you measured.
  • On AMD the readback-only model leaves 155648 (offset 1) and 138240 (offset 3) reads unexplained, so the two models don't overlap. An upload-only model, and one rounding to a multiple of 2, fail on AMD too.
  • The docs credit the Intel pattern to your measurement in this PR.

Could you rerun d3d12_texture_tiles on the Iris Xe at 83aea690a? It should print ... rounded down to 0 only in the tiles-to-buffer copies at offsets 1 and 3.

@MalexAson

Copy link
Copy Markdown

Tested 83aea69 applied on main 6293c1c, on Intel Iris Xe (Raptor Lake-P, 8086:a7a0), Intel 32.0.101.7092, Windows 11 24H2 (26100.6584): pass, with the NOTE you predicted at both offsets.

Vulkan replay: 256 x 240, linear offset 1, initially unbound, aliased, row-major, gated remap
NOTE: native D3D12 broke the expectations at 94208 of 245760 checked reads, every read as CopyTiles would with linear offset 1 rounded down to 0 only in the tiles-to-buffer copies (docs/testing.md, Known problems); not a failure
WARP meets the expectations at linear offset 1 (245760 pixels)
Vulkan replay: 240 x 240, linear offset 3, initially unbound, aliased, row-major, gated remap
NOTE: native D3D12 broke the expectations at 84480 of 222720 checked reads, every read as CopyTiles would with linear offset 3 rounded down to 0 only in the tiles-to-buffer copies (docs/testing.md, Known problems); not a failure
WARP meets the expectations at linear offset 3 (222720 pixels)
  • The three offset-4 cases match natively (262144, 245760 and 222720 pixels), and the layer passes every case.
  • ctest -R "^d3d12_texture_tiles$": 3 of 3 runs pass with the layer on the Iris Xe, and 3 of 3 with the layer on the RTX 4060 Laptop GPU (NVIDIA 621.40; it was 616.92 for my first report). The native device is the Iris Xe in both. With the layer on the RTX 4060 the COPY-to-DIRECT case runs as well and matches natively (262144 pixels).
  • No warnings from the test's translation unit, MSVC 19.50 + Ninja, RelWithDebInfo.

The counts are the ones from my first measurement, and both diverging cases report the same model, so the one-model-per-device rule holds here.

AI-assisted: this run was made with a coding agent.

efeekrb added a commit to efeekrb/leonidaa that referenced this pull request Nov 25, 2026
…Intel iGPU's native D3D12

d3d12_texture_tiles prints "Native D3D12: Intel(R) UHD Graphics" before its
failure, and d3d12_root_args_validation walks the hardware adapters. Say so,
and tie texture_tiles to ProjectLeonida#964 instead of calling it unexplained.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@efeekrb

efeekrb commented Nov 25, 2026

Copy link
Copy Markdown

Tested on a two-GPU Windows laptop: the layer on an NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA 610.78), Windows 11 build 26300. The test's native D3D12 side is the Intel UHD Graphics iGPU (Windows driver 31.0.101.4255, tiled resources tier 3), the first hardware adapter. main at 24a29f8, RelWithDebInfo, LEONIDA_VK_DEVICE=4060. This PR's diff applied cleanly, and only d3d12_texture_tiles_test was rebuilt.

  • main: d3d12_texture_tiles fails 3 of 3 reruns, in the 256 x 240, linear offset 1 case: alias tile 0 at (0,0): got 0x1cc0200, expected 0xcc020000.
  • With this PR: passes 3 of 3. The offset-4 cases match on all 262,144, 245,760 and 222,720 pixels. At offset 1 and offset 3 the test prints the NOTE, with the Intel pattern the description measured: native D3D12 breaks the expectations at 94,208 of 245,760 reads (offset 1) and 84,480 of 222,720 (offset 3), every read as CopyTiles would with the offset rounded down to 0 only in the tiles-to-buffer copies, and WARP meets the expectations at both.

So the Iris Xe pattern also holds on an Intel UHD Graphics. A side note: the test picks its native adapter itself and ignores LEONIDA_HOST_ADAPTER (finding: #1608 (comment)), so on a two-GPU PC the native side is the iGPU even when the layer runs on the NVIDIA GPU. No game files; counts and pass/fail lines only. AI-assisted (Claude Code).

…ajor-offset

# Conflicts:
#	runtime/test/d3d12_texture_tiles_test.cpp
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.

4 participants