Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2022-05-11 16:19:10 +0300
committerJeroen Bakker <jeroen@blender.org>2022-05-11 16:22:01 +0300
commitedd892166d48077290759c3299e2433638f85aa1 (patch)
tree3c6c51cc561bdf9d84f2a4181f5edd0f1c1aa6d2 /source/blender/gpu/intern
parenta3f9862262c0ef192ece6ca8241b67cda9925b32 (diff)
Fix T97330: GPU Subdiv compiler error.
GLSL has different max number of ssbo per glsl stage. This patch checks if the number of compute ssbo blocks matches our requirements for the GPU Subdiv, before enabling it. Some platforms allow more ssbo bindings then blocks per stage.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_capabilities.cc6
-rw-r--r--source/blender/gpu/intern/gpu_capabilities_private.hh1
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_capabilities.cc b/source/blender/gpu/intern/gpu_capabilities.cc
index 72b62b3de3d..6ef015492c7 100644
--- a/source/blender/gpu/intern/gpu_capabilities.cc
+++ b/source/blender/gpu/intern/gpu_capabilities.cc
@@ -167,6 +167,12 @@ int GPU_max_shader_storage_buffer_bindings()
return GCaps.max_shader_storage_buffer_bindings;
}
+int GPU_max_compute_shader_storage_blocks()
+{
+ return GCaps.max_compute_shader_storage_blocks;
+}
+
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/gpu/intern/gpu_capabilities_private.hh b/source/blender/gpu/intern/gpu_capabilities_private.hh
index 611c2d6973c..a17dbe7f8e6 100644
--- a/source/blender/gpu/intern/gpu_capabilities_private.hh
+++ b/source/blender/gpu/intern/gpu_capabilities_private.hh
@@ -36,6 +36,7 @@ struct GPUCapabilities {
int max_vertex_attribs = 0;
int max_varying_floats = 0;
int max_shader_storage_buffer_bindings = 0;
+ int max_compute_shader_storage_blocks = 0;
int extensions_len = 0;
const char *(*extension_get)(int);