Skip to content

Commit

Permalink
fix(OpenCL) initialization on macOS 13
Browse files Browse the repository at this point in the history
Close #861
  • Loading branch information
Spasi committed Mar 27, 2023
1 parent 773cdde commit 635f53a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ This build includes the following changes:
- Core: Many debug messages can no longer tear under concurrency. (#825)
- Build: Fixed offline mode with multiple local architectures. (#740)
- NanoSVG: Fixed auto-sizing of `NSVGPath::pts` buffer.
- OpenCL: Fixed initialization on macOS 13. (#861)
- Opus: Fixed `pcm` parameter type of `opus_decode_float` function. (#785)
- Remotery: Fixed `rmtSettings::free` callback signature.
- stb: Fixed `stb_image_resize` flag values. (#857)
Expand Down
5 changes: 1 addition & 4 deletions modules/lwjgl/opencl/src/main/java/org/lwjgl/opencl/CL.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public static void create() {
CL = Library.loadNative(CL.class, "org.lwjgl.opencl", Configuration.OPENCL_LIBRARY_NAME, "OpenCL");
break;
case MACOSX:
String override = Configuration.OPENCL_LIBRARY_NAME.get();
CL = override != null
? Library.loadNative(CL.class, "org.lwjgl.opencl", override)
: MacOSXLibrary.getWithIdentifier("com.apple.opencl");
CL = Library.loadNative(CL.class, "org.lwjgl.opencl", Configuration.OPENCL_LIBRARY_NAME, "/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL");
break;
default:
throw new IllegalStateException();
Expand Down
5 changes: 1 addition & 4 deletions modules/lwjgl/opengl/src/main/java/org/lwjgl/opengl/GL.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ public static void create() {
GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "libGL.so.1", "libGL.so");
break;
case MACOSX:
String override = Configuration.OPENGL_LIBRARY_NAME.get();
GL = override != null
? Library.loadNative(GL.class, "org.lwjgl.opengl", override)
: MacOSXLibrary.getWithIdentifier("com.apple.opengl");
GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL");
break;
case WINDOWS:
GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "opengl32");
Expand Down

0 comments on commit 635f53a

Please sign in to comment.