Add helper function to enable stateless compression

Related-To: NEO-5107

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-08-02 10:44:48 +00:00
committed by Compute-Runtime-Automation
parent d99f20d400
commit eb14d8458b
38 changed files with 133 additions and 76 deletions

View File

@@ -630,7 +630,7 @@ TEST_F(PerformanceHintTest, given64bitCompressedBufferWhenItsCreatedThenProperPe
Buffer::create(context.get(), MemoryPropertiesHelper::createMemoryProperties(0, 0, 0, &context->getDevice(0)->getDevice()),
0, 0, size, static_cast<void *>(NULL), retVal));
snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[BUFFER_IS_COMPRESSED], buffer.get());
auto compressionSupported = HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size) &&
auto compressionSupported = HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size, hwInfo) &&
HwHelper::renderCompressedBuffersSupported(hwInfo);
if (compressionSupported) {
EXPECT_TRUE(containsHint(expectedHint, userData));
@@ -659,7 +659,7 @@ TEST_F(PerformanceHintTest, givenUncompressedBufferWhenItsCreatedThenProperPerfo
isCompressed = MemObjHelper::isSuitableForRenderCompression(
HwHelper::renderCompressedBuffersSupported(hwInfo),
memoryProperties, *context,
HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size)) &&
HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size, hwInfo)) &&
!is32bit && !context->isSharedContext &&
(!memoryProperties.flags.useHostPtr || context->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex())) &&
!memoryProperties.flags.forceHostMemory;