Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply user-accessible version of packing algorithm #2242

Open
kenrussell opened this issue Jan 6, 2017 · 0 comments
Open

Supply user-accessible version of packing algorithm #2242

kenrussell opened this issue Jan 6, 2017 · 0 comments

Comments

@kenrussell
Copy link
Member

(The text of this issue came largely from an old Khronos-internal bug.)

The current editor's draft of the WebGL specification requires that the packing algorithm defined in GLSL ES 1.0.17, Appendix A, Section 7 "Counting of Varyings and Uniforms" succeed when run against shaders and programs. See https://www.khronos.org/registry/webgl/specs/latest/1.0/#PACKING_RESTRICTIONS .

In a conference call from 29 Nov 2012 (embarrassingly old), there was a request from a working group member for a user-visible version of the packing algorithm that operates upon representations of the types and numbers of the uniforms and varyings, as well as the limits to be imposed, and which provides a boolean answer. (It wasn't a request for a JavaScript compiler for GLSL shaders.)

To avoid duplication and skew between this library and how the browser works, however, the most robust way of providing this functionality may be to compile ANGLE's shader translator with Emscripten or a forthcoming WebAssembly toolchain, and invoke it directly from ECMAScript.

This tool hasn't been shown to be strictly necessary but could still be useful; for example, shader authors could experiment with compiling their shaders given various limitations to see on how small a device they could successfully run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant