mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Handle OS-managed allocations in clGetMemAllocInfoINTEL
Change-Id: I9750bcc05f01aef3973cfac4f10e7d4d9d667bed Related-To: NEO-3524
This commit is contained in:
committed by
sys_ocldev
parent
d9e02697bf
commit
eea2a4451a
@@ -149,6 +149,20 @@ TEST(clUnifiedSharedMemoryTests, whenClGetMemAllocInfoINTELisCalledWithoutSVMAll
|
||||
EXPECT_EQ(CL_INVALID_VALUE, retVal);
|
||||
}
|
||||
|
||||
TEST(clUnifiedSharedMemoryTests, whenClGetMemAllocInfoINTELisCalledWithAllocationTypeParamNameAndWithoutUnifiedSharedMemoryAllocationThenProperFieldsAreSet) {
|
||||
MockContext mockContext;
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
size_t paramValueSize = sizeof(cl_int);
|
||||
cl_int paramValue = 0;
|
||||
size_t paramValueSizeRet = 0;
|
||||
|
||||
retVal = clGetMemAllocInfoINTEL(&mockContext, nullptr, CL_MEM_ALLOC_TYPE_INTEL, paramValueSize, ¶mValue, ¶mValueSizeRet);
|
||||
|
||||
EXPECT_EQ(CL_MEM_TYPE_UNKNOWN_INTEL, paramValue);
|
||||
EXPECT_EQ(sizeof(cl_int), paramValueSizeRet);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
TEST(clUnifiedSharedMemoryTests, whenClGetMemAllocInfoINTELisCalledWithValidUnifiedMemoryHostAllocationThenProperFieldsAreSet) {
|
||||
MockContext mockContext;
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user