From 97cd9417100f084e815cf858e0209c6d1a6d3272 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Tue, 16 Jul 2024 22:36:05 -0500 Subject: [PATCH] vkd3d-shader: Do not make the alpha test ref parameter VSIR_DIMENSION_VEC4. --- libs/vkd3d-shader/ir.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 7c7e4f58..6c98a32e 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -5509,10 +5509,8 @@ static enum vkd3d_result insert_alpha_test_before_ret(struct vsir_program *progr } dst_param_init_ssa_bool(&ins->dst[0], program->ssa_count); - ins->src[0].reg.dimension = VSIR_DIMENSION_VEC4; - ins->src[0].swizzle = VKD3D_SHADER_SWIZZLE(W, W, W, W); - ins->src[1].reg.dimension = VSIR_DIMENSION_VEC4; - ins->src[1].swizzle = VKD3D_SHADER_SWIZZLE(W, W, W, W); + ins->src[opcodes[compare_func].swap ? 1 : 0].reg.dimension = VSIR_DIMENSION_VEC4; + ins->src[opcodes[compare_func].swap ? 1 : 0].swizzle = VKD3D_SHADER_SWIZZLE(W, W, W, W); ++ins; vsir_instruction_init_with_params(program, ins, &ret->location, VKD3DSIH_DISCARD, 0, 1);