fix(agc): include PA_SU_POLY_OFFSET_CLAMP in the initial context state #1086
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1086"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-07T10:13:31Z.
What
decodeDepthBiasneeds PA_SU_POLY_OFFSET_CLAMP (context register 0x2df), butInitialContextRegistersdoesn't hold it, so a depth-biased draw is skipped (missing register in context bank at DWORD 0x2df) unless the title wrote the clamp itself.depthBiasClampdevice feature.sceAgcGetRegisterDefaults2, RegisterDefaultsData.hpp) and amdgpu's GFX10 clear-state table (clearstate_gfx10.h), which the kernel loads for CLEAR_STATE (gfx_v10_0.c).Tested
main0d3c1eec: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 386/386 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeDepthBoundsBiasTests(agc_driver_graphics) now decodes a depth-biased draw afterClearContext(), which CLEAR_STATE runs, with the clamp never written, and gets clamp 0. Fails onmainwith the message above.DWORD 0x2dfskips in a 900 s run; 29,915 before, about 53 per menu frame.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)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T06:06:28Z.
Checked:
0x2df = 0matches libSceAgc's register defaults in the repo (RegisterDefaultsData.hpp, every version); the newDepthBoundsBiasTestscase fails without theQueueState.hppchange and passes with it; full ctest 415/415 on currentmain+ PR, linux/windows CI green. Merging.