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

Metal printer doesn't output gl_FragData correctly #114

Open
bkaradzic opened this issue Oct 10, 2015 · 0 comments
Open

Metal printer doesn't output gl_FragData correctly #114

bkaradzic opened this issue Oct 10, 2015 · 0 comments

Comments

@bkaradzic
Copy link
Contributor

I had to add this code to fix metal printer:
bkaradzic@22be3e7

        if (strstr(var->name, "gl_") == var->name)
        {
            if (NULL == strstr(var->name, "gl_FragData_") ) {
                if (!var->data.used && !var->data.assigned)
                    continue;
            }
        }

The problem is that there are vars gl_FragData, and gl_FragData_0/1/etc.. gl_FragData is used and assigned, but gl_FragData_0/1/etc are not. In that case xlatMtlShaderOutput structure is just left empty causing error when building with metal compiler.

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

1 participant