[Mesa-dev] [PATCH 1/2] glsl: Support uint index in do_vec_index_to_cond_assign

Tapani Pälli tapani.palli at intel.com
Tue Oct 13 21:25:42 PDT 2015


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

(Note that due to recent changes, test won't pass but fails like:
glcts: brw_nir.c:103: brw_nir_lower_inputs: Assertion `!"unsupported 
shader stage"' failed.)

On 10/14/2015 12:27 AM, Jordan Justen wrote:
> The ES31-CTS.compute_shader.pipeline-compute-chain test case was
> generating an unsigned index by using gl_LocalInvocationID.x and
> gl_LocalInvocationID.y as array indices.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>   src/glsl/lower_vec_index_to_cond_assign.cpp | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/lower_vec_index_to_cond_assign.cpp b/src/glsl/lower_vec_index_to_cond_assign.cpp
> index 0c3394a..b623882 100644
> --- a/src/glsl/lower_vec_index_to_cond_assign.cpp
> +++ b/src/glsl/lower_vec_index_to_cond_assign.cpp
> @@ -88,7 +88,9 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(void *mem_
>      exec_list list;
>   
>      /* Store the index to a temporary to avoid reusing its tree. */
> -   index = new(base_ir) ir_variable(glsl_type::int_type,
> +   assert(orig_index->type == glsl_type::int_type ||
> +          orig_index->type == glsl_type::uint_type);
> +   index = new(base_ir) ir_variable(orig_index->type,
>   				    "vec_index_tmp_i",
>   				    ir_var_temporary);
>      list.push_tail(index);



More information about the mesa-dev mailing list