[Mesa-dev] [PATCH 03/11] nir: Add barrier intrinsic function
Connor Abbott
cwabbott0 at gmail.com
Sun Mar 22 19:57:13 PDT 2015
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
On Sun, Mar 22, 2015 at 9:49 PM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/glsl/nir/glsl_to_nir.cpp | 4 +++-
> src/glsl/nir/nir_intrinsics.h | 1 +
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
> index 5543b38..98b3921 100644
> --- a/src/glsl/nir/glsl_to_nir.cpp
> +++ b/src/glsl/nir/glsl_to_nir.cpp
> @@ -1790,5 +1790,7 @@ nir_visitor::visit(ir_dereference_array *ir)
> void
> nir_visitor::visit(ir_barrier *ir)
> {
> - assert(!"Not implemented!");
> + nir_intrinsic_instr *instr =
> + nir_intrinsic_instr_create(this->shader, nir_intrinsic_barrier);
> + nir_instr_insert_after_cf_list(this->cf_node_list, &instr->instr);
> }
> diff --git a/src/glsl/nir/nir_intrinsics.h b/src/glsl/nir/nir_intrinsics.h
> index 8e28765..782cf85 100644
> --- a/src/glsl/nir/nir_intrinsics.h
> +++ b/src/glsl/nir/nir_intrinsics.h
> @@ -67,6 +67,7 @@ INTRINSIC(interp_var_at_offset, 1, ARR(2), true, 0, 1, 0,
> */
> #define BARRIER(name) INTRINSIC(name, 0, ARR(), false, 0, 0, 0, 0)
>
> +BARRIER(barrier)
> BARRIER(discard)
> /** A conditional discard, with a single boolean source. */
> INTRINSIC(discard_if, 1, ARR(1), false, 0, 0, 0, 0)
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list