[Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false
Jason Ekstrand
jason at jlekstrand.net
Wed Dec 19 20:10:00 UTC 2018
On Wed, Dec 19, 2018 at 12:22 PM Eric Anholt <eric at anholt.net> wrote:
> Jonathan Marek <jonathan at marek.ca> 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 dereferences of i/o
> arrays.
>
> That said, it looks like this will be fixing way more than it regresses,
> so I would go along with it.
>
I used to agree but I'm actually inclined to go the other way. Because NIR
is typeles, you have no idea in a lower pass whether a particular value is
an int or a float. In particular, you have no idea for immediates. Of
course, doing it this early would mean that we'd need a version of
nir_lower_io that produces floats but that doesn't seem entirely
unreasonable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181219/e2d9b9bf/attachment.html>
More information about the mesa-dev
mailing list