freedreno/a2xx: Squash a compiler warning

We get a warning here for assigning a const char * pointer to
char *swizzle in struct ir2_src_register.  The constructor strdups a 4
byte string here, so just memcpy to that instead.

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
This commit is contained in:
Kristian H. Kristensen
2018-10-16 14:50:58 -07:00
committed by Rob Clark
parent 4fd6265f42
commit 4222fe8af2
@@ -724,8 +724,8 @@ translate_tex(struct fd2_compile_context *ctx,
instr = ir2_instr_create_alu_s(ctx->so->ir, RECIP_IEEE);
add_dst_reg(ctx, instr, &tmp_dst)->swizzle = "x___";
add_src_reg(ctx, instr, &inst->Src[0].Register)->swizzle =
swiz[inst->Src[0].Register.SwizzleW];
memcpy(add_src_reg(ctx, instr, &inst->Src[0].Register)->swizzle,
swiz[inst->Src[0].Register.SwizzleW], 4);
instr = ir2_instr_create_alu_v(ctx->so->ir, MULv);
add_dst_reg(ctx, instr, &tmp_dst)->swizzle = "xyz_";