Module: Mesa
Branch: master
Commit: 31dbef02a06127ddf3365fe83f8ef04bf2362c2b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=31dbef02a06127ddf3365fe83f8ef04bf2362c2b

Author: Michel Zou <[email protected]>
Date:   Wed Mar 10 21:19:20 2021 +0100

swr: extern declaration for win32 intrinsics

This fixes compilation on msvc because llvm redefines these too
Closes #4417

Reviewed-by: Jan Zielinski <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

---

 src/gallium/drivers/swr/rasterizer/common/os.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h 
b/src/gallium/drivers/swr/rasterizer/common/os.h
index cc13936d8e9..b949625ae73 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -106,6 +106,7 @@ static inline void AlignedFree(void* p)
 #endif
 
 #if !defined(_WIN64)
+extern "C" {
 inline unsigned char _BitScanForward64(unsigned long* Index, uint64_t Mask)
 {
 #ifdef __GNUC__
@@ -131,6 +132,7 @@ inline unsigned char _BitScanReverse64(unsigned long* 
Index, uint64_t Mask)
 #endif
     return (Mask != 0);
 }
+}
 #endif
 
 #elif defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || 
defined(__gnu_linux__)

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to