HLSL: Smear scalars to match vectors for relational operations.
Yield a vector relational compare and a vector result.
This commit is contained in:
@@ -3082,11 +3082,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
|
||||
|
||||
// Handle comparison instructions
|
||||
|
||||
if (reduceComparison && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) {
|
||||
assert(op == glslang::EOpEqual || op == glslang::EOpNotEqual);
|
||||
|
||||
if (reduceComparison && (op == glslang::EOpEqual || op == glslang::EOpNotEqual)
|
||||
&& (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left)))
|
||||
return builder.createCompositeCompare(precision, left, right, op == glslang::EOpEqual);
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case glslang::EOpLessThan:
|
||||
|
||||
Reference in New Issue
Block a user