Problem
Clang does not support HLSL comparison operators when either operand is a matrix.
The following operators should perform element-wise comparisons:
Test cases
bool2x2 matrix_matrix(float2x2 a, float2x2 b) {
return a < b;
}
bool2x2 matrix_scalar(float2x2 a, float b) {
return a == b;
}
bool2x2 scalar_matrix(float a, float2x2 b) {
return a >= b;
}
Requirments
Matrix comparisons should be element-wise and produce a Boolean matrix with the same dimensions as the matrix operand.
Scalar operands should be converted to the matrix element type and broadcast across the matrix.
Problem
Clang does not support HLSL comparison operators when either operand is a matrix.
The following operators should perform element-wise comparisons:
<><=>===!=Test cases
Requirments
Matrix comparisons should be element-wise and produce a Boolean matrix with the same dimensions as the matrix operand.
Scalar operands should be converted to the matrix element type and broadcast across the matrix.