Skip to content

Commit 520f9b3

Browse files
authored
Merge pull request boostorg#773 from sznaider/fix-cl-gl-extension-name
Use system-dependent CL<->GL sharing extension name instead of hardcoded string
2 parents 1bf4b53 + 330a6dc commit 520f9b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/boost/compute/interop/opengl/context.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ inline context opengl_create_shared_context()
7676
const platform &platform = platforms[i];
7777

7878
// check whether this platform supports OpenCL/OpenGL sharing
79-
if (!platform.supports_extension("cl_gl_sharing_extension"))
79+
if (!platform.supports_extension(cl_gl_sharing_extension))
8080
continue;
8181

8282
// load clGetGLContextInfoKHR() extension function
@@ -118,7 +118,7 @@ inline context opengl_create_shared_context()
118118

119119
// create device object for the GPU and ensure it supports CL-GL sharing
120120
device gpu(gpu_id, false);
121-
if(!gpu.supports_extension("cl_gl_sharing_extension")){
121+
if(!gpu.supports_extension(cl_gl_sharing_extension)){
122122
continue;
123123
}
124124

@@ -129,7 +129,7 @@ inline context opengl_create_shared_context()
129129

130130
// no CL-GL sharing capable devices found
131131
BOOST_THROW_EXCEPTION(
132-
unsupported_extension_error("cl_gl_sharing_extension")
132+
unsupported_extension_error(cl_gl_sharing_extension)
133133
);
134134
}
135135

0 commit comments

Comments
 (0)