HLSL: fix invalid spir-v vector * scalar for float1

Missing check for float results in always emitting OpIMul even for float types
This commit is contained in:
t.jung
2018-11-14 13:04:39 +01:00
parent 7274bbc27c
commit 697fdf015f
2 changed files with 5 additions and 7 deletions

View File

@@ -4633,7 +4633,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
assert(builder.isScalar(right));
needMatchingVectors = false;
binOp = spv::OpVectorTimesScalar;
} else
} else if (isFloat)
binOp = spv::OpFMul;
else
binOp = spv::OpIMul;
break;
case glslang::EOpVectorTimesMatrix: