[Mesa-dev] [PATCH] glsl: report builtin variables in getActiveVariables()

Tapani tapani.palli at intel.com
Sun May 31 00:07:43 PDT 2015


Hi Martin;

This patch together with 'reference built-in uniforms into 
gl_uniform_storage' fixes the "builtins missing" issue and also exposes 
some bugs with program_interface_query which I'm about to address soon. 
I played around with idea of adding some 'dummy resource' in the 
resource list instead of adding to the storage, but eventually one needs 
almost all the fields of gl_uniform_storage so this makes things much 
simpler.

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>


On 05/19/2015 04:18 PM, Martin Peres wrote:
> It seems like there were restrictions on builtin variables introduced
> in 2011 (07731ed1692eb5d72110b3c5b693f37e581e3809) that never got
> lifted when proper support got added. At least, getting rid of them
> do not introduce any regression while fixing the following piglit
> tests:
>
> - glsl-getactiveuniform-ftransform
> - glsl-getactiveuniform-mvp
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32403
> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
> ---
>   src/glsl/link_uniforms.cpp | 13 -------------
>   1 file changed, 13 deletions(-)
>
> diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
> index 2c928e1..7bf8be3 100644
> --- a/src/glsl/link_uniforms.cpp
> +++ b/src/glsl/link_uniforms.cpp
> @@ -940,14 +940,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
>   	 if ((var == NULL) || (var->data.mode != ir_var_uniform))
>   	    continue;
>   
> -	 /* FINISHME: Update code to process built-in uniforms!
> -	  */
> -	 if (is_gl_identifier(var->name)) {
> -	    uniform_size.num_shader_uniform_components +=
> -	       var->type->component_slots();
> -	    continue;
> -	 }
> -
>   	 uniform_size.process(var);
>         }
>   
> @@ -992,11 +984,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
>   	 if ((var == NULL) || (var->data.mode != ir_var_uniform))
>   	    continue;
>   
> -	 /* FINISHME: Update code to process built-in uniforms!
> -	  */
> -	 if (is_gl_identifier(var->name))
> -	    continue;
> -
>   	 parcel.set_and_process(prog, var);
>         }
>   



More information about the mesa-dev mailing list