Files
wgpu/tests/out/access.msl
T
Ashley d21dded649 [msl-out] wrap arrays in structs so that they can be returned by functions (#764)
* [msl-out] wrap arrays in structs so that they can be returned by functions

* Fix clippy problems

* use a raw array for output fields

* Fix clippy problems

* Apply suggestions

* Remove put_initialization_component

* Check if the array is a constant size

* Don't use the pointer class
2021-04-28 10:26:17 -04:00

18 lines
311 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
struct type3 {
int inner[5];
};
struct fooInput {
};
struct fooOutput {
metal::float4 member [[position]];
};
vertex fooOutput foo(
metal::uint vi [[vertex_id]]
) {
return fooOutput { static_cast<float4>(int4(type3 {1, 2, 3, 4, 5}.inner[vi])) };
}