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:
authorJeroen Bakker <jeroen@blender.org>2022-01-21 16:24:30 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-21 16:24:30 +0300
commit93065a67c664240bf1df3b303623292b41daf066 (patch)
tree01ea3cb51941c618bf83d65ff4b0ff034005f144
parentf6888b530ac81abbe61755971449ad6b42b93c82 (diff)
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.
-rw-r--r--source/blender/gpu/intern/gpu_shader_builtin.c14
1 files changed, 12 insertions, 2 deletions
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"},