⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277415 in webkit


Ignore:
Timestamp:
May 12, 2021, 5:36:16 PM (5 years ago)
Author:
Kyle Piddington
Message:

[Angle METAL] Remove thread qualifiers and pass-by-reference qualifiers for cast functions
https://bugs.webkit.org/show_bug.cgi?id=225702
<rdar://76799461>

Cast functions fail to compile when casting from user uniforms. Update cast functions to remove pass-by-reference
qualifiers.

Reviewed by Dean Jackson.

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
Location:
trunk/Source/ThirdParty/ANGLE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r277241 r277415  
     12021-05-12  Kyle Piddington  <kpiddington@apple.com>
     2
     3        [Angle METAL] Remove thread qualifiers and pass-by-reference qualifiers for cast functions
     4        https://bugs.webkit.org/show_bug.cgi?id=225702
     5        <rdar://76799461>
     6
     7        Cast functions fail to compile when casting from user uniforms. Update cast functions to remove pass-by-reference
     8        qualifiers.
     9
     10        Reviewed by Dean Jackson.
     11
     12        * src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
     13
    1142021-05-08  Basuke Suzuki  <basuke.suzuki@sony.com>
    215
  • trunk/Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp

    r275476 r277415  
    13031303struct ANGLE_castVector<T, N, N>
    13041304{
    1305     static ANGLE_ALWAYS_INLINE metal::vec<T, N> exec(thread metal::vec<T, N> const &v)
     1305    static ANGLE_ALWAYS_INLINE metal::vec<T, N> exec(metal::vec<T, N> const v)
    13061306    {
    13071307        return v;
     
    13111311struct ANGLE_castVector<T, 2, 3>
    13121312{
    1313     static ANGLE_ALWAYS_INLINE metal::vec<T, 2> exec(thread metal::vec<T, 3> const &v)
     1313    static ANGLE_ALWAYS_INLINE metal::vec<T, 2> exec(metal::vec<T, 3> const v)
    13141314    {
    13151315        return v.xy;
     
    13191319struct ANGLE_castVector<T, 2, 4>
    13201320{
    1321     static ANGLE_ALWAYS_INLINE metal::vec<T, 2> exec(thread metal::vec<T, 4> const &v)
     1321    static ANGLE_ALWAYS_INLINE metal::vec<T, 2> exec(metal::vec<T, 4> const v)
    13221322    {
    13231323        return v.xy;
     
    13271327struct ANGLE_castVector<T, 3, 4>
    13281328{
    1329     static ANGLE_ALWAYS_INLINE metal::vec<T, 3> exec(thread metal::vec<T, 4> const &v)
     1329    static ANGLE_ALWAYS_INLINE metal::vec<T, 3> exec(metal::vec<T, 4> const v)
    13301330    {
    13311331        return as_type<metal::vec<T, 3>>(v);
     
    13331333};
    13341334template <int N1, int N2, typename T>
    1335 ANGLE_ALWAYS_INLINE metal::vec<T, N1> ANGLE_cast(thread metal::vec<T, N2> const &v)
     1335ANGLE_ALWAYS_INLINE metal::vec<T, N1> ANGLE_cast(metal::vec<T, N2> const v)
    13361336{
    13371337    return ANGLE_castVector<T, N1, N2>::exec(v);
     
    13441344struct ANGLE_castMatrix
    13451345{
    1346     static ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> exec(thread metal::matrix<T, C2, R2> const &m2)
     1346    static ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> exec(metal::matrix<T, C2, R2> const m2)
    13471347    {
    13481348        metal::matrix<T, C1, R1> m1;
     
    13731373struct ANGLE_castMatrix<T, C1, R1, C2, R2, ANGLE_enable_if_t<(C1 <= C2 && R1 <= R2)>>
    13741374{
    1375     static ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> exec(thread metal::matrix<T, C2, R2> const &m2)
     1375    static ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> exec(metal::matrix<T, C2, R2> const m2)
    13761376    {
    13771377        metal::matrix<T, C1, R1> m1;
     
    13841384};
    13851385template <int C1, int R1, int C2, int R2, typename T>
    1386 ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> ANGLE_cast(thread metal::matrix<T, C2, R2> const &m)
     1386ANGLE_ALWAYS_INLINE metal::matrix<T, C1, R1> ANGLE_cast(metal::matrix<T, C2, R2> const m)
    13871387{
    13881388    return ANGLE_castMatrix<T, C1, R1, C2, R2>::exec(m);
Note: See TracChangeset for help on using the changeset viewer.