intel/compiler: fixup Gen12 workaround for array sizes
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 15 Sep 2020 12:33:14 +0000 (15:33 +0300)
committerMarge Bot <eric+marge@anholt.net>
Mon, 21 Sep 2020 21:20:09 +0000 (21:20 +0000)
commitcc3bf00cc26ddb991b4036a9911299e7d122115b
treefd055f589573288da4562cf3876c918e161c2247
parent54b9013e4c83a74b2806195bc41d774ca060112b
intel/compiler: fixup Gen12 workaround for array sizes

We didn't handle the case of NULL images/textures for which we should
return 0.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 397ff2976ba281 ("intel: Implement Gen12 workaround for array textures of size 1")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3522
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6729>
src/intel/compiler/brw_nir_clamp_image_1d_2d_array_sizes.c