[Bf-blender-cvs] [b378aed53e0] temp-gpu-compute-shader: Fix issue where library glsl isn't included in compute shaders.
Jeroen Bakker
noreply at git.blender.org
Fri Apr 23 14:15:25 CEST 2021
Commit: b378aed53e0291fb0d1148eaa1841203d46b3680
Author: Jeroen Bakker
Date: Fri Apr 23 14:14:34 2021 +0200
Branches: temp-gpu-compute-shader
https://developer.blender.org/rBb378aed53e0291fb0d1148eaa1841203d46b3680
Fix issue where library glsl isn't included in compute shaders.
===================================================================
M source/blender/gpu/intern/gpu_shader.cc
===================================================================
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index d6331206b5e..fdd912bfd87 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -357,6 +357,9 @@ GPUShader *GPU_shader_create_ex(const char *vertcode,
if (defines) {
sources.append(defines);
}
+ if (libcode) {
+ sources.append(libcode);
+ }
sources.append(computecode);
shader->compute_shader_from_glsl(sources);
More information about the Bf-blender-cvs
mailing list