OS: iOS 15.0.1 kha.js:formatted:30842 Could not link the shader program: Internal error compiling shader with Metal backend. Please submit this shader, or website as a bug to https://bugs.webkit.org compile @ kha.js:formatted:30842 kha_graphics4_PerFramebufferPipelineCache @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 kha_graphics4_ImageShaderPainter @ kha.js:formatted:30842 kha_graphics4_Graphics2 @ kha.js:formatted:30842 kha_js_graphics4_Graphics2 @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 start @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842 (anonymous) @ VM41:333 (anonymous) @ kha.js:formatted:30842 (anonymous) @ kha.js:formatted:30842
<rdar://problem/84066469>
Thanks for filing, I can reproduce this on the latest iOS 15.1 beta as well. Does not reproduce on iOS 14.7.1.
[Error] Could not link the shader program: Internal error compiling shader with Metal backend. program_source:80:30: error: expected ';' at end of declaration list metal::float2 _utexPosition __unassigned_attribute__; ^ ; program_source:102:45: error: invalid type 'ANGLE_VertexIn' of input declaration with attribute 'stage_in' in a vertex function vertex __VERTEX_OUT(ANGLE_VertexOut) main0(ANGLE_VertexIn ANGLE_vertexIn [[stage_in]], constant ANGLE_UserUniforms & ANGLE_userUniforms [[buffer(19)]], constant ANGLE_AngleUniforms & ANGLE_angleUniforms [[buffer(17)]], uint ANGLE_instanceIdMod [[instance_id]], uint gl_VertexID [[vertex_id]] ) ^ program_source:80:3: note: field with missing attribute 'attribute' declared here metal::float2 _utexPosition __unassigned_attribute__; ^
// GLSL // // #version 300 es // // uniform mat4 projectionMatrix; // // in vec3 vertexPosition; // out vec2 texCoord; // in vec2 texPosition; // out vec4 color; // in vec4 vertexColor; // // void main() // { // gl_Position = projectionMatrix * vec4(vertexPosition, 1.0); // texCoord = texPosition; // color = vertexColor; // } // #define ANGLE_ALWAYS_INLINE __attribute__((always_inline)) ANGLE_ALWAYS_INLINE int ANGLE_int_clamp(int value, int minValue, int maxValue) { return ((value < minValue) ? minValue : ((value > maxValue) ? maxValue : value)); }; #if TRANSFORM_FEEDBACK_ENABLED #define __VERTEX_OUT(args) void #else #define __VERTEX_OUT(args) args #endif #define ANGLE_tensor metal::array #pragma clang diagnostic ignored "-Wunused-value" #define ANGLE_SAMPLE_COMPARE_GRADIENT_INDEX 0 #define ANGLE_SAMPLE_COMPARE_LOD_INDEX 1 #define ANGLE_RASTERIZATION_DISCARD_INDEX 2 #define ANGLE_COVERAGE_MASK_ENABLED_INDEX 3 constant bool ANGLE_UseSampleCompareGradient [[function_constant(ANGLE_SAMPLE_COMPARE_GRADIENT_INDEX)]]; constant bool ANGLE_UseSampleCompareLod [[function_constant(ANGLE_SAMPLE_COMPARE_LOD_INDEX)]]; constant bool ANGLE_RasterizationDiscard [[function_constant(ANGLE_RASTERIZATION_DISCARD_INDEX)]]; constant bool ANGLE_CoverageMaskEnabled [[function_constant(ANGLE_COVERAGE_MASK_ENABLED_INDEX)]]; struct ANGLE_DepthRangeParams { float ANGLE_near; float ANGLE_far; float ANGLE_diff; float ANGLE_reserved; }; struct ANGLE_AngleUniforms { metal::float4 ANGLE_viewport; metal::float2 ANGLE_halfRenderArea; metal::float2 ANGLE_flipXY; metal::float2 ANGLE_negFlipXY; uint ANGLE_clipDistancesEnabled; uint ANGLE_xfbActiveUnpaused; uint ANGLE_xfbVerticesPerDraw; metal::int4 ANGLE_xfbBufferOffsets; metal::uint4 ANGLE_acbBufferOffsets; ANGLE_DepthRangeParams ANGLE_depthRange; uint ANGLE_coverageMask; }; struct ANGLE_UserUniforms { metal::float4x4 _uprojectionMatrix; }; struct ANGLE_VertexIn { metal::float3 _uvertexPosition[[attribute(1)]]; metal::float2 _utexPosition __unassigned_attribute__; metal::float4 _uvertexColor[[attribute(2)]]; }; struct ANGLE_VertexOut { metal::float2 _utexCoord; metal::float4 _ucolor; metal::float4 gl_Position [[position]]; }; void ANGLE_0_main(thread ANGLE_VertexOut & ANGLE_vertexOut, thread ANGLE_VertexIn & ANGLE_vertexIn, constant ANGLE_UserUniforms & ANGLE_userUniforms) { ANGLE_vertexOut.gl_Position = metal::float4(0.0f, 0.0f, 0.0f, 0.0f); ANGLE_vertexOut._ucolor = metal::float4(0.0f, 0.0f, 0.0f, 0.0f); ANGLE_vertexOut._utexCoord = metal::float2(0.0f, 0.0f); metal::float4 ANGLE_4 = metal::float4(ANGLE_vertexIn._uvertexPosition, 1.0f); ANGLE_vertexOut.gl_Position = (ANGLE_userUniforms._uprojectionMatrix * ANGLE_4); ANGLE_vertexOut._utexCoord = ANGLE_vertexIn._utexPosition; ANGLE_vertexOut._ucolor = ANGLE_vertexIn._uvertexColor; } vertex __VERTEX_OUT(ANGLE_VertexOut) main0(ANGLE_VertexIn ANGLE_vertexIn [[stage_in]], constant ANGLE_UserUniforms & ANGLE_userUniforms [[buffer(19)]], constant ANGLE_AngleUniforms & ANGLE_angleUniforms [[buffer(17)]], uint ANGLE_instanceIdMod [[instance_id]], uint gl_VertexID [[vertex_id]] ) { ANGLE_VertexOut ANGLE_vertexOut; { ANGLE_0_main(ANGLE_vertexOut, ANGLE_vertexIn, ANGLE_userUniforms); ANGLE_vertexOut.gl_Position.z = (ANGLE_vertexOut.gl_Position.z * ANGLE_angleUniforms.ANGLE_depthRange.ANGLE_reserved); float ANGLE_7 = (ANGLE_vertexOut.gl_Position.z + ANGLE_vertexOut.gl_Position.w); ANGLE_vertexOut.gl_Position.z = (ANGLE_7 * 0.5f); ANGLE_vertexOut.gl_Position.y = (ANGLE_vertexOut.gl_Position.y * ANGLE_angleUniforms.ANGLE_negFlipXY.y); if (ANGLE_RasterizationDiscard) { ANGLE_vertexOut.gl_Position = metal::float4(-3.0f, -3.0f, -3.0f, 1.0f); } else {} } #if TRANSFORM_FEEDBACK_ENABLED return; #else return ANGLE_vertexOut; #endif } http://106.55.234.68/3d-showroom/wgl1/kha.js:1:108144: CONSOLE LOG kha/graphics4/PipelineState.hx:49: Error: Could not link the shader program: Internal error compiling shader with Metal backend. program_source:80:30: error: expected ';' at end of declaration list metal::float2 _utexPosition __unassigned_attribute__; ^ ; program_source:102:45: error: invalid type 'ANGLE_VertexIn' of input declaration with attribute 'stage_in' in a vertex function vertex __VERTEX_OUT(ANGLE_VertexOut) main0(ANGLE_VertexIn ANGLE_vertexIn [[stage_in]], constant ANGLE_UserUniforms & ANGLE_userUniforms [[buffer(19)]], constant ANGLE_AngleUniforms & ANGLE_angleUniforms [[buffer(17)]], uint ANGLE_instanceIdMod [[instance_id]], uint gl_VertexID [[vertex_id]] ) ^ program_source:80:3: note: field with missing attribute 'attribute' declared here metal::float2 _utexPosition __unassigned_attribute__; ^ http://106.55.234.68/3d-showroom/wgl1/kha.js:1:698459: CONSOLE JS ERROR Could not link the shader program: Internal error compiling shader with Metal backend. program_source:80:30: error: expected ';' at end of declaration list metal::float2 _utexPosition __unassigned_attribute__; ^ ; program_source:102:45: error: invalid type 'ANGLE_VertexIn' of input declaration with attribute 'stage_in' in a vertex function vertex __VERTEX_OUT(ANGLE_VertexOut) main0(ANGLE_VertexIn ANGLE_vertexIn [[stage_in]], constant ANGLE_UserUniforms & ANGLE_userUniforms [[buffer(19)]], constant ANGLE_AngleUniforms & ANGLE_angleUniforms [[buffer(17)]], uint ANGLE_instanceIdMod [[instance_id]], uint gl_VertexID [[vertex_id]] ) ^ program_source:80:3: note: field with missing attribute 'attribute' declared here metal::float2 _utexPosition __unassigned_attribute__; ^
Created attachment 442210 [details] Patch
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment on attachment 442210 [details] Patch Could you put in a test?
Created attachment 442218 [details] Patch
Created attachment 442417 [details] Patch for landing
Found 1 new test failure: fast/canvas/webgl/attrib-name-aliasing-bug.html
Created attachment 442435 [details] Patch for landing
Committed r284849 (243526@main): <https://commits.webkit.org/243526@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442435 [details].