pan/bit: Add framework forinterpreting double vs float

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>
This commit is contained in:
Alyssa Rosenzweig 2020-04-30 17:31:38 -04:00 committed by Marge Bot
parent 130a3fba1c
commit f1f4f1b816

View file

@ -140,18 +140,21 @@ bit_write(struct bit_state *s, unsigned index, nir_alu_type T, bit_t value, bool
bint(bit_i64 ## name, bit_i32 ## name, bit_i16 ## name, bit_i8 ## name); \
unreachable("Invalid type");
#define bit_make_float(name, expr) \
#define bit_make_float_2(name, expr32, expr64) \
static inline double \
bit_f64 ## name(double a, double b, double c, double d) \
{ \
return expr; \
return expr64; \
} \
static inline float \
bit_f32 ## name(float a, float b, float c, float d) \
{ \
return expr; \
return expr32; \
} \
#define bit_make_float(name, expr) \
bit_make_float_2(name, expr, expr)
#define bit_make_int(name, expr) \
static inline int64_t \
bit_i64 ## name (int64_t a, int64_t b, int64_t c, int64_t d) \