GL_ARB_vertex_buffer_object not available on Mac?

classic Classic list List threaded Threaded
43 messages Options
123
Reply | Threaded
Open this post in threaded view
|

GL_ARB_vertex_buffer_object not available on Mac?

nyholku
Hi,

I tried to run JOCLSimpleGL3.java from this page:

http://www.jocl.org/samples/samples.html

but it throws exception because  gl.isExtensionAvailable("GL_ARB_vertex_buffer_object")) returns false.

Other demos from the same page that I'v tried work.

This what I get from:

        System.out.println(GlueGenVersion.getInstance());
        System.out.println(JoglVersion.getInstance());

-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.3
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.3.2
Implementation Build: 2.3-b900-20151009
Implementation Branch: origin/master
Implementation Commit: cc1e9bc698b7f11097c1e114027e53121552f280
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.opengl
Extension Name: com.jogamp.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.3
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.3.2
Implementation Build: 2.3-b1469-20151010
Implementation Branch: origin/master
Implementation Commit: e794fc40ba723f2fca4ac892e873975fb393e007
-----------------------------------------------------------------------------------------------------



Here is whatJOCLDeviceQuery demo displays:

Number of platforms: 1
Number of devices in platform Apple: 3
--- Info for device Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz: ---
CL_DEVICE_NAME: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
CL_DEVICE_VENDOR: Intel
CL_DRIVER_VERSION: 1.1
CL_DEVICE_TYPE: CL_DEVICE_TYPE_CPU
CL_DEVICE_MAX_COMPUTE_UNITS: 12
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 1024 / 1 / 1
CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2600 MHz
CL_DEVICE_ADDRESS_BITS: 64
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 8192 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 32768 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: global
CL_DEVICE_LOCAL_MEM_SIZE: 32 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
CL_DEVICE_SINGLE_FP_CONFIG: CL_FP_DENORM CL_FP_INF_NAN CL_FP_ROUND_TO_NEAREST CL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INF CL_FP_FMA CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
CL_DEVICE_2D_MAX_WIDTH 8192
CL_DEVICE_2D_MAX_HEIGHT 8192
CL_DEVICE_3D_MAX_WIDTH 2048
CL_DEVICE_3D_MAX_HEIGHT 2048
CL_DEVICE_3D_MAX_DEPTH 2048
CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>        CHAR 16, SHORT 8, INT 4, LONG 2, FLOAT 4, DOUBLE 2


--- Info for device Intel(R) UHD Graphics 630: ---
CL_DEVICE_NAME: Intel(R) UHD Graphics 630
CL_DEVICE_VENDOR: Intel Inc.
CL_DRIVER_VERSION: 1.2(Jul 20 2018 19:20:00)
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 24
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 256 / 256 / 256
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1150 MHz
CL_DEVICE_ADDRESS_BITS: 64
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 384 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 1536 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: local
CL_DEVICE_LOCAL_MEM_SIZE: 64 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
CL_DEVICE_SINGLE_FP_CONFIG: CL_FP_DENORM CL_FP_INF_NAN CL_FP_ROUND_TO_NEAREST CL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INF CL_FP_FMA CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
CL_DEVICE_2D_MAX_WIDTH 16384
CL_DEVICE_2D_MAX_HEIGHT 16384
CL_DEVICE_3D_MAX_WIDTH 2048
CL_DEVICE_3D_MAX_HEIGHT 2048
CL_DEVICE_3D_MAX_DEPTH 2048
CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>        CHAR 1, SHORT 1, INT 1, LONG 1, FLOAT 1, DOUBLE 0


