[Mesa-dev] [PATCH] r600/cayman: looks like cmpxchg moved to Z
Constantine Kharlamov
Hi-Angel at yandex.ru
Mon Nov 27 09:17:00 UTC 2017
On понедельник, 27 ноября 2017 г. 9:41:35 MSK Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> On cayman it appears the cmp component is now in Z.
>
> Fixes:
> arb_shader_image_load_store-dead-fragments on cayman.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/gallium/drivers/r600/r600_shader.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index 66638f29399..b688aeebdb5 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -8185,9 +8185,12 @@ static int tgsi_atomic_op_rat(struct r600_shader_ctx *ctx)
> return r;
>
> memset(&alu, 0, sizeof(struct r600_bytecode_alu));
> - alu.op = ALU_OP1_MOV;
> + alu.op = ALU_OP1_MOV;
> alu.dst.sel = ctx->thread_id_gpr;
> - alu.dst.chan = 3;
> + if (ctx->bc->chip_class == CAYMAN)
> + alu.dst.chan = 2;
> + else
> + alu.dst.chan = 3;
I think this can be one-liner
+ alu.dst.chan = (ctx->bc->chip_class == CAYMAN)? 2 : 3;
More information about the mesa-dev
mailing list