Skip to content

Commit a82c3d5

Browse files
committed
Relax Linux checks for the code works on any non-Windows platform
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; ^
1 parent a348e40 commit a82c3d5

File tree

18 files changed

+28
-31
lines changed

18 files changed

+28
-31
lines changed

Source/Common/AssertTracer/AssertTracer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void __stdcall ReportAssertETW( const unsigned short compId,
180180
#endif
181181
}
182182

183-
#elif defined( __linux__ ) && defined( _RELEASE_INTERNAL ) && !defined( __ANDROID__ )
183+
#elif defined( _RELEASE_INTERNAL ) && !defined( _WIN32 ) && !defined( __ANDROID__ )
184184
#include <algorithm>
185185
#include <syslog.h>
186186
#include <execinfo.h>

Source/Common/AssertTracer/AssertTracer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void __stdcall ReportAssertETW(const unsigned short compId,
9191
}
9292
#endif
9393

94-
#elif defined( __linux__ ) && defined( _RELEASE_INTERNAL ) && !defined( __ANDROID__ )
94+
#elif defined( _RELEASE_INTERNAL ) && !defined( _WIN32 ) && !defined( __ANDROID__ )
9595
// do while() is missing ";" at the end and this is intentional
9696
// As invoking assert looks like this: assert(expr); So semicolon will
9797
// be stuck to do.. while() and that way sorting out possible

Source/GmmLib/CachePolicy/GmmGen8CachePolicy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_REF_ENCODE
143143
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE , 1 , 1 , 1 , 0 , 1);
144144
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE_DST , 1 , 1 , 0 , 0 , 1);
145145
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_ME_DISTORTION_ENCODE , 1 , 1 , 1 , 0 , 1);
146-
#if defined(__linux__) && !defined(ANDROID)
146+
#if !defined(_WIN32) && !defined(ANDROID)
147147
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE , 1 , 1 , 0 , 0 , 1);
148148
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_SURFACE_BRC_ME_DISTORTION_ENCODE , 1 , 1 , 0 , 0 , 1);
149149
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PAK_OBJECT_ENCODE , 1 , 1 , 0 , 0 , 1);

Source/GmmLib/Resource/Linux/GmmResourceInfoLinCWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
2222

2323
#include "Internal/Common/GmmLibInc.h"
2424

25-
#if defined(__linux__) && !LHDM
25+
#if !defined(_WIN32) && !LHDM
2626
#include "Internal/Linux/GmmResourceInfoLinInt.h"
2727

2828
/////////////////////////////////////////////////////////////////////////////////////
@@ -176,4 +176,4 @@ GMM_TRANSLATIONTABLE_CALLBACKS DummyTTCB = {
176176
.pfWriteL3Adr = DummyWriteL3Adr,
177177
};
178178

179-
#endif /*__linux__*/
179+
#endif /*!_WIN32*/

Source/GmmLib/Texture/GmmTextureAlloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ GMM_STATUS GmmLib::GmmTextureCalc::FillTexPitchAndSize(GMM_TEXTURE_INFO * pTexIn
762762
}
763763
else
764764
{
765-
#if defined(__GMM_KMD__) || defined(__linux__)
765+
#if defined(__GMM_KMD__) || !defined(_WIN32)
766766
GMM_ASSERTDPF(0, "Surface too large!");
767767
#endif
768768
Status = GMM_ERROR;

Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Description: UMD-TT manager (manages both TR-TT and AUX-TT in user mode space)
2828
#include "../TranslationTable/GmmUmdTranslationTable.h"
2929
#include "External/Common/GmmClientContext.h"
3030

31-
#if defined(__linux__)
31+
#if !defined(_WIN32)
3232
#include "Internal/Linux/GmmResourceInfoLinInt.h"
3333
#endif
3434

@@ -44,7 +44,7 @@ Description: UMD-TT manager (manages both TR-TT and AUX-TT in user mode space)
4444
LeaveCriticalSection(&PoolLock); \
4545
}
4646

47-
#if defined(__linux__)
47+
#if !defined(_WIN32)
4848
GMM_STATUS GmmLib::__GmmDeviceAlloc(GmmClientContext * pClientContext,
4949
GMM_DEVICE_CALLBACKS_INT *pDeviceCbInt,
5050
GMM_DEVICE_ALLOC * pAlloc)
@@ -606,7 +606,7 @@ GMM_STATUS GmmLib::GmmPageTableMgr::UpdateAuxTable(const GMM_DDI_UPDATEAUXTABLE
606606
return GMM_SUCCESS;
607607
}
608608

609-
#if defined(__linux__) && !_WIN32
609+
#if !defined(_WIN32)
610610
/////////////////////////////////////////////////////////////////////////////////////
611611
/// Gets size of PageTable buffer object (BOs) list
612612
///

Source/GmmLib/TranslationTable/GmmUmdTranslationTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Description: Contains functions of internal classes
3131

3232
#if !defined(__GMM_KMD)
3333

34-
#if defined(__linux__)
34+
#if !defined(_WIN32)
3535
#include "Internal/Linux/GmmResourceInfoLinInt.h"
3636

3737
#define _aligned_free(ptr) free(ptr)

Source/GmmLib/TranslationTable/GmmUmdTranslationTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Description: This file contains the class definitions for GmmPageTablePool
2727
#pragma once
2828
#include "External/Common/GmmPageTableMgr.h"
2929

30-
#ifdef __linux__
30+
#ifndef _WIN32
3131
#include <pthread.h>
3232
#include <string.h>
3333

@@ -445,7 +445,7 @@ namespace GmmLib
445445
public:
446446
#ifdef _WIN32
447447
CRITICAL_SECTION TTLock; //synchronized access of PageTable obj
448-
#elif defined __linux__
448+
#else
449449
pthread_mutex_t TTLock;
450450
#endif
451451

Source/GmmLib/ULT/GmmAuxTableULT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
OTHER DEALINGS IN THE SOFTWARE.
2121
============================================================================*/
2222

23-
#if defined (__linux__) && !defined(__i386__)
23+
#if !defined (_WIN32) && !defined(__i386__)
2424

2525
#include "GmmAuxTableULT.h"
2626

@@ -262,4 +262,4 @@ TEST_F(CTestAuxTable, TestAuxTableContent)
262262
pGmmULTClientContext->DestroyPageTblMgrObject(mgr);
263263
}
264264

265-
#endif /* __linux__ */
265+
#endif /* !_WIN32 */

Source/GmmLib/ULT/GmmAuxTableULT.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
2222

2323
#pragma once
2424

25-
#if defined (__linux__) && !defined(__i386__)
25+
#if !defined (_WIN32) && !defined(__i386__)
2626

2727
#ifndef _ISOC11_SOURCE
2828
#define _ISOC11_SOURCE 1
@@ -248,4 +248,4 @@ class CTestAuxTable : public CTestGen10Resource
248248
};
249249
};
250250

251-
#endif /* __linux__ */
251+
#endif /* !_WIN32 */

0 commit comments

Comments
 (0)