--- Info for device AMD Radeon Pro 560X Compute Engine: ---
CL_DEVICE_NAME: AMD Radeon Pro 560X Compute Engine
CL_DEVICE_VENDOR: AMD
CL_DRIVER_VERSION: 1.2 (Jul 20 2018 19:09:33)
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 16
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 256 / 256 / 256
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1004 MHz
CL_DEVICE_ADDRESS_BITS: 32
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1024 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 4096 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: local
CL_DEVICE_LOCAL_MEM_SIZE: 32 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
CL_DEVICE_SINGLE_FP_CONFIG: CL_FP_INF_NAN CL_FP_ROUND_TO_NEAREST CL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INF CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
CL_DEVICE_2D_MAX_WIDTH 16384
CL_DEVICE_2D_MAX_HEIGHT 16384
CL_DEVICE_3D_MAX_WIDTH 2048
CL_DEVICE_3D_MAX_HEIGHT 2048
CL_DEVICE_3D_MAX_DEPTH 2048
CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>        CHAR 4, SHORT 2, INT 1, LONG 1, FLOAT 1, DOUBLE 1



I'm on MacOs 10.13.6 High Sierra running on latest (mid 2018) MacBook Pro 15"

cheers Kusti



Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
It looks like maybe you're mixing two different JOCLs -- the one at http://www.jocl.org is different from ours, which is at http://jogamp.org/jocl/www/. So you probably can't run their sample apps against JogAmp JOCL :)
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
Thanks!

Ok, I was mixing stuff. Now I'm trying the proper jogamp jocl demos from here:

https://github.com/JogAmp/jocl-demos

 with mixes success, basically only one demo that does some GPU processing works (JOGLINTEROP)

see below

FRACTAL

Dec 18, 2018 8:44:07 PM com.jogamp.opencl.demos.fractal.MultiDeviceFractal initCL
SEVERE: something went wrong, hopefully nobody got hurt
com.jogamp.opencl.CLException$CLInvalidValueException: error while asking for info string [error: CL_INVALID_VALUE]
        at com.jogamp.opencl.CLException.checkForError(CLException.java:73)
        at com.jogamp.opencl.impl.CLTLInfoAccessor.getString(CLTLInfoAccessor.java:91)
        at com.jogamp.opencl.CLPlatform.getInfoString(CLPlatform.java:509)
        at com.jogamp.opencl.CLPlatform.getICDSuffix(CLPlatform.java:466)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.initCL(MultiDeviceFractal.java:156)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.init(MultiDeviceFractal.java:134)
        at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
        at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
        at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
        at com.jogamp.opengl.Threading.invoke(Threading.java:223)
        at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
        at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:59)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
        at java.awt.Component.dispatchEventImpl(Component.java:4965)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught GLException: array offset argument "buffers_offset" (0) equals or exceeds array length (0) on thread AWT-EventQueue-0
        at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
        at com.jogamp.opengl.Threading.invoke(Threading.java:223)
        at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
        at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:59)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
        at java.awt.Component.dispatchEventImpl(Component.java:4965)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.jogamp.opengl.GLException: array offset argument "buffers_offset" (0) equals or exceeds array length (0)
        at jogamp.opengl.gl4.GL4bcImpl.glGenBuffers(GL4bcImpl.java:10273)
        at com.jogamp.opengl.DebugGL4bc.glGenBuffers(DebugGL4bc.java:6141)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.initPBO(MultiDeviceFractal.java:279)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.init(MultiDeviceFractal.java:144)
        at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
        at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
        at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
        ... 30 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught GLException: array offset argument "buffers_offset" (0) equals or exceeds array length (0) on thread AWT-EventQueue-0
        at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
        at com.jogamp.opengl.Threading.invoke(Threading.java:223)
        at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
        at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
        at com.jogamp.opengl.awt.GLCanvas.update(GLCanvas.java:866)
        at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
        at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
        at sun.awt.RepaintArea.paint(RepaintArea.java:232)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
        at java.awt.Component.dispatchEventImpl(Component.java:4965)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.jogamp.opengl.GLException: array offset argument "buffers_offset" (0) equals or exceeds array length (0)
        at jogamp.opengl.gl4.GL4bcImpl.glDeleteBuffers(GL4bcImpl.java:10243)
        at com.jogamp.opengl.DebugGL4bc.glDeleteBuffers(DebugGL4bc.java:3785)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.initPBO(MultiDeviceFractal.java:273)
        at com.jogamp.opencl.demos.fractal.MultiDeviceFractal.reshape(MultiDeviceFractal.java:452)
        at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:751)
        at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1420)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
        ... 31 more



