pan/bi: Handle non-2D arrays
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sat, 5 Mar 2022 20:49:43 +0000 (15:49 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 12 Mar 2022 17:34:01 +0000 (17:34 +0000)
commit53f1e57ee7a7a6f7906c34cf7b78a39873fd00c2
treeeb7258df3ee56749748a1eeb5ec5b0507a925e2b
parent1f97819fbe56a388878a23f49c0cf47016e4dde0
pan/bi: Handle non-2D arrays

Handle arrays generically by using the last component of the coordinate source
as the array index. That works for both 2D arrays and cube arrays, fixing cube
arrays. Cube arrays were already handled correctly in core Panfrost code.

This code path is not tested in dEQP-GLES31 without exposing OES_cube_map_array,
which depends on OES_geometry_shader, which we don't have. Yet we do expose
PIPE_CAP_CUBE_ARRAY, so ARB_cube_map_array is exposed.

Disabling PIPE_CAP_CUBE_ARRAY would be an easy band-aid fix, but it's easy
enough to handle correctly.

dEQP-GLES31 passes with a hack enabling OES_cube_map_array [without geometry
shaders].

Also fixes 1D arrays on Bifrost for the same reasons.

Fixes: 70d6c5675d6 ("pan/bi: Emit TEXC with builder")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15254>
src/panfrost/bifrost/bifrost_compile.c
src/panfrost/ci/panfrost-g52-fails.txt