[Mesa-dev] [PATCH 04/16] mesa/st/nir: fix instruction removal

Jason Ekstrand jason at jlekstrand.net
Sat Apr 7 16:48:27 UTC 2018


Yeah, that's bad.  3-4 are

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Sat, Apr 7, 2018 at 9:13 AM, Rob Clark <robdclark at gmail.com> wrote:

> At one point this kinda worked (or at least didn't cause problems).  But
> with deref-instructions it results in dangling deref instructions not
> being properly removed.
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
>  src/mesa/state_tracker/st_nir_lower_builtin.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_nir_lower_builtin.c
> b/src/mesa/state_tracker/st_nir_lower_builtin.c
> index fca0bef6653..660fdf3f910 100644
> --- a/src/mesa/state_tracker/st_nir_lower_builtin.c
> +++ b/src/mesa/state_tracker/st_nir_lower_builtin.c
> @@ -216,7 +216,7 @@ lower_builtin_block(lower_builtin_state *state,
> nir_block *block)
>         * to remove'd var.  And we have to remove the original uniform
>         * var since we don't want it to get uniform space allocated.
>         */
> -      exec_node_remove(&intrin->instr.node);
> +      nir_instr_remove(&intrin->instr);
>     }
>
>     return true;
> --
> 2.14.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180407/43d1b470/attachment.html>


More information about the mesa-dev mailing list