Skip to content

Commit f7b5da5

Browse files
committed
Revert "Add new target to unify gmmlib"
This reverts commit d6c3b56. Change-Id: I55a7c86f0d9a834f546e497324c6d2d7f464ba87
1 parent ae8aa03 commit f7b5da5

14 files changed

+120
-1282
lines changed

Source/GmmLib/CMakeLists.txt

+1-8
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON)
7676
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
7777

7878
set (TARGET_LIST
79-
igfxgmmumd
80-
gmm_umd
79+
gmm_umd
8180
igfx_gmmumd_excite
8281
#igfx_gmmumd_ocl
8382
)
@@ -269,7 +268,6 @@ set(SOURCES_
269268
set(UMD_SOURCES
270269
${SOURCES_}
271270
${BS_DIR_GMMLIB}/GlobalInfo/GmmClientContext.cpp
272-
${BS_DIR_GMMLIB}/GlobalInfo/GmmOCL.cpp
273271
)
274272

275273
source_group("Source Files\\Cache Policy\\Client Files" FILES
@@ -475,11 +473,6 @@ endforeach()
475473
# GMM_OCL
476474
#)
477475

478-
bs_set_extra_target_properties(igfxgmmumd
479-
ISTDLIB_UMD
480-
UNUSED_ISTDLIB_MT
481-
)
482-
483476

484477
if(ARCH EQUAL 32)
485478
#bs_set_extra_target_properties(igfx_gmmumd_ocl UNUSED_ISTDLIB_MT)

Source/GmmLib/GlobalInfo/GmmClientContext.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -363,20 +363,20 @@ GMM_RESOURCE_INFO *GMM_STDCALL GmmLib::GmmClientContext::CreateResInfoObject(GMM
363363
// GMM_RESOURCE_INFO...
364364
if(pCreateParams->pPreallocatedResInfo)
365365
{
366-
pRes = new(pCreateParams->pPreallocatedResInfo) GmmLib::GmmResourceInfo(this); // Use preallocated memory as a class
366+
pRes = new(pCreateParams->pPreallocatedResInfo) GmmLib::GmmResourceInfo(); // Use preallocated memory as a class
367367
pCreateParams->Flags.Info.__PreallocatedResInfo =
368368
pRes->GetResFlags().Info.__PreallocatedResInfo = 1; // Set both in case we can die before copying over the flags.
369369
}
370370
else
371371
{
372-
if((pRes = new GMM_RESOURCE_INFO(this)) == NULL)
372+
if((pRes = new GMM_RESOURCE_INFO) == NULL)
373373
{
374374
GMM_ASSERTDPF(0, "Allocation failed!");
375375
goto ERROR_CASE;
376376
}
377377
}
378378

379-
if(pRes->Create(*pCreateParams) != GMM_SUCCESS)
379+
if(pRes->Create(*pGmmGlobalContext, *pCreateParams) != GMM_SUCCESS)
380380
{
381381
goto ERROR_CASE;
382382
}

Source/GmmLib/GlobalInfo/GmmInfo.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ GMM_STATUS GMM_STDCALL GmmInitGlobalContext(const PLATFORM Platform,
6969
GMM_CLIENT ClientType)
7070
#endif
7171
{
72-
GMM_STATUS Status = GMM_ERROR;
7372
__GMM_ASSERTPTR(pSkuTable, GMM_ERROR);
7473
__GMM_ASSERTPTR(pWaTable, GMM_ERROR);
7574
__GMM_ASSERTPTR(pGtSysInfo, GMM_ERROR);
@@ -94,13 +93,7 @@ GMM_STATUS GMM_STDCALL GmmInitGlobalContext(const PLATFORM Platform,
9493
return GMM_ERROR;
9594
}
9695

97-
Status = (pGmmGlobalContext->InitContext(Platform, skuTable, waTable, sysInfo, ClientType));
98-
99-
#ifdef GMM_OCL
100-
Status = GmmCreateGlobalOCLClientContext();
101-
#endif
102-
103-
return Status;
96+
return (pGmmGlobalContext->InitContext(Platform, skuTable, waTable, sysInfo, ClientType));
10497
}
10598

10699

@@ -114,9 +107,6 @@ void GMM_STDCALL GmmDestroyGlobalContext(void)
114107
int32_t ContextRefCount = GmmLib::Context::DecrementRefCount();
115108
if(!ContextRefCount && pGmmGlobalContext)
116109
{
117-
#ifdef GMM_OCL
118-
GmmDestroyGlobalOCLClientContext();
119-
#endif
120110
pGmmGlobalContext->DestroyContext();
121111
delete pGmmGlobalContext;
122112
pGmmGlobalContext = NULL;

0 commit comments

Comments
 (0)