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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-15 18:07:32 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-15 18:07:32 +0300
commit3bb4597b2d23d5d3afd342c432b5cac23e2ba755 (patch)
treead5a4b2493c565775576651771334cc6af6de9fa /source/blender/blenkernel/BKE_subdiv_modifier.h
parent45b637e1e79f817b182031246233c29a4344d159 (diff)
Disable GPU subdivision if the maximum number of SSBO binding is reached
Some old platforms and drivers have limited amount of SSBO binding per compute shader. This disables GPU subdivision if we cannot possibly bind all required buffers within this limit. For now the maximum number of buffers used by the GPU code is hardcoded, but will be programmatically detected when shader creation is automated. Ref D14337
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv_modifier.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv_modifier.h b/source/blender/blenkernel/BKE_subdiv_modifier.h
index 40e8ee2f999..e9de7d1532e 100644
--- a/source/blender/blenkernel/BKE_subdiv_modifier.h
+++ b/source/blender/blenkernel/BKE_subdiv_modifier.h
@@ -13,6 +13,10 @@
extern "C" {
#endif
+/* Hardcoded for until GPU shaders are automatically generated, then we will have a more
+ * programmatic way of detecting this. */
+#define MAX_GPU_SUBDIV_SSBOS 12
+
struct Mesh;
struct Object;
struct Scene;