Cleanup: Formatting
This commit is contained in:
@@ -6,32 +6,32 @@
|
||||
|
||||
#include "gpu_glsl_cpp_stubs.hh"
|
||||
|
||||
# ifndef FLT_MAX
|
||||
# define FLT_MAX uintBitsToFloat(0x7F7FFFFFu)
|
||||
# define FLT_MIN uintBitsToFloat(0x00800000u)
|
||||
# define FLT_EPSILON 1.192092896e-07F
|
||||
# endif
|
||||
# ifndef SHRT_MAX
|
||||
# define SHRT_MAX 0x00007FFF
|
||||
# define INT_MAX 0x7FFFFFFF
|
||||
# define USHRT_MAX 0x0000FFFFu
|
||||
# define UINT_MAX 0xFFFFFFFFu
|
||||
# endif
|
||||
# define NAN_FLT uintBitsToFloat(0x7FC00000u)
|
||||
# define FLT_11_MAX uintBitsToFloat(0x477E0000)
|
||||
# define FLT_10_MAX uintBitsToFloat(0x477C0000)
|
||||
# define FLT_11_11_10_MAX float3(FLT_11_MAX, FLT_11_MAX, FLT_10_MAX)
|
||||
#ifndef FLT_MAX
|
||||
# define FLT_MAX uintBitsToFloat(0x7F7FFFFFu)
|
||||
# define FLT_MIN uintBitsToFloat(0x00800000u)
|
||||
# define FLT_EPSILON 1.192092896e-07F
|
||||
#endif
|
||||
#ifndef SHRT_MAX
|
||||
# define SHRT_MAX 0x00007FFF
|
||||
# define INT_MAX 0x7FFFFFFF
|
||||
# define USHRT_MAX 0x0000FFFFu
|
||||
# define UINT_MAX 0xFFFFFFFFu
|
||||
#endif
|
||||
#define NAN_FLT uintBitsToFloat(0x7FC00000u)
|
||||
#define FLT_11_MAX uintBitsToFloat(0x477E0000)
|
||||
#define FLT_10_MAX uintBitsToFloat(0x477C0000)
|
||||
#define FLT_11_11_10_MAX float3(FLT_11_MAX, FLT_11_MAX, FLT_10_MAX)
|
||||
|
||||
# define UNPACK2(a) (a)[0], (a)[1]
|
||||
# define UNPACK3(a) (a)[0], (a)[1], (a)[2]
|
||||
# define UNPACK4(a) (a)[0], (a)[1], (a)[2], (a)[3]
|
||||
#define UNPACK2(a) (a)[0], (a)[1]
|
||||
#define UNPACK3(a) (a)[0], (a)[1], (a)[2]
|
||||
#define UNPACK4(a) (a)[0], (a)[1], (a)[2], (a)[3]
|
||||
|
||||
/**
|
||||
* Clamp input into [0..1] range.
|
||||
*/
|
||||
# define saturate(a) clamp(a, 0.0f, 1.0f)
|
||||
#define saturate(a) clamp(a, 0.0f, 1.0f)
|
||||
|
||||
# define isfinite(a) (!isinf(a) && !isnan(a))
|
||||
#define isfinite(a) (!isinf(a) && !isnan(a))
|
||||
|
||||
/* clang-format off */
|
||||
#define in_range_inclusive(val, min_v, max_v) (all(greaterThanEqual(val, min_v)) && all(lessThanEqual(val, max_v)))
|
||||
@@ -76,7 +76,7 @@ void set_flag_from_test(inout int value, bool test, int flag)
|
||||
}
|
||||
|
||||
/* Keep define to match C++ implementation. */
|
||||
# define SET_FLAG_FROM_TEST(value, test, flag) set_flag_from_test(value, test, flag)
|
||||
#define SET_FLAG_FROM_TEST(value, test, flag) set_flag_from_test(value, test, flag)
|
||||
|
||||
/**
|
||||
* Return true if the bit inside bitmask at bit_index is set high.
|
||||
|
||||
Reference in New Issue
Block a user