spirv/nir: add support for ImageGatherExtended
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 27 Nov 2016 21:09:55 +0000 (16:09 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 17 Dec 2016 01:27:37 +0000 (20:27 -0500)
commit6493b4f4dded6e622630d22f6bc2c779fb73d467
treea7914deba458c429ecaf7bb4fced187567308ad2
parent79d08ed3d21bef21881303f320706ebb2098a50a
spirv/nir: add support for ImageGatherExtended

The strategy is to do the same thing that the GLSL lower_offset_arrays
pass does - create 4 separate texture gather ops, one per offset, and
read in the results from each gather's w component to recreate the
desired result.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/spirv/spirv_to_nir.c