2018-01-16 13:08:14 +01:00
|
|
|
/*
|
2019-02-28 12:23:13 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-01-16 13:08:14 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-01-16 13:08:14 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-11-29 15:41:47 +01:00
|
|
|
#include "core/helpers/hw_info.h"
|
2018-06-21 11:36:47 +02:00
|
|
|
#include "runtime/gmm_helper/gmm.h"
|
2018-08-27 16:30:40 +02:00
|
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
2018-07-22 19:27:33 +02:00
|
|
|
#include "runtime/gmm_helper/resource_info.h"
|
2018-01-16 13:08:14 +01:00
|
|
|
#include "runtime/helpers/surface_formats.h"
|
|
|
|
|
|
2018-08-27 16:30:40 +02:00
|
|
|
#include "GL/gl.h"
|
|
|
|
|
#include "GL/glext.h"
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
using namespace NEO;
|
|
|
|
|
namespace NEO {
|
2018-08-27 16:30:40 +02:00
|
|
|
GMM_CUBE_FACE_ENUM GmmHelper::getCubeFaceIndex(uint32_t target) {
|
|
|
|
|
switch (target) {
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
|
|
|
|
|
return __GMM_CUBE_FACE_NEG_X;
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
|
|
|
|
|
return __GMM_CUBE_FACE_POS_X;
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
|
|
|
|
|
return __GMM_CUBE_FACE_NEG_Y;
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
|
|
|
|
|
return __GMM_CUBE_FACE_POS_Y;
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
|
|
|
|
|
return __GMM_CUBE_FACE_NEG_Z;
|
|
|
|
|
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
|
|
|
|
|
return __GMM_CUBE_FACE_POS_Z;
|
|
|
|
|
}
|
|
|
|
|
return __GMM_NO_CUBE_MAP;
|
|
|
|
|
}
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|
2018-06-29 11:48:19 +02:00
|
|
|
|
|
|
|
|
void Gmm::applyAuxFlagsForImage(ImageInfo &imgInfo) {}
|
|
|
|
|
void Gmm::applyAuxFlagsForBuffer(bool preferRenderCompression) {}
|
2018-08-02 18:24:59 +02:00
|
|
|
|
2019-02-28 16:12:23 +01:00
|
|
|
void Gmm::applyMemoryFlags(bool systemMemoryPool, StorageInfo &storageInfo) { this->useSystemMemoryPool = systemMemoryPool; }
|