Skip to content
Browse files

Based on feedback from Gregg Tavares, relaxed exactly when errors are…

… reported during uniform and varying variable packing.
  • Loading branch information...
1 parent 6b0d1b0 commit fbb323e96e030f6d658178c0fd5e7efac0ff6b1b Kenneth Russell committed
Showing with 10 additions and 13 deletions.
  1. +10 −13 specs/latest/index.html
View
23 specs/latest/index.html
@@ -28,7 +28,7 @@
<!--end-logo-->
<h1>WebGL Specification</h1>
- <h2 class="no-toc">Editor's Draft 14 January 2013</h2>
+ <h2 class="no-toc">Editor's Draft 15 January 2013</h2>
<dl>
<dt>This version:
<dd>
@@ -3502,20 +3502,17 @@ <h2 class="no-toc">Table of contents</h2>
computing the storage required for all of the uniform and varying variables in a shader. The
GLSL ES specification requires that if the packing algorithm defined in Appendix A succeeds,
then the shader must succeed compilation on the target platform. The WebGL API further requires
- that this packing algorithm succeed when run against shaders and programs submitted
- to <code>compileShader</code> and <code>linkProgram</code> in order for the shader or program to
- be valid.
+ that this packing algorithm succeed in order for shaders and programs to be considered valid.
</p>
<p>
- During a call to <code>compileShader</code>, packing of uniform variables is validated. Instead
- of using a fixed size grid of registers, the number of rows allocated for uniform variables is
- determined by querying MAX_VERTEX_UNIFORM_VECTORS or MAX_FRAGMENT_UNIFORM_VECTORS, depending on
- whether a vertex or fragment shader is being compiled.
-</p>
-<p>
- During a call to <code>linkProgram</code>, packing of varying variables is validated. Instead of
- using a fixed size grid of registers, the number of rows allocated for varying variables is
- determined by querying MAX_VARYING_VECTORS.
+ Instead of using a fixed size grid of registers, the number of rows in the target architecture
+ is determined in the following ways:
+
+ <ul>
+ <li> when counting uniform variables in a vertex shader: <code>getParameter(MAX_VERTEX_UNIFORM_VECTORS)</code>
+ <li> when counting uniform variables in a fragment shader: <code>getParameter(MAX_FRAGMENT_UNIFORM_VECTORS)</code>
+ <li> when counting varying variables: <code>getParameter(MAX_VARYING_VECTORS)</code>
+ </ul>
</p>
<p>
If the packing algorithm fails either for the uniform variables of a shader or for the varying

0 comments on commit fbb323e

Please sign in to comment.
Something went wrong with that request. Please try again.