From 5cd3e29827079ac15109ac1f7ec249130ed32f9c Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 7 Mar 2019 18:43:23 +0100 Subject: [PATCH] shader: Use swizzles on return values of (i|u)mulextended A recent change in the mesa glsl code mesa/e551040c resulted in a regression for dEQP-GLES31.functional.shaders.builtin_functions. integer.umulextended.uvec* because the generated TGSI was staring to use only certain components of the temporary return values. Therefore, it became visible that the swizzle was not honored on these values. Signed-off-by: Gert Wollny Reviewed-by: --- src/vrend_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index c17d22c..35a2a3f 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4549,13 +4549,13 @@ iter_instruction(struct tgsi_iterate_context *iter, break; case TGSI_OPCODE_UMUL_HI: emit_buff(ctx, "umulExtended(%s, %s, umul_temp, mul_utemp);\n", srcs[0], srcs[1]); - emit_buff(ctx, "%s = %s(%s(umul_temp));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix)); + emit_buff(ctx, "%s = %s(%s(umul_temp%s));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), writemask); ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5; ctx->write_mul_utemp = true; break; case TGSI_OPCODE_IMUL_HI: emit_buff(ctx, "imulExtended(%s, %s, imul_temp, mul_itemp);\n", srcs[0], srcs[1]); - emit_buff(ctx, "%s = %s(%s(imul_temp));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix)); + emit_buff(ctx, "%s = %s(%s(imul_temp%s));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), writemask); ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5; ctx->write_mul_itemp = true; break;