nir: Add possibility to store image var offset in range_base
authorGert Wollny <gert.wollny@collabora.com>
Thu, 24 Nov 2022 12:23:06 +0000 (13:23 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 Jan 2023 13:19:04 +0000 (13:19 +0000)
commitc4cde91c1b81958bbe12bd72d16376873cfa9ad5
tree02bc0a425ba48b9c70cd65daf2ef2dd73c041897
parent2f4c7b5ccfb73e0d8a0a194cae4b1af0fbf6d358
nir: Add possibility to store image var offset in range_base

Add the intrinsic range_base value to the image intrinsics and add
the option to store the image array offset into range_base instead
of adding it to the image array index if the driver requests it.

v2: Always initialize range_base

v3: fix for bindless intrinsics

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19980>
src/compiler/glsl/gl_nir_lower_images.c
src/compiler/nir/nir.h
src/compiler/nir/nir_intrinsics.py