GAMMA

Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140707089591808 name: gamma]
 with gwo: null gws: {786432} lws: {1024}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]
        at com.jogamp.opencl.CLException.newException(CLException.java:84)
        at com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1638)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1496)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1466)
        at com.jogamp.opencl.demos.gamma.CLSimpleGammaCorrection.gammaCorrection(CLSimpleGammaCorrection.java:144)
        at com.jogamp.opencl.demos.gamma.CLSimpleGammaCorrection.main(CLSimpleGammaCorrection.java:117)


HELLOJOCL

created CLContext [id: 140194850494624, platform: Apple, profile: FULL_PROFILE, devices: 3]
using CLDevice [id: 4294967295 name: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz type: CPU profile: FULL_PROFILE]
used device memory: 17MB
Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140194855763456 name: VectorAdd]
 with gwo: null gws: {1444608} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]
        at com.jogamp.opencl.CLException.newException(CLException.java:84)
        at com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1638)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1496)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1466)
        at com.jogamp.opencl.demos.hellojocl.HelloJOCL.main(HelloJOCL.java:73)


INFO
- works as far as I can tell

JOGLINTEROP
- works as far as I can tell, beautiful and fast wave displayed


JULIA3D

BUILD_SUCCESS
CLDevice [id: 4294967295 name: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz type: CPU profile: FULL_PROFILE] build log:
<program source>:54:8: warning: no previous prototype for function 'QuatMult'
float4 QuatMult(const float4 q1, const float4 q2) {
       ^
<program source>:69:8: warning: no previous prototype for function 'QuatSqr'
float4 QuatSqr(const float4 q) {
       ^
<program source>:80:6: warning: no previous prototype for function 'IterateIntersect'
void IterateIntersect(float4 *q, float4 *qp, const float4 c, const uint maxIterations) {
     ^
<program source>:96:7: warning: no previous prototype for function 'IntersectJulia'
float IntersectJulia(const float4 eyeRayOrig, const float4 eyeRayDir,
      ^
<program source>:130:7: warning: no previous prototype for function 'IntersectFloorSphere'
float IntersectFloorSphere(const float4 eyeRayOrig, const float4 eyeRayDir) {
      ^
<program source>:149:7: warning: no previous prototype for function 'IntersectBoundingSphere'
float IntersectBoundingSphere(const float4 eyeRayOrig, const float4 eyeRayDir) {
      ^
<program source>:173:8: warning: no previous prototype for function 'NormEstimate'
float4 NormEstimate(const float4 p, const float4 c,
       ^
<program source>:204:8: warning: no previous prototype for function 'Phong'
float4 Phong(const float4 light, const float4 eye, const float4 pt, const float4 N, const float4 diffuse) {
       ^
<program source>:237:11: warning: comparison of integers of different signs: 'const int' and 'unsigned int'
    if (y >= height)
        ~ ^  ~~~~~~
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140637415718400 name: JuliaGPU]
 with gwo: null gws: {1228800} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE] on thread AWT-EventQueue-0
        at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
        at com.jogamp.opengl.Threading.invoke(Threading.java:223)
        at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
        at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:59)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
        at java.awt.Component.dispatchEventImpl(Component.java:4965)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140637415718400 name: JuliaGPU]
 with gwo: null gws: {1228800} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]
        at com.jogamp.opencl.CLException.newException(CLException.java:84)
        at com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1638)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1496)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1466)
        at com.jogamp.opencl.demos.julia3d.Julia3d.compute(Julia3d.java:163)
        at com.jogamp.opencl.demos.julia3d.Renderer.display(Renderer.java:70)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
        at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
        ... 30 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140637415718400 name: JuliaGPU]
 with gwo: null gws: {1228800} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE] on thread AWT-EventQueue-0
        at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
        at com.jogamp.opengl.Threading.invoke(Threading.java:223)
        at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
        at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
        at com.jogamp.opengl.awt.GLCanvas.update(GLCanvas.java:866)
        at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
        at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
        at sun.awt.RepaintArea.paint(RepaintArea.java:232)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
        at java.awt.Component.dispatchEventImpl(Component.java:4965)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.jogamp.opencl.CLException$CLInvalidWorkGroupSizeException: can not enqueue 1DRange CLKernel [id: 140637415718400 name: JuliaGPU]
 with gwo: null gws: {1228800} lws: {256}
