[Mesa-dev] [PATCH 4/8] glsl: Add new builtins required by GL_ARB_sample_shading

Kenneth Graunke kenneth at whitecape.org
Wed Oct 16 20:50:58 CEST 2013

On 10/16/2013 11:29 AM, Kenneth Graunke wrote:
> * Smaller than ceil(float(gl_NumSamples)/32.0):

I misspoke here.  gl_NumSamples is a uniform, and is the number of
samples in the framebuffer.  It isn't the implementation's maximum
number of color samples, which is what actually goes in that formula.

AFAICT, GLSL does not expose the maximum number of supported color
samples as a compile time constant, so there is no way to actually write
code to explicitly size this array correctly on all (theoretical)
implementations.  Unless you GetIntegerv and generate shader strings

I'm pretty sure people are just going to access element 1 and call it good.


More information about the mesa-dev mailing list