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

Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal

On Thu, Nov 6, 2014 at 2:29 PM, Olli Etuaho <oetuaho@nvidia.com> wrote:
I commented on implementing this as a JS library in my first message. Making it a WebGL extension is just the simplest way to expose this, since the functionality is easiest to implement by reusing the existing infrastructure in ANGLE. But if someone really wants the emulation as a JS library, they would be free to emscripten-compile the relevant parts of ANGLE and use it that way.
I agree that reusing the existing ESSL parsing infrastructure makes this much easier as then it can be implemented as an AST visitor relatively trivially. Though a variety of other usecases would benefit from that ability as well. I'd much rather see an extension along the lines of WEBGL_shader_ast that offers an api/format to parse a shader to an AST, modify it, and pass it back to be compiled.