mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Remove OCL object from MemoryProperties 13/n
Refactor parseMemoryProperties and createMemoryPropertiesFlags functions Related-To: NEO-3132 Change-Id: I61aaae69b84d8b0f77c08a59010879cc3a93e6cf Signed-off-by: Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
@@ -465,13 +465,12 @@ TEST_F(PerformanceHintTest, given64bitCompressedBufferWhenItsCreatedThenProperPe
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
cl_device_id deviceId = static_cast<cl_device_id>(device.get());
|
||||
const MemoryProperties properties(1 << 21);
|
||||
size_t size = 8192u;
|
||||
|
||||
cl_context_properties validProperties[3] = {CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL, 0};
|
||||
auto context = std::unique_ptr<MockContext>(Context::create<NEO::MockContext>(validProperties, DeviceVector(&deviceId, 1), callbackFunction, static_cast<void *>(userData), retVal));
|
||||
context->isSharedContext = false;
|
||||
auto buffer = std::unique_ptr<Buffer>(Buffer::create(context.get(), MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties), (1 << 21), 0, size, static_cast<void *>(NULL), retVal));
|
||||
auto buffer = std::unique_ptr<Buffer>(Buffer::create(context.get(), MemoryPropertiesFlagsParser::createMemoryPropertiesFlags((1 << 21), 0), (1 << 21), 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) &&
|
||||
HwHelper::renderCompressedBuffersSupported(hwInfo);
|
||||
@@ -489,8 +488,7 @@ TEST_F(PerformanceHintTest, givenUncompressedBufferWhenItsCreatedThenProperPerfo
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
cl_device_id deviceId = static_cast<cl_device_id>(device.get());
|
||||
const MemoryProperties properties(CL_MEM_READ_WRITE);
|
||||
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
|
||||
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(CL_MEM_READ_WRITE, 0);
|
||||
|
||||
size_t size = 0u;
|
||||
|
||||
@@ -562,7 +560,7 @@ TEST_F(PerformanceHintTest, givenCompressedImageWhenItsCreatedThenProperPerforma
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags({flags}),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(flags, 0),
|
||||
flags,
|
||||
0,
|
||||
surfaceFormat,
|
||||
@@ -621,7 +619,7 @@ TEST_F(PerformanceHintTest, givenImageWithNoGmmWhenItsCreatedThenNoPerformanceHi
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags({flags}),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(flags, 0),
|
||||
flags,
|
||||
0,
|
||||
surfaceFormat,
|
||||
@@ -682,7 +680,7 @@ TEST_F(PerformanceHintTest, givenUncompressedImageWhenItsCreatedThenProperPerfor
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags({flags}),
|
||||
MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(flags, 0),
|
||||
flags,
|
||||
0,
|
||||
surfaceFormat,
|
||||
|
||||
Reference in New Issue
Block a user