On Sun, Mar 22, 2015 at 6:49 PM, Jordan Justen
<[email protected]> wrote:
> This will be used to implement the Gateway Barrier SEND needed to implement
> the barrier function.
>
> Signed-off-by: Jordan Justen <[email protected]>
> Reviewed-by: Chris Forbes <[email protected]>
> ---
> src/mesa/drivers/dri/i965/brw_eu.h | 3 +++
> src/mesa/drivers/dri/i965/brw_eu_emit.c | 31 +++++++++++++++++++++++++++++++
> 2 files changed, 34 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_eu.h
> b/src/mesa/drivers/dri/i965/brw_eu.h
> index 5e86591..6ef8dbf 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu.h
> +++ b/src/mesa/drivers/dri/i965/brw_eu.h
> @@ -360,6 +360,9 @@ brw_jump_scale(const struct brw_context *brw)
> return 1;
> }
>
> +void brw_barrier(struct brw_compile *p,
> + struct brw_reg src);
Fits on one line.
> +
> void brw_wait(struct brw_compile *p);
>
> /* If/else/endif. Works by manipulating the execution flags on each
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> index d9572b5..d27e2c6 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> @@ -2953,6 +2953,37 @@ void brw_shader_time_add(struct brw_compile *p,
>
>
> /**
> + * Emit the SEND message for a barrier
> + */
> +void
> +brw_barrier(struct brw_compile *p,
> + struct brw_reg src)
Fits on one line.
> +{
> + struct brw_context *brw = p->brw;
> + struct brw_inst *inst;
> +
> + assert(brw->gen >= 7);
> +
> + inst = next_insn(p, BRW_OPCODE_SEND);
> + brw_set_dest(p, inst, brw_null_reg());
> + brw_set_src0(p, inst, src);
> + brw_set_src1(p, inst, brw_null_reg());
> +
> + brw_set_message_descriptor(p, inst, BRW_SFID_MESSAGE_GATEWAY,
> + 1 /* msg_length */,
> + 0 /* response_length */,
> + false /* header_present */,
> + false /* end_of_thread */);
> +
> + brw_inst_set_notify(brw, inst, 1);
> + brw_inst_set_gateway_subfuncid(brw, inst,
> + BRW_MESSAGE_GATEWAY_SFID_BARRIER_MSG);
> +
> + brw_inst_set_mask_control(brw, inst, BRW_MASK_DISABLE);
> +}
> +
> +
> +/**
> * Emit the wait instruction for a barrier
> */
> void
> --
> 2.1.4
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev