HLSL: Fix #2037: Integer dot used incorrect input for adds.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 745dd7f..0755636 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -7482,7 +7482,7 @@
id = builder.createCompositeExtract(mulOp, typeId, 0);
for (int i = 1; i < componentCount; ++i) {
builder.setPrecision(id, precision);
- id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(operands[0], typeId, i));
+ id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(mulOp, typeId, i));
}
} else {
switch (consumedOperands) {