mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Restore "MSL writer: make signed int overflow defined behaviour"
This reverts commit e33b0baa08.
Added tests/expressions/literals/intmin.wgsl test.
Bug: tint:124
Change-Id: I3d46f939ff20fa377ddb5fcb52f9afe728b8e430
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60441
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
9bdf2dcc6b
commit
d388bc9b36
@@ -29,12 +29,12 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
int x_24 = 0;
|
||||
x_23 = x_23_phi;
|
||||
x_27 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_23 < (100 - as_type<int>(x_27)))) {
|
||||
if ((x_23 < as_type<int>((as_type<uint>(100) - as_type<uint>(as_type<int>(x_27)))))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_24 = as_type<int>((x_23 + as_type<int>(1)));
|
||||
x_24 = as_type<int>(as_type<int>((as_type<uint>(x_23) + as_type<uint>(as_type<int>(1)))));
|
||||
x_23_phi = x_24;
|
||||
}
|
||||
}
|
||||
@@ -55,8 +55,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_41 = (x_40 + 1);
|
||||
x_38 = as_type<int>((x_37 * as_type<int>((1 - as_type<int>(x_37)))));
|
||||
x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
|
||||
x_38 = as_type<int>(as_type<int>((as_type<uint>(x_37) * as_type<uint>(as_type<int>(as_type<int>((as_type<uint>(1) - as_type<uint>(as_type<int>(x_37)))))))));
|
||||
x_37_phi = x_38;
|
||||
x_40_phi = x_41;
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
int x_24 = 0;
|
||||
x_23 = x_23_phi;
|
||||
x_27 = x_5.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_23 < (100 - as_type<int>(x_27)))) {
|
||||
if ((x_23 < as_type<int>((as_type<uint>(100) - as_type<uint>(as_type<int>(x_27)))))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_24 = as_type<int>((x_23 + as_type<int>(1)));
|
||||
x_24 = as_type<int>(as_type<int>((as_type<uint>(x_23) + as_type<uint>(as_type<int>(1)))));
|
||||
x_23_phi = x_24;
|
||||
}
|
||||
}
|
||||
@@ -55,8 +55,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_41 = (x_40 + 1);
|
||||
x_38 = as_type<int>((x_37 * as_type<int>((1 - as_type<int>(x_37)))));
|
||||
x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
|
||||
x_38 = as_type<int>(as_type<int>((as_type<uint>(x_37) * as_type<uint>(as_type<int>(as_type<int>((as_type<uint>(1) - as_type<uint>(as_type<int>(x_37)))))))));
|
||||
x_37_phi = x_38;
|
||||
x_40_phi = x_41;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user