[Webkit-unassigned] [Bug 223316] webgl/1.0.x/conformance/glsl/bugs/vector-matrix-constructor-scalarization.html fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 11 04:45:51 PDT 2021


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

--- Comment #6 from Kimmo Kinnunen <kkinnunen at apple.com> ---
GLSL constructs something along the lines of:
 mat2(vec4(1))
Which gets translated to MSL:
 float2x2(float4(1))

.. which is not valid.

We need to add a cast operator and emit it?

see the attachments for the msl and errors.

GLSL:
precision mediump float;
varying vec2 vTexCoord;
float a = 0.;
#define A 0.
#define r(a)    mat2( cos( a + vec4(0,-1.5708,1.5708,0) ) )
vec2 c;
#define f(U,a)  ( c = (U) * r(a) , sin(10.*c.x) )
void main() {
    vec2 U = vTexCoord;
    gl_FragColor = U.y > .5
        ? vec4( f(U,a) , f(U*4.,a) , 0,1.0)   // top
        : vec4( f(U,A) , f(U*4.,A) , 0,1.0);  // bottom
}

-- 
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/20210811/0dfae91e/attachment.htm>


More information about the webkit-unassigned mailing list