cond.: null events: null [error: CL_INVALID_WORK_GROUP_SIZE]
        at com.jogamp.opencl.CLException.newException(CLException.java:84)
        at com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1638)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1496)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1466)
        at com.jogamp.opencl.demos.julia3d.Julia3d.compute(Julia3d.java:163)
        at com.jogamp.opencl.demos.julia3d.Renderer.display(Renderer.java:70)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
        at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
        ... 31 more

RADIXSORT


 = = = workgroup size: 128 = = =
array size: 0.131072MB; elements: 32K
time: 4.615029ms
time: 3.217311ms
time: 3.419998ms
time: 3.448344ms
time: 3.153253ms
time: 3.242435ms
time: 3.250704ms
time: 3.226251ms
time: 3.212008ms
time: 3.130395ms
snapshot: 8, 0, 0, 0, 136120808, 149163, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 3, 79943, 0, 4, ...; 32748 more
validating...
Exception in thread "main" java.lang.RuntimeException: not sorted 8 !> 0
        at com.jogamp.opencl.demos.radixsort.RadixSortDemo.checkIfSorted(RadixSortDemo.java:130)
        at com.jogamp.opencl.demos.radixsort.RadixSortDemo.<init>(RadixSortDemo.java:96)
        at com.jogamp.opencl.demos.radixsort.RadixSortDemo.main(RadixSortDemo.java:136)

Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
I've duplicated this error. With this command line:

java -cp jocl-demos/jar/jocl-demos.jar:jogamp-all-platforms/jar/jocl.jar:jogamp-all-platforms/jar/gluegen-rt.jar -Djava.library.path="jogamp-all-platforms/jar/jocl-natives-macosx-universal.jar:jogamp-all-platforms/jar/gluegen-rt-natives-macosx-universal.jar" com.jogamp.opencl.demos.hellojocl.HelloJOCL

the output is:

created CLContext [id: 140627526720672, platform: Apple, profile: FULL_PROFILE, devices: 2]
using CLDevice [id: 16918016 name: GeForce 320M type: GPU profile: FULL_PROFILE]
used device memory: 17MB
Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidProgramExecutableException: can not enqueue 1DRange CLKernel [id: 140627533187072 name: VectorAdd]
 with gwo: null gws: {1444608} lws: {256}
cond.: null events: null [error: CL_INVALID_PROGRAM_EXECUTABLE]
        at com.jogamp.opencl.CLException.newException(CLException.java:84)
        at com.jogamp.opencl.CLCommandQueue.putNDRangeKernel(CLCommandQueue.java:1638)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1496)
        at com.jogamp.opencl.CLCommandQueue.put1DRangeKernel(CLCommandQueue.java:1466)
        at com.jogamp.opencl.demos.hellojocl.HelloJOCL.main(HelloJOCL.java:73)

This is using the downloaded 2.3.2 version of JogAmp, rather than building it myself. It worked the last time I tried it on this Mac (2010 Macbook Air), but I've since updated to macOS 10.13, which could have broken something.

