glsl/nir: int constants as float for native_integers=false
authorJonathan Marek <jonathan@marek.ca>
Mon, 12 Nov 2018 18:08:50 +0000 (13:08 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 11 Jan 2019 19:16:11 +0000 (19:16 +0000)
commitd3b47e073e002a01261dacf11e04e37b812736e6
tree71a1874fd12cf91ff755b58d06cccb6e9cc41380
parent1ede463b6e66eb0a6df5250261810b6985c35eb9
glsl/nir: int constants as float for native_integers=false

All alu instructions emitted with native_integers=false expect float
(or bool in some cases) constants, so this change is necessary.

This will cause changes with some intrinsics which had integer sources,
such as nir_intrinsic_load_uniform. Apparently it might cause issues with
some opt passes, but perhaps those don't apply in OpenGL ES 2.0 cases?

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/glsl_to_nir.cpp