Return pointer to clCreateBufferWithPropertiesINTEL.

Change-Id: I36c5e1e0ed9a9032e7f5d3653b413ad1911c37a5
This commit is contained in:
Mrozek, Michal
2018-11-19 15:13:32 +01:00
parent c0f6af1df3
commit 1c6fb9def4
2 changed files with 7 additions and 0 deletions

View File

@@ -3326,6 +3326,8 @@ void *CL_API_CALL clGetExtensionFunctionAddress(const char *func_name) {
RETURN_FUNC_PTR_IF_EXIST(clRetainAcceleratorINTEL);
RETURN_FUNC_PTR_IF_EXIST(clReleaseAcceleratorINTEL);
RETURN_FUNC_PTR_IF_EXIST(clCreateBufferWithPropertiesINTEL);
void *ret = sharingFactory.getExtensionFunctionAddress(func_name);
if (ret != nullptr)
return ret;

View File

@@ -51,4 +51,9 @@ TEST_F(clGetExtensionFunctionAddressTests, clSetPerformanceConfigurationINTEL) {
auto retVal = clGetExtensionFunctionAddress("clSetPerformanceConfigurationINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSetPerformanceConfigurationINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, givenClCreateBufferWithPropertiesIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) {
auto functionPointer = clGetExtensionFunctionAddress("clCreateBufferWithPropertiesINTEL");
EXPECT_EQ(functionPointer, reinterpret_cast<void *>(clCreateBufferWithPropertiesINTEL));
}
} // namespace ULT