[Public WebGL] WEBGL_debug_shader_precision extension proposal

Jeff Gilbert [email protected]
Mon Nov 10 20:21:28 PST 2014


An extension would be fine, in my opinion.
shaderMaxPrecision(WebGLShader* shader, GLenum maxPrecision) seems reasonable.

Regardless, if this is implemented in Firefox, there will definitely be a pref to force-enable this for all shaders for testing purposes.

-Jeff

----- Original Message -----
From: "Olli Etuaho" <[email protected]>
To: "Mark Callow" <[email protected]>, "Kenneth Russell" <[email protected]>
Cc: "Florian Bösch" <[email protected]>, "public webgl" <[email protected]>
Sent: Monday, November 10, 2014 4:33:05 AM
Subject: RE: [Public WebGL] WEBGL_debug_shader_precision extension proposal


Thanks for the valuable feedback. It seems reasonable that since this does not add any new features to the language, #extension should not be used. #pragma might still be better than the enable/disable switch. From an implementation perspective, that encapsulates the functionality better inside the shader compiler. For the user, it's easier to understand - there can be no confusion regarding whether the flag should be set when linkProgram is called, for example. It's also more flexible. They can simply add the getExtension() call and then narrow down problems by only editing shaders if they wish, or they can add a parameter to their compileShader() code path that toggles inserting the pragma to shader code.

So I'll submit an amendment adding a #pragma webgl_debug_shader_precision directive, if you have strong objections to this please raise them.

-Olli
________________________________________
From: Mark Callow <[email protected]>
Sent: Saturday, November 8, 2014 3:40 AM
To: Kenneth Russell
Cc: Florian Bösch; Olli Etuaho; [email protected]
Subject: Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal

>
> t does seem better if the shaders
> don't have to be modified in order to take advantage of this
> extension.
>

I agree.

Another point is that #extension is intended for language extensions and this is arguably not a language extension. I think being able to enable and disable this in the API between calls to compileShader is the best approach.

Regards

    -Mark


-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------


-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------





More information about the public_webgl mailing list