From 09b37ba65f5870112a4f60f75d7e74594bdbee01 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 19 Dec 2019 10:17:14 +0100 Subject: [PATCH] zink: fixup initialization of operand_mask / num_extra_operands This doesn't change behavior, but makes the code a bit easier to read. Both values are zero, but I somehow swapped the logical meaning of them when initializing. --- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c index 43a4a556653..572b38b291d 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c +++ b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c @@ -530,9 +530,9 @@ spirv_builder_emit_image_sample(struct spirv_builder *b, operands++; } - SpvImageOperandsMask operand_mask = 0; + SpvImageOperandsMask operand_mask = SpvImageOperandsMaskNone; SpvId extra_operands[4]; - int num_extra_operands = SpvImageOperandsMaskNone; + int num_extra_operands = 0; if (bias) { extra_operands[++num_extra_operands] = bias; operand_mask |= SpvImageOperandsBiasMask; -- 2.30.2