[Bf-blender-cvs] [93065a67c66] master: GPU: Disable create info for 2d image overlay merge.

Jeroen Bakker noreply at git.blender.org
Fri Jan 21 14:28:36 CET 2022


Commit: 93065a67c664240bf1df3b303623292b41daf066
Author: Jeroen Bakker
Date:   Fri Jan 21 14:24:30 2022 +0100
Branches: master
https://developer.blender.org/rB93065a67c664240bf1df3b303623292b41daf066

GPU: Disable create info for 2d image overlay merge.

This shader needs to use the same interface as the OCIO shader. On Linux
and Windows this seems to be the case. On MacOS however there is a
mismatch that makes the overlay texture to be completely black when
switching to workbench in the Shader workspace.

This is just a temporarily work-around as this should be solved. Due to
the poor GPU debugging facilities on Mac we haven't been able to
pin-point the root cause.

===================================================================

M	source/blender/gpu/intern/gpu_shader_builtin.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c
index 13f1774df03..931c3750ac8 100644
--- a/source/blender/gpu/intern/gpu_shader_builtin.c
+++ b/source/blender/gpu/intern/gpu_shader_builtin.c
@@ -192,8 +192,18 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
                                   .create_info = "gpu_shader_2D_flat_color"},
     [GPU_SHADER_2D_SMOOTH_COLOR] = {.name = "GPU_SHADER_2D_SMOOTH_COLOR",
                                     .create_info = "gpu_shader_2D_smooth_color"},
-    [GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE] = {.name = "GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE",
-                                            .create_info = "gpu_shader_2D_image_overlays_merge"},
+    [GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE] =
+        {
+            .name = "GPU_SHADER_2D_IMAGE_OVERLAYS_MERGE",
+#ifdef __APPLE__
+            /* GPUShaderCreateInfo is disabled on MacOS due to mismatch with OCIO shader. See
+             * T95052 for more details. */
+            .vert = "gpu_shader_2D_image_vert.glsl",
+            .frag = "gpu_shader_image_overlays_merge_frag.glsl",
+#else
+            .create_info = "gpu_shader_2D_image_overlays_merge",
+#endif
+        },
     [GPU_SHADER_2D_IMAGE_OVERLAYS_STEREO_MERGE] =
         {.name = "GPU_SHADER_2D_IMAGE_OVERLAYS_STEREO_MERGE",
          .create_info = "gpu_shader_2D_image_overlays_stereo_merge"},



More information about the Bf-blender-cvs mailing list