mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-02 19:25:56 +00:00
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>
27 lines
537 B
HLSL
27 lines
537 B
HLSL
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
|
|
void main_1() {
|
|
bool a = false;
|
|
a = false;
|
|
if ((true & a)) {
|
|
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
} else {
|
|
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
|
}
|
|
return;
|
|
}
|
|
|
|
struct main_out {
|
|
float4 x_GLF_color_1;
|
|
};
|
|
struct tint_symbol {
|
|
float4 x_GLF_color_1 : SV_Target0;
|
|
};
|
|
|
|
tint_symbol main() {
|
|
main_1();
|
|
const main_out tint_symbol_1 = {x_GLF_color};
|
|
const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
|
|
return tint_symbol_2;
|
|
}
|