HLSL: Fix #2037: Integer dot used incorrect input for adds.

This commit is contained in:
John Kessenich
2019-12-26 10:56:54 -07:00
parent bd97b6f9f2
commit 5de15a256e
2 changed files with 7 additions and 7 deletions

View File

@@ -7482,7 +7482,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
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) {