lima,panfrost: Correct pixel vs block mismatches
Different parts of our codebase disagree on whether spatial coordinates/dimensions are given in pixels or blocks, which differ by a constant factor for block-compressed formats. This disagreement manifests as incorrect results accessing block-compressed formats. To resolve this, define the public tiling routines to take their coordinates in pixels, and align the relevant code in Panfrost accordingly. Fixes rendering glitches in Factorio, as well as a pile of piglits on Panfrost. It should also fix glTexSubImage() with ETC1 on Lima, but there are no tests for this in dEQP/Piglit. Signed-off-by:Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by:
Emma Anholt <emma@anholt.net> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> [dEQP/Lima] Tested-by: Erico Nunes <nunes.erico@gmail.com> [Piglit/Lima] Reported-by:
Icecream95 <ixn@disroot.org> Closes: #5560 Cc: mesa-stable Part-of: <mesa/mesa!14370>
- src/gallium/drivers/panfrost/pan_resource.c 15 additions, 6 deletionssrc/gallium/drivers/panfrost/pan_resource.c
- src/panfrost/ci/panfrost-g52-fails.txt 0 additions, 19 deletionssrc/panfrost/ci/panfrost-g52-fails.txt
- src/panfrost/shared/pan_tiling.c 17 additions, 3 deletionssrc/panfrost/shared/pan_tiling.c