mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
tint/msl: Preserve trailing vec3 padding
In order to preserve padding properly for MSL, we need to use its packed_vec type for all vec3 types in storage buffers, not just struct members. This commit includes a complete rewrite of the PackedVec3 transform to achieve this. The key details are: * An internal `__packed_vec3<>` type was added, which corresponds to a `type::Vector` with an additional flag to indicate that it will be emitted as packed vector. * The `PackedVec3` transform replaces all vec3 types used in host-shareable address spaces with the internal `__packed_vec3` type. This includes vec3 types that appear as the store type of a pointer. * When used as an array element, these `__packed_vec3` types are wrapped in a struct that contains a single `__packed_vec3` member. This allows us to add an `@align()` attribute that ensures that `array<vec3<T>>` still has the correct array element stride. * When the `vec3<T>` appears as a struct member in the input program, we apply the `@align()` to that member to ensure that we do not change its offset. * Matrix types with three rows that are used in memory are replaced with an array of columns, where each column uses a `__packed_vec3` inside an aligned wrapper structure as above. * Accesses to host-shareable memory that involve any of these types invoke a "pack" or "unpack" helper function to convert them to the equivalent type that uses `__packed_vec3` or a regular `vec3` as required. * The `chromium_internal_relaxed_uniform_layout` extension is used to avoid issues where modifying a type in the uniform address space triggers stricter layout validation rules. Bug: tint:1571 Fixed: tint:1837 Change-Id: Idaf2da2f5bcb2be00c85ec657edfb614186476bb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121200 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
55183e6c3a
commit
4d3af66bbd
@@ -14,42 +14,108 @@ struct tint_array {
|
||||
T elements[N];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
struct tint_packed_vec3_f32_array_element {
|
||||
/* 0x0000 */ packed_float3 elements;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
};
|
||||
|
||||
struct Inner_tint_packed_vec3 {
|
||||
/* 0x0000 */ float scalar_f32;
|
||||
/* 0x0004 */ int scalar_i32;
|
||||
/* 0x0008 */ uint scalar_u32;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad_1;
|
||||
/* 0x0010 */ float2 vec2_f32;
|
||||
/* 0x0018 */ int2 vec2_i32;
|
||||
/* 0x0020 */ uint2 vec2_u32;
|
||||
/* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
|
||||
/* 0x0028 */ tint_array<int8_t, 8> tint_pad_2;
|
||||
/* 0x0030 */ packed_float3 vec3_f32;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x0040 */ packed_int3 vec3_i32;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x0050 */ packed_uint3 vec3_u32;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_5;
|
||||
/* 0x0060 */ float4 vec4_f32;
|
||||
/* 0x0070 */ int4 vec4_i32;
|
||||
/* 0x0080 */ uint4 vec4_u32;
|
||||
/* 0x0090 */ float2x2 mat2x2_f32;
|
||||
/* 0x00a0 */ float2x3 mat2x3_f32;
|
||||
/* 0x00a0 */ tint_array<tint_packed_vec3_f32_array_element, 2> mat2x3_f32;
|
||||
/* 0x00c0 */ float2x4 mat2x4_f32;
|
||||
/* 0x00e0 */ float3x2 mat3x2_f32;
|
||||
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
|
||||
/* 0x0100 */ float3x3 mat3x3_f32;
|
||||
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_6;
|
||||
/* 0x0100 */ tint_array<tint_packed_vec3_f32_array_element, 3> mat3x3_f32;
|
||||
/* 0x0130 */ float3x4 mat3x4_f32;
|
||||
/* 0x0160 */ float4x2 mat4x2_f32;
|
||||
/* 0x0180 */ float4x3 mat4x3_f32;
|
||||
/* 0x0180 */ tint_array<tint_packed_vec3_f32_array_element, 4> mat4x3_f32;
|
||||
/* 0x01c0 */ float4x4 mat4x4_f32;
|
||||
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
|
||||
/* 0x0200 */ tint_array<tint_packed_vec3_f32_array_element, 2> arr2_vec3_f32;
|
||||
};
|
||||
|
||||
struct S_tint_packed_vec3 {
|
||||
/* 0x0000 */ tint_array<Inner_tint_packed_vec3, 1> arr;
|
||||
};
|
||||
|
||||
float2x3 tint_unpack_vec3_in_composite(tint_array<tint_packed_vec3_f32_array_element, 2> in) {
|
||||
float2x3 result = float2x3(0.0f);
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float3x3 tint_unpack_vec3_in_composite_1(tint_array<tint_packed_vec3_f32_array_element, 3> in) {
|
||||
float3x3 result = float3x3(0.0f);
|
||||
for(uint i = 0u; (i < 3u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float4x3 tint_unpack_vec3_in_composite_2(tint_array<tint_packed_vec3_f32_array_element, 4> in) {
|
||||
float4x3 result = float4x3(0.0f);
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
tint_array<float3, 2> tint_unpack_vec3_in_composite_3(tint_array<tint_packed_vec3_f32_array_element, 2> in) {
|
||||
tint_array<float3, 2> result = {};
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
struct Inner {
|
||||
float scalar_f32;
|
||||
int scalar_i32;
|
||||
uint scalar_u32;
|
||||
float2 vec2_f32;
|
||||
int2 vec2_i32;
|
||||
uint2 vec2_u32;
|
||||
float3 vec3_f32;
|
||||
int3 vec3_i32;
|
||||
uint3 vec3_u32;
|
||||
float4 vec4_f32;
|
||||
int4 vec4_i32;
|
||||
uint4 vec4_u32;
|
||||
float2x2 mat2x2_f32;
|
||||
float2x3 mat2x3_f32;
|
||||
float2x4 mat2x4_f32;
|
||||
float3x2 mat3x2_f32;
|
||||
float3x3 mat3x3_f32;
|
||||
float3x4 mat3x4_f32;
|
||||
float4x2 mat4x2_f32;
|
||||
float4x3 mat4x3_f32;
|
||||
float4x4 mat4x4_f32;
|
||||
tint_array<float3, 2> arr2_vec3_f32;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array<Inner, 1> arr;
|
||||
tint_array<Inner, 1> arr;
|
||||
};
|
||||
|
||||
void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
|
||||
void tint_symbol_inner(uint idx, const device S_tint_packed_vec3* const tint_symbol_1) {
|
||||
float const scalar_f32 = (*(tint_symbol_1)).arr[idx].scalar_f32;
|
||||
int const scalar_i32 = (*(tint_symbol_1)).arr[idx].scalar_i32;
|
||||
uint const scalar_u32 = (*(tint_symbol_1)).arr[idx].scalar_u32;
|
||||
@@ -63,18 +129,18 @@ void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
|
||||
int4 const vec4_i32 = (*(tint_symbol_1)).arr[idx].vec4_i32;
|
||||
uint4 const vec4_u32 = (*(tint_symbol_1)).arr[idx].vec4_u32;
|
||||
float2x2 const mat2x2_f32 = (*(tint_symbol_1)).arr[idx].mat2x2_f32;
|
||||
float2x3 const mat2x3_f32 = (*(tint_symbol_1)).arr[idx].mat2x3_f32;
|
||||
float2x3 const mat2x3_f32 = tint_unpack_vec3_in_composite((*(tint_symbol_1)).arr[idx].mat2x3_f32);
|
||||
float2x4 const mat2x4_f32 = (*(tint_symbol_1)).arr[idx].mat2x4_f32;
|
||||
float3x2 const mat3x2_f32 = (*(tint_symbol_1)).arr[idx].mat3x2_f32;
|
||||
float3x3 const mat3x3_f32 = (*(tint_symbol_1)).arr[idx].mat3x3_f32;
|
||||
float3x3 const mat3x3_f32 = tint_unpack_vec3_in_composite_1((*(tint_symbol_1)).arr[idx].mat3x3_f32);
|
||||
float3x4 const mat3x4_f32 = (*(tint_symbol_1)).arr[idx].mat3x4_f32;
|
||||
float4x2 const mat4x2_f32 = (*(tint_symbol_1)).arr[idx].mat4x2_f32;
|
||||
float4x3 const mat4x3_f32 = (*(tint_symbol_1)).arr[idx].mat4x3_f32;
|
||||
float4x3 const mat4x3_f32 = tint_unpack_vec3_in_composite_2((*(tint_symbol_1)).arr[idx].mat4x3_f32);
|
||||
float4x4 const mat4x4_f32 = (*(tint_symbol_1)).arr[idx].mat4x4_f32;
|
||||
tint_array<float3, 2> const arr2_vec3_f32 = (*(tint_symbol_1)).arr[idx].arr2_vec3_f32;
|
||||
tint_array<float3, 2> const arr2_vec3_f32 = tint_unpack_vec3_in_composite_3((*(tint_symbol_1)).arr[idx].arr2_vec3_f32);
|
||||
}
|
||||
|
||||
kernel void tint_symbol(const device S* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
kernel void tint_symbol(const device S_tint_packed_vec3* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
tint_symbol_inner(idx, tint_symbol_2);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,60 +14,169 @@ struct tint_array {
|
||||
T elements[N];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
struct tint_packed_vec3_f32_array_element {
|
||||
/* 0x0000 */ packed_float3 elements;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
};
|
||||
|
||||
struct tint_packed_vec3_f16_array_element {
|
||||
/* 0x0000 */ packed_half3 elements;
|
||||
/* 0x0006 */ tint_array<int8_t, 2> tint_pad_1;
|
||||
};
|
||||
|
||||
struct Inner_tint_packed_vec3 {
|
||||
/* 0x0000 */ float scalar_f32;
|
||||
/* 0x0004 */ int scalar_i32;
|
||||
/* 0x0008 */ uint scalar_u32;
|
||||
/* 0x000c */ half scalar_f16;
|
||||
/* 0x000e */ tint_array<int8_t, 2> tint_pad;
|
||||
/* 0x000e */ tint_array<int8_t, 2> tint_pad_2;
|
||||
/* 0x0010 */ float2 vec2_f32;
|
||||
/* 0x0018 */ int2 vec2_i32;
|
||||
/* 0x0020 */ uint2 vec2_u32;
|
||||
/* 0x0028 */ half2 vec2_f16;
|
||||
/* 0x002c */ tint_array<int8_t, 4> tint_pad_1;
|
||||
/* 0x002c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x0030 */ packed_float3 vec3_f32;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x0040 */ packed_int3 vec3_i32;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_5;
|
||||
/* 0x0050 */ packed_uint3 vec3_u32;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_6;
|
||||
/* 0x0060 */ packed_half3 vec3_f16;
|
||||
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_5;
|
||||
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_7;
|
||||
/* 0x0070 */ float4 vec4_f32;
|
||||
/* 0x0080 */ int4 vec4_i32;
|
||||
/* 0x0090 */ uint4 vec4_u32;
|
||||
/* 0x00a0 */ half4 vec4_f16;
|
||||
/* 0x00a8 */ float2x2 mat2x2_f32;
|
||||
/* 0x00b8 */ tint_array<int8_t, 8> tint_pad_6;
|
||||
/* 0x00c0 */ float2x3 mat2x3_f32;
|
||||
/* 0x00b8 */ tint_array<int8_t, 8> tint_pad_8;
|
||||
/* 0x00c0 */ tint_array<tint_packed_vec3_f32_array_element, 2> mat2x3_f32;
|
||||
/* 0x00e0 */ float2x4 mat2x4_f32;
|
||||
/* 0x0100 */ float3x2 mat3x2_f32;
|
||||
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_7;
|
||||
/* 0x0120 */ float3x3 mat3x3_f32;
|
||||
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_9;
|
||||
/* 0x0120 */ tint_array<tint_packed_vec3_f32_array_element, 3> mat3x3_f32;
|
||||
/* 0x0150 */ float3x4 mat3x4_f32;
|
||||
/* 0x0180 */ float4x2 mat4x2_f32;
|
||||
/* 0x01a0 */ float4x3 mat4x3_f32;
|
||||
/* 0x01a0 */ tint_array<tint_packed_vec3_f32_array_element, 4> mat4x3_f32;
|
||||
/* 0x01e0 */ float4x4 mat4x4_f32;
|
||||
/* 0x0220 */ half2x2 mat2x2_f16;
|
||||
/* 0x0228 */ half2x3 mat2x3_f16;
|
||||
/* 0x0228 */ tint_array<tint_packed_vec3_f16_array_element, 2> mat2x3_f16;
|
||||
/* 0x0238 */ half2x4 mat2x4_f16;
|
||||
/* 0x0248 */ half3x2 mat3x2_f16;
|
||||
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_8;
|
||||
/* 0x0258 */ half3x3 mat3x3_f16;
|
||||
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_10;
|
||||
/* 0x0258 */ tint_array<tint_packed_vec3_f16_array_element, 3> mat3x3_f16;
|
||||
/* 0x0270 */ half3x4 mat3x4_f16;
|
||||
/* 0x0288 */ half4x2 mat4x2_f16;
|
||||
/* 0x0298 */ half4x3 mat4x3_f16;
|
||||
/* 0x0298 */ tint_array<tint_packed_vec3_f16_array_element, 4> mat4x3_f16;
|
||||
/* 0x02b8 */ half4x4 mat4x4_f16;
|
||||
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_9;
|
||||
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
|
||||
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_11;
|
||||
/* 0x02e0 */ tint_array<tint_packed_vec3_f32_array_element, 2> arr2_vec3_f32;
|
||||
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array<Inner, 1> arr;
|
||||
struct S_tint_packed_vec3 {
|
||||
/* 0x0000 */ tint_array<Inner_tint_packed_vec3, 1> arr;
|
||||
};
|
||||
|
||||
void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
|
||||
float2x3 tint_unpack_vec3_in_composite(tint_array<tint_packed_vec3_f32_array_element, 2> in) {
|
||||
float2x3 result = float2x3(0.0f);
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float3x3 tint_unpack_vec3_in_composite_1(tint_array<tint_packed_vec3_f32_array_element, 3> in) {
|
||||
float3x3 result = float3x3(0.0f);
|
||||
for(uint i = 0u; (i < 3u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float4x3 tint_unpack_vec3_in_composite_2(tint_array<tint_packed_vec3_f32_array_element, 4> in) {
|
||||
float4x3 result = float4x3(0.0f);
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
half2x3 tint_unpack_vec3_in_composite_3(tint_array<tint_packed_vec3_f16_array_element, 2> in) {
|
||||
half2x3 result = half2x3(0.0h);
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
result[i] = half3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
half3x3 tint_unpack_vec3_in_composite_4(tint_array<tint_packed_vec3_f16_array_element, 3> in) {
|
||||
half3x3 result = half3x3(0.0h);
|
||||
for(uint i = 0u; (i < 3u); i = (i + 1u)) {
|
||||
result[i] = half3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
half4x3 tint_unpack_vec3_in_composite_5(tint_array<tint_packed_vec3_f16_array_element, 4> in) {
|
||||
half4x3 result = half4x3(0.0h);
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
result[i] = half3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
tint_array<float3, 2> tint_unpack_vec3_in_composite_6(tint_array<tint_packed_vec3_f32_array_element, 2> in) {
|
||||
tint_array<float3, 2> result = {};
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
result[i] = float3(in[i].elements);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
struct Inner {
|
||||
float scalar_f32;
|
||||
int scalar_i32;
|
||||
uint scalar_u32;
|
||||
half scalar_f16;
|
||||
float2 vec2_f32;
|
||||
int2 vec2_i32;
|
||||
uint2 vec2_u32;
|
||||
half2 vec2_f16;
|
||||
float3 vec3_f32;
|
||||
int3 vec3_i32;
|
||||
uint3 vec3_u32;
|
||||
half3 vec3_f16;
|
||||
float4 vec4_f32;
|
||||
int4 vec4_i32;
|
||||
uint4 vec4_u32;
|
||||
half4 vec4_f16;
|
||||
float2x2 mat2x2_f32;
|
||||
float2x3 mat2x3_f32;
|
||||
float2x4 mat2x4_f32;
|
||||
float3x2 mat3x2_f32;
|
||||
float3x3 mat3x3_f32;
|
||||
float3x4 mat3x4_f32;
|
||||
float4x2 mat4x2_f32;
|
||||
float4x3 mat4x3_f32;
|
||||
float4x4 mat4x4_f32;
|
||||
half2x2 mat2x2_f16;
|
||||
half2x3 mat2x3_f16;
|
||||
half2x4 mat2x4_f16;
|
||||
half3x2 mat3x2_f16;
|
||||
half3x3 mat3x3_f16;
|
||||
half3x4 mat3x4_f16;
|
||||
half4x2 mat4x2_f16;
|
||||
half4x3 mat4x3_f16;
|
||||
half4x4 mat4x4_f16;
|
||||
tint_array<float3, 2> arr2_vec3_f32;
|
||||
tint_array<half4x2, 2> arr2_mat4x2_f16;
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array<Inner, 1> arr;
|
||||
};
|
||||
|
||||
void tint_symbol_inner(uint idx, const device S_tint_packed_vec3* const tint_symbol_1) {
|
||||
float const scalar_f32 = (*(tint_symbol_1)).arr[idx].scalar_f32;
|
||||
int const scalar_i32 = (*(tint_symbol_1)).arr[idx].scalar_i32;
|
||||
uint const scalar_u32 = (*(tint_symbol_1)).arr[idx].scalar_u32;
|
||||
@@ -85,28 +194,28 @@ void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
|
||||
uint4 const vec4_u32 = (*(tint_symbol_1)).arr[idx].vec4_u32;
|
||||
half4 const vec4_f16 = (*(tint_symbol_1)).arr[idx].vec4_f16;
|
||||
float2x2 const mat2x2_f32 = (*(tint_symbol_1)).arr[idx].mat2x2_f32;
|
||||
float2x3 const mat2x3_f32 = (*(tint_symbol_1)).arr[idx].mat2x3_f32;
|
||||
float2x3 const mat2x3_f32 = tint_unpack_vec3_in_composite((*(tint_symbol_1)).arr[idx].mat2x3_f32);
|
||||
float2x4 const mat2x4_f32 = (*(tint_symbol_1)).arr[idx].mat2x4_f32;
|
||||
float3x2 const mat3x2_f32 = (*(tint_symbol_1)).arr[idx].mat3x2_f32;
|
||||
float3x3 const mat3x3_f32 = (*(tint_symbol_1)).arr[idx].mat3x3_f32;
|
||||
float3x3 const mat3x3_f32 = tint_unpack_vec3_in_composite_1((*(tint_symbol_1)).arr[idx].mat3x3_f32);
|
||||
float3x4 const mat3x4_f32 = (*(tint_symbol_1)).arr[idx].mat3x4_f32;
|
||||
float4x2 const mat4x2_f32 = (*(tint_symbol_1)).arr[idx].mat4x2_f32;
|
||||
float4x3 const mat4x3_f32 = (*(tint_symbol_1)).arr[idx].mat4x3_f32;
|
||||
float4x3 const mat4x3_f32 = tint_unpack_vec3_in_composite_2((*(tint_symbol_1)).arr[idx].mat4x3_f32);
|
||||
float4x4 const mat4x4_f32 = (*(tint_symbol_1)).arr[idx].mat4x4_f32;
|
||||
half2x2 const mat2x2_f16 = (*(tint_symbol_1)).arr[idx].mat2x2_f16;
|
||||
half2x3 const mat2x3_f16 = (*(tint_symbol_1)).arr[idx].mat2x3_f16;
|
||||
half2x3 const mat2x3_f16 = tint_unpack_vec3_in_composite_3((*(tint_symbol_1)).arr[idx].mat2x3_f16);
|
||||
half2x4 const mat2x4_f16 = (*(tint_symbol_1)).arr[idx].mat2x4_f16;
|
||||
half3x2 const mat3x2_f16 = (*(tint_symbol_1)).arr[idx].mat3x2_f16;
|
||||
half3x3 const mat3x3_f16 = (*(tint_symbol_1)).arr[idx].mat3x3_f16;
|
||||
half3x3 const mat3x3_f16 = tint_unpack_vec3_in_composite_4((*(tint_symbol_1)).arr[idx].mat3x3_f16);
|
||||
half3x4 const mat3x4_f16 = (*(tint_symbol_1)).arr[idx].mat3x4_f16;
|
||||
half4x2 const mat4x2_f16 = (*(tint_symbol_1)).arr[idx].mat4x2_f16;
|
||||
half4x3 const mat4x3_f16 = (*(tint_symbol_1)).arr[idx].mat4x3_f16;
|
||||
half4x3 const mat4x3_f16 = tint_unpack_vec3_in_composite_5((*(tint_symbol_1)).arr[idx].mat4x3_f16);
|
||||
half4x4 const mat4x4_f16 = (*(tint_symbol_1)).arr[idx].mat4x4_f16;
|
||||
tint_array<float3, 2> const arr2_vec3_f32 = (*(tint_symbol_1)).arr[idx].arr2_vec3_f32;
|
||||
tint_array<float3, 2> const arr2_vec3_f32 = tint_unpack_vec3_in_composite_6((*(tint_symbol_1)).arr[idx].arr2_vec3_f32);
|
||||
tint_array<half4x2, 2> const arr2_mat4x2_f16 = (*(tint_symbol_1)).arr[idx].arr2_mat4x2_f16;
|
||||
}
|
||||
|
||||
kernel void tint_symbol(const device S* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
kernel void tint_symbol(const device S_tint_packed_vec3* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
tint_symbol_inner(idx, tint_symbol_2);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,75 +14,109 @@ struct tint_array {
|
||||
T elements[N];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
struct tint_packed_vec3_f32_array_element {
|
||||
/* 0x0000 */ packed_float3 elements;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
};
|
||||
|
||||
struct Inner_tint_packed_vec3 {
|
||||
/* 0x0000 */ float scalar_f32;
|
||||
/* 0x0004 */ int scalar_i32;
|
||||
/* 0x0008 */ uint scalar_u32;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad_1;
|
||||
/* 0x0010 */ float2 vec2_f32;
|
||||
/* 0x0018 */ int2 vec2_i32;
|
||||
/* 0x0020 */ uint2 vec2_u32;
|
||||
/* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
|
||||
/* 0x0028 */ tint_array<int8_t, 8> tint_pad_2;
|
||||
/* 0x0030 */ packed_float3 vec3_f32;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x0040 */ packed_int3 vec3_i32;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x0050 */ packed_uint3 vec3_u32;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_5;
|
||||
/* 0x0060 */ float4 vec4_f32;
|
||||
/* 0x0070 */ int4 vec4_i32;
|
||||
/* 0x0080 */ uint4 vec4_u32;
|
||||
/* 0x0090 */ float2x2 mat2x2_f32;
|
||||
/* 0x00a0 */ float2x3 mat2x3_f32;
|
||||
/* 0x00a0 */ tint_array<tint_packed_vec3_f32_array_element, 2> mat2x3_f32;
|
||||
/* 0x00c0 */ float2x4 mat2x4_f32;
|
||||
/* 0x00e0 */ float3x2 mat3x2_f32;
|
||||
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
|
||||
/* 0x0100 */ float3x3 mat3x3_f32;
|
||||
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_6;
|
||||
/* 0x0100 */ tint_array<tint_packed_vec3_f32_array_element, 3> mat3x3_f32;
|
||||
/* 0x0130 */ float3x4 mat3x4_f32;
|
||||
/* 0x0160 */ float4x2 mat4x2_f32;
|
||||
/* 0x0180 */ float4x3 mat4x3_f32;
|
||||
/* 0x0180 */ tint_array<tint_packed_vec3_f32_array_element, 4> mat4x3_f32;
|
||||
/* 0x01c0 */ float4x4 mat4x4_f32;
|
||||
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
|
||||
/* 0x0200 */ tint_array<tint_packed_vec3_f32_array_element, 2> arr2_vec3_f32;
|
||||
};
|
||||
|
||||
struct S_tint_packed_vec3 {
|
||||
/* 0x0000 */ tint_array<Inner_tint_packed_vec3, 1> arr;
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
float scalar_f32;
|
||||
int scalar_i32;
|
||||
uint scalar_u32;
|
||||
float2 vec2_f32;
|
||||
int2 vec2_i32;
|
||||
uint2 vec2_u32;
|
||||
float3 vec3_f32;
|
||||
int3 vec3_i32;
|
||||
uint3 vec3_u32;
|
||||
float4 vec4_f32;
|
||||
int4 vec4_i32;
|
||||
uint4 vec4_u32;
|
||||
float2x2 mat2x2_f32;
|
||||
float2x3 mat2x3_f32;
|
||||
float2x4 mat2x4_f32;
|
||||
float3x2 mat3x2_f32;
|
||||
float3x3 mat3x3_f32;
|
||||
float3x4 mat3x4_f32;
|
||||
float4x2 mat4x2_f32;
|
||||
float4x3 mat4x3_f32;
|
||||
float4x4 mat4x4_f32;
|
||||
tint_array<float3, 2> arr2_vec3_f32;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array<Inner, 1> arr;
|
||||
tint_array<Inner, 1> arr;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding(device float2x3* const dest, float2x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
void assign_and_preserve_padding(device tint_array<tint_packed_vec3_f32_array_element, 2>* const dest, float2x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device float3x3* const dest, float3x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
void assign_and_preserve_padding_1(device tint_array<tint_packed_vec3_f32_array_element, 3>* const dest, float3x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_float3(value[2u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_2(device float4x3* const dest, float4x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
(*(dest))[3u] = value[3u];
|
||||
void assign_and_preserve_padding_2(device tint_array<tint_packed_vec3_f32_array_element, 4>* const dest, float4x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_float3(value[2u]);
|
||||
(*(dest))[3u].elements = packed_float3(value[3u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_3(device tint_array<float3, 2>* const dest, tint_array<float3, 2> value) {
|
||||
void assign_and_preserve_padding_3(device tint_array<tint_packed_vec3_f32_array_element, 2>* const dest, tint_array<float3, 2> value) {
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
(*(dest))[i] = value[i];
|
||||
(*(dest))[i].elements = packed_float3(value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_inner(uint idx, device S* const tint_symbol_2) {
|
||||
void tint_symbol_inner(uint idx, device S_tint_packed_vec3* const tint_symbol_2) {
|
||||
(*(tint_symbol_2)).arr[idx].scalar_f32 = 0.0f;
|
||||
(*(tint_symbol_2)).arr[idx].scalar_i32 = 0;
|
||||
(*(tint_symbol_2)).arr[idx].scalar_u32 = 0u;
|
||||
(*(tint_symbol_2)).arr[idx].vec2_f32 = float2(0.0f);
|
||||
(*(tint_symbol_2)).arr[idx].vec2_i32 = int2(0);
|
||||
(*(tint_symbol_2)).arr[idx].vec2_u32 = uint2(0u);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_f32 = float3(0.0f);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_i32 = int3(0);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_u32 = uint3(0u);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_f32 = packed_float3(0.0f);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_i32 = packed_int3(0);
|
||||
(*(tint_symbol_2)).arr[idx].vec3_u32 = packed_uint3(0u);
|
||||
(*(tint_symbol_2)).arr[idx].vec4_f32 = float4(0.0f);
|
||||
(*(tint_symbol_2)).arr[idx].vec4_i32 = int4(0);
|
||||
(*(tint_symbol_2)).arr[idx].vec4_u32 = uint4(0u);
|
||||
@@ -99,7 +133,7 @@ void tint_symbol_inner(uint idx, device S* const tint_symbol_2) {
|
||||
assign_and_preserve_padding_3(&((*(tint_symbol_2)).arr[idx].arr2_vec3_f32), tint_symbol_1);
|
||||
}
|
||||
|
||||
kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
kernel void tint_symbol(device S_tint_packed_vec3* tint_symbol_3 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
tint_symbol_inner(idx, tint_symbol_3);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,102 +14,155 @@ struct tint_array {
|
||||
T elements[N];
|
||||
};
|
||||
|
||||
struct Inner {
|
||||
struct tint_packed_vec3_f32_array_element {
|
||||
/* 0x0000 */ packed_float3 elements;
|
||||
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
|
||||
};
|
||||
|
||||
struct tint_packed_vec3_f16_array_element {
|
||||
/* 0x0000 */ packed_half3 elements;
|
||||
/* 0x0006 */ tint_array<int8_t, 2> tint_pad_1;
|
||||
};
|
||||
|
||||
struct Inner_tint_packed_vec3 {
|
||||
/* 0x0000 */ float scalar_f32;
|
||||
/* 0x0004 */ int scalar_i32;
|
||||
/* 0x0008 */ uint scalar_u32;
|
||||
/* 0x000c */ half scalar_f16;
|
||||
/* 0x000e */ tint_array<int8_t, 2> tint_pad;
|
||||
/* 0x000e */ tint_array<int8_t, 2> tint_pad_2;
|
||||
/* 0x0010 */ float2 vec2_f32;
|
||||
/* 0x0018 */ int2 vec2_i32;
|
||||
/* 0x0020 */ uint2 vec2_u32;
|
||||
/* 0x0028 */ half2 vec2_f16;
|
||||
/* 0x002c */ tint_array<int8_t, 4> tint_pad_1;
|
||||
/* 0x002c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x0030 */ packed_float3 vec3_f32;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
|
||||
/* 0x003c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x0040 */ packed_int3 vec3_i32;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
|
||||
/* 0x004c */ tint_array<int8_t, 4> tint_pad_5;
|
||||
/* 0x0050 */ packed_uint3 vec3_u32;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
|
||||
/* 0x005c */ tint_array<int8_t, 4> tint_pad_6;
|
||||
/* 0x0060 */ packed_half3 vec3_f16;
|
||||
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_5;
|
||||
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_7;
|
||||
/* 0x0070 */ float4 vec4_f32;
|
||||
/* 0x0080 */ int4 vec4_i32;
|
||||
/* 0x0090 */ uint4 vec4_u32;
|
||||
/* 0x00a0 */ half4 vec4_f16;
|
||||
/* 0x00a8 */ float2x2 mat2x2_f32;
|
||||
/* 0x00b8 */ tint_array<int8_t, 8> tint_pad_6;
|
||||
/* 0x00c0 */ float2x3 mat2x3_f32;
|
||||
/* 0x00b8 */ tint_array<int8_t, 8> tint_pad_8;
|
||||
/* 0x00c0 */ tint_array<tint_packed_vec3_f32_array_element, 2> mat2x3_f32;
|
||||
/* 0x00e0 */ float2x4 mat2x4_f32;
|
||||
/* 0x0100 */ float3x2 mat3x2_f32;
|
||||
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_7;
|
||||
/* 0x0120 */ float3x3 mat3x3_f32;
|
||||
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_9;
|
||||
/* 0x0120 */ tint_array<tint_packed_vec3_f32_array_element, 3> mat3x3_f32;
|
||||
/* 0x0150 */ float3x4 mat3x4_f32;
|
||||
/* 0x0180 */ float4x2 mat4x2_f32;
|
||||
/* 0x01a0 */ float4x3 mat4x3_f32;
|
||||
/* 0x01a0 */ tint_array<tint_packed_vec3_f32_array_element, 4> mat4x3_f32;
|
||||
/* 0x01e0 */ float4x4 mat4x4_f32;
|
||||
/* 0x0220 */ half2x2 mat2x2_f16;
|
||||
/* 0x0228 */ half2x3 mat2x3_f16;
|
||||
/* 0x0228 */ tint_array<tint_packed_vec3_f16_array_element, 2> mat2x3_f16;
|
||||
/* 0x0238 */ half2x4 mat2x4_f16;
|
||||
/* 0x0248 */ half3x2 mat3x2_f16;
|
||||
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_8;
|
||||
/* 0x0258 */ half3x3 mat3x3_f16;
|
||||
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_10;
|
||||
/* 0x0258 */ tint_array<tint_packed_vec3_f16_array_element, 3> mat3x3_f16;
|
||||
/* 0x0270 */ half3x4 mat3x4_f16;
|
||||
/* 0x0288 */ half4x2 mat4x2_f16;
|
||||
/* 0x0298 */ half4x3 mat4x3_f16;
|
||||
/* 0x0298 */ tint_array<tint_packed_vec3_f16_array_element, 4> mat4x3_f16;
|
||||
/* 0x02b8 */ half4x4 mat4x4_f16;
|
||||
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_9;
|
||||
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
|
||||
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_11;
|
||||
/* 0x02e0 */ tint_array<tint_packed_vec3_f32_array_element, 2> arr2_vec3_f32;
|
||||
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
|
||||
};
|
||||
|
||||
struct S {
|
||||
/* 0x0000 */ tint_array<Inner, 1> arr;
|
||||
struct S_tint_packed_vec3 {
|
||||
/* 0x0000 */ tint_array<Inner_tint_packed_vec3, 1> arr;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding(device float2x3* const dest, float2x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
struct Inner {
|
||||
float scalar_f32;
|
||||
int scalar_i32;
|
||||
uint scalar_u32;
|
||||
half scalar_f16;
|
||||
float2 vec2_f32;
|
||||
int2 vec2_i32;
|
||||
uint2 vec2_u32;
|
||||
half2 vec2_f16;
|
||||
float3 vec3_f32;
|
||||
int3 vec3_i32;
|
||||
uint3 vec3_u32;
|
||||
half3 vec3_f16;
|
||||
float4 vec4_f32;
|
||||
int4 vec4_i32;
|
||||
uint4 vec4_u32;
|
||||
half4 vec4_f16;
|
||||
float2x2 mat2x2_f32;
|
||||
float2x3 mat2x3_f32;
|
||||
float2x4 mat2x4_f32;
|
||||
float3x2 mat3x2_f32;
|
||||
float3x3 mat3x3_f32;
|
||||
float3x4 mat3x4_f32;
|
||||
float4x2 mat4x2_f32;
|
||||
float4x3 mat4x3_f32;
|
||||
float4x4 mat4x4_f32;
|
||||
half2x2 mat2x2_f16;
|
||||
half2x3 mat2x3_f16;
|
||||
half2x4 mat2x4_f16;
|
||||
half3x2 mat3x2_f16;
|
||||
half3x3 mat3x3_f16;
|
||||
half3x4 mat3x4_f16;
|
||||
half4x2 mat4x2_f16;
|
||||
half4x3 mat4x3_f16;
|
||||
half4x4 mat4x4_f16;
|
||||
tint_array<float3, 2> arr2_vec3_f32;
|
||||
tint_array<half4x2, 2> arr2_mat4x2_f16;
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array<Inner, 1> arr;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding(device tint_array<tint_packed_vec3_f32_array_element, 2>* const dest, float2x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device float3x3* const dest, float3x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
void assign_and_preserve_padding_1(device tint_array<tint_packed_vec3_f32_array_element, 3>* const dest, float3x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_float3(value[2u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_2(device float4x3* const dest, float4x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
(*(dest))[3u] = value[3u];
|
||||
void assign_and_preserve_padding_2(device tint_array<tint_packed_vec3_f32_array_element, 4>* const dest, float4x3 value) {
|
||||
(*(dest))[0u].elements = packed_float3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_float3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_float3(value[2u]);
|
||||
(*(dest))[3u].elements = packed_float3(value[3u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_3(device half2x3* const dest, half2x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
void assign_and_preserve_padding_3(device tint_array<tint_packed_vec3_f16_array_element, 2>* const dest, half2x3 value) {
|
||||
(*(dest))[0u].elements = packed_half3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_half3(value[1u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_4(device half3x3* const dest, half3x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
void assign_and_preserve_padding_4(device tint_array<tint_packed_vec3_f16_array_element, 3>* const dest, half3x3 value) {
|
||||
(*(dest))[0u].elements = packed_half3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_half3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_half3(value[2u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_5(device half4x3* const dest, half4x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
(*(dest))[3u] = value[3u];
|
||||
void assign_and_preserve_padding_5(device tint_array<tint_packed_vec3_f16_array_element, 4>* const dest, half4x3 value) {
|
||||
(*(dest))[0u].elements = packed_half3(value[0u]);
|
||||
(*(dest))[1u].elements = packed_half3(value[1u]);
|
||||
(*(dest))[2u].elements = packed_half3(value[2u]);
|
||||
(*(dest))[3u].elements = packed_half3(value[3u]);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_6(device tint_array<float3, 2>* const dest, tint_array<float3, 2> value) {
|
||||
void assign_and_preserve_padding_6(device tint_array<tint_packed_vec3_f32_array_element, 2>* const dest, tint_array<float3, 2> value) {
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
(*(dest))[i] = value[i];
|
||||
(*(dest))[i].elements = packed_float3(value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_inner(uint idx, device S* const tint_symbol_3) {
|
||||
void tint_symbol_inner(uint idx, device S_tint_packed_vec3* const tint_symbol_3) {
|
||||
(*(tint_symbol_3)).arr[idx].scalar_f32 = 0.0f;
|
||||
(*(tint_symbol_3)).arr[idx].scalar_i32 = 0;
|
||||
(*(tint_symbol_3)).arr[idx].scalar_u32 = 0u;
|
||||
@@ -118,10 +171,10 @@ void tint_symbol_inner(uint idx, device S* const tint_symbol_3) {
|
||||
(*(tint_symbol_3)).arr[idx].vec2_i32 = int2(0);
|
||||
(*(tint_symbol_3)).arr[idx].vec2_u32 = uint2(0u);
|
||||
(*(tint_symbol_3)).arr[idx].vec2_f16 = half2(0.0h);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_f32 = float3(0.0f);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_i32 = int3(0);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_u32 = uint3(0u);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_f16 = half3(0.0h);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_f32 = packed_float3(0.0f);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_i32 = packed_int3(0);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_u32 = packed_uint3(0u);
|
||||
(*(tint_symbol_3)).arr[idx].vec3_f16 = packed_half3(0.0h);
|
||||
(*(tint_symbol_3)).arr[idx].vec4_f32 = float4(0.0f);
|
||||
(*(tint_symbol_3)).arr[idx].vec4_i32 = int4(0);
|
||||
(*(tint_symbol_3)).arr[idx].vec4_u32 = uint4(0u);
|
||||
@@ -150,7 +203,7 @@ void tint_symbol_inner(uint idx, device S* const tint_symbol_3) {
|
||||
(*(tint_symbol_3)).arr[idx].arr2_mat4x2_f16 = tint_symbol_2;
|
||||
}
|
||||
|
||||
kernel void tint_symbol(device S* tint_symbol_4 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
kernel void tint_symbol(device S_tint_packed_vec3* tint_symbol_4 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||
tint_symbol_inner(idx, tint_symbol_4);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user