mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add hwhelper function allowRenderCompressionForContext
Rename and unify compression related functions. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e096e5b0f8
commit
ed04053007
@@ -477,7 +477,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).obtainRenderBufferCompressionPreference(hwInfo, size) &&
|
||||
auto compressionSupported = HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size) &&
|
||||
HwHelper::renderCompressedBuffersSupported(hwInfo);
|
||||
if (compressionSupported) {
|
||||
EXPECT_TRUE(containsHint(expectedHint, userData));
|
||||
@@ -506,7 +506,7 @@ TEST_F(PerformanceHintTest, givenUncompressedBufferWhenItsCreatedThenProperPerfo
|
||||
isCompressed = MemObjHelper::isSuitableForRenderCompression(
|
||||
HwHelper::renderCompressedBuffersSupported(hwInfo),
|
||||
memoryProperties, *context,
|
||||
HwHelper::get(hwInfo.platform.eRenderCoreFamily).obtainRenderBufferCompressionPreference(hwInfo, size)) &&
|
||||
HwHelper::get(hwInfo.platform.eRenderCoreFamily).isBufferSizeSuitableForRenderCompression(size)) &&
|
||||
!is32bit && !context->isSharedContext &&
|
||||
(!memoryProperties.flags.useHostPtr || context->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex())) &&
|
||||
!memoryProperties.flags.forceHostMemory;
|
||||
|
||||
Reference in New Issue
Block a user