From af321b4a90a4da9351dfbdd6d9a8202a73fc8c05 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 6 Aug 2023 21:26:04 +0200 Subject: Bug 1441 - Fix ARB_multi_draw_indirect: Belongs to GL4, glMultiDrawElementsIndirect shall only have VBO indirect access --- make/config/jogl/gl-common-gpubufferonly.cfg | 5 ++++- make/config/jogl/gl-common.cfg | 12 +++++++++++- make/config/jogl/gl-if-gl4-ignores.cfg | 1 + make/config/jogl/gl4bc-common-cpubufferJavaCode.java | 4 ---- 4 files changed, 16 insertions(+), 6 deletions(-) (limited to 'make/config/jogl') 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: void {@native glMultiDrawArraysIndirect}(GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride);
Part of GL_VERSION_4_3, GL_ARB_multi_draw_indirect - @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: void {@native glDrawElementsInstancedBaseInstance}(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance);
Part of GL_VERSION_4_2, GL_ARB_base_instance @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); -- cgit v1.2.3