[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Possibility of not writing gl_Position is not addressed by WebGL spec



I don't think WebGL implementations enforce writing to gl_Position in
general.  It only happens in HLSL port.  So on Linux / Mac, it could
still be undefined.

But I agree, we should make sure it is never undefined.

Mo

On Tue, Jun 18, 2013 at 8:53 AM, Olli Etuaho <oetuaho@nvidia.com> wrote:
>
> Hi all,
>
> GLSL ES spec 1.0.17 section 10.13 says that not writing gl_Position results in undefined behavior, which is undesirable in WebGL. Current WebGL implementations do seem to enforce statically writing to gl_Position, but it's not mentioned in the WebGL spec. Should this be explicitly specified in the "Differences Between WebGL and OpenGL ES 2.0" section?
>
> There's also a related problem in the conformance test glsl/literals/float_literal.vert.html, where vertex shader does not write gl_Position. I think the test should be fixed by adding writing to gl_Position.
>
> A new test could also be written that specifically checks that not writing to gl_Position in a vertex shader will result in a shader compilation error.
>
> Regards, Olli
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------