From c8bd830dfb87e32638b652adfe23f3d79e9b2d56 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 1 Feb 2022 11:39:43 -0800 Subject: [PATCH] microsoft/compiler: Fix make_double and split_double to respect swizzles Reviewed-by: Bill Kristiansen Reviewed-By: Sil Vilerino Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index ca69d29e89d..13a597d0d77 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -2224,8 +2224,8 @@ emit_make_double(struct ntd_context *ctx, nir_alu_instr *alu) const struct dxil_value *args[3] = { opcode, - get_src(ctx, &alu->src[0].src, 0, nir_type_uint32), - get_src(ctx, &alu->src[0].src, 1, nir_type_uint32), + get_src(ctx, &alu->src[0].src, alu->src[0].swizzle[0], nir_type_uint32), + get_src(ctx, &alu->src[0].src, alu->src[0].swizzle[1], nir_type_uint32), }; if (!args[1] || !args[2]) return false; @@ -2250,7 +2250,7 @@ emit_split_double(struct ntd_context *ctx, nir_alu_instr *alu) const struct dxil_value *args[] = { opcode, - get_src(ctx, &alu->src[0].src, 0, nir_type_float64) + get_src(ctx, &alu->src[0].src, alu->src[0].swizzle[0], nir_type_float64) }; if (!args[1]) return false;