[Mesa-dev] [PATCH 1/3] nir: add nir_instr_is_first() and nir_instr_is_last() helpers

Jason Ekstrand jason at jlekstrand.net
Thu Jul 16 16:01:18 PDT 2015


R-B me too
On Jul 16, 2015 5:19 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:

> From: Connor Abbott <connor.w.abbott at intel.com>
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/glsl/nir/nir.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index e9a506c..0db1fc3 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -443,6 +443,18 @@ nir_instr_prev(nir_instr *instr)
>        return exec_node_data(nir_instr, prev, node);
>  }
>
> +static inline bool
> +nir_instr_is_first(nir_instr *instr)
> +{
> +   return exec_node_is_head_sentinel(exec_node_get_prev(&instr->node));
> +}
> +
> +static inline bool
> +nir_instr_is_last(nir_instr *instr)
> +{
> +   return exec_node_is_tail_sentinel(exec_node_get_next(&instr->node));
> +}
> +
>  typedef struct {
>     /** for debugging only, can be NULL */
>     const char* name;
> --
> 2.4.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150716/7da51bb6/attachment-0001.html>


More information about the mesa-dev mailing list