[Mesa-dev] [PATCH 08/17] glsl: fix the value of gl_MaxFragmentUniformVectors

Kenneth Graunke kenneth at whitecape.org
Wed May 1 23:39:05 PDT 2013


On 05/01/2013 08:42 PM, Marek Olšák wrote:
> NOTE: This is a candidate for the 9.1 branch.
> ---
>   src/glsl/builtin_variables.cpp |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
> index b0c7a20..15f5bf3 100644
> --- a/src/glsl/builtin_variables.cpp
> +++ b/src/glsl/builtin_variables.cpp
> @@ -535,7 +535,7 @@ generate_common_ES_uniforms(exec_list *instructions,
>      add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
>   			state->Const.MaxTextureImageUnits);
>      add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformVectors",
> -			state->Const.MaxFragmentUniformComponents);
> +			state->Const.MaxFragmentUniformComponents / 4);
>
>      add_uniform(instructions, symtab, "gl_DepthRange",
>   	       state->symbols->get_type("gl_DepthRangeParameters"));

For some reason, I thought state->Const.MaxFragmentUniformComponents got 
initialized to different values based on whether ctx->API was GLES or 
not.  But it doesn't, and that wouldn't even work in the case of 
ARB_ES?_compatibility.

So, looks good to me.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list