Repository navigation
feat(agc): clip and cull distances on the mesh path - #5323
Merged
oneandonlydean merged 1 commit intoOct 14, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
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
#423 added clip and cull distances for vertex shaders on the vertex path. A vertex program that runs on the mesh path (NGG,
ShaderPath::Geometry) and exports distances throughPA_CL_VS_OUT_CNTLstill failed to recompile withunsupported mesh output kind. PPSA06694 (Remnant 2) stops on this 7 s after start.DefineMeshOutputsdefinesgl_ClipDistanceandgl_CullDistanceas per-vertex arrays (float[N]per vertex,Nthe highest distance index used plus one), with a private per-lane copy for each distance like the other mesh outputs.EmitAuxPositionExportstores a distance into that per-lane copy on the mesh path, andEmitMeshEntryPointwrites it to the vertex's element of the built-in array.ShaderValidationaccepts the two built-ins and theClipDistance/CullDistancecapabilities in mesh shaders, under the same device feature checks as vertex shaders.The all-zero-position clip distance that vertex and tessellation evaluation shaders get is not added on the mesh path, as before.
Tested
agc_driver_vertex_clip_cull_distancesnow draws its seven rows (clip planes, cull planes, sparse enables) a second time through an NGG program on the mesh path, and checks every pixel. The program is the one fromLayeredVolumeDraw.cpp, withpos1exporting four components. Onmainthe mesh rows fail withunsupported mesh output kind. The mesh rows are skipped on a device withoutVK_EXT_mesh_shader.ctestonmain8c772ad with this change: 1076 of 1077 passed. The failure isagc_driver_pixel_lds, which also fails on unmodifiedmainon this GPU. Rebased ontomain61b8742; thereagc_driver_graphics,guest_np_authandagc_driver_vertex_clip_cull_distancespass.mainit stops at the first such shader.tools/check_conventions.py --base origin/mainpasses.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)🤖 Generated with Claude Code