On Tue, Oct 17, 2017 at 2:03 PM, Matt Turner <matts...@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.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to