summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-03-22 19:20:42 -0500
committerTim Rowley <[email protected]>2017-03-28 11:24:44 -0500
commit3974cfea2531b86fb394d8501b106e69f00c5f89 (patch)
tree2c4f0d156905306e88d65e428037a8670b26853b /src/gallium
parent1c7224c85fddcbac64ee5a6595ec8608b4f00437 (diff)
swr: [rasterizer core] Disable inline function expansion
Disable expansion in windows Debug builds. Reviewed-by: George Kyriazis <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/os.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
index 71c4da3a59a..ef00a255d31 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -47,7 +47,19 @@
#endif
#define OSALIGN(RWORD, WIDTH) __declspec(align(WIDTH)) RWORD
+
+#if defined(_DEBUG)
+// We compile Debug builds with inline function expansion enabled. This allows
+// functions compiled with __forceinline to be inlined even in Debug builds.
+// The inline_depth(0) pragma below will disable inline function expansion for
+// normal INLINE / inline functions, but not for __forceinline functions.
+// Our SIMD function wrappers (see simdlib.hpp) use __forceinline even in
+// Debug builds.
+#define INLINE inline
+#pragma inline_depth(0)
+#else
#define INLINE __forceinline
+#endif
#define DEBUGBREAK __debugbreak()
#define PRAGMA_WARNING_PUSH_DISABLE(...) \