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:
authorClément Foucault <foucault.clem@gmail.com>2022-05-18 22:45:06 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-05-19 00:01:08 +0300
commit9631bb1e17425d9dd9acdf06b251dd98e1838441 (patch)
treecbe01ee22dc9dc2aa1a2cd950efaee9d687e32d6
parentca780f4406c3f8d668d91e39b62d9bf81bf49ba2 (diff)
GLShader: Add glsl_shader_defines.glsl to compute shaders
-rw-r--r--source/blender/gpu/opengl/gl_shader.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index 957bc8b24be..5a28b8b7318 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -876,7 +876,7 @@ static char *glsl_patch_default_get()
static char *glsl_patch_compute_get()
{
/** Used for shader patching. Init once. */
- static char patch[512] = "\0";
+ static char patch[2048] = "\0";
if (patch[0] != '\0') {
return patch;
}
@@ -889,6 +889,8 @@ static char *glsl_patch_compute_get()
/* Array compat. */
STR_CONCAT(patch, slen, "#define gpu_Array(_type) _type[]\n");
+ STR_CONCAT(patch, slen, datatoc_glsl_shader_defines_glsl);
+
BLI_assert(slen < sizeof(patch));
return patch;
}