[Mesa-dev] [PATCH 05/45] nir: Add rounding mode enum
Jason Ekstrand
jason at jlekstrand.net
Thu Aug 17 18:31:57 UTC 2017
On Thu, Aug 17, 2017 at 11:26 AM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> On Thu, Jul 13, 2017 at 7:35 AM, Alejandro PiƱeiro <apinheiro at igalia.com>
> wrote:
>
>> From: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
>>
>> ---
>> src/compiler/nir/nir.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
>> index 2ac5b1e..115ec1b 100644
>> --- a/src/compiler/nir/nir.h
>> +++ b/src/compiler/nir/nir.h
>> @@ -107,6 +107,14 @@ typedef enum {
>> } nir_variable_mode;
>>
>>
>> +typedef enum {
>> + nir_rounding_mode_undef = 0,
>> + nir_rounding_mode_rtne = 1,
>> + nir_rounding_mode_ru = 2,
>> + nir_rounding_mode_rd = 3,
>> + nir_rounding_mode_rtz = 4,
>>
>
> Could we have either better names or a comment on each as to what it
> means. Better names could be:
>
> nir_rounding_mode_nearest_even
> nir_rounding_mode_up
> nir_rounding_mode_down
> nir_rounding_mode_towards_zero
>
> Things like "rtne" are less typing but hard to read.
>
And I just read patch 6 which is where abreviating things suddenly becomes
useful... Maybe it's best to just add comments?
> --Jason
>
>
>> +} nir_rounding_mode;
>> +
>> typedef union {
>> float f32[4];
>> double f64[4];
>> --
>> 2.9.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170817/f5e02e4c/attachment.html>
More information about the mesa-dev
mailing list