mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Pass context to isSuitableForRenderCompression method
Related-To: NEO-3691 Change-Id: I3417e647f4219451922a4dc905726366b4448890 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e1ff6603b2
commit
e0594d4716
@@ -149,8 +149,7 @@ Buffer *Buffer::create(Context *context,
|
||||
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
|
||||
GraphicsAllocation::AllocationType allocationType = getGraphicsAllocationType(
|
||||
memoryProperties,
|
||||
context->isSharedContext,
|
||||
context->peekContextType(),
|
||||
*context,
|
||||
HwHelper::renderCompressedBuffersSupported(context->getDevice(0)->getHardwareInfo()),
|
||||
memoryManager->isLocalMemorySupported(),
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily).obtainRenderBufferCompressionPreference(size));
|
||||
@@ -376,10 +375,10 @@ void Buffer::checkMemory(MemoryPropertiesFlags memoryProperties,
|
||||
return;
|
||||
}
|
||||
|
||||
GraphicsAllocation::AllocationType Buffer::getGraphicsAllocationType(const MemoryPropertiesFlags &properties, bool sharedContext,
|
||||
ContextType contextType, bool renderCompressedBuffers,
|
||||
bool isLocalMemoryEnabled, bool preferCompression) {
|
||||
if (is32bit || sharedContext || properties.flags.forceSharedPhysicalMemory) {
|
||||
GraphicsAllocation::AllocationType Buffer::getGraphicsAllocationType(const MemoryPropertiesFlags &properties, Context &context,
|
||||
bool renderCompressedBuffers, bool isLocalMemoryEnabled,
|
||||
bool preferCompression) {
|
||||
if (is32bit || context.isSharedContext || properties.flags.forceSharedPhysicalMemory) {
|
||||
return GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY;
|
||||
}
|
||||
|
||||
@@ -387,7 +386,7 @@ GraphicsAllocation::AllocationType Buffer::getGraphicsAllocationType(const Memor
|
||||
return GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY;
|
||||
}
|
||||
|
||||
if (MemObjHelper::isSuitableForRenderCompression(renderCompressedBuffers, properties, contextType, preferCompression)) {
|
||||
if (MemObjHelper::isSuitableForRenderCompression(renderCompressedBuffers, properties, context, preferCompression)) {
|
||||
return GraphicsAllocation::AllocationType::BUFFER_COMPRESSED;
|
||||
}
|
||||
return GraphicsAllocation::AllocationType::BUFFER;
|
||||
|
||||
Reference in New Issue
Block a user