diff options
author | Alok Hota <[email protected]> | 2018-08-02 12:03:29 -0500 |
---|---|---|
committer | Alok Hota <[email protected]> | 2019-02-15 14:52:51 -0600 |
commit | 78bab664792a77b0fa4ac428fa5c0960af12b46c (patch) | |
tree | 191ef53a7ba0fd234e90d90c973a181d642daee2 | |
parent | 20d5c88760dd260998b73fc0a6156a9d95e6e836 (diff) |
swr/rast: Disable use of __forceinline by default
- Was not useful to inline in release builds
- FORCEINLINE can be used if absolutely necessary
Reviewed-by: Bruce Cherniak <[email protected]>
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/common/os.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h index d33c8735d11..d685467906b 100644 --- a/src/gallium/drivers/swr/rasterizer/common/os.h +++ b/src/gallium/drivers/swr/rasterizer/common/os.h @@ -59,8 +59,16 @@ #define INLINE inline #pragma inline_depth(0) #else -#define INLINE __forceinline +// Use of __forceinline increases compile time dramatically in release builds +// and provides almost 0 measurable benefit. Disable until we have a compelling +// use-case +// #define INLINE __forceinline +#define INLINE inline +#endif +#ifndef FORCEINLINE +#define FORCEINLINE __forceinline #endif + #define DEBUGBREAK __debugbreak() #define PRAGMA_WARNING_PUSH_DISABLE(...) \ @@ -124,6 +132,9 @@ typedef unsigned int DWORD; #ifndef INLINE #define INLINE __inline #endif +#ifndef FORCEINLINE +#define FORCEINLINE INLINE +#endif #define DEBUGBREAK asm("int $3") #if !defined(__CYGWIN__) |