Fix getCommandQueueInfo for param CL_QUEUE_DEVICE_DEFAULT
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
parent
8e03ce9c54
commit
26308a59bc
|
@ -104,6 +104,9 @@ cl_int getQueueInfo(QueueType *queue,
|
||||||
case CL_QUEUE_PROPERTIES:
|
case CL_QUEUE_PROPERTIES:
|
||||||
retVal = changeGetInfoStatusToCLResultType(getInfoHelper.set<cl_command_queue_properties>(queue->getCommandQueueProperties()));
|
retVal = changeGetInfoStatusToCLResultType(getInfoHelper.set<cl_command_queue_properties>(queue->getCommandQueueProperties()));
|
||||||
break;
|
break;
|
||||||
|
case CL_QUEUE_DEVICE_DEFAULT:
|
||||||
|
retVal = changeGetInfoStatusToCLResultType(getInfoHelper.set<cl_command_queue>(nullptr));
|
||||||
|
break;
|
||||||
case CL_QUEUE_SIZE:
|
case CL_QUEUE_SIZE:
|
||||||
retVal = CL_INVALID_COMMAND_QUEUE;
|
retVal = CL_INVALID_COMMAND_QUEUE;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -93,6 +93,19 @@ TEST_P(GetCommandQueueInfoTest, givenNonDeviceQueueWhenQueryingQueueSizeThenInva
|
||||||
EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal);
|
EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(GetCommandQueueInfoTest, GivenClQueueDeviceDefaultWhenGettingCommandQueueInfoThenSuccessIsReturned) {
|
||||||
|
cl_command_queue commandQueueReturned = reinterpret_cast<cl_command_queue>(static_cast<uintptr_t>(0x1234));
|
||||||
|
size_t sizeReturned = 0u;
|
||||||
|
auto retVal = pCmdQ->getCommandQueueInfo(
|
||||||
|
CL_QUEUE_DEVICE_DEFAULT,
|
||||||
|
sizeof(commandQueueReturned),
|
||||||
|
&commandQueueReturned,
|
||||||
|
&sizeReturned);
|
||||||
|
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||||
|
EXPECT_EQ(nullptr, commandQueueReturned);
|
||||||
|
EXPECT_EQ(sizeof(cl_command_queue), sizeReturned);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_P(GetCommandQueueInfoTest, GivenInvalidParameterWhenGettingCommandQueueInfoThenInvalidValueIsReturned) {
|
TEST_P(GetCommandQueueInfoTest, GivenInvalidParameterWhenGettingCommandQueueInfoThenInvalidValueIsReturned) {
|
||||||
cl_uint parameterReturned = 0;
|
cl_uint parameterReturned = 0;
|
||||||
cl_command_queue_info invalidParameter = 0xdeadbeef;
|
cl_command_queue_info invalidParameter = 0xdeadbeef;
|
||||||
|
|
Loading…
Reference in New Issue