Skip to content

Commit

Permalink
Adding GMM interface for unified cp surface tracking
Browse files Browse the repository at this point in the history
Bump up Major Version as new interface is added

Change-Id: I49081391db15652d37a1c055510407b830d0777c
Signed-off-by: drprajap <dimpalben.r.prajapati@intel.com>
  • Loading branch information
drprajap committed Oct 18, 2018
1 parent 6b14fa1 commit 3e602a8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/GmmLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ cmake_minimum_required(VERSION 3.5)
project(igfx_gmmumd)

# GmmLib Api Version used for so naming
set(GMMLIB_API_MAJOR_VERSION 2)
set(GMMLIB_API_MAJOR_VERSION 3)
set(GMMLIB_API_MINOR_VERSION 0)

if(NOT DEFINED MAJOR_VERSION)
set(MAJOR_VERSION 2)
set(MAJOR_VERSION 3)
endif()

if(NOT DEFINED MINOR_VERSION)
Expand Down
1 change: 1 addition & 0 deletions Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
Surf.MSAA.NumSamples = GFX_MAX(Surf.MSAA.NumSamples, 1);
Surf.MaximumRenamingListLength = CreateParams.MaximumRenamingListLength;
Surf.OverridePitch = CreateParams.OverridePitch;
Surf.CpTag = CreateParams.CpTag;

Surf.Flags.Info.__PreWddm2SVM =
Surf.Flags.Info.SVM &&
Expand Down
4 changes: 2 additions & 2 deletions Source/GmmLib/inc/External/Common/GmmLibDllName.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
#if defined(_WIN64)
#define GMM_UMD_DLL "igdgmm64.dll"
#else
#define GMM_UMD_DLL "libigdgmm.so.2"
#define GMM_UMD_DLL "libigdgmm.so.3"
#endif
#else
#define GMM_ENTRY_NAME "_OpenGmm@4"
Expand All @@ -40,6 +40,6 @@ OTHER DEALINGS IN THE SOFTWARE.
#if defined(_WIN32)
#define GMM_UMD_DLL "igdgmm32.dll"
#else
#define GMM_UMD_DLL "libigdgmm.so.2"
#define GMM_UMD_DLL "libigdgmm.so.3"
#endif
#endif
16 changes: 16 additions & 0 deletions Source/GmmLib/inc/External/Common/GmmResourceInfoCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,22 @@ namespace GmmLib
return IsEncrypted;
}

/////////////////////////////////////////////////////////////////////////
/// This function returns or sets the value of the Cp surface tag
/// associated with the given GMM resource within same process.
/// @param[in] IsSet: true for updating tag in gmm
/// @param[in] CpTag: Cp surface tag value
/// @return current cp surface tag in gmm
/////////////////////////////////////////////////////////////////////////
GMM_INLINE_VIRTUAL GMM_INLINE uint32_t GMM_STDCALL GetSetCpSurfTag(uint8_t IsSet, uint32_t CpTag)
{
if (IsSet)
{
Surf.CpTag = CpTag;
}
return Surf.CpTag;
}

/////////////////////////////////////////////////////////////////////////
/// Returns the size of the surface in StdLayout format
/// @return Size in bytes of Standard Layout version of surface.
Expand Down
1 change: 1 addition & 0 deletions Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ typedef struct GMM_RESCREATE_PARAMS_REC
GMM_RESOURCE_MSAA_INFO MSAA; // How to sample this resource for anti-alisaing.

GMM_RESOURCE_USAGE_TYPE Usage; // Intended use for this resource. See enumerated type.
uint32_t CpTag;

union
{
Expand Down
1 change: 1 addition & 0 deletions Source/GmmLib/inc/External/Common/GmmTextureExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ typedef struct GMM_TEXTURE_INFO_REC
uint32_t Depth;
uint32_t MaxLod;
uint32_t ArraySize;
uint32_t CpTag;

struct{
GMM_RESOURCE_USAGE_TYPE Usage;
Expand Down

0 comments on commit 3e602a8

Please sign in to comment.