[Webkit-unassigned] [Bug 244152] use of gl_VertexId causes error compiling shader with Metal backend

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 22 14:11:06 PDT 2022


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

Kenneth Russell <kbr at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geofflang at google.com,
                   |                            |gman at chromium.org,
                   |                            |jonahr at google.com,
                   |                            |kpiddington at apple.com

--- Comment #2 from Kenneth Russell <kbr at google.com> ---
The new repro link fails in Chrome with ANGLE's Metal backend as well. These are the reported compilation errors:

---
[.WebGL-0x118015ca100] GL_INVALID_OPERATION: Error: 0x00000502, in ../../third_party/angle/src/libANGLE/renderer/metal/ProgramMtl.mm, createMslShaderLib:768. Internal error compiling shader with Metal backend.
program_source:409:28: error: call to '_ureadFromTexture' is ambiguous
  metal::float4 ANGLE_55 = _ureadFromTexture(ANGLE_textureEnvs._utGroup, ANGLE_invocationVertexGlobals.gl_VertexID, ANGLE_userUniforms._uuGeoTexDim);
                           ^~~~~~~~~~~~~~~~~
program_source:377:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, float _ui, metal::float2 _udim)
              ^
program_source:389:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, int _ui, metal::float2 _udim)
              ^
program_source:418:28: error: call to '_ureadFromTexture' is ambiguous
  metal::float4 ANGLE_63 = _ureadFromTexture(ANGLE_textureEnvs._utPosition, ANGLE_invocationVertexGlobals.gl_VertexID, ANGLE_userUniforms._uuGeoTexDim);
                           ^~~~~~~~~~~~~~~~~
program_source:377:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, float _ui, metal::float2 _udim)
              ^
program_source:389:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, int _ui, metal::float2 _udim)
              ^
program_source:426:28: error: call to '_ureadFromTexture' is ambiguous
  metal::float4 ANGLE_68 = _ureadFromTexture(ANGLE_textureEnvs._utNormal, ANGLE_invocationVertexGlobals.gl_VertexID, ANGLE_userUniforms._uuGeoTexDim);
                           ^~~~~~~~~~~~~~~~~
program_source:377:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, float _ui, metal::float2 _udim)
              ^
program_source:389:15: note: candidate function
metal::float4 _ureadFromTexture(ANGLE_TextureEnv<metal::texture2d<float>> _utex, int _ui, metal::float2 _udim)
---

It makes sense that `int(gl_VertexId)` works around the bug because that disambiguates the internal function call.

Surprising this didn't show up in the conformance tests.

-- 
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/20220822/5b5de4a2/attachment-0001.htm>


More information about the webkit-unassigned mailing list