title: Variable output primitives count in geometry shader GLSL
body: <p>I want to do something like this in my geometry shader:</p>
  
  <pre><code>uniform int maxOutputVert;
  
  layout(points) in;
  layout(points, max_vertices=maxOutputVert) out;
  </code></pre>
  
  <p>However I get error while compiling it:</p>
  
  <pre><code>Error: error(#132) Syntax error: 'maxOutputVert' parse error
  </code></pre>
  
  <p>and shader won't compile.</p>
  
  <p>I could understand that it might be too hard for memory management if that variable would change in each shader run, but here it would be constant thorough single drawing call, because uniforms are constant. It also fails if I define some integer constant right in shader and use it as max_vertices count:</p>
  
  <pre><code>const int a = 5;
  layout(points, max_vertices=a) out;
  </code></pre>
  
  <p>Same error is generated. So is there way to do this or do I simply have to put a number inside that call or it won't compile. If the second is the case, how can I assure that I won't exceed the maximum output number queried inside main process by:</p>
  
  <pre><code>glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, &amp;maxoutput);
  </code></pre>
  
  <p>Edit: Sorry for I forgot to mention I'm using ATI/AMD and the Catalyst version is 2010.1105.19.41785 (it's the most stable I've tried...)</p>