diff options
author | Sven Gothel <[email protected]> | 2023-08-06 21:26:04 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-08-06 21:26:04 +0200 |
commit | af321b4a90a4da9351dfbdd6d9a8202a73fc8c05 (patch) | |
tree | d279e01f01f2de580276ca91f773df3e5ebbc2e7 /make | |
parent | 7437eb0e4a6bbbfb96047677716d9306e9b2acbd (diff) |
Bug 1441 - Fix ARB_multi_draw_indirect: Belongs to GL4, glMultiDrawElementsIndirect shall only have VBO indirect access
Diffstat (limited to 'make')
-rw-r--r-- | make/build-jogl.xml | 11 | ||||
-rw-r--r-- | make/config/jogl/gl-common-gpubufferonly.cfg | 5 | ||||
-rw-r--r-- | make/config/jogl/gl-common.cfg | 12 | ||||
-rw-r--r-- | make/config/jogl/gl-if-gl4-ignores.cfg | 1 | ||||
-rw-r--r-- | make/config/jogl/gl4bc-common-cpubufferJavaCode.java | 4 | ||||
-rwxr-xr-x | make/scripts/gluegen-gl.sh | 101 |
6 files changed, 115 insertions, 19 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml index 7f2ebbcd5..ee95eb642 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -578,7 +578,9 @@ config="${config.jogl}/gl-if-gl3.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" - emitter="com.jogamp.gluegen.opengl.GLEmitter"> + emitter="com.jogamp.gluegen.opengl.GLEmitter" + debug="false" + logLevel="WARNING"> <classpath refid="gluegen-gl.classpath" /> </gluegen> </target> @@ -643,7 +645,9 @@ config="${config.jogl}/gl-if-gl4.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" - emitter="com.jogamp.gluegen.opengl.GLEmitter"> + emitter="com.jogamp.gluegen.opengl.GLEmitter" + debug="false" + logLevel="WARNING"> <classpath refid="gluegen-gl.classpath" /> </gluegen> </target> @@ -657,7 +661,8 @@ includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" - debug="false"> + debug="false" + logLevel="WARNING"> <classpath refid="gluegen-gl.classpath" /> </gluegen> </target> diff --git a/make/config/jogl/gl-common-gpubufferonly.cfg b/make/config/jogl/gl-common-gpubufferonly.cfg index 9370d9502..e91f341dd 100644 --- a/make/config/jogl/gl-common-gpubufferonly.cfg +++ b/make/config/jogl/gl-common-gpubufferonly.cfg @@ -44,7 +44,10 @@ BufferObjectOnly glDrawElementsInstancedBaseVertex BufferObjectOnly glDrawElementsInstancedBaseVertexBaseInstance BufferObjectOnly glDrawRangeElements BufferObjectOnly glDrawRangeElementsBaseVertex -BufferObjectOnly glMultiDrawArraysIndirect + +# `glMultiDrawArraysIndirect` uses both, Buffer for memory address and (see Bug 974) VBO offset for GL_DRAW_INDIRECT_BUFFER +#BufferObjectOnly glMultiDrawArraysIndirect +BufferObjectOnly glMultiDrawElementsIndirect BufferObjectOnly glDrawArraysIndirect BufferObjectOnly glDrawElementsIndirect diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg index be4d9c44e..499c7db7f 100644 --- a/make/config/jogl/gl-common.cfg +++ b/make/config/jogl/gl-common.cfg @@ -734,9 +734,19 @@ BufferObjectKind Element glDrawElementsInstancedBaseVertexBaseInstance BufferObjectKind Element glDrawRangeElements BufferObjectKind Element glDrawRangeElementsBaseVertex +# ARB_multi_draw_indirect +# Example of VBO offset only: glMultiDrawElementsIndirect of extension ARB_multi_draw_indirect +# - `BufferObjectOnly` and `NIODirectOnly` causes only 1 binding variant while +# - We specify this in file `gl-common-gpubufferonly.cfg` in general +# - `BufferObjectKind Indirect` causes it to be of indirect VBO, type long +NIODirectOnly glMultiDrawElementsIndirect +BufferObjectOnly glMultiDrawElementsIndirect +BufferObjectKind Indirect glMultiDrawElementsIndirect +# `glMultiDrawArraysIndirect` uses both, Buffer for memory address and (see Bug 974) VBO offset for GL_DRAW_INDIRECT_BUFFER +BufferObjectKind Indirect glMultiDrawArraysIndirect + BufferObjectKind Indirect glDrawArraysIndirect BufferObjectKind Indirect glDrawElementsIndirect -BufferObjectKind Indirect glMultiDrawArraysIndirect # There are no PBOs in the embedded OpenGL variants right now BufferObjectKind UnpackPixel glBitmap diff --git a/make/config/jogl/gl-if-gl4-ignores.cfg b/make/config/jogl/gl-if-gl4-ignores.cfg index 7de570557..ec623d8d4 100644 --- a/make/config/jogl/gl-if-gl4-ignores.cfg +++ b/make/config/jogl/gl-if-gl4-ignores.cfg @@ -57,4 +57,5 @@ IgnoreExtension GL_ARB_sparse_texture_clamp IgnoreExtension GL_ARB_sample_locations IgnoreExtension GL_ARB_fragment_shader_interlock IgnoreExtension GL_ARB_post_depth_coverage +IgnoreExtension GL_ARB_multi_draw_indirect diff --git a/make/config/jogl/gl4bc-common-cpubufferJavaCode.java b/make/config/jogl/gl4bc-common-cpubufferJavaCode.java index 39dc9f6c4..a29f540fa 100644 --- a/make/config/jogl/gl4bc-common-cpubufferJavaCode.java +++ b/make/config/jogl/gl4bc-common-cpubufferJavaCode.java @@ -7,10 +7,6 @@ @param indirect a direct or array-backed {@link java.nio.Buffer} */ public void glDrawElementsIndirect(int mode, int type, Buffer indirect); - /** Entry point to C language function: <code> void {@native glMultiDrawArraysIndirect}(GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride); </code> <br>Part of <code>GL_VERSION_4_3</code>, <code>GL_ARB_multi_draw_indirect</code> - @param indirect a direct or array-backed {@link java.nio.Buffer} */ - public void glMultiDrawArraysIndirect(int mode, Buffer indirect, int drawcount, int stride); - /** Entry point to C language function: <code> void {@native glDrawElementsInstancedBaseInstance}(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance); </code> <br>Part of <code>GL_VERSION_4_2</code>, <code>GL_ARB_base_instance</code> @param indices a direct or array-backed {@link java.nio.Buffer} */ public void glDrawElementsInstancedBaseInstance(int mode, int count, int type, Buffer indices, int instancecount, int baseinstance); diff --git a/make/scripts/gluegen-gl.sh b/make/scripts/gluegen-gl.sh index b94658523..b4788b5be 100755 --- a/make/scripts/gluegen-gl.sh +++ b/make/scripts/gluegen-gl.sh @@ -309,12 +309,14 @@ fi } function gluegen_gl3es3() { +# --logLevel INFO \ +# --debug \ + java \ -classpath \ ../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ com.jogamp.gluegen.GlueGen \ ---debug \ ---dumpCPP \ +--logLevel INFO \ -O../$rootrel/jogl \ -Ecom.jogamp.gluegen.opengl.GLEmitter \ -C./config/jogl/gl-if-gl3_es3.cfg \ @@ -349,8 +351,7 @@ java \ -classpath \ ../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ com.jogamp.gluegen.GlueGen \ ---debug \ ---dumpCPP \ +--logLevel INFO \ -O../$rootrel/jogl \ -Ecom.jogamp.gluegen.opengl.GLEmitter \ -C./config/jogl/gl-if-es3.cfg \ @@ -455,12 +456,14 @@ copy_temp } function gluegen_gl2gl3() { +# --logLevel INFO \ +# --debug \ + java \ -classpath \ ../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ com.jogamp.gluegen.GlueGen \ ---debug \ ---dumpCPP \ +--logLevel INFO \ -O../$rootrel/jogl \ -Ecom.jogamp.gluegen.opengl.GLEmitter \ -C./config/jogl/gl-if-gl2gl3-subset.cfg \ @@ -493,8 +496,7 @@ java \ -classpath \ ../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ com.jogamp.gluegen.GlueGen \ ---debug \ ---dumpCPP \ +--logLevel INFO \ -O../$rootrel/jogl \ -Ecom.jogamp.gluegen.opengl.GLEmitter \ -C./config/jogl/gl-if-gl2_gl3.cfg \ @@ -525,7 +527,45 @@ copy_temp } -function gluegen_gl4() { +function gluegen_gl3() { +# --logLevel INFO \ +# --debug \ + +java \ +-classpath \ +../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ +com.jogamp.gluegen.GlueGen \ +--logLevel INFO \ +-O../$rootrel/jogl \ +-Ecom.jogamp.gluegen.opengl.GLEmitter \ +-C./config/jogl/gl-if-gl3.cfg \ +-Istub_includes/jni \ +-Istub_includes/jni/macosx \ +-Istub_includes/jni/win32 \ +-Istub_includes/jni/x11 \ +-Istub_includes/khr \ +-Istub_includes/khr/KD \ +-Istub_includes/khr/KHR \ +-Istub_includes/macosx \ +-Istub_includes/macosx/AppKit \ +-Istub_includes/macosx/OpenGL \ +-Istub_includes/macosx/QuartzCore \ +-Istub_includes/opengl \ +-Istub_includes/opengl/GL \ +-Istub_includes/opengl/GL3 \ +-Istub_includes/opengl/GLES \ +-Istub_includes/opengl/GLES2 \ +-Istub_includes/win32 \ +-Istub_includes/x11 \ +-Istub_includes/x11/X11 \ +-Istub_includes/x11/X11/extensions \ +-I../../gluegen/make/stub_includes/gluegen \ +stub_includes/opengl/gl3.c \ + +copy_temp + +} +function gluegen_gl3bc() { java \ -classpath \ ../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ @@ -534,6 +574,45 @@ com.jogamp.gluegen.GlueGen \ --dumpCPP \ -O../$rootrel/jogl \ -Ecom.jogamp.gluegen.opengl.GLEmitter \ +-C./config/jogl/gl-gl3bc.cfg \ +-Istub_includes/jni \ +-Istub_includes/jni/macosx \ +-Istub_includes/jni/win32 \ +-Istub_includes/jni/x11 \ +-Istub_includes/khr \ +-Istub_includes/khr/KD \ +-Istub_includes/khr/KHR \ +-Istub_includes/macosx \ +-Istub_includes/macosx/AppKit \ +-Istub_includes/macosx/OpenGL \ +-Istub_includes/macosx/QuartzCore \ +-Istub_includes/opengl \ +-Istub_includes/opengl/GL \ +-Istub_includes/opengl/GL3 \ +-Istub_includes/opengl/GLES \ +-Istub_includes/opengl/GLES2 \ +-Istub_includes/win32 \ +-Istub_includes/x11 \ +-Istub_includes/x11/X11 \ +-Istub_includes/x11/X11/extensions \ +-I../../gluegen/make/stub_includes/gluegen \ +stub_includes/opengl/gl3bc.c \ + +copy_temp + +} + +function gluegen_gl4() { +# --logLevel INFO \ +# --debug \ + +java \ +-classpath \ +../../gluegen/$rootrel/gluegen.jar:../$rootrel/jogl/gluegen-gl.jar \ +com.jogamp.gluegen.GlueGen \ +--logLevel INFO \ +-O../$rootrel/jogl \ +-Ecom.jogamp.gluegen.opengl.GLEmitter \ -C./config/jogl/gl-if-gl4.cfg \ -Istub_includes/jni \ -Istub_includes/jni/macosx \ @@ -913,7 +992,9 @@ function gluegen_all() { # gluegen_es3_impl # gluegen_gl2 # gluegen_gl2gl3 -# gluegen_gl4 +# gluegen_gl3 +# gluegen_gl3bc + gluegen_gl4 # gluegen_gl4bc # # gluegen_egl |