test: texture tiles NOTE only for the measured CopyTiles offset rounding on AMD and Intel (D3D-TILES-AMD-BYTE-OFFSET) #964
Closed
leonida/mandy
adrianmjim wants to merge 0 commits from
fix/texture-tiles-row-major-offset into main
pull from: fix/texture-tiles-row-major-offset
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!964
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/texture-tiles-row-major-offset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as: D3D-TILES-AMD-BYTE-OFFSET
What and why
d3d12_texture_tilesfails 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 fivectestfailures #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 1replay 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
CopyTilesroundedBufferStartOffsetInBytesdown to a multiple of 4, in both directions: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:
CopyTilesdocuments no alignment for that offset.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):
CopyTilesfrommodelled_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 isd3d12_bundle_test.256x240and240x240at offset 4: native stays strict on clipped tiles on every GPU.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.LEONIDA_VK_VALIDATION=1and 3 without. After: passed 6/6 in a row, with no validation messages, and a passing run prints nogot ... expectedlines. The one exception is the handoff case described below.83aea690a: pass, with the tiles-to-buffer-only NOTE at offsets 1 and 3 (https://github.com/ubiquitarianism/leonida/pull/964#issuecomment-7144284362).ctest: only the 4 failuresmainalready has on this GPU (vk_queue_query_sync,d3d12_execute_indirect_validation#504,d3d12_clear#516/#787,d3d12_pipeline_library_host).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
ctestand once in 3 single-test runs.mainthis 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.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
mainand merges cleanly (written on23c459644, merges cleanly ontoa28927849).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Addressed the four review comments in
e4f040332::102):for_each_checkednow 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.:201): the upload buffer is now zeroed over[0, tile_copy_offset)beforefill_tiles. Those bytes were already zero in practice, since it is a committed resource withoutD3D12_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 explicitifwith a separate increment.Re-run on the RX 7900 XT (driver 32.0.32029.2010): builds without warnings,
d3d12_texture_tilespasses 3/3, one of them withLEONIDA_VK_VALIDATION=1(no validation messages). AI-assisted.Tested e4f0403323 applied on
main6293c1c4f, on Intel Iris Xe (Raptor Lake-P, 8086:a7a0), Intel 32.0.101.7092, Windows 11 24H2 (26100.6584):d3d12_texture_tilesstill 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:
On unchanged
mainthe same run stops at line 239 withalias 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 roundsBufferStartOffsetInBytesdown 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.
@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.Checked on the RX 7900 XT, without Intel hardware:
LEONIDA_VK_VALIDATION=1).Could you rerun
d3d12_texture_tileson the Iris Xe at83aea690a? It should print... rounded down to 0 only in the tiles-to-buffer copiesat offsets 1 and 3.Tested 83aea690a applied on
main6293c1c4f, 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.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).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.
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.
mainat24a29f8, RelWithDebInfo,LEONIDA_VK_DEVICE=4060. This PR's diff applied cleanly, and onlyd3d12_texture_tiles_testwas rebuilt.main:d3d12_texture_tilesfails 3 of 3 reruns, in the 256 x 240, linear offset 1 case:alias tile 0 at (0,0): got 0x1cc0200, expected 0xcc020000.CopyTileswould 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: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166810805), 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).Closing this to free a pull request slot for the memory leak fixes claimed in #1608. The change still applies: on current
main(c0276f15f),d3d12_texture_tilesstill fails on AMD and Intel, and this merges cleanly. The branch stays at07a204a9b, so anyone can pick it up, or I'll reopen it later. Thanks @MalexAson and @efeekrb for the Intel and laptop runs.Reopening: closing it did not free anything after all, so it stays open for review.