HLSL: Fix unary and binary operator type conversion issues
This fixes defects as follows:
1. handleLvalue could be called on a non-L-value, and it shouldn't be.
2. HLSL allows unary negation on non-bool values. TUnaryOperator::promote
can now promote other types (e.g, int, float) to bool for this op.
3. HLSL allows binary logical operations (&&, ||) on arbitrary types, similar
(2).
4. HLSL allows mod operation on arbitrary types, which will be promoted.
E.g, int % float -> float % float.
Showing
This diff is collapsed.
Click to expand it.
Test/baseResults/hlsl.logical.unary.frag.out
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Test/hlsl.logical.binary.frag
0 → 100644
Test/hlsl.logical.unary.frag
0 → 100644
Test/hlsl.promote.binary.frag
0 → 100644
Please
register
or
sign in
to comment