Repository navigation
test(agc): enter whole quad mode in the implicit-LOD 1D sample test - #3922
Merged
oneandonlydean merged 1 commit intoOct 11, 2026
Merged
Conversation
A pixel wave starts with only its covered pixels in EXEC, so a shader that takes an implicit LOD has to run s_wqm first or the helper lanes of a partly covered quad hold no coordinate. The test's pixel shader did not, which goes unnoticed while its one triangle covers every quad whole. llvmpipe clips that triangle at twice the viewport into three, and in the quads on the two inner edges the helpers' zero coordinate gave the last mip instead of the expected one. The shader now starts with s_wqm_b64 exec, exec, as a compiled pixel shader that samples with an implicit LOD does.
9 tasks done
9 tasks done
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.
What
agc_driver_image_plane_address_on_line_implicit_lod, added by #3222, fails on lavapipe, so the Linux job has been red onmainsince that merge (first in run 38121052397; @orishamir reported it on #3222):The cause is the test's pixel shader, not llvmpipe's sampler. Since #305 a pixel wave starts with only its covered pixels in EXEC, and the helper lanes of a partly covered quad join when the shader runs
s_wqm. The test's shader never does. In a partly covered quad its helpers hold a zero coordinate, so the implicit LOD comes out as the last mip (mark 170).Only llvmpipe gets partly covered quads here. The test's triangle reaches 3 in clip space, and llvmpipe clips it at twice the viewport and draws the result as three triangles. The wrong quads in @orishamir's map lie on the two inner edges, from the (-1,-1) corner towards (2,0) and (0,2). With the far vertices moved out to 5 there is one inner edge, towards (2,2), and the wrong quads follow it. With
gl_HelperInvocationforced to false in the recompiled shader, every pixel reads the expected mip.The shader now starts with
s_wqm_b64 exec, exec(0xbefe0a7e). Title pixel shaders do the same: in the 90 captured programs I have that runs_wqm, it comes before the first implicit-LOD sample in every one, most often in this form.#3418 gets the same test green by skipping its level checks on llvmpipe. With this change the checks run there too, so only one of the two is needed.
Tested
Linux, Release, CI's configure flags,
maina11c8f7 against this branch (one commit on it).ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx):mainwith the message above and passes 5/5 with the change;ctest: 831/838 onmain, 832/838 with the change. The six left are the same on both:agc_driver_emulated_color_compare(since fix(shader): return 0 for 8-bit sRGB color comparison #3438; fix(shader): allow constant-zero sRGB comparisons #3532 fixes it),guest_kernel_stack_protect(linux CI: guest_kernel_stack_protect aborts on main since #2982 (libc unwinder, GCC 13 only) #3459) and the fouragc_driver_prepared_shaders*tests, which fail in this container (shader failure capture was incomplete) and pass in CI.mainand passes 5/5 with the change;ctestwith the change: 837/838, onlyagc_driver_emulated_color_compareagain.ResourceTracker.cppput back tomain's old form, the changed test still fails withimage descriptor is incompatible with the static runtime image interface, as the original does.tools/check_conventions.py --base origin/mainpasses.Not tested: Windows, RADV.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)