From 45b637e1e79f817b182031246233c29a4344d159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Tue, 15 Mar 2022 16:04:41 +0100 Subject: GPU capabilities: detect max SSBO bindings This adds detection of the maximum number of shader storage buffer bindings that is supported on the current platform. This can be useful to turn off features that require compute shaders but use more buffer bindings than available. Differential Revision: https://developer.blender.org/D14337 --- source/blender/gpu/opengl/gl_backend.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/gpu/opengl') diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index f0d7a23ef82..9885b16966b 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -485,6 +485,8 @@ void GLBackend::capabilities_init() glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 0, &GCaps.max_work_group_size[0]); glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 1, &GCaps.max_work_group_size[1]); glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 2, &GCaps.max_work_group_size[2]); + glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, + &GCaps.max_shader_storage_buffer_bindings); } GCaps.shader_storage_buffer_objects_support = GLEW_ARB_shader_storage_buffer_object; /* GL specific capabilities. */ -- cgit v1.2.3