zink: fixup initialization of operand_mask / num_extra_operands
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 19 Dec 2019 09:17:14 +0000 (10:17 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 14 Jan 2020 01:06:59 +0000 (01:06 +0000)
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

index 43a4a5566535e1601805f0377c28df8834fd73cb..572b38b291de58ba14faedfb840a2c600bf8889e 100644 (file)
@@ -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;