Repository navigation
Conversation
gpu_ps_image_sample_offset_implicit_lod_between_mips failed on D3DMetal (macOS, CrossOver) for two reasons outside the code it tests: - Its program had no s_wqm, which a console shader runs before an implicit-LOD sample. On D3DMetal, quads along a diagonal of the test's triangle have helper lanes; their u / v stayed 0 and 30 pixels read mip 3. A plain HLSL Sample with the same offset has no such pixels. - The expected values assumed a host LOD of exactly 0.25. D3DMetal's CalculateLevelOfDetail returns 0.2421875 for every pixel. The program now starts with s_wqm, and the expected values blend the two mips by the host's own LOD, read by a plain HLSL draw of the same triangle, texture and sampler. The tolerance and the per-mip texel check are unchanged: moving mip 1 by mip 0's offset still fails the test, and so does leaving s_wqm out. (#258) Assisted-by: Claude Code (Claude Opus 5.5)
Owner
Author
|
Upstream PR xcl-dev#982 was closed or merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gpu_ps_image_sample_offset_implicit_lod_between_mipsfails on Apple's D3DMetal (macOS, CrossOver) for two reasons, neither in the code it tests. Part of #258.s_wqm, which a console shader runs before an implicit-LOD sample. On D3DMetal, quads along a diagonal of the test's triangle have helper lanes. Their u / v stay 0, so 30 pixels read mip 3 (300 where 30.25 is expected). A plain HLSLSamplewith the same offset, texture and triangle has no such pixels.CalculateLevelOfDetailon D3DMetal returns 0.2421875 for every pixel, so even correct sampling misses the 0.02 tolerance (25.22 where 26 is expected).What is in it
crates/xcl/src/gpu/recomp/tests.rs: the program starts withS_WQM_B64 exec, exec, and the expected values blend the two mips by the host's own LOD, read by a plain HLSL draw of the same triangle, texture and sampler. The tolerance and the per-mip texel check are unchanged. The test also asserts that the host LOD lies between mips 0 and 1.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<lib test exe> --exact <test> --test-threads=1 --nocapture).main6bac4b4: fails,pixel (0,0) = 25.21875, expected 26.3a6f95a(onmain9aec53d): passes.gpu_image_sample_offsetalso passes.6bac4b4, each failing the test as it should: mip 1 moved by mip 0's offset inemit.rsgivespixel (0,0) = 24.976563, expected 25.21875; withouts_wqm,pixel (14,4) = 300, expected 30.25.cargo test --workspace --no-fail-fast -- --test-threads=4: 724 passed, 0 failed, 41 ignored, the same asmain9aec53d(@Diskuss, Tests: implicit-LOD sample offset test uses s_wqm and the host's LOD xcl-dev/xcl#982 (comment)); NVIDIA RTX 3050 Laptop,scripts/test.ps1: 724 passed, 0 failed, 41 ignored, and the test passes on the base and at this head (@LANgmas, Tests: implicit-LOD sample offset test uses s_wqm and the host's LOD xcl-dev/xcl#982 (comment)); a second M5 Pro (x86_64-pc-windows-gnullvm, release): fails on9aec53dwithpixel (0,0) = 25.21875, expected 26and passes at this head (@mikebuckets171, Tests: implicit-LOD sample offset test uses s_wqm and the host's LOD xcl-dev/xcl#982 (comment)).Regression run
Test-only change in
tests.rs: noxcl-smokeblocks.Not tested
AI use
Mirror of xcl-dev#982 (auto-synced, do not edit).