mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:00:01 +08:00
Force linear storage for images
Related-To: NEO-3114 Change-Id: I20dd6c7fdf4a223d45f1c3587d8a1327268742d8 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
@@ -180,7 +180,7 @@ Image *Image::create(Context *context,
|
||||
|
||||
auto hostPtrRowPitch = imageDesc->image_row_pitch ? imageDesc->image_row_pitch : imageWidth * surfaceFormat->ImageElementSizeInBytes;
|
||||
auto hostPtrSlicePitch = imageDesc->image_slice_pitch ? imageDesc->image_slice_pitch : hostPtrRowPitch * imageHeight;
|
||||
auto isTilingAllowed = context->isSharedContext ? false : GmmHelper::allowTiling(*imageDesc);
|
||||
auto isTilingAllowed = context->isSharedContext ? false : GmmHelper::allowTiling(*imageDesc) && !MemObjHelper::isLinearStorageForced(flags);
|
||||
imgInfo.preferRenderCompression = MemObjHelper::isSuitableForRenderCompression(isTilingAllowed, flags,
|
||||
context->peekContextType(), true);
|
||||
|
||||
|
||||
@@ -127,6 +127,11 @@ class MemObjHelper {
|
||||
return svmProperties;
|
||||
}
|
||||
|
||||
static bool isLinearStorageForced(const MemoryProperties &memoryProperties) {
|
||||
return isValueSet(memoryProperties.flags, CL_MEM_FORCE_LINEAR_STORAGE_INTEL) ||
|
||||
isValueSet(memoryProperties.flags_intel, CL_MEM_FORCE_LINEAR_STORAGE_INTEL);
|
||||
}
|
||||
|
||||
static bool isSuitableForRenderCompression(bool renderCompressed, const MemoryProperties &properties, ContextType contextType, bool preferCompression);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user