r300: disable PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF
authorPavel Ondračka <pavel.ondracka@gmail.com>
Sat, 16 Jul 2022 05:57:33 +0000 (07:57 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Jul 2022 20:31:37 +0000 (20:31 +0000)
commitae003ef78cb3a6e76edd32c5a6ae5766ebf51d3b
tree7362dadf116e7b0b71766aee20d8dea4e8aff7e4
parent3f19a6086947309207c2701f7c24cbfc75cfe79e
r300: disable PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF

We can't do uniform buffer objects and from the hardware
perspective constants (uniforms) and immediates are treated in
the same way. They are uploaded together and fit together into the
(rather low) total constant limit. Therefore, there is actually no
advantage in converting immediates to uniforms, and a whole lot of
disadvantages (less possible optimizations and no inlining).

Fixes the dEQP regressions from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16770

The tests failed because when there is an indirect array access the
compiler inserts a big if ladder and converting the temp to a uniform
means more instructions because the ifs cant be lowered at least
partially to selects. It is particularly visible, because the code
NIR currently emits for the indirect access doesn't really fit the
hardware, see: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6366

No change in my shader-db, so this concerns the tests only.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17576>
src/gallium/drivers/r300/ci/r300-rv515-fails.txt
src/gallium/drivers/r300/r300_screen.c