Disable compression for multi root device mem objects

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-05-21 13:32:24 +00:00
committed by Compute-Runtime-Automation
parent 2cca41aeb2
commit 1673738dc7
2 changed files with 12 additions and 1 deletions

View File

@@ -1,10 +1,11 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/context/context.h"
#include "opencl/source/mem_obj/mem_obj_helper_common.inl"
#include "memory_properties_flags.h"
@@ -12,6 +13,9 @@
namespace NEO {
bool MemObjHelper::isSuitableForRenderCompression(bool renderCompressed, const MemoryProperties &properties, Context &context, bool preferCompression) {
if (context.getRootDeviceIndices().size() > 1u) {
return false;
}
return renderCompressed && preferCompression;
}