mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Refactor OCL api tests
use testedClDevice instead of devices[testedRootDeviceIndex] pass only tested device to build program add member ApiFixture::pDevice Related-To: NEO-4632 Change-Id: I7d8d1bd6c3336970a1ad0f0e48c254eb6f419200 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
7ed45adb27
commit
fe3d0a567f
@ -38,13 +38,13 @@ class DeviceHostQueueFixture : public ApiFixture<>,
|
||||
}
|
||||
|
||||
cl_command_queue createClQueue(cl_queue_properties properties[5] = deviceQueueProperties::noProperties) {
|
||||
return create(pContext, devices[testedRootDeviceIndex], retVal, properties);
|
||||
return create(pContext, testedClDevice, retVal, properties);
|
||||
}
|
||||
|
||||
T *createQueueObject(cl_queue_properties properties[5] = deviceQueueProperties::noProperties) {
|
||||
using BaseType = typename T::BaseType;
|
||||
cl_context context = (cl_context)(pContext);
|
||||
auto clQueue = create(context, devices[testedRootDeviceIndex], retVal, properties);
|
||||
auto clQueue = create(context, testedClDevice, retVal, properties);
|
||||
return castToObject<T>(static_cast<BaseType *>(clQueue));
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ class DeviceQueueHwTest : public DeviceHostQueueFixture<DeviceQueue> {
|
||||
using BaseClass = DeviceHostQueueFixture<DeviceQueue>;
|
||||
void SetUp() override {
|
||||
BaseClass::SetUp();
|
||||
device = castToObject<ClDevice>(devices[testedRootDeviceIndex]);
|
||||
device = castToObject<ClDevice>(testedClDevice);
|
||||
ASSERT_NE(device, nullptr);
|
||||
if (!device->getHardwareInfo().capabilityTable.supportsDeviceEnqueue) {
|
||||
GTEST_SKIP();
|
||||
|
Reference in New Issue
Block a user