mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Helper method to check if allocation is compressed
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7b55d38e34
commit
55959d4d1d
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user