Helper method to check if allocation is compressed

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-12-01 18:11:27 +00:00
committed by Compute-Runtime-Automation
parent 7b55d38e34
commit 55959d4d1d
15 changed files with 32 additions and 94 deletions

View File

@@ -387,12 +387,10 @@ Image *Image::create(Context *context,
auto &hwInfo = *memoryManager->peekExecutionEnvironment().rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
if (context->isProvidingPerformanceHints() && HwHelper::renderCompressedImagesSupported(hwInfo)) {
if (allocationInfo[rootDeviceIndex].memory->getDefaultGmm()) {
if (allocationInfo[rootDeviceIndex].memory->getDefaultGmm()->isCompressionEnabled) {
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, IMAGE_IS_COMPRESSED, image);
} else {
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, IMAGE_IS_NOT_COMPRESSED, image);
}
if (allocationInfo[rootDeviceIndex].memory->isCompressionEnabled()) {
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, IMAGE_IS_COMPRESSED, image);
} else {
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, IMAGE_IS_NOT_COMPRESSED, image);
}
}