Skip to content

Conversation

nathanstouffer
Copy link
Contributor

@nathanstouffer nathanstouffer commented Oct 3, 2025

Summary

When I use clang version 17 to compile shaderc, the resulting essl/glsl shaders have all constants replaced with the value (-1.0/0.0). Removing FloatFast for the glsl-optimizer target resolved the issue for me.

Minimum Reproducible Example

$input a_position

void main()
{
    gl_Postition = vec4(0.0, 0.0, 0.0, 1.0);
}
precision highp int;
precision highp float;
void main()
{
    gl_Position = vec4((-1.0/0.0), (-1.0/0.0), (-1.0/0.0), (-1.0/0.0));
}

@nathanstouffer nathanstouffer marked this pull request as ready for review October 3, 2025 15:41
Copy link
Owner

@bkaradzic bkaradzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the removeflags block into glsl-optimizer.

@nathanstouffer nathanstouffer changed the title Remove FloatFast option for shaderc Remove FloatFast option for glsl-optimizer Oct 3, 2025
@bkaradzic bkaradzic merged commit b4dbc12 into bkaradzic:master Oct 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants