Cleanup includes 2/n

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-07-26 04:58:51 +00:00
committed by Compute-Runtime-Automation
parent 7434a7503a
commit 5a3746df76
7 changed files with 19 additions and 14 deletions

View File

@@ -18,10 +18,11 @@
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/surface_format_info.h"
#include "shared/source/memory_manager/allocation_type.h"
#include "shared/source/memory_manager/definitions/storage_info.h"
namespace NEO {
Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_t alignment, GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage,
bool preferCompressed, StorageInfo storageInfo, bool allowLargePages) : gmmHelper(gmmHelper) {
bool preferCompressed, const StorageInfo &storageInfo, bool allowLargePages) : gmmHelper(gmmHelper) {
resourceParams.Type = RESOURCE_BUFFER;
resourceParams.Format = GMM_FORMAT_GENERIC_8BIT;
resourceParams.BaseWidth64 = static_cast<uint64_t>(alignedSize);
@@ -69,7 +70,7 @@ Gmm::Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm, bool openingHandle)
Gmm::~Gmm() = default;
Gmm::Gmm(GmmHelper *gmmHelper, ImageInfo &inputOutputImgInfo, StorageInfo storageInfo, bool preferCompressed) : gmmHelper(gmmHelper) {
Gmm::Gmm(GmmHelper *gmmHelper, ImageInfo &inputOutputImgInfo, const StorageInfo &storageInfo, bool preferCompressed) : gmmHelper(gmmHelper) {
this->resourceParams = {};
setupImageResourceParams(inputOutputImgInfo, preferCompressed);
applyMemoryFlags(storageInfo);
@@ -333,7 +334,7 @@ uint32_t Gmm::getAuxQPitch() {
return this->gmmResourceInfo->getAuxQPitch();
}
void Gmm::applyMemoryFlags(StorageInfo &storageInfo) {
void Gmm::applyMemoryFlags(const StorageInfo &storageInfo) {
auto hardwareInfo = gmmHelper->getClientContext()->getHardwareInfo();
if (hardwareInfo->featureTable.flags.ftrLocalMemory) {

View File

@@ -7,7 +7,6 @@
#pragma once
#include "shared/source/gmm_helper/gmm_lib.h"
#include "shared/source/memory_manager/definitions/storage_info.h"
#include <cstdint>
#include <memory>
@@ -16,6 +15,7 @@ namespace NEO {
enum class ImagePlane;
struct HardwareInfo;
struct ImageInfo;
struct StorageInfo;
class GmmResourceInfo;
class GmmHelper;
@@ -23,17 +23,17 @@ class Gmm {
public:
virtual ~Gmm();
Gmm() = delete;
Gmm(GmmHelper *gmmHelper, ImageInfo &inputOutputImgInfo, StorageInfo storageInfo, bool preferCompressed);
Gmm(GmmHelper *gmmHelper, ImageInfo &inputOutputImgInfo, const StorageInfo &storageInfo, bool preferCompressed);
Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_t alignment,
GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage, bool preferCompressed, StorageInfo storageInfo, bool allowLargePages);
GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage, bool preferCompressed, const StorageInfo &storageInfo, bool allowLargePages);
Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm);
Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm, bool openingHandle);
void queryImageParams(ImageInfo &inputOutputImgInfo);
void applyAuxFlagsForBuffer(bool preferCompression);
void applyMemoryFlags(StorageInfo &storageInfo);
void applyAppResource(StorageInfo &storageInfo);
void applyMemoryFlags(const StorageInfo &storageInfo);
void applyAppResource(const StorageInfo &storageInfo);
bool unifiedAuxTranslationCapable() const;
bool hasMultisampleControlSurface() const;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,4 +12,4 @@ using namespace NEO;
void Gmm::applyExtraMemoryFlags(const StorageInfo &storageInfo) {}
bool Gmm::extraMemoryFlagsRequired() { return false; }
void Gmm::applyAppResource(StorageInfo &storageInfo) {}
void Gmm::applyAppResource(const StorageInfo &storageInfo) {}

View File

@@ -8,6 +8,7 @@
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/resource_info.h"
#include "shared/source/helpers/debug_helpers.h"
namespace NEO {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -8,6 +8,7 @@
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/page_table_mngr.h"
#include "shared/source/helpers/debug_helpers.h"
namespace NEO {
GmmPageTableMngr::GmmPageTableMngr(GmmClientContext *gmmClientContext, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb) : clientContext(gmmClientContext->getHandle()) {