My suggestion would be to try building from source, to see if a fresh build in modern macOS will work. I'm not sure what will happen, but I can help advise if you try it :) I haven't spent a lot of time on this in the last few years, especially since Apple has said they're deprecating both OpenGL and OpenCL in favor of Metal.
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
Thanks.


I tried to build jocl from source following instructions from here:



https://jogamp.org/jocl/doc/HowToBuild.html


but it fails:

ant clean
Buildfile: /Users/nyholku/jocltest/jocl/make/build.xml

BUILD FAILED
/Users/nyholku/jocltest/jocl/make/build.xml:65: Cannot find /Users/nyholku/jocltest/gluegen/make/gluegen-cpptasks.xml imported from /Users/nyholku/jocltest/jocl/make/build.xml

Total time: 0 seconds


I also tried to build jogl from source with these instructions

https://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line





and it fails differently:






ant clean
Buildfile: /Users/nyholku/jocltest/jocl/gluegen/make/build.xml

jogamp.env.validation:
     [echo] ant.version                Apache Ant(TM) version 1.10.5 compiled on July 10 2018
     [echo] ant.java.version           10
     [echo] java.version               10.0.2
     [echo] java.home                  /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
     [echo] jvmJava.exe                /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java
     [echo] jvmJava7.exe               ${jvmJava7.exe}

BUILD FAILED
/Users/nyholku/jocltest/jocl/gluegen/make/jogamp-env.xml:48: Unsupported Java version: 10. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.

Total time: 0 seconds
MacBook-Pro:make nyholku$ java --version
java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
MacBook-Pro:make nyholku$
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

gouessej
Administrator
Try with Java 1.8.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
Thanks but now.

I've just purged all my systems (Linux/Mac/Windows) from anything prior to Java 10 in an effort to get closer to 'modern' Java in  my development. I would have liked to go to 11 LTS but that has no javapackager so alas 10 is the way for me to go. Java 8 is 5 years old and I was in Java 7 (8 years old) and I want to go forward.

For me at this point the jogl/jocl interoperability demo, which happens to work,  is good enough so I'm good, but if someone wants to work with me to get the other demos in Java 10 then I'm willing to put in 'some' effort.

wbr Kusti
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
I meant of course "Thanks but NO"
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

gouessej
Administrator
In reply to this post by nyholku
Java 1.10 isn't a LTS version unlike Java 1.11 and keep in mind that Java 1.9, 1.10 and 1.11 contain lots of potentially breaking changes (especially Java 1.9), supporting "modern" Java is unfortunately not as trivial as you might think.

Remove the test of the Java version in jogamp-env.xml and try again with Java 1.10.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
I'm not thinking it is simple. For my few applications it has been trivial but I'm sure you have reason to say it there are lots of potentially breaking changes. Still I want to go forward and I will start with the sample that works.

I did take away the test for hava version but next it looks for javahome/lib/rt.jar (IIRC) and I did not try to work past that (yet).

wbr Kusti
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

gouessej
Administrator
Thank you for giving it a try.

The problem is that there are at least one known bug under Mac OS X with Java >= 1.9 which causes a crash, it crashes when a native resource is released.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
In reply to this post by nyholku
I tried building gluegen with Java 11 and got the same result as nyholku -- it fails because it's trying to explicitly include rt.jar on the bootclasspath when building with javac, but rt.jar no longer exists in Java 10 and 11.

