mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
multimedia/gmmlib: switch to upstream patches
This commit is contained in:
parent
fe4d7b7d11
commit
84f6bb2e84
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=522734
@ -7,6 +7,14 @@ CATEGORIES= multimedia
|
||||
|
||||
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
|
||||
PATCHFILES+= f17dd87c7f57.patch:-p1 # https://github.com/intel/gmmlib/pull/67
|
||||
PATCHFILES+= c1e398124a55.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 92704b3ed362.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= ee3afe457015.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 3eaaa3ac097e.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 492c1eea16ab.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 62cbd18f9ab6.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 4261462b0586.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
PATCHFILES+= 6cb8a44dcc55.patch:-p1 # https://github.com/intel/gmmlib/pull/68
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
COMMENT= Intel Graphics Memory Management Library
|
||||
@ -30,17 +38,6 @@ OPTIONS_DEFINE= TEST
|
||||
TEST_CMAKE_BOOL= RUN_TEST_SUITE
|
||||
TEST_TEST_TARGET= Run_ULT
|
||||
|
||||
post-patch:
|
||||
# Silence -Wmacro-redefined
|
||||
@${REINPLACE_CMD} -e '/__fastcall/d' \
|
||||
${WRKSRC}/Source/inc/portable_compiler.h
|
||||
# XXX Uncomment and drop patches if upstream doesn't regain sanity
|
||||
.if !exists(${.CURDIR}/files/patch-gcc-atomics) && !exists(${.CURDIR}/files/patch-unix)
|
||||
# Avoid platform whitelists for generic non-Windows code
|
||||
@${GREP} --exclude='*/os.h*' --exclude='*/googletest/*' -Flr '__linux' ${WRKSRC} | ${XARGS} \
|
||||
${REINPLACE_CMD} -i .opsys -E 's/__linux(__)?/__unix__/'
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
# Clean up after PATTERN-based install
|
||||
@${FIND} ${STAGEDIR}${PREFIX}/include -type d -empty -delete
|
||||
|
@ -3,3 +3,19 @@ SHA256 (intel-gmmlib-intel-gmmlib-19.4.1_GH0.tar.gz) = bb874b41c499abb8f6253b183
|
||||
SIZE (intel-gmmlib-intel-gmmlib-19.4.1_GH0.tar.gz) = 707375
|
||||
SHA256 (f17dd87c7f57.patch) = 0bdfd22e8f36a097c875796c7bbf7003a16cc7535fdf5d3caa3a7de9dc21c28e
|
||||
SIZE (f17dd87c7f57.patch) = 1485
|
||||
SHA256 (c1e398124a55.patch) = 65b65dc9fb7841baa2b5336b64e69bcaa4cb8bd9c1678e7832712700c6676c99
|
||||
SIZE (c1e398124a55.patch) = 951
|
||||
SHA256 (92704b3ed362.patch) = fa2aa083d8649ecaeb68b0f01186568208b898ca92a9d3bc2a1defaf6808261c
|
||||
SIZE (92704b3ed362.patch) = 900
|
||||
SHA256 (ee3afe457015.patch) = e3f6625e14d714c41bc031b4a55e89c0c024fff0b31b5d3ec5e6c0590afd1f12
|
||||
SIZE (ee3afe457015.patch) = 2225
|
||||
SHA256 (3eaaa3ac097e.patch) = cd5b35479137942c822049f89c1db9fc7aed55613ebd756d22f55e9f5baf590d
|
||||
SIZE (3eaaa3ac097e.patch) = 731
|
||||
SHA256 (492c1eea16ab.patch) = 59466ec8d31a54711e23ccff4c5f7f4ce878c0dbc16393947fb5b06c8b82d011
|
||||
SIZE (492c1eea16ab.patch) = 5771
|
||||
SHA256 (62cbd18f9ab6.patch) = 5cc752be06334cf75d14bdbcb868e02be28639e6fc36f889e4b7874570ea441b
|
||||
SIZE (62cbd18f9ab6.patch) = 18623
|
||||
SHA256 (4261462b0586.patch) = 3a79ea97a569392915a8932e4b8f863030395644cc3fc53e874a982baf1ef543
|
||||
SIZE (4261462b0586.patch) = 2523
|
||||
SHA256 (6cb8a44dcc55.patch) = e4861ff0d5e14b79ce0d2b83539652c4e204f77a6d23fdaa510b8dc7984fb5f3
|
||||
SIZE (6cb8a44dcc55.patch) = 1470
|
||||
|
@ -1,107 +0,0 @@
|
||||
__sync* are GCC/Clang atomic builtins supported on any platform
|
||||
|
||||
In file included from Source/GmmLib/Platform/GmmGen11Platform.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:35:
|
||||
In file included from Source/GmmLib/inc/External/Common/GmmCachePolicy.h:332:
|
||||
Source/GmmLib/inc/External/Common/GmmCachePolicyCommon.h:74:13: error: control reaches end of non-void function [-Werror,-Wreturn-type]
|
||||
}
|
||||
^
|
||||
In file included from Source/GmmLib/Platform/GmmGen11Platform.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:38:
|
||||
Source/GmmLib/inc/../Platform/GmmPlatforms.h:86:9: error: control reaches end of non-void function [-Werror,-Wreturn-type]
|
||||
}
|
||||
^
|
||||
In file included from Source/GmmLib/Platform/GmmGen11Platform.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:42:
|
||||
In file included from Source/GmmLib/inc/../Texture/GmmTexture.h:27:
|
||||
In file included from Source/GmmLib/inc/External/Common/GmmInfoExt.h:25:
|
||||
Source/GmmLib/inc/External/Common/GmmInfo.h:134:9: error: control reaches end of non-void function [-Werror,-Wreturn-type]
|
||||
}
|
||||
^
|
||||
In file included from Source/GmmLib/CachePolicy/GmmGen11CachePolicy.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:42:
|
||||
In file included from Source/GmmLib/inc/../Texture/GmmTexture.h:31:
|
||||
Source/GmmLib/inc/Internal/Common/Texture/GmmTextureCalc.h:163:13: error: control reaches end of non-void function [-Werror,-Wreturn-type]
|
||||
}
|
||||
^
|
||||
|
||||
--- Source/GmmLib/Platform/GmmPlatforms.h.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/Platform/GmmPlatforms.h
|
||||
@@ -69,7 +69,7 @@ namespace GmmLib {
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
InterlockedIncrement((LONG *)&RefCount);
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__GNUC__)
|
||||
__sync_fetch_and_add(&RefCount, 1);
|
||||
#endif
|
||||
//TODO[Android]
|
||||
@@ -79,7 +79,7 @@ namespace GmmLib {
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
return(InterlockedDecrement((LONG *)&RefCount));
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__GNUC__)
|
||||
return(__sync_sub_and_fetch(&RefCount, 1));
|
||||
#endif
|
||||
//TODO[Android]
|
||||
--- Source/GmmLib/inc/External/Common/GmmCachePolicyCommon.h.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/inc/External/Common/GmmCachePolicyCommon.h
|
||||
@@ -57,7 +57,7 @@ namespace GmmLib
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
InterlockedIncrement((LONG *)&RefCount);
|
||||
- #elif defined(__linux__)
|
||||
+ #elif defined(__GNUC__)
|
||||
__sync_fetch_and_add(&RefCount, 1);
|
||||
#endif
|
||||
//TODO[Android]
|
||||
@@ -67,7 +67,7 @@ namespace GmmLib
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
return(InterlockedDecrement((LONG *)&RefCount));
|
||||
- #elif defined(__linux__)
|
||||
+ #elif defined(__GNUC__)
|
||||
return(__sync_sub_and_fetch(&RefCount, 1));
|
||||
#endif
|
||||
//TODO[Android]
|
||||
--- Source/GmmLib/inc/External/Common/GmmInfo.h.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/inc/External/Common/GmmInfo.h
|
||||
@@ -128,7 +128,7 @@ namespace GmmLib
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return(InterlockedIncrement((LONG *)&RefCount) - 1); //InterLockedIncrement() returns incremented value
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__GNUC__)
|
||||
return(__sync_fetch_and_add(&RefCount, 1));
|
||||
#endif
|
||||
}
|
||||
@@ -150,7 +150,7 @@ namespace GmmLib
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
} while (!(InterlockedCompareExchange((LONG *)&RefCount, TargetValue, CurrentValue) == CurrentValue));
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__GNUC__)
|
||||
} while (!__sync_bool_compare_and_swap(&RefCount, CurrentValue, TargetValue));
|
||||
#endif
|
||||
|
||||
--- Source/GmmLib/inc/Internal/Common/Texture/GmmTextureCalc.h.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/inc/Internal/Common/Texture/GmmTextureCalc.h
|
||||
@@ -146,7 +146,7 @@ namespace GmmLib
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
InterlockedIncrement((LONG *)&RefCount);
|
||||
- #elif defined(__linux__)
|
||||
+ #elif defined(__GNUC__)
|
||||
__sync_fetch_and_add(&RefCount, 1);
|
||||
#endif
|
||||
//TODO[Android]
|
||||
@@ -156,7 +156,7 @@ namespace GmmLib
|
||||
{
|
||||
#if defined(__GMM_KMD__) || _WIN32
|
||||
return(InterlockedDecrement((LONG *)&RefCount));
|
||||
- #elif defined(__linux__)
|
||||
+ #elif defined(__GNUC__)
|
||||
return(__sync_sub_and_fetch(&RefCount, 1));
|
||||
#endif
|
||||
//TODO[Android]
|
@ -1,16 +0,0 @@
|
||||
<linux/limits.h> is implicitly included via <limits.h> but not required here
|
||||
|
||||
Source/GmmLib/Utility/GmmLog/GmmLog.cpp:36:10: fatal error: 'linux/limits.h' file not found
|
||||
#include <linux/limits.h>
|
||||
^~~~~~~~~~~~~~~~
|
||||
|
||||
--- Source/GmmLib/Utility/GmmLog/GmmLog.cpp.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/Utility/GmmLog/GmmLog.cpp
|
||||
@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fstream>
|
||||
-#include <linux/limits.h>
|
||||
#endif
|
||||
|
||||
/// Logger instance shared by all of GmmLib within a process
|
@ -1,16 +0,0 @@
|
||||
In file included from Source/GmmLib/ULT/GmmAuxTableULT.cpp:25:
|
||||
In file included from Source/GmmLib/ULT/./GmmAuxTableULT.h:33:
|
||||
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
|
||||
#error "<malloc.h> has been replaced by <stdlib.h>"
|
||||
^
|
||||
|
||||
--- Source/GmmLib/ULT/GmmAuxTableULT.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/ULT/GmmAuxTableULT.h
|
||||
@@ -30,7 +30,6 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include "GmmGen10ResourceULT.h"
|
||||
#include <stdlib.h>
|
||||
-#include <malloc.h>
|
||||
|
||||
#ifndef ALIGN
|
||||
#define ALIGN(v, a) (((v) + ((a)-1)) & ~((a)-1))
|
@ -1,31 +0,0 @@
|
||||
FreeBSD and OpenBSD define NULL as nullptr for C++11 or later.
|
||||
https://github.com/freebsd/freebsd/commit/c8ed04c26b6758354853a6bed4629f71d0d01a7d
|
||||
https://github.com/openbsd/src/commit/6ecde746dea9a5d17abf3bafa06c232b9189b33b
|
||||
|
||||
Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp:415:21: error: non-pointer operand type 'GMM_GFX_ADDRESS' (aka 'unsigned long') incompatible with nullptr
|
||||
return AuxTTObj ? AuxTTObj->GetL3Address() : NULL;
|
||||
^ ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp:474:28: error: invalid operands to binary expression ('GMM_GFX_ADDRESS' (aka 'unsigned long') and 'nullptr_t')
|
||||
if(GetAuxL3TableAddr() == NULL)
|
||||
~~~~~~~~~~~~~~~~~~~ ^ ~~~~
|
||||
|
||||
--- Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp
|
||||
@@ -412,7 +412,7 @@ ERROR_CASE:
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
GMM_GFX_ADDRESS GmmLib::GmmPageTableMgr::GetAuxL3TableAddr()
|
||||
{
|
||||
- return AuxTTObj ? AuxTTObj->GetL3Address() : NULL;
|
||||
+ return AuxTTObj ? AuxTTObj->GetL3Address() : 0;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -471,7 +471,7 @@ GMM_STATUS GmmLib::GmmPageTableMgr::InitContextAuxTabl
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
GMM_STATUS GmmLib::GmmPageTableMgr::UpdateAuxTable(const GMM_DDI_UPDATEAUXTABLE *UpdateReq)
|
||||
{
|
||||
- if(GetAuxL3TableAddr() == NULL)
|
||||
+ if(GetAuxL3TableAddr() == 0)
|
||||
{
|
||||
GMM_ASSERTDPF(0, "Invalid AuxTable update request, AuxTable is not initialized");
|
||||
return GMM_INVALIDPARAM;
|
@ -1,57 +0,0 @@
|
||||
Add more BSDs and update to modern way to get thread ID
|
||||
https://github.com/gabime/spdlog/pull/1234
|
||||
|
||||
--- Source/GmmLib/Utility/GmmLog/spdlog/details/os.h.orig 2018-09-28 18:59:39 UTC
|
||||
+++ Source/GmmLib/Utility/GmmLog/spdlog/details/os.h
|
||||
@@ -39,9 +39,21 @@
|
||||
#include <unistd.h>
|
||||
#include <chrono>
|
||||
|
||||
-#elif __FreeBSD__
|
||||
-#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
|
||||
+#elif defined(_AIX)
|
||||
+#include <pthread.h> // for pthread_getthreadid_np
|
||||
|
||||
+#elif defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
+#include <pthread_np.h> // for pthread_getthreadid_np
|
||||
+
|
||||
+#elif defined(__NetBSD__)
|
||||
+#include <lwp.h> // for _lwp_self
|
||||
+
|
||||
+#elif defined(__OpenBSD__)
|
||||
+#include <unistd.h> // for getthrid
|
||||
+
|
||||
+#elif defined(__sun)
|
||||
+#include <thread.h> // for thr_self
|
||||
+
|
||||
#else
|
||||
#include <thread>
|
||||
|
||||
@@ -213,7 +225,7 @@ inline size_t filesize(FILE *f)
|
||||
#else // unix
|
||||
int fd = fileno(f);
|
||||
//64 bits(but not in osx, where fstat64 is deprecated)
|
||||
-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
|
||||
+#if (defined(__linux__) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64))
|
||||
struct stat64 st;
|
||||
if (fstat64(fd, &st) == 0)
|
||||
return static_cast<size_t>(st.st_size);
|
||||
@@ -302,10 +314,14 @@ inline size_t thread_id()
|
||||
# define SYS_gettid __NR_gettid
|
||||
# endif
|
||||
return static_cast<size_t>(syscall(SYS_gettid));
|
||||
-#elif __FreeBSD__
|
||||
- long tid;
|
||||
- thr_self(&tid);
|
||||
- return static_cast<size_t>(tid);
|
||||
+#elif defined(_AIX) || defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
+ return static_cast<size_t>(pthread_getthreadid_np());
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return static_cast<size_t>(_lwp_self());
|
||||
+#elif defined(__OpenBSD__)
|
||||
+ return static_cast<size_t>(getthrid());
|
||||
+#elif defined(__sun)
|
||||
+ return static_cast<size_t>(thr_self());
|
||||
#else //Default to standard C++11 (OSX and other Unix)
|
||||
return static_cast<size_t>(std::hash<std::thread::id>()(std::this_thread::get_id()));
|
||||
#endif
|
@ -1,308 +0,0 @@
|
||||
Relax recent Linux checks for the code works on any non-Windows platform.
|
||||
https://github.com/intel/gmmlib/commit/a09c68fd3244 - example offender
|
||||
|
||||
In file included from Source/GmmLib/CachePolicy/GmmCachePolicy.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:58:
|
||||
In file included from Source/GmmLib/inc/External/Common/GmmResourceInfo.h:91:
|
||||
In file included from Source/GmmLib/inc/External/Common/../Linux/GmmResourceInfoLin.h:26:
|
||||
In file included from Source/GmmLib/inc/External/Common/../Linux/../Common/GmmResourceInfoCommon.h:32:
|
||||
Source/GmmLib/inc/External/Common/GmmClientContext.h:59:5: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GMM_DEVICE_CALLBACKS_INT *pDeviceCb;
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmClientContext.h:85:9: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GMM_DEVICE_CALLBACKS_INT DeviceCB; //OS-specific defn: Will be used by Clients to send as input arguments.
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmClientContext.h:139:80: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GMM_VIRTUAL GMM_PAGETABLE_MGR* GMM_STDCALL CreatePageTblMgrObject(GMM_DEVICE_CALLBACKS_INT* pDevCb, uint32_t TTFlags);
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmClientContext.h:154:57: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GMM_DEVICE_CALLBACKS_INT* pDevCb,
|
||||
^
|
||||
In file included from Source/GmmLib/CachePolicy/GmmCachePolicy.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:62:
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:56:5: error: unknown type name 'GMM_UMD_SYNCCONTEXT'; did you mean 'GMM_UMD_CONTEXT'?
|
||||
GMM_UMD_SYNCCONTEXT * UmdContext; // [in] pointer to thread-specific data, specifying BBQHandle/Fence etc
|
||||
^~~~~~~~~~~~~~~~~~~
|
||||
GMM_UMD_CONTEXT
|
||||
Source/GmmLib/inc/External/Common/GmmInfo.h:58:3: note: 'GMM_UMD_CONTEXT' declared here
|
||||
} GMM_UMD_CONTEXT;
|
||||
^
|
||||
In file included from Source/GmmLib/CachePolicy/GmmCachePolicy.cpp:23:
|
||||
In file included from Source/GmmLib/inc/Internal/Common/GmmLibInc.h:62:
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:72:9: error: unknown type name 'HANDLE'
|
||||
HANDLE BBQueueHandle;
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:75:21: error: unknown type name 'HANDLE'
|
||||
SyncInfoLin(HANDLE Handle, uint64_t Fence) {}
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:115:9: error: unknown type name 'GMM_DEVICE_CALLBACKS'
|
||||
GMM_DEVICE_CALLBACKS DeviceCb; //OS-specific defn: Will be used by Clients to send as input arguments for TR-TT APIs
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:116:9: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GMM_DEVICE_CALLBACKS_INT DeviceCbInt; //OS-specific defn: Will be used internally GMM lib
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:117:9: error: unknown type name 'GMM_TRANSLATIONTABLE_CALLBACKS'
|
||||
GMM_TRANSLATIONTABLE_CALLBACKS TTCb; //OS-specific defn
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:118:9: error: unknown type name 'HANDLE'
|
||||
HANDLE hCsr; // OCL per-device command stream receiver handle for aubcapture
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:121:25: error: unknown type name 'GMM_DEVICE_CALLBACKS_INT'
|
||||
GmmPageTableMgr(GMM_DEVICE_CALLBACKS_INT *, uint32_t TTFlags, GmmClientContext *pClientContextIn); // Allocates memory for indicate TT’s root-tables, initializes common node-pool
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:128:60: error: unknown type name 'HANDLE'
|
||||
GMM_VIRTUAL GMM_STATUS InitContextAuxTableRegister(HANDLE initialBBHandle, GMM_ENGINE_TYPE engType); //Clients call it to update Aux-Table pointer in context-image, engType reqd. if @ context level
|
||||
^
|
||||
Source/GmmLib/inc/External/Common/GmmPageTableMgr.h:133:46: error: unknown type name 'GMM_UMD_SYNCCONTEXT'; did you mean 'GMM_UMD_CONTEXT'?
|
||||
GMM_VIRTUAL void __ReleaseUnusedPool(GMM_UMD_SYNCCONTEXT *UmdContext);
|
||||
^~~~~~~~~~~~~~~~~~~
|
||||
GMM_UMD_CONTEXT
|
||||
Source/GmmLib/inc/External/Common/GmmInfo.h:58:3: note: 'GMM_UMD_CONTEXT' declared here
|
||||
} GMM_UMD_CONTEXT;
|
||||
^
|
||||
|
||||
--- Source/GmmLib/CachePolicy/GmmGen8CachePolicy.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/CachePolicy/GmmGen8CachePolicy.h
|
||||
@@ -143,7 +143,7 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_REF_EN
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE , 1 , 1 , 1 , 0 , 1);
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE_DST , 1 , 1 , 0 , 0 , 1);
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_ME_DISTORTION_ENCODE , 1 , 1 , 1 , 0 , 1);
|
||||
-#if defined(__linux__) && !defined(ANDROID)
|
||||
+#if !defined(_WIN32) && !defined(ANDROID)
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE , 1 , 1 , 0 , 0 , 1);
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_BRC_ME_DISTORTION_ENCODE , 1 , 1 , 0 , 0 , 1);
|
||||
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PAK_OBJECT_ENCODE , 1 , 1 , 0 , 0 , 1);
|
||||
--- Source/GmmLib/Resource/Linux/GmmResourceInfoLinCWrapper.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/Resource/Linux/GmmResourceInfoLinCWrapper.cpp
|
||||
@@ -22,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include "Internal/Common/GmmLibInc.h"
|
||||
|
||||
-#if defined(__linux__) && !LHDM
|
||||
+#if !defined(_WIN32) && !LHDM
|
||||
#include "Internal/Linux/GmmResourceInfoLinInt.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -176,4 +176,4 @@ GMM_TRANSLATIONTABLE_CALLBACKS DummyTTCB = {
|
||||
.pfWriteL3Adr = DummyWriteL3Adr,
|
||||
};
|
||||
|
||||
-#endif /*__linux__*/
|
||||
+#endif /*!_WIN32*/
|
||||
--- Source/GmmLib/Texture/GmmTextureAlloc.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/Texture/GmmTextureAlloc.cpp
|
||||
@@ -762,7 +762,7 @@ GMM_STATUS GmmLib::GmmTextureCalc::FillTexPitchAndSize
|
||||
}
|
||||
else
|
||||
{
|
||||
-#if defined(__GMM_KMD__) || defined(__linux__)
|
||||
+#if defined(__GMM_KMD__) || !defined(_WIN32)
|
||||
GMM_ASSERTDPF(0, "Surface too large!");
|
||||
#endif
|
||||
Status = GMM_ERROR;
|
||||
--- Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp
|
||||
@@ -28,7 +28,7 @@ Description: UMD-TT manager (manages both TR-TT and AU
|
||||
#include "../TranslationTable/GmmUmdTranslationTable.h"
|
||||
#include "External/Common/GmmClientContext.h"
|
||||
|
||||
-#if defined(__linux__)
|
||||
+#if !defined(_WIN32)
|
||||
#include "Internal/Linux/GmmResourceInfoLinInt.h"
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ Description: UMD-TT manager (manages both TR-TT and AU
|
||||
LeaveCriticalSection(&PoolLock); \
|
||||
}
|
||||
|
||||
-#if defined(__linux__)
|
||||
+#if !defined(_WIN32)
|
||||
GMM_STATUS GmmLib::__GmmDeviceAlloc(GmmClientContext * pClientContext,
|
||||
GMM_DEVICE_CALLBACKS_INT *pDeviceCbInt,
|
||||
GMM_DEVICE_ALLOC * pAlloc)
|
||||
@@ -606,7 +606,7 @@ GMM_STATUS GmmLib::GmmPageTableMgr::UpdateAuxTable(con
|
||||
return GMM_SUCCESS;
|
||||
}
|
||||
|
||||
-#if defined(__linux__) && !_WIN32
|
||||
+#if !defined(_WIN32)
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Gets size of PageTable buffer object (BOs) list
|
||||
///
|
||||
--- Source/GmmLib/TranslationTable/GmmUmdTranslationTable.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/TranslationTable/GmmUmdTranslationTable.cpp
|
||||
@@ -31,7 +31,7 @@ Description: Contains functions of internal classes
|
||||
|
||||
#if !defined(__GMM_KMD)
|
||||
|
||||
-#if defined(__linux__)
|
||||
+#if !defined(_WIN32)
|
||||
#include "Internal/Linux/GmmResourceInfoLinInt.h"
|
||||
|
||||
#define _aligned_free(ptr) free(ptr)
|
||||
--- Source/GmmLib/TranslationTable/GmmUmdTranslationTable.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/TranslationTable/GmmUmdTranslationTable.h
|
||||
@@ -27,7 +27,7 @@ Description: This file contains the class definitions
|
||||
#pragma once
|
||||
#include "External/Common/GmmPageTableMgr.h"
|
||||
|
||||
-#ifdef __linux__
|
||||
+#ifndef _WIN32
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -433,7 +433,7 @@ namespace GmmLib
|
||||
public:
|
||||
#ifdef _WIN32
|
||||
CRITICAL_SECTION TTLock; //synchronized access of PageTable obj
|
||||
-#elif defined __linux__
|
||||
+#else
|
||||
pthread_mutex_t TTLock;
|
||||
#endif
|
||||
|
||||
--- Source/GmmLib/ULT/GmmAuxTableULT.cpp.orig 2019-10-15 14:02:10 UTC
|
||||
+++ Source/GmmLib/ULT/GmmAuxTableULT.cpp
|
||||
@@ -20,7 +20,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
============================================================================*/
|
||||
|
||||
-#if defined (__linux__) && !defined(__i386__)
|
||||
+#if !defined (_WIN32) && !defined(__i386__)
|
||||
|
||||
#include "GmmAuxTableULT.h"
|
||||
|
||||
@@ -262,4 +262,4 @@ TEST_F(CTestAuxTable, TestAuxTableContent)
|
||||
pGmmULTClientContext->DestroyPageTblMgrObject(mgr);
|
||||
}
|
||||
|
||||
-#endif /* __linux__ */
|
||||
+#endif /* !_WIN32 */
|
||||
--- Source/GmmLib/ULT/GmmAuxTableULT.h.orig 2019-10-17 00:14:58 UTC
|
||||
+++ Source/GmmLib/ULT/GmmAuxTableULT.h
|
||||
@@ -22,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
-#if defined (__linux__) && !defined(__i386__)
|
||||
+#if !defined (_WIN32) && !defined(__i386__)
|
||||
|
||||
#ifndef _ISOC11_SOURCE
|
||||
#define _ISOC11_SOURCE 1
|
||||
@@ -249,4 +249,4 @@ class CTestAuxTable : public CTestGen10Resource (publi
|
||||
};
|
||||
};
|
||||
|
||||
-#endif /* __linux__ */
|
||||
+#endif /* !_WIN32 */
|
||||
--- Source/GmmLib/Utility/GmmLog/GmmLog.cpp.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/Utility/GmmLog/GmmLog.cpp
|
||||
@@ -183,12 +183,9 @@ bool GmmLib::Logger::GmmLogInit()
|
||||
#elif defined(__ANDROID__)
|
||||
// Log to logcat
|
||||
SpdLogger = spdlog::android_logger(GMM_LOGGER_NAME, GMM_LOG_TAG);
|
||||
-#elif defined(__linux__)
|
||||
+#else
|
||||
// Log to syslog
|
||||
SpdLogger = spdlog::syslog_logger(GMM_LOGGER_NAME, GMM_LOG_TAG, 1 /*Log Pid*/);
|
||||
-#else
|
||||
- __GMM_ASSERT(0);
|
||||
- return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
--- Source/GmmLib/Utility/GmmLog/spdlog/tweakme.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/Utility/GmmLog/spdlog/tweakme.h
|
||||
@@ -97,7 +97,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Uncomment to enable syslog (disabled by default)
|
||||
//
|
||||
-#if __linux__
|
||||
+#ifndef _WIN32
|
||||
#define SPDLOG_ENABLE_SYSLOG
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
--- Source/GmmLib/inc/External/Common/GmmCommonExt.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/inc/External/Common/GmmCommonExt.h
|
||||
@@ -72,7 +72,7 @@ extern const SWIZZLE_DESCRIPTOR INTEL_64KB_UNDEFINED_6
|
||||
#define GMM_NO_FENCE_REG 0xDEADBEEF
|
||||
#define GMM_MAX_DISPLAYS 3
|
||||
|
||||
-#if defined __linux__
|
||||
+#ifndef _WIN32
|
||||
typedef void* HANDLE;
|
||||
#endif
|
||||
|
||||
--- Source/GmmLib/inc/External/Common/GmmPageTableMgr.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/inc/External/Common/GmmPageTableMgr.h
|
||||
@@ -28,7 +28,7 @@ Description: This file contains the class definitions
|
||||
#pragma once
|
||||
#include "GmmHw.h"
|
||||
|
||||
-#ifdef __linux__
|
||||
+#ifndef _WIN32
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace GmmLib
|
||||
GmmClientContext *pClientContext; ///< ClientContext of the client creating this Object
|
||||
|
||||
//OS-specific defn
|
||||
-#if defined __linux__
|
||||
+#ifndef _WIN32
|
||||
pthread_mutex_t PoolLock;
|
||||
#endif
|
||||
public:
|
||||
@@ -134,7 +134,7 @@ namespace GmmLib
|
||||
GMM_VIRTUAL GMM_PAGETABLEPool * __GetFreePoolNode(uint32_t * FreePoolNodeIdx, POOL_TYPE PoolType);
|
||||
|
||||
|
||||
-#if defined __linux__
|
||||
+#ifndef _WIN32
|
||||
//returns number of BOs for indicated TTs = NumNodePoolElements+1 BOs for root table and pools
|
||||
GMM_VIRTUAL int GetNumOfPageTableBOs(uint8_t TTFlags);
|
||||
//returns BO* list for indicated TT in client allocated memory
|
||||
--- Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h
|
||||
@@ -181,7 +181,7 @@ typedef struct GMM_RESOURCE_ALIGNMENT_REC
|
||||
// TBD - Place holder for GMM_RESOURCE_FLAG definition.
|
||||
//---------------------------------------------------------------------------
|
||||
#include "GmmResourceFlags.h"
|
||||
-#if defined __linux__
|
||||
+#ifndef _WIN32
|
||||
#include "External/Linux/GmmResourceInfoLinExt.h"
|
||||
#endif
|
||||
|
||||
--- Source/GmmLib/inc/External/Linux/GmmResourceInfoLinExt.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/inc/External/Linux/GmmResourceInfoLinExt.h
|
||||
@@ -21,7 +21,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
============================================================================*/
|
||||
#pragma once
|
||||
|
||||
-#ifdef __linux__
|
||||
+#ifndef _WIN32
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -93,4 +93,4 @@ typedef struct GMM_UMD_SYNCCONTEXT_REC
|
||||
}
|
||||
#endif /*__cplusplus*/
|
||||
|
||||
-#endif /*__linux__*/
|
||||
+#endif /*!_WIN32*/
|
||||
--- Source/GmmLib/inc/Internal/Linux/GmmResourceInfoLinInt.h.orig 2019-09-16 10:30:27 UTC
|
||||
+++ Source/GmmLib/inc/Internal/Linux/GmmResourceInfoLinInt.h
|
||||
@@ -22,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
-#if defined(__linux__) && !LHDM
|
||||
+#if !defined(_WIN32) && !LHDM
|
||||
|
||||
// GMM Lib Client Exports
|
||||
#include "External/Common/GmmCommonExt.h"
|
||||
@@ -68,4 +68,4 @@ int GmmCheckForNullDevCbPfn(GMM_CLIENT ClientType, GMM
|
||||
|
||||
extern GMM_TRANSLATIONTABLE_CALLBACKS DummyTTCB;
|
||||
|
||||
-#endif /*__linux__*/
|
||||
+#endif /*!_WIN32*/
|
Loading…
Reference in New Issue
Block a user