Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Comparison between UInt and Int fails on GlslEs300 #75

Open
thargy opened this issue May 19, 2018 · 1 comment
Open

[Bug] Comparison between UInt and Int fails on GlslEs300 #75

thargy opened this issue May 19, 2018 · 1 comment

Comments

@thargy
Copy link
Contributor

thargy commented May 19, 2018

When compiling code such as

    uint index = 3;
    if (index >= 2)
        return ;

Against the GlslEs300 backend, the following error occurs (from glslangvalidator:

'>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type ' temp mediump uint' and a right operand of type ' const int' (or there is no acceptable conversion)

This implies we need add am explicit cast in this scenario for this specific backend (compilation succeeds on other backends, can't test Metal).

@mellinoe
Copy link
Owner

GLSL ES has been a major pain with how it handles signed-unsigned and other cross-type comparisons. It's far more strict than all of the other language targets, for whatever reason.

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

No branches or pull requests

2 participants