[wgsl-in] eagerly evaluate const-expressions

[wgsl-in] support const-expressions in attributes

allow `Splat` as an evaluated const-expression type
This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2023-10-12 13:13:26 +02:00
1 parent c5d884fca8
commit a730236b68
44 files changed
+2917 -2770

No files matched your search

+2 -5
View File
@@ -40,11 +40,8 @@ kernel void main_(
metal::float2x2 cit1_ = metal::float2x2(metal::float2(0.0), metal::float2(0.0));
type_11 cit2_ = type_11 {0, 1, 2, 3};
bool ic0_ = static_cast<bool>(bool {});
int ic1_ = static_cast<int>(int {});
uint ic2_ = static_cast<uint>(uint {});
float ic3_ = static_cast<float>(float {});
metal::uint2 ic4_ = static_cast<metal::uint2>(metal::uint2 {});
metal::float2x3 ic5_ = metal::float2x3(metal::float2x3 {});
metal::uint2 ic4_ = metal::uint2(0u, 0u);
metal::float2x3 ic5_ = metal::float2x3(metal::float3(0.0, 0.0, 0.0), metal::float3(0.0, 0.0, 0.0));
metal::uint2 ic6_ = as_type<metal::uint2>(metal::uint2 {});
metal::float2x3 ic7_ = metal::float2x3(metal::float2x3 {});
}