From ff44e9922dc3e94450c6425b5b2583ddab454769 Mon Sep 17 00:00:00 2001 From: Jacek Danecki Date: Tue, 13 Feb 2018 11:41:32 +0100 Subject: [PATCH] Used ratified Khronos extension names Change-Id: I15b62b6f5fb805efedec5cd9e14215a94d97c8f6 --- runtime/api/api.cpp | 10 +++++----- runtime/api/api.h | 4 ++-- runtime/api/dispatch.h | 4 ++-- runtime/platform/extensions.cpp | 3 ++- .../cl_create_command_queue_with_properties_tests.cpp | 4 ++-- unit_tests/device/device_caps_tests.cpp | 7 +++++++ 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/runtime/api/api.cpp b/runtime/api/api.cpp index 9313e2f73e..69e87b64ba 100644 --- a/runtime/api/api.cpp +++ b/runtime/api/api.cpp @@ -2760,10 +2760,10 @@ clSetPerformanceConfigurationINTEL( return perfCounters->sendPerfConfiguration(count, offsets, values); } -cl_command_queue CL_API_CALL clCreateCommandQueueWithPropertiesINTEL(cl_context context, - cl_device_id device, - const cl_queue_properties_intel *properties, - cl_int *errcodeRet) { +cl_command_queue CL_API_CALL clCreateCommandQueueWithPropertiesKHR(cl_context context, + cl_device_id device, + const cl_queue_properties_khr *properties, + cl_int *errcodeRet) { return clCreateCommandQueueWithProperties(context, device, properties, errcodeRet); } @@ -2938,7 +2938,7 @@ void *CL_API_CALL clGetExtensionFunctionAddress(const char *func_name) { // SPIR-V support through the cl_khr_il_program extension RETURN_FUNC_PTR_IF_EXIST(clCreateProgramWithILKHR); - RETURN_FUNC_PTR_IF_EXIST(clCreateCommandQueueWithPropertiesINTEL); + RETURN_FUNC_PTR_IF_EXIST(clCreateCommandQueueWithPropertiesKHR); return nullptr; } diff --git a/runtime/api/api.h b/runtime/api/api.h index 7ee974a253..6d531479c4 100644 --- a/runtime/api/api.h +++ b/runtime/api/api.h @@ -838,10 +838,10 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties( const cl_queue_properties *properties, cl_int *errcodeRet); -cl_command_queue CL_API_CALL clCreateCommandQueueWithPropertiesINTEL( +cl_command_queue CL_API_CALL clCreateCommandQueueWithPropertiesKHR( cl_context context, cl_device_id device, - const cl_queue_properties_intel *properties, + const cl_queue_properties_khr *properties, cl_int *errcodeRet); cl_sampler CL_API_CALL clCreateSamplerWithProperties( diff --git a/runtime/api/dispatch.h b/runtime/api/dispatch.h index 8350a3c97e..19eeca4266 100644 --- a/runtime/api/dispatch.h +++ b/runtime/api/dispatch.h @@ -59,7 +59,7 @@ typedef void *ID3D11Texture3D; typedef void *HANDLE; #endif -typedef cl_bitfield cl_queue_properties_intel; +typedef cl_bitfield cl_queue_properties_khr; typedef void(CL_CALLBACK *ctxt_logging_fn)(const char *, const void *, size_t, void *); typedef void(CL_CALLBACK *prog_logging_fn)(cl_program, void *); typedef void(CL_CALLBACK *evnt_logging_fn)(cl_event, cl_int, void *); @@ -1277,7 +1277,7 @@ struct SCRTDispatchTable { void *placeholder12; void *placeholder13; - // VAMedia sharing extension +// VAMedia sharing extension #ifdef LIBVA INTELpfn_clCreateFromVA_APIMediaSurfaceINTEL clCreateFromVA_APIMediaSurfaceINTEL; INTELpfn_clGetDeviceIDsFromVA_APIMediaAdapterINTEL clGetDeviceIDsFromVA_APIMediaAdapterINTEL; diff --git a/runtime/platform/extensions.cpp b/runtime/platform/extensions.cpp index a2cb0dd692..8ca2aa6e97 100644 --- a/runtime/platform/extensions.cpp +++ b/runtime/platform/extensions.cpp @@ -45,7 +45,8 @@ const char *deviceExtensionsList = "cl_khr_3d_image_writes " "cl_intel_driver_diagnostics " "cl_intel_device_side_avc_motion_estimation " "cl_khr_priority_hints " - "cl_khr_throttle_hints "; + "cl_khr_throttle_hints " + "cl_khr_create_command_queue "; std::string getExtensionsList(const HardwareInfo &hwInfo) { std::string allExtensionsList; diff --git a/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp b/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp index c7fe1eb4fe..4c35d1b12b 100644 --- a/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp +++ b/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp @@ -193,9 +193,9 @@ TEST_F(clCreateCommandQueueWithPropertiesApi, negativeCase) { EXPECT_NE(retVal, CL_SUCCESS); } -TEST_F(clCreateCommandQueueWithPropertiesApi, negativeCaseINTEL) { +TEST_F(clCreateCommandQueueWithPropertiesApi, negativeCaseKHR) { cl_int retVal = CL_SUCCESS; - auto cmdQ = clCreateCommandQueueWithPropertiesINTEL( + auto cmdQ = clCreateCommandQueueWithPropertiesKHR( nullptr, nullptr, 0, diff --git a/unit_tests/device/device_caps_tests.cpp b/unit_tests/device/device_caps_tests.cpp index e0ca7bde8b..3280a2d20f 100644 --- a/unit_tests/device/device_caps_tests.cpp +++ b/unit_tests/device/device_caps_tests.cpp @@ -512,6 +512,13 @@ TEST(Device_GetCaps, deviceReportsPriorityHintsExtension) { EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_priority_hints"))); } +TEST(Device_GetCaps, deviceReportsCreateCommandQueueExtension) { + auto device = std::unique_ptr(DeviceHelper<>::create(platformDevices[0])); + const auto &caps = device->getDeviceInfo(); + + EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_create_command_queue"))); +} + TEST(Device_GetCaps, deviceReportsThrottleHintsExtension) { auto device = std::unique_ptr(DeviceHelper<>::create(platformDevices[0])); const auto &caps = device->getDeviceInfo();