[Webkit-unassigned] [Bug 241728] WebGL Internal error compiling shader with Metal backend.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 18 01:49:37 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=241728
--- Comment #3 from Christopher Dyken <cdyk-bugzilla at protonmail.com> ---
It looks like the failure is tied to fetching the true-expression from a uniform block:
Putting more data into MaterialParameter still fails to link:
----------------------------------------
#version 300 es
precision highp float;
uniform MaterialParameters {
vec4 bar;
float specularPower;
float baz;
};
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = vec4(specularPower != 0.0 ? specularPower : 80.0,
bar.xy,
baz);
}
----------------------------------------
Moving specularPower out of the block into a single uniform links successfully:
----------------------------------------
#version 300 es
precision highp float;
uniform MaterialParameters {
vec4 bar;
float baz;
};
uniform float specularPower;
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = vec4(specularPower != 0.0 ? specularPower : 80.0,
bar.xy,
baz);
}
----------------------------------------
Adding a float-cast to the true-expression links successfully:
----------------------------------------
#version 300 es
precision highp float;
uniform MaterialParameters {
float specularPower;
};
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = vec4(specularPower != 0.0 ? float(specularPower) : 80.0);
}
----------------------------------------
Fetching from the false-expression links successfully:
----------------------------------------
#version 300 es
precision highp float;
uniform MaterialParameters {
float specularPower;
};
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = vec4(specularPower == 0.0 ? 80.0 : specularPower);
}
--
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/20220618/318bcc73/attachment.htm>
More information about the webkit-unassigned
mailing list