mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Add ClDevice
Decouple cl_device_id from Device class. Related-To: NEO-3938 Change-Id: I68543a753aea562f3b47ba0d23a059ff3cffa906 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -21,7 +21,7 @@ using namespace NEO;
|
||||
struct BlitAuxTranslationTests : public ::testing::Test {
|
||||
class BcsMockContext : public MockContext {
|
||||
public:
|
||||
BcsMockContext(Device *device) : MockContext(device) {
|
||||
BcsMockContext(ClDevice *device) : MockContext(device) {
|
||||
bcsOsContext.reset(OsContext::create(nullptr, 0, 0, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex()));
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
@@ -57,7 +57,7 @@ struct BlitAuxTranslationTests : public ::testing::Test {
|
||||
DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.set(1);
|
||||
DebugManager.flags.ForceAuxTranslationMode.set(1);
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<int32_t>(DispatchMode::ImmediateDispatch));
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
auto &capabilityTable = device->getExecutionEnvironment()->getMutableHardwareInfo()->capabilityTable;
|
||||
bool createBcsEngine = !capabilityTable.blitterOperationsSupported;
|
||||
capabilityTable.blitterOperationsSupported = true;
|
||||
@@ -68,7 +68,6 @@ struct BlitAuxTranslationTests : public ::testing::Test {
|
||||
engine.osContext = bcsOsContext.get();
|
||||
engine.commandStreamReceiver->setupContext(*bcsOsContext);
|
||||
}
|
||||
|
||||
bcsMockContext = std::make_unique<BcsMockContext>(device.get());
|
||||
auto mockCmdQueue = new MockCommandQueueHw<FamilyType>(bcsMockContext.get(), device.get(), nullptr);
|
||||
commandQueue.reset(mockCmdQueue);
|
||||
@@ -160,7 +159,7 @@ struct BlitAuxTranslationTests : public ::testing::Test {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
std::unique_ptr<OsContext> bcsOsContext;
|
||||
std::unique_ptr<MockDevice> device;
|
||||
std::unique_ptr<MockClDevice> device;
|
||||
std::unique_ptr<BcsMockContext> bcsMockContext;
|
||||
std::unique_ptr<CommandQueue> commandQueue;
|
||||
std::unique_ptr<MockKernelWithInternals> mockKernel;
|
||||
|
||||
Reference in New Issue
Block a user