f45075b08b
If we run on a system with Xcode installed to a default path, run Xcode Metal shader compiler to validate the generated MSL shader. This uncovers an issue in the existing MSL test - MSL backend currently does not auto-assign attribute locations, which means that translating GLSL shader without location layout produces an invalid MSL which generates "error: 'attribute' index '0' is used more than once".
18 lines
242 B
GLSL
18 lines
242 B
GLSL
#version 310 es
|
|
|
|
layout(std140) uniform UBO
|
|
{
|
|
uniform mat4 uMVP;
|
|
};
|
|
|
|
layout(location = 0) in vec4 aVertex;
|
|
layout(location = 1) in vec3 aNormal;
|
|
|
|
out vec3 vNormal;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = uMVP * aVertex;
|
|
vNormal = aNormal;
|
|
}
|