mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-21 02:32:06 +08:00
Add control on platform life cycle.
Change-Id: I5c24b41747d822b71dd57e9a949cf25fcc78a453
This commit is contained in:
committed by
sys_ocldev
parent
0f91c3bc47
commit
a21c0a0074
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/built_in_fixture.h"
|
||||
@@ -36,6 +37,7 @@ struct CommandEnqueueAUBFixture : public CommandEnqueueBaseFixture,
|
||||
public AUBCommandStreamFixture {
|
||||
using AUBCommandStreamFixture::SetUp;
|
||||
void SetUp() {
|
||||
constructPlatform();
|
||||
CommandEnqueueBaseFixture::SetUp(cl_command_queue_properties(0));
|
||||
AUBCommandStreamFixture::SetUp(pCmdQ);
|
||||
}
|
||||
@@ -43,6 +45,7 @@ struct CommandEnqueueAUBFixture : public CommandEnqueueBaseFixture,
|
||||
void TearDown() {
|
||||
AUBCommandStreamFixture::TearDown();
|
||||
CommandEnqueueBaseFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
};
|
||||
} // namespace OCLRT
|
||||
|
||||
@@ -40,10 +40,8 @@ struct AUBCopyImage
|
||||
|
||||
typedef AUBCommandStreamFixture CommandStreamFixture;
|
||||
|
||||
AUBCopyImage() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
CommandDeviceFixture::SetUp(cl_command_queue_properties(0));
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -55,6 +53,7 @@ struct AUBCopyImage
|
||||
delete context;
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandDeviceFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -102,10 +102,8 @@ struct AubFillImage
|
||||
|
||||
typedef AUBCommandStreamFixture CommandStreamFixture;
|
||||
|
||||
AubFillImage() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
CommandDeviceFixture::SetUp(cl_command_queue_properties(0));
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -116,6 +114,7 @@ struct AubFillImage
|
||||
delete context;
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandDeviceFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -52,10 +52,8 @@ struct AUBMapImage
|
||||
|
||||
using AUBCommandStreamFixture::SetUp;
|
||||
|
||||
AUBMapImage() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
CommandDeviceFixture::SetUp(cl_command_queue_properties(0));
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -66,6 +64,7 @@ struct AUBMapImage
|
||||
delete context;
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandDeviceFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -55,6 +55,7 @@ struct AUBReadImage
|
||||
using AUBCommandStreamFixture::SetUp;
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
CommandDeviceFixture::SetUp(cl_command_queue_properties(0));
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -65,6 +66,7 @@ struct AUBReadImage
|
||||
delete context;
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandDeviceFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -53,6 +53,7 @@ struct AUBWriteImage
|
||||
using AUBCommandStreamFixture::SetUp;
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
CommandDeviceFixture::SetUp(cl_command_queue_properties(0));
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -63,6 +64,7 @@ struct AUBWriteImage
|
||||
delete context;
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandDeviceFixture::TearDown();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
Reference in New Issue
Block a user