It looks like the javac -source/-target/-bootclasspath options all need to be replaced with --release these days, though that would require us to always compile glugen/jogl with Java 9 or later (see https://stackoverflow.com/questions/43102787/what-is-the-release-flag-in-the-java-9-compiler). Earlier versions can still be targeted, but only 3 versions back (see https://docs.oracle.com/javase/10/migrate/toc.htm#JSMIG-GUID-77874D97-46F3-4DB5-85E4-2ACB5F8D760B).
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

gouessej
Administrator
Thank you so much Wade. It seems almost impossible to preserve the backward compatibility with pre-Java 9 versions and post-Java 9 versions.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
After fixing the --bootclasspath reference to rt.jar, the next problem is the Javadoc builder. It's using the old Taglet interface in com.sun.tools.doclets, which now in Java 9 needs to be updated to the one in jdk.javadoc.doclet (see https://openjdk.java.net/jeps/221 for more information).

I've got a fix for this, though it's not checked in yet. You can follow my progress in https://github.com/WadeWalker/gluegen/tree/java-11-fixes.

The next thing after the Taglet is the fact that the javah command doesn't exist in Java 10 and later :) Apparently this needs to be fixed by changing from the Ant javah task to using  javac task using (see https://ant.apache.org/manual-1.9.x/Tasks/javah.html and https://ant.apache.org/manual-1.9.x/Tasks/javac.html).
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

gouessej
Administrator
Do you think it's still possible to remain compatible with Java <= 1.9 by using conditions in the Ant build?

Was the boot classpath really necessary to build Gluegen with Java 1.8?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
It may be possible, but I'm not trying to do so at this point -- I just want to see if it's possible to build and run under Java 11 at all :) Once that's established, we can see how much backwards compatibility we want to preserve.
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

nyholku
Please let me know if there is something I can do in the testing line.

I'm travelling atm but will be back on this project from 6th Jan forward.

Seasonal greetings to all good folks working on JOGL/JOCL and doing sterling work.

wbr Kusti

PS What is the practical effect of Apple dropping OpenGL/OpenCL in favor of Metal?





On 22/12/2018 17:47, "Wade Walker [via jogamp]" <[hidden email]> wrote:



It may be possible, but I'm not trying to do so at this point -- I just want to see if it's possible to build and run under Java 11 at all :) Once that's established, we can see how much backwards compatibility we want to preserve.


________________________________________
If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/GL-ARB-vertex-buffer-object-not-available-on-Mac-tp4039309p4039343.html
To unsubscribe from GL_ARB_vertex_buffer_object not available on Mac?,
click here <
NAML <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


This e-mail may contain confidential or privileged information and is intended solely for the person to whom it is addressed. If you have received this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from the alteration of this e-mail, or as a result of any virus being passed on or as of transmission of this e-mail in general.
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
OK, the taglet and javah problems are fixed and checked into https://github.com/WadeWalker/gluegen/tree/java-11-fixes. Next problem: gluegen seems to be generating invalid Java code during the build, so it probably needs a little debugging :)
Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
Fixed the latest bug with @CStruct annotation processing, and now glugen compiles. I just need to test it, then move on to JOGL itself :)

There was a change back in https://jogamp.org/bugzilla/show_bug.cgi?id=923 for this annotation processing that gave you the ability to specify a "jname" for the generated class, instead of going by the declared Java name. This was to avoid the problem where the annotation processing failed if you annotated an undeclared class (since the annotation processing was what was going to create that class). So instead of doing this

    @CStruct(name="RenderingConfig", header="TestStruct01.h")
    RenderingConfig dummy1;


you'd annotate a dummy variable of an existing Java primitive type, like this

    @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h")
    boolean dummy1;

and the annotation processor would create RenderingConfig.java.

I'm not sure what changed in the meantime, but with Java 11, CStructAnnotationProcessor was emitting a RenameJavaType directive into the gluegen config file that caused the emitted file to be named boolean.java instead of RenderingConfig.java. So I put in a test to disable that behavior when jname is being used.

Reply | Threaded
Open this post in threaded view
|

Re: GL_ARB_vertex_buffer_object not available on Mac?

Wade Walker
Administrator
Now working on JOGL itself. The first two problems were (of course) the removal of javah in favor of javac for native header compilation, and the fact that JAVA_HOME/jre doesn't exist anymore in Java 9, so some paths need to be changed in the build (see https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-BC5E3EDE-C1FB-4B60-AF7D-8D4D7FE79C84).
123