Skip to content

Commit 3e602a8

Browse files
committed
Adding GMM interface for unified cp surface tracking
Bump up Major Version as new interface is added Change-Id: I49081391db15652d37a1c055510407b830d0777c Signed-off-by: drprajap <[email protected]>
1 parent 6b14fa1 commit 3e602a8

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

Source/GmmLib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ cmake_minimum_required(VERSION 3.5)
2424
project(igfx_gmmumd)
2525

2626
# GmmLib Api Version used for so naming
27-
set(GMMLIB_API_MAJOR_VERSION 2)
27+
set(GMMLIB_API_MAJOR_VERSION 3)
2828
set(GMMLIB_API_MINOR_VERSION 0)
2929

3030
if(NOT DEFINED MAJOR_VERSION)
31-
set(MAJOR_VERSION 2)
31+
set(MAJOR_VERSION 3)
3232
endif()
3333

3434
if(NOT DEFINED MINOR_VERSION)

Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
8585
Surf.MSAA.NumSamples = GFX_MAX(Surf.MSAA.NumSamples, 1);
8686
Surf.MaximumRenamingListLength = CreateParams.MaximumRenamingListLength;
8787
Surf.OverridePitch = CreateParams.OverridePitch;
88+
Surf.CpTag = CreateParams.CpTag;
8889

8990
Surf.Flags.Info.__PreWddm2SVM =
9091
Surf.Flags.Info.SVM &&

Source/GmmLib/inc/External/Common/GmmLibDllName.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
2929
#if defined(_WIN64)
3030
#define GMM_UMD_DLL "igdgmm64.dll"
3131
#else
32-
#define GMM_UMD_DLL "libigdgmm.so.2"
32+
#define GMM_UMD_DLL "libigdgmm.so.3"
3333
#endif
3434
#else
3535
#define GMM_ENTRY_NAME "_OpenGmm@4"
@@ -40,6 +40,6 @@ OTHER DEALINGS IN THE SOFTWARE.
4040
#if defined(_WIN32)
4141
#define GMM_UMD_DLL "igdgmm32.dll"
4242
#else
43-
#define GMM_UMD_DLL "libigdgmm.so.2"
43+
#define GMM_UMD_DLL "libigdgmm.so.3"
4444
#endif
4545
#endif

Source/GmmLib/inc/External/Common/GmmResourceInfoCommon.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,22 @@ namespace GmmLib
11321132
return IsEncrypted;
11331133
}
11341134

1135+
/////////////////////////////////////////////////////////////////////////
1136+
/// This function returns or sets the value of the Cp surface tag
1137+
/// associated with the given GMM resource within same process.
1138+
/// @param[in] IsSet: true for updating tag in gmm
1139+
/// @param[in] CpTag: Cp surface tag value
1140+
/// @return current cp surface tag in gmm
1141+
/////////////////////////////////////////////////////////////////////////
1142+
GMM_INLINE_VIRTUAL GMM_INLINE uint32_t GMM_STDCALL GetSetCpSurfTag(uint8_t IsSet, uint32_t CpTag)
1143+
{
1144+
if (IsSet)
1145+
{
1146+
Surf.CpTag = CpTag;
1147+
}
1148+
return Surf.CpTag;
1149+
}
1150+
11351151
/////////////////////////////////////////////////////////////////////////
11361152
/// Returns the size of the surface in StdLayout format
11371153
/// @return Size in bytes of Standard Layout version of surface.

Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ typedef struct GMM_RESCREATE_PARAMS_REC
235235
GMM_RESOURCE_MSAA_INFO MSAA; // How to sample this resource for anti-alisaing.
236236

237237
GMM_RESOURCE_USAGE_TYPE Usage; // Intended use for this resource. See enumerated type.
238+
uint32_t CpTag;
238239

239240
union
240241
{

Source/GmmLib/inc/External/Common/GmmTextureExt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ typedef struct GMM_TEXTURE_INFO_REC
136136
uint32_t Depth;
137137
uint32_t MaxLod;
138138
uint32_t ArraySize;
139+
uint32_t CpTag;
139140

140141
struct{
141142
GMM_RESOURCE_USAGE_TYPE Usage;

0 commit comments

Comments
 (0)