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

Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal



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" <oetuaho@nvidia.com>
To: "Mark Callow" <khronos@callow.im>, "Kenneth Russell" <kbr@google.com>
Cc: "Florian Bösch" <pyalot@gmail.com>, "public webgl" <public_webgl@khronos.org>
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 <khronos@callow.im>
Sent: Saturday, November 8, 2014 3:40 AM
To: Kenneth Russell
Cc: Florian Bösch; Olli Etuaho; public_webgl@khronos.org
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 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
-----------------------------------------------------------