mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Change-Id: I6228413938930f36c120523818649cde1a717cf2 Related-To: NEO-3564
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/gmm_helper/client_context/gmm_client_context_base.h"
|
|
|
|
namespace NEO {
|
|
GmmClientContextBase::GmmClientContextBase(GMM_CLIENT clientType, GmmExportEntries &gmmEntries) : gmmEntries(gmmEntries) {
|
|
clientContext = gmmEntries.pfnCreateClientContext(clientType);
|
|
}
|
|
GmmClientContextBase::~GmmClientContextBase() {
|
|
gmmEntries.pfnDeleteClientContext(clientContext);
|
|
};
|
|
|
|
MEMORY_OBJECT_CONTROL_STATE GmmClientContextBase::cachePolicyGetMemoryObject(GMM_RESOURCE_INFO *pResInfo, GMM_RESOURCE_USAGE_TYPE usage) {
|
|
return clientContext->CachePolicyGetMemoryObject(pResInfo, usage);
|
|
}
|
|
|
|
GMM_RESOURCE_INFO *GmmClientContextBase::createResInfoObject(GMM_RESCREATE_PARAMS *pCreateParams) {
|
|
return clientContext->CreateResInfoObject(pCreateParams);
|
|
}
|
|
|
|
GMM_RESOURCE_INFO *GmmClientContextBase::copyResInfoObject(GMM_RESOURCE_INFO *pSrcRes) {
|
|
return clientContext->CopyResInfoObject(pSrcRes);
|
|
}
|
|
|
|
void GmmClientContextBase::destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo) {
|
|
return clientContext->DestroyResInfoObject(pResInfo);
|
|
}
|
|
|
|
GMM_CLIENT_CONTEXT *GmmClientContextBase::getHandle() const {
|
|
return clientContext;
|
|
}
|
|
|
|
uint8_t GmmClientContextBase::getSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT format) {
|
|
return clientContext->GetSurfaceStateCompressionFormat(format);
|
|
}
|
|
|
|
uint8_t GmmClientContextBase::getMediaSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT format) {
|
|
return clientContext->GetMediaSurfaceStateCompressionFormat(format);
|
|
}
|
|
|
|
} // namespace NEO
|