Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions specs/latest/1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,8 @@ <h4><a name="WRITING_TO_THE_DRAWING_BUFFER">Writing to the drawing buffer</a></h
<dd>
If <em>first</em> is negative, an <code>INVALID_VALUE</code> error will be generated.
If the CURRENT_PROGRAM is null, an <code>INVALID_OPERATION</code> error will be generated.
If the <em>mode</em> is <code>POINTS</code> and the current program does not set
<code>gl_PointSize</code> variable, an <code>INVALID_OPERATION</code> error will be generated.
<dt class="idl-code">void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset)
<span class="gl-spec">(<a href="http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf#nameddest=section-2.8">OpenGL ES 2.0 &sect;2.8</a>, <a class="nonnormative" href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glDrawElements.xml">man page</a>)</span>
<dd>
Expand All @@ -3297,6 +3299,8 @@ <h4><a name="WRITING_TO_THE_DRAWING_BUFFER">Writing to the drawing buffer</a></h
then a non-null <code>WebGLBuffer</code> must be bound to the <code>ELEMENT_ARRAY_BUFFER</code>
binding point or an <code>INVALID_OPERATION</code> error will be generated.<br><br>
If the CURRENT_PROGRAM is null, an <code>INVALID_OPERATION</code> error will be generated.
If the <em>mode</em> is <code>POINTS</code> and the current program does not set
<code>gl_PointSize</code> variable, an <code>INVALID_OPERATION</code> error will be generated.

WebGL performs additional error checking beyond that specified in OpenGL ES 2.0 during
calls to <code>drawArrays</code>
Expand Down Expand Up @@ -4455,6 +4459,17 @@ <h3>Wide point primitive clipping</h3>
</p>
</div>

<h3>Undefined Point Size</h3>
<p>
Draw calls with <code>POINTS</code> primitives are rejected when the bound program does not set
<code>gl_PointSize</code>.
</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?

</p>
</div>

<!-- ======================================================================================================= -->

<h2>References</h2>
Expand Down