Files
compute-runtime/runtime/gmm_helper/client_context/gmm_client_context_base.cpp
Maciej Dziuban 100f888b85 Enable setting additional params for gen12lp image compression
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Change-Id: I6228413938930f36c120523818649cde1a717cf2
Related-To: NEO-3564
2019-10-11 07:25:38 +02:00

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