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:
authorJason Fielder <jason_apple>2022-09-22 18:52:44 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-09-22 18:53:56 +0300
commit18b45aabf91ad0a407e8c7cd16c5503e7a99d6fa (patch)
treec4b5a1db3ec5bab9f1d9f1038d131f398046506a /intern
parent1514e1a5b7e15ec0c11cd40c2b9389982bd5d00e (diff)
Metal: GLSL shader compatibility changes for global uniform and interface name collision.
For the Metal shader translation support for shader-global uniforms are remapped via macro's, and in such cases where a uniform name matches a vertex attribute name, compilation errors will occur due to this injected syntax being incompatible with the immediate code. Also adding source-level function interface alternatives where sized arrays are passed in. These are not supported directly in Metal shading language and are instead handled as pointers. These pointers require explicit address-space qualifiers in some cases, if device/constant address space memory is passed into the function. Ref T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D15898
Diffstat (limited to 'intern')
-rw-r--r--intern/opencolorio/gpu_shader_display_transform_frag.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/opencolorio/gpu_shader_display_transform_frag.glsl b/intern/opencolorio/gpu_shader_display_transform_frag.glsl
index 3c2352c13ba..92cf9b013fd 100644
--- a/intern/opencolorio/gpu_shader_display_transform_frag.glsl
+++ b/intern/opencolorio/gpu_shader_display_transform_frag.glsl
@@ -130,8 +130,10 @@ vec4 apply_dither(vec4 col, vec2 uv)
* \{ */
/* Prototypes: Implementation is generaterd and defined after. */
+#ifndef GPU_METAL /* Forward declaration invalid in MSL. */
vec4 OCIO_to_scene_linear(vec4 pixel);
vec4 OCIO_to_display(vec4 pixel);
+#endif
vec4 OCIO_ProcessColor(vec4 col, vec4 col_overlay)
{