mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
msl: Handle buffer variables in transform
This removes a lot of awkward logic from the MSL writer, and means that we now handle all module-scope variables with the same transform. Change-Id: I782e36a4b88dafbc3f8364f7caa7f95c6ae3f5f1 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67643 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4) {
|
||||
void foo(tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4, const constant S* const tint_symbol_5, device S* const tint_symbol_6) {
|
||||
tint_array_wrapper src_function = {};
|
||||
tint_array_wrapper dst = {};
|
||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||
@@ -44,8 +44,8 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||
dst = *(tint_symbol_3);
|
||||
dst = *(tint_symbol_4);
|
||||
dst = ret_struct_arr().arr;
|
||||
dst = src_uniform.arr;
|
||||
dst = src_storage.arr;
|
||||
dst = (*(tint_symbol_5)).arr;
|
||||
dst = (*(tint_symbol_6)).arr;
|
||||
tint_array_wrapper_1 dst_nested = {};
|
||||
tint_array_wrapper_1 src_nested = {};
|
||||
dst_nested = src_nested;
|
||||
|
||||
@@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper_1* const tint_symbol_6) {
|
||||
void foo(tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8) {
|
||||
tint_array_wrapper src_function = {};
|
||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||
*(tint_symbol_3) = tint_symbol_2;
|
||||
@@ -43,9 +43,9 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||
*(tint_symbol_3) = *(tint_symbol_4);
|
||||
*(tint_symbol_3) = *(tint_symbol_5);
|
||||
*(tint_symbol_3) = ret_struct_arr().arr;
|
||||
*(tint_symbol_3) = src_uniform.arr;
|
||||
*(tint_symbol_3) = src_storage.arr;
|
||||
*(tint_symbol_3) = (*(tint_symbol_6)).arr;
|
||||
*(tint_symbol_3) = (*(tint_symbol_7)).arr;
|
||||
tint_array_wrapper_1 src_nested = {};
|
||||
*(tint_symbol_6) = src_nested;
|
||||
*(tint_symbol_8) = src_nested;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,21 +34,21 @@ S ret_struct_arr() {
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void foo(constant S& src_uniform, device S& dst, device S& src_storage, device S_nested& dst_nested, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4) {
|
||||
void foo(tint_array_wrapper src_param, device S* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, device S_nested* const tint_symbol_8) {
|
||||
tint_array_wrapper src_function = {};
|
||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||
dst.arr = tint_symbol_2;
|
||||
dst.arr = src_param;
|
||||
dst.arr = ret_arr();
|
||||
(*(tint_symbol_3)).arr = tint_symbol_2;
|
||||
(*(tint_symbol_3)).arr = src_param;
|
||||
(*(tint_symbol_3)).arr = ret_arr();
|
||||
tint_array_wrapper const src_let = {.arr={}};
|
||||
dst.arr = src_let;
|
||||
dst.arr = src_function;
|
||||
dst.arr = *(tint_symbol_3);
|
||||
dst.arr = *(tint_symbol_4);
|
||||
dst.arr = ret_struct_arr().arr;
|
||||
dst.arr = src_uniform.arr;
|
||||
dst.arr = src_storage.arr;
|
||||
(*(tint_symbol_3)).arr = src_let;
|
||||
(*(tint_symbol_3)).arr = src_function;
|
||||
(*(tint_symbol_3)).arr = *(tint_symbol_4);
|
||||
(*(tint_symbol_3)).arr = *(tint_symbol_5);
|
||||
(*(tint_symbol_3)).arr = ret_struct_arr().arr;
|
||||
(*(tint_symbol_3)).arr = (*(tint_symbol_6)).arr;
|
||||
(*(tint_symbol_3)).arr = (*(tint_symbol_7)).arr;
|
||||
tint_array_wrapper_1 src_nested = {};
|
||||
dst_nested.arr = src_nested;
|
||||
(*(tint_symbol_8)).arr = src_nested;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, threadgroup tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, threadgroup tint_array_wrapper_1* const tint_symbol_6) {
|
||||
void foo(tint_array_wrapper src_param, threadgroup tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, threadgroup tint_array_wrapper_1* const tint_symbol_8) {
|
||||
tint_array_wrapper src_function = {};
|
||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||
*(tint_symbol_3) = tint_symbol_2;
|
||||
@@ -43,9 +43,9 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||
*(tint_symbol_3) = *(tint_symbol_4);
|
||||
*(tint_symbol_3) = *(tint_symbol_5);
|
||||
*(tint_symbol_3) = ret_struct_arr().arr;
|
||||
*(tint_symbol_3) = src_uniform.arr;
|
||||
*(tint_symbol_3) = src_storage.arr;
|
||||
*(tint_symbol_3) = (*(tint_symbol_6)).arr;
|
||||
*(tint_symbol_3) = (*(tint_symbol_7)).arr;
|
||||
tint_array_wrapper_1 src_nested = {};
|
||||
*(tint_symbol_6) = src_nested;
|
||||
*(tint_symbol_8) = src_nested;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user