nir: fix gather_ssa_types
authorJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 19:08:54 +0000 (15:08 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 21:35:26 +0000 (21:35 +0000)
commit887c2a60923debf0facc4d95554ed87555d83620
tree1e4e37c4fb86fed7c3360c59d804a31913de36e7
parentc12750527b7c4d1f4265ffa2346fd5c2346f41cd
nir: fix gather_ssa_types

Consts and undefs can be used as different types (common with "0" constant)
so don't copy types from consts/undefs, only to them. It doesn't entirely
solve the problem that the type given to the const could be wrong , but
now the only realistic case is with "0" which is the same when casted to
float, so it doesn't matter for lower_int_to_float.

The other change is to get type information for load input/uniform and
store output, and use that to get correct results.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_gather_ssa_types.c