-
Notifications
You must be signed in to change notification settings - Fork 670
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
Add test for unwritten gl_PointSize. #2822
base: main
Are you sure you want to change the base?
Conversation
The full quote from ES3 is:
This certainly says that point size is clamped to within the valid range, though it does follow that up by saying that it's undefined-value sometimes. While this is somewhat ambiguous, the reasonable read here is that gl_PointSize should be clamped, even if an undefined value. |
This exposes a bug on ANGLE, but my NV native GL driver on Windows seems fine. |
Curiously, with transform-feedback enabled, ANGLE passes this test. |
I fully agree with the "reasonable read" for WebGL that never produces undefined values. However since it doesn't exactly follow the OpenGL spec, I think the "Differences Between WebGL and OpenGL ES" section should mention that. |
While this is arguably nitpicking, OpenGL ES rules are:
Quick tests show that ANGLE always does clamping when Also from ANGLE's
So, ANGLE is not inherently wrong by skipping draw calls here. I don't know what would be easier to implement for WebGL contexts: requiring |
Per comments on #2818: I recall the Chrome team ran into this issue a long time ago, that we attempted to resolve it by initializing gl_PointSize to 1.0 at the beginning of vertex shaders, and that this broke geometry rendering on some platforms. I don't remember the details but we may be able to dig them out of Chromium's issue tracker. For this reason the only way we could resolve this undefined behavior would be to dynamically recompile the current program if it was used to draw points and if its vertex shader didn't set gl_PointSize. This was a huge amount of complexity to take on and we decided to just leave this corner case undefined. I'm very concerned that as we are collectively trying to reach conformance again that we are pushing the bar farther and farther out. This particular area has been problematic in the past and would require fairly extensive testing in order to make sure we aren't tickling a buggy area of OpenGL and OpenGL ES drivers by initializing gl_PointSize to 1.0 unilaterally. How is Firefox currently passing the test in #2778 on Windows? |
Just tested Firefox 65.0.2 on Win10: fails when ANGLE is enabled, passes on NVIDIA 419.17 OpenGL. |
It was suggested to generate INVALID_OPERATION if There's no easy way for a JavaScript app that takes user generated shaders to know beforehand that they shouldn't allow calls with POINTS. To be thorough they'd have to parse the GLSL shaders themselves. I'm just wondering if no-op is better than error here. Browsers could print a warning. |
Assuming that an app does not query last error after every draw call, what's the difference? ANGLE on D3D currently skips the draw and prints a warning to the |
The difference is a lingering GL_ERROR Code:
|
Failing to set this was relying on currently-undefined behavior and causing the tests to fail on Apple's M1. Related to KhronosGroup#2818, KhronosGroup#2822 and KhronosGroup#3356.
Failing to set this was relying on currently-undefined behavior and causing the tests to fail on Apple's M1. Related to KhronosGroup#2818, KhronosGroup#2822 and KhronosGroup#3356.
No description provided.