remove platform dependecy from gmm

Change-Id: Id9bf00b3833267e76939a3ce3c595210e87b3663
This commit is contained in:
kamdiedrich
2020-01-09 08:28:08 +01:00
committed by sys_ocldev
parent fd4e5722b3
commit 814cfc921d
3 changed files with 9 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
#include "runtime/gmm_helper/gmm.h"
#include "core/gmm_helper/client_context/gmm_client_context.h"
#include "core/gmm_helper/gmm_helper.h"
#include "core/gmm_helper/resource_info.h"
#include "core/helpers/aligned_memory.h"
@@ -15,7 +16,6 @@
#include "core/helpers/hw_info.h"
#include "core/helpers/ptr_math.h"
#include "runtime/helpers/surface_formats.h"
#include "runtime/platform/platform.h"
namespace NEO {
Gmm::Gmm(GmmClientContext *clientContext, const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(clientContext, alignedPtr, alignedSize, uncacheable, false, true, {}) {}
@@ -100,7 +100,7 @@ void Gmm::setupImageResourceParams(ImageInfo &imgInfo) {
resourceParams.Flags.Info.Linear = imgInfo.linearStorage;
auto &hwHelper = HwHelper::get(platform()->peekGmmHelper()->getHardwareInfo()->platform.eRenderCoreFamily);
auto &hwHelper = HwHelper::get(clientContext->getHardwareInfo()->platform.eRenderCoreFamily);
resourceParams.NoGfxMemory = 1; // dont allocate, only query for params
@@ -177,7 +177,7 @@ void Gmm::queryImageParams(ImageInfo &imgInfo) {
}
uint32_t Gmm::queryQPitch(GMM_RESOURCE_TYPE resType) {
if (platform()->peekGmmHelper()->getHardwareInfo()->platform.eRenderCoreFamily == IGFX_GEN8_CORE && resType == GMM_RESOURCE_TYPE::RESOURCE_3D) {
if (clientContext->getHardwareInfo()->platform.eRenderCoreFamily == IGFX_GEN8_CORE && resType == GMM_RESOURCE_TYPE::RESOURCE_3D) {
return 0;
}
return gmmResourceInfo->getQPitch();