[Mesa-dev] [PATCH v3 020/104] nir: Support deref instructions in split_var_copies

Caio Marcelo de Oliveira Filho caio.oliveira at intel.com
Thu Apr 5 20:31:09 UTC 2018


> @@ -268,8 +288,30 @@ split_var_copies_impl(nir_function_impl *impl)
>     state.dead_ctx = ralloc_context(NULL);
>     state.progress = false;
>  
> +   nir_builder b;
> +   nir_builder_init(&b, impl);
> +
>     nir_foreach_block(block, impl) {
>        split_var_copies_block(block, &state);
> +
> +      nir_foreach_instr_safe(instr, block) {
> +         if (instr->type != nir_instr_type_intrinsic)
> +            continue;
> +
> +         nir_intrinsic_instr *copy = nir_instr_as_intrinsic(instr);
> +         if (copy->intrinsic != nir_intrinsic_copy_deref)
> +            continue;

Could you 'continue' here if glsl_type_is_vector_or_scalar() returns
true for one of the srcs? If I understood correctly, it would avoid
cluttering the 'progress'.


Thanks,
Caio


More information about the mesa-dev mailing list