nir: add legal bit_sizes to intrinsics
authorKarol Herbst <kherbst@redhat.com>
Thu, 19 Jul 2018 11:04:43 +0000 (13:04 +0200)
committerKarol Herbst <kherbst@redhat.com>
Sun, 20 Jan 2019 23:16:51 +0000 (00:16 +0100)
commit4125211e9c46a3b6f3eb82ded7a57a1a07e0fe02
tree59980a502297f42c55f73a2568a336ccb5073011
parent27bd07e230a0df43b110362d74ba65f494fa7d1f
nir: add legal bit_sizes to intrinsics

With OpenCL some system values match the address bits, but in GLSL we also
have some system values being 64 bit like subgroup masks.

With this it is possible to adjust the builder functions so that depending
on the bit_sizes the correct bit_size is used or an additional argument is
added in case of multiple possible values.

v2: validate dest bit_size
v3: generate hex values in python code
    remove useless imports
    rename and move bit_sizes
v4: add 1 to legal bit_sizes for front_face

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir/nir.h
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_intrinsics_c.py
src/compiler/nir/nir_validate.c