summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/common
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-04-19 19:00:21 -0500
committerTim Rowley <[email protected]>2017-04-28 19:56:34 -0500
commitd4c14867373862e47ed7286ac08d0301e95d707f (patch)
tree7d9b643c822123739b0e18ff8d31e26aa77e33ef /src/gallium/drivers/swr/rasterizer/common
parentdabd0499a6ba4032f2cf24103a7ca044061a3b98 (diff)
swr/rast: add SwrGetInterface() function to return api
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/common')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/os.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
index 38553df508b..f9b6ccaee82 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -30,6 +30,7 @@
#if (defined(FORCE_WINDOWS) || defined(_WIN32)) && !defined(FORCE_LINUX)
#define SWR_API __cdecl
+#define SWR_VISIBLE
#ifndef NOMINMAX
#define NOMINMAX
@@ -91,6 +92,7 @@ static inline void AlignedFree(void* p)
#elif defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
#define SWR_API
+#define SWR_VISIBLE __attribute__((visibility("default")))
#include <stdlib.h>
#include <string.h>
@@ -273,6 +275,10 @@ typedef MEGABYTE GIGABYTE[1024];
#define ATTR_UNUSED
#endif
+#define SWR_FUNC(_retType, _funcName, /* args */...) \
+ typedef _retType (SWR_API * PFN##_funcName)(__VA_ARGS__); \
+ _retType SWR_API _funcName(__VA_ARGS__);
+
// Defined in os.cpp
void SWR_API SetCurrentThreadName(const char* pThreadName);