Repository navigation
fix(agc): accept fractional-even tessellation partitioning - #5402
adriadam10 merged 1 commit into
Conversation
|
Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with 6e52733 merged into main 18c438b:
I can't tell from here whether this is specific to lavapipe's tessellator; the PR was tested on an NVIDIA MX450 under Windows. AI-assisted: yes (Claude Code) |
|
coltken95's lavapipe run fails the new case: The branch also carries a copy of #5234's commit; once #5234 is in, please rebase so only yours is left. |
* fix(agc): accept integer tessellation partitioning Ported from upstream PR boykopovar#5234, adapted to our triangle/fractional-odd only tessellation path: VGT_TF_PARAM.PARTITIONING 0 decodes, emits equal spacing and bounds factors at 64. Metal still refuses guest tessellation draws in MetalRenderState. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * fix(agc): accept fractional-even tessellation partitioning Ported from upstream PR boykopovar#5402 (its integer-partitioning base commit is the previous commit), adapted to our triangle-only tessellation path: VGT_TF_PARAM.PARTITIONING 3 decodes, emits fractional-even spacing and bounds factors at 64. Metal still refuses guest tessellation draws. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * fix(shader): place hull input components by their offset in the control-point slot Ported from upstream PR boykopovar#4723 (shader hunk; its Vulkan execution test is not ported). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * fix(shader): lower hulls with one input or one output control point (partial) Ported from upstream PR boykopovar#5457, commits 1, 4 and 5 of 5 (hull exec masks restored through phis, input stride from the patch term, one output control point per patch). Vulkan execution-test hunks are not ported. Skipped from boykopovar#5457, with reasons: - relative patch index rebuilt as data: needs GE_CNTL.PRIM_GRP_SIZE and BREAK_WAVE_AT_EOI in TessellationConfiguration, VGT_LS_HS_CONFIG patchesPerGroup and the request key/serializer additions. None of these exist on main, which only lowers triangle fractional-odd hulls. - recording BDA faults in hull programs: drops a refusal whose safety rests on upstream hull work we lack; the refusal stays. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input Ported from upstream PR boykopovar#5314. Tracks SPI_BARYC_CNTL in the draw key and shader request key, and bumps the request serialization to version 24 (shared with the following slice-offset port, which adds no second bump). Not ported: the ShaderMemory serializer-version assertions of the PR, which build on upstream test scaffolding absent from main. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * fix(shader): propagate color view slice to pixel ancillary input Ported from upstream PR boykopovar#5500, adapted to main: the draw decode sets the color view slice as layerBase (the layer-export decode this PR also touches does not exist on main, so its diagnostic and layers hunks are skipped). layerBase is added to the pixel info, request key, shader info, disk cache and pipeline specialization constants. The request serialization stays at version 24, bumped once by the front-face commit. The shader disk cache format is bumped to 36. Not ported: unrelated hunks the upstream commit carried in Recompiler.cpp (dot-product capability option) and its ShaderMemory serializer tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj * test(shader): cover tessellation partitioning, hull slot placement, layerBase and serializer v24 Fix the stale serialization version expectation in the shader memory test, add pixel ancillary rows with a non-zero layerBase, extract PixelLayerBase for a derivation test, and point the FrontFace note at TechnicalDebt.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: XairRrR <dev910382@gmail.com>
6e52733 to
c3de6c7
Compare
|
The test was wrong, not the clamp. The test pixel shader reads the colour with The new test does not depend on the vertex order. Its domain program lowers each point by Rebased on |
c3de6c7 to
ba4201d
Compare
VGT_TF_PARAM.PARTITIONING 3 now compiles to Vulkan's fractional-even spacing, which radeonsi programs as PART_FRAC_EVEN. Its factors are bounded at 64 like integer partitioning; Vulkan raises the remaining ones to at least 2, the D3D11 range for this mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ba4201d to
f8e8aca
Compare
|
Checked on a rebase onto current main (only |
What
Tessellation with
VGT_TF_PARAM.PARTITIONING3 (fractional-even) threwonly triangle and quad domains with integer or fractional-odd partitioning and triangle output are supported by the reference path. #5234 left this mode for its own PR; this is that PR.SpacingFractionalEven, which radeonsi programs asPART_FRAC_EVEN. The draw state, the shader input info, the SPIR-V emitter and the pipeline's module check all accept it.VGT_HOS_MAX_TESS_LEVELbelow 2 therefore still tessellates at 2; the console's order of that clamp and the minimum is not measured and is recorded indocs/dev/debt/shader.md.Tested
Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce MX450 (driver 581.83) and lavapipe (Mesa 26.2.4, mesa-dist-win).
agc_driver_graphics_tests:VGT_TF_PARAM0x4004d decodes as partitioning 3 and is no longer refused; 0x40045 (power of two) still is.agc_driver_tessellation_tests: newRequireFractionalEvenPartitioningchecks that the domain module has fractional-even spacing and that the hull bounds factors at 64. Its domain program lowers each domain point by3·min(u, v, w), so edge points stay in place and only an interior point reaches below the patch. With integer spacing the level-1 patch covers nothing below its base and the level-5 patch does. With fractional-even spacing the level-1 patch does too (raised to level 2), the level-0 patch is culled and the level-5 patch has interior points. All tessellation tests pass on NVIDIA and lavapipe.mainat43349d433. The title ran on a local branch with this change and unrelated local changes (feat(agc): sample a multisampled color target through its 2D MSAA texture #4820 among them).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)