ntt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 10 Jan 2022 22:52:08 +0000 (14:52 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 21 Jan 2022 00:25:38 +0000 (00:25 +0000)
commit926d78a645b7c41bbfe279c977008da759faffb6
treec13898400a66d5e5ec65f2c36bb0fdab0e8da8d3
parent495debebad2a86b12c27da173a545ca44b0f5cff
ntt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg

This was identified by Coverity.  4bb9c0a28a5 added uses of a third
address register, but the arrays for tracking address registers only
have two slots.

Add back a version of the assertion from before 4bb9c0a28a5 to help
prevent future problems.  I don't think any drivers that would hit
this path use NIR-to-TGSI yet, so it may be moot.

Reviewed-by: Matt Turner <mattst88@gmail.com>
CID: 1496942
CID: 1496944
Fixes: 4bb9c0a28a5 ("nir_to_tgsi: Use the same address reg mappings as GLSL-to-TGSI did.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14487>
src/gallium/auxiliary/nir/nir_to_tgsi.c