Re: [Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Jason Ekstrand
On Wed, Dec 19, 2018 at 12:22 PM Eric Anholt wrote: > Jonathan Marek writes: > > > Note: the backend must take care that uniform index is now a float > > This makes me think that lowering ints to float should be done near the > end of the compile (followed by maybe an algebraic and a dce). As i

Re: [Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Jonathan marek
I haven't encountered such dereference issues, but lowering integers later is a good idea (as with bools which are now lowered later). On 12/19/2018 01:22 PM, Eric Anholt wrote: Jonathan Marek writes: Note: the backend must take care that uniform index is now a float This makes me think th

Re: [Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Eric Anholt
Jonathan Marek writes: > Note: the backend must take care that uniform index is now a float This makes me think that lowering ints to float should be done near the end of the compile (followed by maybe an algebraic and a dce). As is, I think nir_lower_io() is going to do bad things to dereferen

[Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Jonathan Marek
Note: the backend must take care that uniform index is now a float Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp inde