Files
compute-runtime/shared/source/gmm_helper/gmm.h
Jobczyk, Lukasz 1d44699adb Enable hw path in the memory manager multi device test
Resolves: NEO-4136

Change-Id: I95b1de2804b61516bda9d6eb76d30ea9752d0771
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-03-14 21:53:02 +01:00

61 lines
1.9 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/gmm_helper/gmm_lib.h"
#include "storage_info.h"
#include <cstdint>
#include <cstdlib>
#include <memory>
namespace NEO {
enum class ImagePlane;
struct HardwareInfo;
struct ImageInfo;
class GmmResourceInfo;
class GmmClientContext;
class Gmm {
public:
virtual ~Gmm();
Gmm() = delete;
Gmm(GmmClientContext *clientContext, ImageInfo &inputOutputImgInfo, StorageInfo storageInfo);
Gmm(GmmClientContext *clientContext, const void *alignedPtr, size_t alignedSize, bool uncacheable);
Gmm(GmmClientContext *clientContext, const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, StorageInfo storageInfo);
Gmm(GmmClientContext *clientContext, GMM_RESOURCE_INFO *inputGmm);
void queryImageParams(ImageInfo &inputOutputImgInfo);
void applyAuxFlagsForBuffer(bool preferRenderCompression);
void applyMemoryFlags(bool systemMemoryPool, StorageInfo &storageInfo);
bool unifiedAuxTranslationCapable() const;
bool hasMultisampleControlSurface() const;
uint32_t queryQPitch(GMM_RESOURCE_TYPE resType);
void updateImgInfoAndDesc(ImageInfo &imgInfo, uint32_t arrayIndex);
void updateOffsetsInImgInfo(ImageInfo &imgInfo, uint32_t arrayIndex);
uint8_t resourceCopyBlt(void *sys, void *gpu, uint32_t pitch, uint32_t height, unsigned char upload, ImagePlane plane);
uint32_t getUnifiedAuxPitchTiles();
uint32_t getAuxQPitch();
GMM_RESCREATE_PARAMS resourceParams = {};
std::unique_ptr<GmmResourceInfo> gmmResourceInfo;
bool isRenderCompressed = false;
bool useSystemMemoryPool = true;
protected:
void applyAuxFlagsForImage(ImageInfo &imgInfo);
void setupImageResourceParams(ImageInfo &imgInfo);
GmmClientContext *clientContext = nullptr;
};
} // namespace NEO