[Mesa-dev] [PATCH v2 06/52] intel/fs: Use an explicit D type for vote any/all/eq intrinsics
jason at jlekstrand.net
Wed Oct 25 21:53:20 UTC 2017
On Tue, Oct 17, 2017 at 2:03 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On 10/12, Jason Ekstrand wrote:
>> They return a boolean so this is the right type. Unfortunately,
>> get_nir_dest has the annoying behavior of giving us a float type by
>> default. This is mostly to work around the fact that gen7 has 64-bit
>> float but no Q types.
> I'd really like to see a clearer explanation about what this fixes.
> Something like
> "These intrinsics will be used to implement X, Y, Z from $extension,
> which support additional types (including 64-bit types). For 64-bit
> types get_nir_dest() returns ..., so we need to force the type to D
> since it always returns a bool."
That's not quite accurate. How about this:
The any/all intrinsics return a boolean value so D or UD is the correct
type. Unfortunately, get_nir_dest has the annoying behavior of returnning
a float type by default. This causes format conversion which gives us
-1.0f or 0.0f in the register. If the consumer of the result does an
integer comparison to zero, it will give you the right boolean value but if
we do something more clever based on the 0/~0 assumption for booleans, this
will give the wrong value.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev