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 <jeroen@blender.org>2021-04-16 13:54:53 +0300
committerJeroen Bakker <jeroen@blender.org>2021-04-16 13:54:53 +0300
commitea7eff1cc843fcfa130f569fb8061c31a28bcebc (patch)
tree53d47e07378fd8f4aa8b55f35bd08941fce2ead8 /intern
parent4bef49e32b6d4d9df496b2b54a78b66b11df7334 (diff)
Fix OCIO Shader Compilation Error.
Compilation fails when our OCIO wrapper creates a shader that transfer first to scene ref and directly after that to display. This cause is that the GPU resources of both transfers had the same name. This is fixed by prefixing the resources. This can be reproduced by loading a movie file (mkv) in the VSE editor. Reported by Sergey Sharybin.
Diffstat (limited to 'intern')
-rw-r--r--intern/opencolorio/ocio_impl_glsl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 590d7c07002..5ebf2e33723 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -561,6 +561,7 @@ static OCIO_GPUDisplayShader &getGPUDisplayShader(
GpuShaderDescRcPtr shaderdesc_to_scene_linear = GpuShaderDesc::CreateShaderDesc();
shaderdesc_to_scene_linear->setLanguage(GPU_LANGUAGE_GLSL_1_3);
shaderdesc_to_scene_linear->setFunctionName("OCIO_to_scene_linear");
+ shaderdesc_to_scene_linear->setResourcePrefix("to_scene");
(*(ConstProcessorRcPtr *)processor_to_scene_linear)
->getDefaultGPUProcessor()
->extractGpuShaderInfo(shaderdesc_to_scene_linear);
@@ -569,6 +570,8 @@ static OCIO_GPUDisplayShader &getGPUDisplayShader(
GpuShaderDescRcPtr shaderdesc_to_display = GpuShaderDesc::CreateShaderDesc();
shaderdesc_to_display->setLanguage(GPU_LANGUAGE_GLSL_1_3);
shaderdesc_to_display->setFunctionName("OCIO_to_display");
+ shaderdesc_to_scene_linear->setResourcePrefix("to_display");
+ shaderdesc_to_display->getNextResourceIndex();
(*(ConstProcessorRcPtr *)processor_to_display)
->getDefaultGPUProcessor()
->extractGpuShaderInfo(shaderdesc_to_display);