SPV: Implement composite comparisons (reductions across hierchical compare).

This commit is contained in:
John Kessenich
2015-12-21 20:54:09 -07:00
parent 59420fd356
commit 2211835b4d
6 changed files with 470 additions and 71 deletions

View File

@@ -2274,7 +2274,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
if (reduceComparison && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) {
assert(op == glslang::EOpEqual || op == glslang::EOpNotEqual);
return builder.createCompare(precision, left, right, op == glslang::EOpEqual);
return builder.createCompositeCompare(precision, left, right, op == glslang::EOpEqual);
}
switch (op) {