diff options
author | Jose Maria Casanova Crespo <[email protected]> | 2017-07-01 07:56:51 +0200 |
---|---|---|
committer | Jose Maria Casanova Crespo <[email protected]> | 2017-12-06 08:57:18 +0100 |
commit | d7114454305a64f9624d7b1fcc726d97d7f1835a (patch) | |
tree | a744f9ef2127bb897fddb7c5f85dbef7ac77f516 /src | |
parent | 5165e222d15a546a550a3165dce05eac81f94482 (diff) |
nir: Add rounding modes enum
v2: Added comments describing each of the rounding modes. (Jason
Ekstrand)
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 2abf2ddd843..1e0dee91192 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -106,6 +106,16 @@ typedef enum { nir_var_all = ~0, } nir_variable_mode; +/** + * Rounding modes. + */ +typedef enum { + nir_rounding_mode_undef = 0, + nir_rounding_mode_rtne = 1, /* round to nearest even */ + nir_rounding_mode_ru = 2, /* round up */ + nir_rounding_mode_rd = 3, /* round down */ + nir_rounding_mode_rtz = 4, /* round towards zero */ +} nir_rounding_mode; typedef union { float f32[4]; |