Commit: 4a3cbfd90e9f11b138d2e6e97d287275be6e2580
Author: Jeroen Bakker
Date: Tue Nov 29 15:25:22 2022 +0100
Branches: temp-vulkan-shader
https://developer.blender.org/rB4a3cbfd90e9f11b138d2e6e97d287275be6e2580
Add glsl shader defines.
===================================================================
M source/blender/gpu/vulkan/vk_shader.cc
===================================================================
diff --git a/source/blender/gpu/vulkan/vk_shader.cc
b/source/blender/gpu/vulkan/vk_shader.cc
index 8a247434901..fe5db057fa5 100644
--- a/source/blender/gpu/vulkan/vk_shader.cc
+++ b/source/blender/gpu/vulkan/vk_shader.cc
@@ -15,6 +15,8 @@
using namespace blender::gpu::shader;
+extern "C" char datatoc_glsl_shader_defines_glsl[];
+
namespace blender::gpu {
/* -------------------------------------------------------------------- */
@@ -493,7 +495,7 @@ static std::string combine_sources(Span<const char *>
sources)
static char *glsl_patch_get()
{
- static char patch[512] = "\0";
+ static char patch[2048] = "\0";
if (patch[0] != '\0') {
return patch;
}
@@ -507,6 +509,9 @@ static char *glsl_patch_get()
STR_CONCAT(patch, slen, "#define gpu_BaseInstance 0\n");
STR_CONCAT(patch, slen, "#define gpu_InstanceIndex (gl_InstanceIndex +
gpu_BaseInstance)\n");
+ /* GLSL Backend Lib. */
+ STR_CONCAT(patch, slen, datatoc_glsl_shader_defines_glsl);
+
BLI_assert(slen < sizeof(patch));
return patch;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs