[Webkit-unassigned] [Bug 231475] REGRESSION (iOS 15), safari604.1: Could not link the shader program

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 22 01:07:59 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231475

--- Comment #4 from Kimmo Kinnunen <kkinnunen at apple.com> ---
// 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__;
  ^

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211022/4ad6b332/attachment.htm>


More information about the webkit-unassigned mailing list