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
path: root/intern
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2022-03-23 16:06:36 +0300
committerJeroen Bakker <jeroen@blender.org>2022-03-23 16:13:09 +0300
commit51727fe86fdeb1f01552afdac5a5d7b7ad4453b5 (patch)
treea3bbd2955489239a8ea3b93276b84e25ab945c9d /intern
parent3d5d8b7f7121990de5db9d0c8e56011e807c6ee4 (diff)
Fix T96502: Compilation error OCIO when using GradingPrimaryTransform.
When using GradingPrimaryTransform the generated GLSL code fails to compile. The actual issue is inside OCIO (https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1603). The reason is that unset clamping values are rendered out as `inf`, which isn't recognizable by GLSL. The issue is worked around by defining a default for `inf`. Reviewed By: brecht Maniphest Tasks: T96502 Differential Revision: https://developer.blender.org/D14425
Diffstat (limited to 'intern')
-rw-r--r--intern/opencolorio/ocio_impl_glsl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index e3d44ae9d55..4de4d2caf15 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -192,6 +192,11 @@ static bool createGPUShader(OCIO_GPUShader &shader,
info.fragment_source("gpu_shader_display_transform_frag.glsl");
info.fragment_source_generated = source;
+ /* T96502: Work around for incorrect OCIO GLSL code generation when using
+ * GradingPrimaryTransform. Should be reevaluated when changing to a next version of OCIO.
+ * (currently v2.1.1). */
+ info.define("inf 1e32");
+
if (use_curve_mapping) {
info.define("USE_CURVE_MAPPING");
info.uniform_buf(UNIFORMBUF_SLOT_CURVEMAP, "OCIO_GPUCurveMappingParameters", "curve_mapping");