fix(shader): answer image_get_resinfo on 2D MSAA T#s #19682
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19682"
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 c1b3r-p3d1a on 2026-11-13T19:48:16Z.
What
image_get_resinfoon a 2D MSAA T# with 2, 4 or 8 fragments returned 0 levels under DIM 2D_MSAA and threwimage address has too few coordinate componentsunder DIM 1D. It now returns (width, height, 0, 1), the level component measured on RDNA2 with the hardware oracle in #18467 (recorded indocs/dev/debt/shader.md).SpirvImageEmitter.cpp: the level component of a multisampled dimension query starts at 1 instead of 0 (SPIR-V has no level query on multisampled images).ResourceMaterializer.cpp: a query-only DIM 1D image also gets a 2D MSAA view, gated like the existing query-only 2D/2D-array/3D/cube views (plain, non-depth, no conversion or packing), so read modes are unchanged.Still throwing, as the debt entry now says: DIM 2D on a 2D MSAA T# (its views are shared with 2D reads), 2D MSAA-array T#s (the driver binds no type-15 texture) and 16-fragment T#s (refused as invalid descriptors). Not measured on the PS5's gfx1013.
Tested
Windows 11, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh r7), Release, rebased on
main135da47a9c.agc_driver_image_resinfo_dimensionnow also checks 2D MSAA T#s (SW_MODE 64KB_S, 2/4/8 fragments) under DIM 2D_MSAA and DIM 1D against (8, 8, 0, 1). It fails with each fix reverted: levels 0, andimage address has too few coordinate components.ctest -R "agc_driver|shader|recompiler": 1258/1267 pass. The 9 failures (agc_driver_f16_conversion_float_mode,float16_misc,float16_modifiers,float16_rounding,fp16_overflow,ldexp_f16_inline_constants,sdwa_ldexp_f16,vop2_modifier_forms,sample_order_grid_reference) were already failing onmainon this machine in an earlier run today and do not involve image queries.python tools/check_conventions.py --base origin/main: 0 errors; one warning that the existing debt entry is over 1000 characters (it already was onmain).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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T03:48:00Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the read code and supplied checks support merging.
What I ran
Reviewed head
5c9cc0632165d052c989ee24bc80270e2e7a8bbcusing the pinnedrepo_read.pyreader. No commands or tests were run by me; the environment and toolchain were not independently verified.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports the execution check on RDNA3 and the hardware behavior measurement on RDNA2; neither was run by me. Linux and PS5 gfx1013 behavior were not verified. The review bundle contained no excluded changed files; all four files listed in the manifest as reviewed were read:
ImageResinfoDimension.cpp,ResourceMaterializer.cpp,SpirvImageEmitter.cpp, andshader.md.To get this to a good state
Nothing is required.