* 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>
What
The pixel shader's front-face VGPR was always
+1.0/-1.0. That is its form only whileSPI_BARYC_CNTL.FRONT_FACE_ALL_BITS(bit 24) is clear. With the bit set, a back face reads0and a front face non-zero:v_cmp_lg_u32 0, front_face(aco_instruction_selection.cpp).fgt 0, andfsignfor±1.0, inac_nir_lower_intrinsics_to_args.c). That is the form the driver produced until now.Uncharted: Legacy of Thieves Collection (PPSA05684) sets the bit. Its two-sided cloth shaders enable FRONT_FACE (
SPI_PS_INPUT_ENA = 0x1b02, so the input isv5) and test it withv_cmp_lt_u32 0, v5.-1.0(0xbf800000) is non-zero, so every back face was taken as a front face. The insides of the menu skeleton's rags kept their front normals and were lit white by the spot light behind the cage. With this change the rags render dark, as on the PC version.Changes:
ShaderPixelStageInfo::frontFaceAllBits, decoded fromSPI_BARYC_CNTLonly when FRONT_FACE is an active input, so contexts without the input don't need the register.RequestSerializerTestsupgrades older fixtures to version 27), the shader cache key, the draw lookup key and the draw register key comparison.DrawKeyRegisterscovers0x1b6..0x1b8.0xffffffff/0.0xffffffff) is not measured; only back = 0 and front ≠ 0 are sourced. It is listed indocs/dev/debt/shader.md.Tested
agc_driver_front_face_all_bits: a front-facing and a back-facing triangle export the raw front-face VGPR into an R32_UINT target. It expects0x3f800000/0xbf800000without the bit and0xffffffff/0with it. With the translator change reverted, it fails withwith FRONT_FACE_ALL_BITS: the front-facing triangle read FRONT_FACE as 0x3f800000, expected 0xffffffff.agc_driver_graphicsdecodes the bit (set, clear, and set without the front-face input).agc_shader_memoryround-trips the flag and replays a version 26 request.main32e810d, before adriadam10's rebase onto version 27 (he re-ran the affected tests on the rebase).tools/check_conventions.py --base origin/mainpasses.mainyet, it needs feat(agc): implement image and sampler tables indexed at runtime offsets #757/feat(agc): implement image tables loaded through 64-bit pointers #758): the white rags are gone and the skeleton matches the PC reference.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)