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

Disallow point rendering with undefined point size #3356

Closed
wants to merge 2 commits into from

Conversation

lexaknyazev
Copy link
Member

Fixes #2818.

Should the CTS update be included in this PR before merging?

</p>
<div class="note rationale">
<p>
Point rendering with undefined point size is undefined in GLES and may be unsupported in other APIs.
Copy link
Member

Choose a reason for hiding this comment

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

From concall: please mention something more precise about why this doesn't work.

Copy link
Member Author

Choose a reason for hiding this comment

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

After looking into this again, it seems there are two underlying issues there:

  • D3D11 does not support point rendering with point size greater than 1.0, so ANGLE generates a geometry shader to handle that.
  • The presence of gl_PointSize in the original ESSL source non-trivially affects ANGLE's shader translator (e.g., how varyings are packed), so simply prepending all shaders with gl_PointSize = 1.0; may cause unexpected issues. Those may be caused by unknown bugs in the translator.

So this issue looks like an ANGLE limitation, which may remain indefinitely.

What would be the appropriate language for the spec here?

specs/latest/1.0/index.html Outdated Show resolved Hide resolved
Copy link
Member

@kenrussell kenrussell left a comment

Choose a reason for hiding this comment

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

Yes, it would be ideal to update the conformance tests at the same time.

Copy link
Member

@kenrussell kenrussell left a comment

Choose a reason for hiding this comment

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

@lexaknyazev is it feasible for you to make the requested changes?

@greggman
Copy link
Contributor

greggman commented Dec 3, 2021

Just so this doesn't get lost, I'm not sure this should happen. See #2822 (comment)

kenrussell added a commit to kenrussell/WebGL that referenced this pull request Dec 4, 2021
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.
kenrussell added a commit to kenrussell/WebGL that referenced this pull request Dec 4, 2021
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.
kdashg pushed a commit that referenced this pull request Dec 6, 2021
Failing to set this was relying on currently-undefined behavior and
causing the tests to fail on Apple's M1.

Related to #2818, #2822 and #3356.
@lexaknyazev
Copy link
Member Author

Closed in favor of #3370.

@lexaknyazev lexaknyazev deleted the pointsize-spec branch December 17, 2021 13:07
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.

Require gl_PointSize for points rendering or define a default value
3 participants