intel/compiler: quiet Coverity warnings
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 9 Sep 2020 17:01:49 +0000 (19:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Sep 2020 12:16:58 +0000 (12:16 +0000)
commit18eb853ac86c116e2a50e560462258fbad33e13e
tree0e8cf1621476a58db6145fa8693bbf543fdeaad9
parent5b6fd2a3140fa70a86a65631a20bf39d75e89c0d
intel/compiler: quiet Coverity warnings

Coverity complains about possible out-of-bounds write & read, because
it thinks that "loc + i" can be bigger than sizes of the 2 used arrays.

It's not obvious from the code it cannot happen, so add asserts here.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
src/intel/compiler/brw_fs_nir.cpp