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

Fix for chromium GLSL compiler issue #1114

Merged
merged 1 commit into from May 21, 2019
Merged

Fix for chromium GLSL compiler issue #1114

merged 1 commit into from May 21, 2019

Conversation

1chandu
Copy link
Contributor

@1chandu 1chandu commented May 20, 2019

For #1112

Background

Empty Fragment shader used to work :

'void main() {}'

But when upgrading chromium fails all Transform related tests with this error :

[.WebGL-0x7fa0cf002a00]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: buffer format and fragment output variable type incompatible

Change in this PR fixes the problem.

Change List

  • Fix for chromium GLSL compiler issue

@1chandu
Copy link
Contributor Author

1chandu commented May 20, 2019

@tsherif @Pessimistress
Could this be Chromium specific issue, I didn't find any in google search.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 45.063% when pulling 516676a on TransformError into c5dc527 on master.

@tsherif
Copy link
Contributor

tsherif commented May 20, 2019

It seems that behavior is correct for WebGL 2:

If any draw buffer with an attachment does not have a defined fragment shader output, draws generate INVALID_OPERATION, unless all 4 channels of colorMask are set to false.

Odd that there's inconsistency across browsers though...

@tsherif
Copy link
Contributor

tsherif commented May 20, 2019

It was a recent update to the spec: KhronosGroup/WebGL#2780

@Pessimistress
Copy link
Collaborator

I first observed this issue in Chromium 76. Is this going to be an issue for everyone when Chrome updates? (i.e. do we need to patch 6.x)?

@tsherif
Copy link
Contributor

tsherif commented May 20, 2019

I imagine it won't be an issue unless there's code somewhere that uses GLSL 3 shaders that don't output anything?

@1chandu
Copy link
Contributor Author

1chandu commented May 21, 2019

It was a recent update to the spec: KhronosGroup/WebGL#2780

Thanks for the link.
For all TF paths we also set RASTERIZER_DISCARD to true but wonder thats not enough. Will merge this PR given this should be safe change.

@1chandu 1chandu changed the title [For discussion] Fix for chromium GLSL compiler issue Fix for chromium GLSL compiler issue May 21, 2019
@1chandu 1chandu merged commit 364956a into master May 21, 2019
@1chandu 1chandu deleted the TransformError branch May 21, 2019 01:41
1chandu added a commit that referenced this pull request May 21, 2019
@tsherif
Copy link
Contributor

tsherif commented May 21, 2019

If RASTERIZER_DISCARD isn't working, I'd say that's a bug. We should file it with Chromium: https://bugs.chromium.org/p/chromium/issues/list

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.

None yet

4 participants