From b92978744d5fda43e12acdfb52e0a7a610b816cb Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 16 Feb 2022 18:41:52 +0900 Subject: [PATCH] shader: Use swizzle_writer in get_source_info Signed-off-by: Akihiko Odaki Reviewed-by: Gert Wollny --- src/vrend_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index d6ee1ae..f0a1865 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4147,8 +4147,6 @@ get_source_info(struct dump_ctx *ctx, sinfo->override_no_wm[i] = false; sinfo->override_no_cast[i] = false; - if (isfloatabsolute) - swizzle[swz_idx++] = ')'; if (src->Register.Negate) prefix[pre_idx++] = '-'; @@ -4172,6 +4170,9 @@ get_source_info(struct dump_ctx *ctx, swizzle_writer = src_swizzle0; } + if (isfloatabsolute) + swizzle_writer[swz_idx++] = ')'; + usage_mask |= 1 << src->Register.SwizzleX; usage_mask |= 1 << src->Register.SwizzleY; usage_mask |= 1 << src->Register.SwizzleZ;