Refactor linear/tiled Images logic

Change-Id: I1deac70e95c6953645e9f52fb75f103b62927066
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-09-06 10:25:14 +02:00
committed by sys_ocldev
parent d4571d685a
commit 3e4dd67f09
14 changed files with 77 additions and 89 deletions

View File

@ -81,14 +81,6 @@ void GmmHelper::queryImgFromBufferParams(ImageInfo &imgInfo, GraphicsAllocation
imgInfo.qPitch = 0;
}
bool GmmHelper::allowTiling(const cl_image_desc &imageDesc) {
auto imageType = imageDesc.image_type;
auto buffer = castToObject<Buffer>(imageDesc.buffer);
return (!(DebugManager.flags.ForceLinearImages.get() || imageType == CL_MEM_OBJECT_IMAGE1D ||
imageType == CL_MEM_OBJECT_IMAGE1D_ARRAY || imageType == CL_MEM_OBJECT_IMAGE1D_BUFFER || buffer));
}
uint64_t GmmHelper::canonize(uint64_t address) {
return ((int64_t)((address & 0xFFFFFFFFFFFF) << (64 - 48))) >> (64 - 48);
}

View File

@ -46,7 +46,6 @@ class GmmHelper {
static void queryImgFromBufferParams(ImageInfo &imgInfo, GraphicsAllocation *gfxAlloc);
static GMM_CUBE_FACE_ENUM getCubeFaceIndex(uint32_t target);
static bool allowTiling(const cl_image_desc &imageDesc);
static uint32_t getRenderMultisamplesCount(uint32_t numSamples);
static GMM_YUV_PLANE convertPlane(OCLPlane oclPlane);