Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ cc_library_shared {
"-Wno-missing-braces",
"-Wno-unknown-pragmas",
"-Wno-parentheses",
"-Wno-pragma-pack",
"-fexceptions",
"-std=c++11",
"-fvisibility-inlines-hidden",
"-fno-use-cxa-atexit",
"-fno-rtti",
"-fcheck-new",
"-pthread",
"-Wpragma-pack-suspicious-include",
],

local_include_dirs: [
Expand Down
6 changes: 3 additions & 3 deletions Source/GmmLib/inc/External/Common/GmmResourceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ typedef struct GMM_EXISTING_SYS_MEM_REC
// Struct describing the attributes and properties of a user mode resource
//
//----------------------------------------------------------------------------
// Reset packing alignment to project default
#pragma pack(pop)

#ifndef _WIN32
#include "../Linux/GmmResourceInfoLin.h"
#endif

// Reset packing alignment to project default
#pragma pack(pop)

uint8_t GMM_STDCALL GmmResValidateParams(GMM_RESOURCE_INFO *pResourceInfo);
void GMM_STDCALL GmmResGetRestrictions(GMM_RESOURCE_INFO* pResourceInfo, __GMM_BUFFER_TYPE* pRestrictions);
uint8_t __CanSupportStdTiling(GMM_TEXTURE_INFO Surface, GMM_LIB_CONTEXT *pGmmLibContext);
Expand Down
6 changes: 3 additions & 3 deletions Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ typedef struct GmmLibContext GMM_LIB_CONTEXT;
// Place holder for GMM_RESOURCE_FLAG definition.
//---------------------------------------------------------------------------
#include "GmmResourceFlags.h"
#if defined __linux__
#include "External/Linux/GmmResourceInfoLinExt.h"
#endif

//==========================================================================
// typedef:
Expand Down Expand Up @@ -768,6 +765,9 @@ void GmmResMemcpyThroughClientCtxt(void *pDst, void *pSrc);
// Reset packing alignment to project default
#pragma pack(pop)

#if defined __linux__
#include "External/Linux/GmmResourceInfoLinExt.h"
#endif
#ifdef __cplusplus
}
#endif /*__cplusplus*/
7 changes: 7 additions & 0 deletions Source/GmmLib/inc/External/Linux/GmmResourceInfoLin.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ OTHER DEALINGS IN THE SOFTWARE.
#ifdef __cplusplus
#include "../Common/GmmResourceInfoCommon.h"

// Set packing alignment
#pragma pack(push, 8)

/////////////////////////////////////////////////////////////////////////////////////
/// @file GmmResourceInfoLin.h
/// @brief This file contains the functions and members of GmmResourceInfo that is
Expand Down Expand Up @@ -57,6 +60,10 @@ namespace GmmLib
typedef GmmResourceInfoLin GmmResourceInfo;

} // namespace GmmLib

// Reset packing alignment to project default
#pragma pack(pop)

#else
typedef struct GmmResourceInfo GmmResourceInfo;
#endif // #ifdef __cplusplus
6 changes: 6 additions & 0 deletions Source/GmmLib/inc/External/Linux/GmmResourceInfoLinExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ OTHER DEALINGS IN THE SOFTWARE.
extern "C" {
#endif /*__cplusplus*/

// Set packing alignment
#pragma pack(push, 8)

typedef struct {
int(*pfnAllocate)(void *bufMgr, size_t size, size_t alignment, void **bo, void **cpuAddr, uint64_t *gpuAddr);
void(*pfnDeallocate)(void *bo);
Expand Down Expand Up @@ -89,6 +92,9 @@ typedef struct GMM_UMD_SYNCCONTEXT_REC
uint64_t BBLastFence; // BatchBuffer Last Fence for TT
} GMM_UMD_SYNCCONTEXT;

// Reset packing alignment to project default
#pragma pack(pop)

#ifdef __cplusplus
}
#endif /*__cplusplus*/
Expand Down