diff options
Diffstat (limited to 'test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h')
-rw-r--r-- | test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h index 44f4cc63..d08a11af 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h +++ b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h @@ -34,6 +34,18 @@ } \ } +// If it is supported get the addresses of all the APIs here. +#define GET_EXTENSION_ADDRESS(FUNC) \ + FUNC = reinterpret_cast<FUNC##_fn>( \ + clGetExtensionFunctionAddressForPlatform(platform, #FUNC)); \ + if (FUNC == nullptr) \ + { \ + log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed" \ + " with " #FUNC "\n"); \ + return TEST_FAIL; \ + } + + // Helper test fixture for constructing OpenCL objects used in testing // a variety of simple command-buffer enqueue scenarios. struct BasicCommandBufferTest : CommandBufferTestBase @@ -70,6 +82,7 @@ protected: clCommandBufferWrapper command_buffer; }; + template <class T> int MakeAndRunTest(cl_device_id device, cl_context context, cl_command_queue queue, int num_elements) |