[Mesa-dev] [PATCH 2/2] gallium: Desambiguate TGSI_OPCODE_IF.
Marek Olšák
maraeo at gmail.com
Tue Apr 16 13:49:16 PDT 2013
Hi Jose,
This looks good to me.
Marek
On Tue, Apr 16, 2013 at 10:11 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> ----- Original Message -----
> > The R600 code looks good.
> >
> > Marek
> >
> >
>
> When I rebased on top of master, I had a conflict on r600. Below is how I
> resolved. Please confirm you're OK with it.
>
> Jose
>
> diff --git a/src/gallium/drivers/r600/r600_shader.c
> b/src/gallium/drivers/r600/r600_shader.c
> index f3e2187..5ac8c09 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -5728,7 +5728,7 @@ static void break_loop_on_flag(struct
> r600_shader_ctx *ctx, unsigned fc_sp)
> }
> #endif
>
> -static int tgsi_if(struct r600_shader_ctx *ctx)
> +static int emit_if(struct r600_shader_ctx *ctx, int opcode)
> {
> int alu_type = CF_OP_ALU_PUSH_BEFORE;
>
> @@ -5742,7 +5742,7 @@ static int tgsi_if(struct r600_shader_ctx *ctx)
> alu_type = CF_OP_ALU;
> }
>
> - emit_logic_pred(ctx, ALU_OP2_PRED_SETNE_INT, alu_type);
> + emit_logic_pred(ctx, opcode, alu_type);
>
> r600_bytecode_add_cfinst(ctx->bc, CF_OP_JUMP);
>
> @@ -5752,6 +5752,16 @@ static int tgsi_if(struct r600_shader_ctx *ctx)
> return 0;
> }
>
> +static int tgsi_if(struct r600_shader_ctx *ctx)
> +{
> + return emit_if(ctx, ALU_OP2_PRED_SETNE);
> +}
> +
> +static int tgsi_uif(struct r600_shader_ctx *ctx)
> +{
> + return emit_if(ctx, ALU_OP2_PRED_SETNE_INT);
> +}
> +
> static int tgsi_else(struct r600_shader_ctx *ctx)
> {
> r600_bytecode_add_cfinst(ctx->bc, CF_OP_ELSE);
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130416/487199de/attachment.html>
More information about the mesa-dev
mailing list