Metal: Fix crash when compiling compositor shaders.

Although viewport compositor isn't supported yet on Apple deviced the
shaderlibs are compiled. The compositor shaders uses mat3 constructor
with a single vec3 and 6 floats. This constructor wasn't defined in
metal so it failed the compilation.

This patch adds the override to mat3.
This commit is contained in:
Jeroen Bakker 2023-01-05 08:27:31 +01:00
parent bfb0b1decc
commit d7598c8081
Notes: blender-bot 2023-02-14 11:28:39 +01:00
Referenced by issue #103635, Metal backend shows everything in pink
1 changed files with 5 additions and 0 deletions

View File

@ -1236,6 +1236,11 @@ mat3 MAT3x3(
{
return mat3(vec3(a1, a2, a3), vec3(b1, b2, b3), vec3(c1, c2, c3));
}
mat3 MAT3x3(
vec3 a, float b1, float b2, float b3, float c1, float c2, float c3)
{
return mat3(a, vec3(b1, b2, b3), vec3(c1, c2, c3));
}
mat3 MAT3x3(float f)
{
return mat3(f);