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-01-29 01:32:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-29 01:32:51 +0300
commitfe80b6ceace8d42ffdd467d506fec02f42a9f972 (patch)
tree0f311024fa06bcd8a784ff7605b4bad76668dbf5
parent6b7756279f719a434505d461fb03b5faa5ce9aa0 (diff)
parent0a8fa07735cdb89081b652c032c73863e34f8ff1 (diff)
Merge branch 'blender-v3.1-release'
-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 6f39d69e6ff..79182ea05e6 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -416,7 +416,9 @@ std::string GLShader::resources_declare(const ShaderCreateInfo &info) const
ss << ";\n";
}
for (const ShaderCreateInfo::PushConst &uniform : info.push_constants_) {
- ss << "#define " << uniform.name << " (" << uniform.name << ")\n";
+ /* T95278: Double macro to avoid some compilers think it is recusive. */
+ ss << "#define " << uniform.name << "_ " << uniform.name << "\n";
+ ss << "#define " << uniform.name << " (" << uniform.name << _ ")\n";
}
ss << "\n";
return ss.str();