clover: Implement clGetExtensionFunctionAddressForPlatform.
authorSerge Martin <edb+mesa@sigluy.net>
Sun, 27 Sep 2015 09:15:14 +0000 (11:15 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 30 Oct 2016 19:53:03 +0000 (12:53 -0700)
Add clGetExtensionFunctionAddressForPlatform (CL 1.2).

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/api/dispatch.cpp
src/gallium/state_trackers/clover/api/dispatch.hpp
src/gallium/state_trackers/clover/api/platform.cpp

index f10babe31a0e95e42dd7ebdb84305b5619428f5c..8f4cfdc7fb2f4eb5048d9ff8f3f6f8aa3820555e 100644 (file)
@@ -131,7 +131,7 @@ namespace clover {
       clEnqueueMigrateMemObjects,
       clEnqueueMarkerWithWaitList,
       clEnqueueBarrierWithWaitList,
-      NULL, // clGetExtensionFunctionAddressForPlatform
+      GetExtensionFunctionAddressForPlatform,
       NULL, // clCreateFromGLTexture
       NULL, // clGetDeviceIDsFromD3D11KHR
       NULL, // clCreateFromD3D11BufferKHR
index 7f622822ef922c7a6d44180ba9c79491ad443337..0ec1b51fa6d8d3d4d4c095b067324d0076979742 100644 (file)
@@ -777,6 +777,10 @@ namespace clover {
    void *
    GetExtensionFunctionAddress(const char *p_name);
 
+   void *
+   GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+                                          const char *p_name);
+
    cl_int
    IcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,
                         cl_uint *rnum_platforms);
index b1b1fdfb6f2f6f10cafe049ea852f8509a618e81..ed861633116dc88b3ff7d1fa78a6653f2c35f13d 100644 (file)
@@ -91,6 +91,16 @@ clover::GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,
    return e.get();
 }
 
+void *
+clover::GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+                                               const char *p_name) try {
+   obj(d_platform);
+   return GetExtensionFunctionAddress(p_name);
+
+} catch (error &e) {
+   return NULL;
+}
+
 void *
 clover::GetExtensionFunctionAddress(const char *p_name) {
    std::string name { p_name };
@@ -118,6 +128,12 @@ clGetExtensionFunctionAddress(const char *p_name) {
    return GetExtensionFunctionAddress(p_name);
 }
 
+CLOVER_ICD_API void *
+clGetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+                                         const char *p_name) {
+   return GetExtensionFunctionAddressForPlatform(d_platform, p_name);
+}
+
 CLOVER_ICD_API cl_int
 clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,
                        cl_uint *rnum_platforms) {