[Mesa-dev] [PATCH 21/26] glsl: Add builtin variables for GLSL 3.00 ES.

Eric Anholt eric at anholt.net
Fri Nov 30 15:04:41 PST 2012


Ian Romanick <idr at freedesktop.org> writes:

> From: Paul Berry <stereotype441 at gmail.com>
>
> This patch also adds assertions so that when we add new GLSL versions,
> we'll notice that we need to update the builtin variables.
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> +static void
> +generate_300ES_uniforms(exec_list *instructions,
> +                        struct _mesa_glsl_parse_state *state)
> +{
> +   generate_common_ES_uniforms(instructions, state);
> +
> +   glsl_symbol_table *const symtab = state->symbols;
> +
> +   add_builtin_constant(instructions, symtab, "gl_MaxVertexOutputVectors",
> +			state->Const.MaxVaryingFloats / 4);
> +   add_builtin_constant(instructions, symtab, "gl_MaxFrabmentInputVectors",

                                                        ^ Fragment

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121130/e7d66bf4/attachment.pgp>


More information about the mesa-dev mailing list