freedreno/ir3: Fix sizing of the inputs/outputs array.
authorEric Anholt <eric@anholt.net>
Tue, 21 Apr 2020 22:43:03 +0000 (15:43 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Apr 2020 18:52:46 +0000 (18:52 +0000)
commit5593d80a2c0db362e80c7733bc4a3f2899c288bf
treea1613616a0e97b5c26b4834c38cb311067be9960
parentac937bf878c30f1879adfb31f68a4dec15d3b616
freedreno/ir3: Fix sizing of the inputs/outputs array.

If you have a struct, the var's base driver location is not the last
driver location that will be accessed in that var.  We have a shader
struct member with this number for us, already.  Fixes overflows in:

dEQP-GLES31.functional.program_interface_query.program_output.type.interface_blocks.out.named_block_explicit_location.struct.mat3x2

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4670>
src/freedreno/ir3/ir3_compiler_nir.c