mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +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
@@ -30,27 +30,27 @@ kernel void tint_symbol() {
|
||||
int const x = 42;
|
||||
S1 const empty = {};
|
||||
S1 const nonempty = {.a=1, .b=2, .c=3, .d=4};
|
||||
S1 const nonempty_with_expr = {.a=1, .b=x, .c=(x + 1), .d=nonempty.d};
|
||||
S1 const nonempty_with_expr = {.a=1, .b=x, .c=as_type<int>((as_type<uint>(x) + as_type<uint>(1))), .d=nonempty.d};
|
||||
S3 const nested_empty = {};
|
||||
S1 const tint_symbol_1 = {.a=2, .b=3, .c=4, .d=5};
|
||||
S1 const tint_symbol_2 = {.a=7, .b=8, .c=9, .d=10};
|
||||
S2 const tint_symbol_3 = {.e=6, .f=tint_symbol_2};
|
||||
S3 const nested_nonempty = {.g=1, .h=tint_symbol_1, .i=tint_symbol_3};
|
||||
S1 const tint_symbol_4 = {.a=2, .b=x, .c=(x + 1), .d=nested_nonempty.i.f.d};
|
||||
S1 const tint_symbol_4 = {.a=2, .b=x, .c=as_type<int>((as_type<uint>(x) + as_type<uint>(1))), .d=nested_nonempty.i.f.d};
|
||||
S2 const tint_symbol_5 = {.e=6, .f=nonempty};
|
||||
S3 const nested_nonempty_with_expr = {.g=1, .h=tint_symbol_4, .i=tint_symbol_5};
|
||||
S1 const tint_symbol_6 = {};
|
||||
int const subexpr_empty = tint_symbol_6.a;
|
||||
S1 const tint_symbol_7 = {.a=1, .b=2, .c=3, .d=4};
|
||||
int const subexpr_nonempty = tint_symbol_7.b;
|
||||
S1 const tint_symbol_8 = {.a=1, .b=x, .c=(x + 1), .d=nonempty.d};
|
||||
S1 const tint_symbol_8 = {.a=1, .b=x, .c=as_type<int>((as_type<uint>(x) + as_type<uint>(1))), .d=nonempty.d};
|
||||
int const subexpr_nonempty_with_expr = tint_symbol_8.c;
|
||||
S2 const tint_symbol_9 = {};
|
||||
S1 const subexpr_nested_empty = tint_symbol_9.f;
|
||||
S1 const tint_symbol_10 = {.a=2, .b=3, .c=4, .d=5};
|
||||
S2 const tint_symbol_11 = {.e=1, .f=tint_symbol_10};
|
||||
S1 const subexpr_nested_nonempty = tint_symbol_11.f;
|
||||
S1 const tint_symbol_12 = {.a=2, .b=x, .c=(x + 1), .d=nested_nonempty.i.f.d};
|
||||
S1 const tint_symbol_12 = {.a=2, .b=x, .c=as_type<int>((as_type<uint>(x) + as_type<uint>(1))), .d=nested_nonempty.i.f.d};
|
||||
S2 const tint_symbol_13 = {.e=1, .f=tint_symbol_12};
|
||||
S1 const subexpr_nested_nonempty_with_expr = tint_symbol_13.f;
|
||||
tint_array_wrapper_1 const aosoa_empty = {.arr={}};
|
||||
@@ -59,7 +59,7 @@ kernel void tint_symbol() {
|
||||
tint_array_wrapper const tint_symbol_16 = {.arr={3, 4}};
|
||||
T const tint_symbol_17 = {.a=tint_symbol_16};
|
||||
tint_array_wrapper_1 const aosoa_nonempty = {.arr={tint_symbol_15, tint_symbol_17}};
|
||||
tint_array_wrapper const tint_symbol_18 = {.arr={1, (aosoa_nonempty.arr[0].a.arr[0] + 1)}};
|
||||
tint_array_wrapper const tint_symbol_18 = {.arr={1, as_type<int>((as_type<uint>(aosoa_nonempty.arr[0].a.arr[0]) + as_type<uint>(1)))}};
|
||||
T const tint_symbol_19 = {.a=tint_symbol_18};
|
||||
tint_array_wrapper_1 const aosoa_nonempty_with_expr = {.arr={tint_symbol_19, aosoa_nonempty.arr[1]}};
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user