From a926cde165b41b3f64bc66e287e9602c2661b948 Mon Sep 17 00:00:00 2001 From: Harald Steinlechner Date: Tue, 19 Dec 2023 17:47:04 +0100 Subject: [PATCH] extended RuntimeConfig & version bump --- RELEASE_NOTES.md | 3 +++ src/Aardvark.Rendering.GL/Core/Config.fs | 2 ++ src/Aardvark.Rendering.GL/Instructions/OpenGL.fs | 12 ++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7f85997a..9e26b132 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 5.4.10-prerelease0003 +- [GL] added flag to disable multidraw (experimental) + ### 5.4.10-prerelease0003 - [FontResolve] fixed null family name failure diff --git a/src/Aardvark.Rendering.GL/Core/Config.fs b/src/Aardvark.Rendering.GL/Core/Config.fs index 213906d0..a127cc28 100644 --- a/src/Aardvark.Rendering.GL/Core/Config.fs +++ b/src/Aardvark.Rendering.GL/Core/Config.fs @@ -101,6 +101,8 @@ module RuntimeConfig = /// let mutable AllowConcurrentResourceAccess = false + let mutable AllowMultiDrawIndirect = false + /// Reporting modes for OpenGL errors. type ErrorFlagCheck = diff --git a/src/Aardvark.Rendering.GL/Instructions/OpenGL.fs b/src/Aardvark.Rendering.GL/Instructions/OpenGL.fs index f06fdfe4..cd9239c8 100644 --- a/src/Aardvark.Rendering.GL/Instructions/OpenGL.fs +++ b/src/Aardvark.Rendering.GL/Instructions/OpenGL.fs @@ -665,12 +665,20 @@ module OpenGl = /// /// https://www.opengl.org/sdk/docs/man/html/glMultiDrawArraysIndirect.xhtml /// - let MultiDrawArraysIndirect = getProcAddress "glMultiDrawArraysIndirect" + let MultiDrawArraysIndirect = + if RuntimeConfig.AllowMultiDrawIndirect then + getProcAddress "glMultiDrawArraysIndirect" + else + 0n /// /// https://www.opengl.org/sdk/docs/man/html/glMultiDrawElementsIndirect.xhtml /// - let MultiDrawElementsIndirect = getProcAddress "glMultiDrawElementsIndirect" + let MultiDrawElementsIndirect = + if RuntimeConfig.AllowMultiDrawIndirect then + getProcAddress "glMultiDrawElementsIndirect" + else + 0n ///