Repository navigation
fix(shader): honor explicit LOD on 3D samples of 1D textures - #28324
DannyOppenheimer wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head 53c5f9cdd18dba7db197c23acc10c09637966f3f. I read the prepared description, commits, diff, manifest, and all added lines in the three changed files, plus the resource materializer compatibility logic. No tests or builds were run by me; the hardware and Vulkan runs described in the PR were author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Changed-line review | passed | All added lines read |
| Build and tests | not run | Author reports focused Vulkan test passed |
Findings
Blocking
None.
Non-blocking
- The execution test covers integer LODs 0–2 with point mip filtering. Fractional LODs and other sampler modes remain unverified, as the description notes.
Not verified
I did not run builds, tests, or the hardware oracle. I read all changed files listed in the manifest; no changed files were excluded. The referenced files.json was not available through the reader, so excluded-by-rule details are not verified.
To get this to a good state
Nothing is required. Optional: extend hardware coverage to fractional LODs and additional sampler modes if those are needed.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows at this head ( Setup:
The added test lines are not inside a platform guard. AI-assisted: yes. |
Plyxen
left a comment
There was a problem hiding this comment.
I read the diff at 53c5f9cdd1. Windows 11, GCC 15.2, merged into main at b97867d3ce6 together with other open PRs (so not an isolated build), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).
agc_driver_image_volume_address_on_line: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.- Control (same tree and tests, the changed files of those PRs put back to
main's): fails on both GPUs: "image descriptor is incompatible with the static runtime image interface".
Not checked: a title.
AI-assisted: yes (Claude Code)
ligmaSec
left a comment
There was a problem hiding this comment.
Ran the GCN scalar-buffer CTest on main and this head integrated using lavapipe. It passed on both runs. The branch's new agc_driver_image_volume_address_on_line test also passed, covering explicit LOD with 3D sampling of a line texture. The requested Khronos validation 1.4.369 layer was inserted in all three logs, with no missing-layer diagnostic or VUID- messages.
AI-assisted: yes.
|
Windows/NVIDIA run of head Tests:
Not tested: Linux, AMD or Intel drivers, a title run. AI-assisted: yes. Claude Code (Claude Opus 5.5) ran the build and the tests and wrote this. |
What
A shader that issues
image_sample_lwith DIM 3D can bind a 1D texture. Main rejects that binding during resource materialization. An RX 5700 XT sampled the same mip as a native DIM 1D instruction when the two instructions shared the descriptor, sampler, u coordinate and explicit LOD.Allow the exact explicit-LOD sample flag in the existing 3D-on-1D compatibility check. The existing sampling path supplies u and the instruction's LOD to the 1D image. Combined flags, including comparison and offset, retain their existing checks. This extends the plain and level-zero samples covered by #5375.
The overlap check flagged shared tracker lines in #7085 and #28176 (extra mip backing), and #10867 adjusts the compute target in the former refusal test. Those patches address different behavior.
The execution test replaces its explicit-LOD refusal assertion with a three-level texture. Each dispatch requests one mip with u fixed and sweeps v and r independently. It checks RGBA for every lane.
Tested
Hardware oracle. AMD Radeon RX 5700 XT (Navi 10, gfx1010), Windows 11 build 26200, AMD driver 32.0.21045.5002. The probe used a 64-texel linear RGBA8 UNORM 1D texture, point mip filtering, wrap addressing and u = 0.375. Both instructions ran in each lane, with the 1D form as the control. For each requested LOD, v and r independently covered {-0.25, 0, 0.5, 1, 1.5}.
All four raw float channels matched on all 75 rows, in two wave32 runs and one wave64 run. Fractional LODs and other sampler modes were outside this measurement.
Reproduce the native measurement with tools/hw-oracle
Save the following script and run
python measure.py <AnyPS5 checkout>with the RX 5700 XT selected viaHIP_VISIBLE_DEVICES. It records the per-lane channel bits inresults.jsonnext to the script.Vulkan execution. Built the focused target with WinLibs GCC and ran
ctest --test-dir build -R '^agc_driver_image_volume_address_on_line$' -Vat main4025563419and at53c5f9cdd1on the same RX 5700 XT. Both passed withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer. Both logs show insertion of validation layer 1.4.369, zero missing-layer warnings and zeroVUID-messages. Main exercises the old refusal. The branch checks the sampled colors.python tools/check_conventions.pypassed. No game was tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit