[Mesa-dev] [PATCH] mesa: fix name returned for XFB varyings

Martin Peres martin.peres at linux.intel.com
Mon Aug 3 03:48:21 PDT 2015


On 03/08/15 11:10, Tapani Pälli wrote:
> _mesa_get_program_resource_name has logic to append '[0]' in name
> if variable is an array, this should be skipped for XFB varyings
> that have array index already appended.
>
> Fixes:
>     ES31-CTS.program_interface_query.transform-feedback-types
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>   src/mesa/main/shader_query.cpp | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
> index c1a7660..a50c348 100644
> --- a/src/mesa/main/shader_query.cpp
> +++ b/src/mesa/main/shader_query.cpp
> @@ -726,6 +726,12 @@ _mesa_get_program_resource_name(struct gl_shader_program *shProg,
>      bool add_index = !(((programInterface == GL_PROGRAM_INPUT) &&
>                          res->StageReferences & (1 << MESA_SHADER_GEOMETRY)));
>   
> +   /* Transform feedback varyings have possible array index already appended
> +    * in their names.
> +    */

Possibly have the array index already appended? So how do you detect that here?

> +   if (programInterface == GL_TRANSFORM_FEEDBACK_VARYING)
> +      add_index = false;
> +
>      if (add_index && _mesa_program_resource_array_size(res)) {
>         int i;
>   



More information about the mesa-dev mailing list