spirv-reader: fix mapping of OpLogicalOr, OpLogicalAnd

These work on scalar and vector of bool, and map to ast::BinaryOp::kOr
and kAnd.

Bug: tint:1043
Change-Id: I009edf8e43c21cb75ccfdcde1106ec177d2fe50e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59561
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: David Neto <dneto@google.com>
This commit is contained in:
David Neto
2021-07-26 17:34:58 +00:00
committed by Tint LUCI CQ
parent 5f3063359c
commit 1444a2e117
188 changed files with 2306 additions and 3080 deletions

View File

@@ -55,18 +55,10 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(inout float2 p, inout float2 a_1, inout flo
param_3 = float2((x_123 - x_124), (x_127 - x_128));
const float x_131 = cross2d_vf2_vf2_(param_2, param_3);
pbc = x_131;
bool tint_tmp = (x_114 < 0.0f);
if (tint_tmp) {
tint_tmp = (x_131 < 0.0f);
}
const bool x_134 = (tint_tmp);
const bool x_134 = ((x_114 < 0.0f) & (x_131 < 0.0f));
x_141_phi = x_134;
if (!(x_134)) {
bool tint_tmp_1 = (x_114 >= 0.0f);
if (tint_tmp_1) {
tint_tmp_1 = (x_131 >= 0.0f);
}
x_140 = (tint_tmp_1);
x_140 = ((x_114 >= 0.0f) & (x_131 >= 0.0f));
x_141_phi = x_140;
}
if (!(x_141_phi)) {
@@ -87,18 +79,10 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(inout float2 p, inout float2 a_1, inout flo
param_5 = float2((x_152 - x_153), (x_155 - x_156));
const float x_159 = cross2d_vf2_vf2_(param_4, param_5);
pca = x_159;
bool tint_tmp_2 = (x_114 < 0.0f);
if (tint_tmp_2) {
tint_tmp_2 = (x_159 < 0.0f);
}
const bool x_162 = (tint_tmp_2);
const bool x_162 = ((x_114 < 0.0f) & (x_159 < 0.0f));
x_169_phi = x_162;
if (!(x_162)) {
bool tint_tmp_3 = (x_114 >= 0.0f);
if (tint_tmp_3) {
tint_tmp_3 = (x_159 >= 0.0f);
}
x_168 = (tint_tmp_3);
x_168 = ((x_114 >= 0.0f) & (x_159 >= 0.0f));
x_169_phi = x_168;
}
if (!(x_169_phi)) {