Tint/E2E: Add f16 uniform/storage buffer E2E tests

This CL add Tint E2E tests for f16 types in uniform and storage buffers.

Bug: tint:1473, tint:1502
Change-Id: I325524d2df326240cc1b080a90abf5bd076b3da1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107543
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This commit is contained in:
Zhaoming Jiang 2022-11-30 02:47:27 +00:00 committed by Dawn LUCI CQ
parent 205e16de63
commit 776b221ae2
2995 changed files with 113726 additions and 2997 deletions

View File

@ -1,30 +1,56 @@
struct Inner { struct Inner {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : array<vec4<i32>, 4>, vec3_u32 : vec3<u32>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
}; };
struct S { struct S {
arr : array<Inner>, arr : array<Inner>,
}; };
@binding(0) @group(0) var<storage, read> s : S; @binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) { fn main(@builtin(local_invocation_index) idx : u32) {
let a = s.arr[idx].a; let scalar_f32 : f32 = sb.arr[idx].scalar_f32;
let b = s.arr[idx].b; let scalar_i32 : i32 = sb.arr[idx].scalar_i32;
let c = s.arr[idx].c; let scalar_u32 : u32 = sb.arr[idx].scalar_u32;
let d = s.arr[idx].d; let vec2_f32 : vec2<f32> = sb.arr[idx].vec2_f32;
let e = s.arr[idx].e; let vec2_i32 : vec2<i32> = sb.arr[idx].vec2_i32;
let f = s.arr[idx].f; let vec2_u32 : vec2<u32> = sb.arr[idx].vec2_u32;
let g = s.arr[idx].g; let vec3_f32 : vec3<f32> = sb.arr[idx].vec3_f32;
let h = s.arr[idx].h; let vec3_i32 : vec3<i32> = sb.arr[idx].vec3_i32;
let i = s.arr[idx].i; let vec3_u32 : vec3<u32> = sb.arr[idx].vec3_u32;
let vec4_f32 : vec4<f32> = sb.arr[idx].vec4_f32;
let vec4_i32 : vec4<i32> = sb.arr[idx].vec4_i32;
let vec4_u32 : vec4<u32> = sb.arr[idx].vec4_u32;
let mat2x2_f32 : mat2x2<f32> = sb.arr[idx].mat2x2_f32;
let mat2x3_f32 : mat2x3<f32> = sb.arr[idx].mat2x3_f32;
let mat2x4_f32 : mat2x4<f32> = sb.arr[idx].mat2x4_f32;
let mat3x2_f32 : mat3x2<f32> = sb.arr[idx].mat3x2_f32;
let mat3x3_f32 : mat3x3<f32> = sb.arr[idx].mat3x3_f32;
let mat3x4_f32 : mat3x4<f32> = sb.arr[idx].mat3x4_f32;
let mat4x2_f32 : mat4x2<f32> = sb.arr[idx].mat4x2_f32;
let mat4x3_f32 : mat4x3<f32> = sb.arr[idx].mat4x3_f32;
let mat4x4_f32 : mat4x4<f32> = sb.arr[idx].mat4x4_f32;
let arr2_vec3_f32 : array<vec3<f32>, 2> = sb.arr[idx].arr2_vec3_f32;
} }

View File

@ -1,38 +1,79 @@
ByteAddressBuffer s : register(t0, space0); ByteAddressBuffer sb : register(t0, space0);
struct tint_symbol_1 { struct tint_symbol_1 {
uint idx : SV_GroupIndex; uint idx : SV_GroupIndex;
}; };
float2x3 tint_symbol_8(ByteAddressBuffer buffer, uint offset) { float2x2 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u)))); return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
} }
float3x2 tint_symbol_9(ByteAddressBuffer buffer, uint offset) { float2x4 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u)))); return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
} }
typedef int4 tint_symbol_11_ret[4]; float3x3 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
tint_symbol_11_ret tint_symbol_11(ByteAddressBuffer buffer, uint offset) { return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
int4 arr_1[4] = (int4[4])0; }
float3x4 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
typedef float3 tint_symbol_23_ret[2];
tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
float3 arr_1[2] = (float3[2])0;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr_1[i_1] = asint(buffer.Load4((offset + (i_1 * 16u)))); arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
} }
} }
return arr_1; return arr_1;
} }
void main_inner(uint idx) { void main_inner(uint idx) {
const int3 a = asint(s.Load3((176u * idx))); const float scalar_f32 = asfloat(sb.Load((544u * idx)));
const int b = asint(s.Load(((176u * idx) + 12u))); const int scalar_i32 = asint(sb.Load(((544u * idx) + 4u)));
const uint3 c = s.Load3(((176u * idx) + 16u)); const uint scalar_u32 = sb.Load(((544u * idx) + 8u));
const uint d = s.Load(((176u * idx) + 28u)); const float2 vec2_f32 = asfloat(sb.Load2(((544u * idx) + 16u)));
const float3 e = asfloat(s.Load3(((176u * idx) + 32u))); const int2 vec2_i32 = asint(sb.Load2(((544u * idx) + 24u)));
const float f = asfloat(s.Load(((176u * idx) + 44u))); const uint2 vec2_u32 = sb.Load2(((544u * idx) + 32u));
const float2x3 g = tint_symbol_8(s, ((176u * idx) + 48u)); const float3 vec3_f32 = asfloat(sb.Load3(((544u * idx) + 48u)));
const float3x2 h = tint_symbol_9(s, ((176u * idx) + 80u)); const int3 vec3_i32 = asint(sb.Load3(((544u * idx) + 64u)));
const int4 i[4] = tint_symbol_11(s, ((176u * idx) + 112u)); const uint3 vec3_u32 = sb.Load3(((544u * idx) + 80u));
const float4 vec4_f32 = asfloat(sb.Load4(((544u * idx) + 96u)));
const int4 vec4_i32 = asint(sb.Load4(((544u * idx) + 112u)));
const uint4 vec4_u32 = sb.Load4(((544u * idx) + 128u));
const float2x2 mat2x2_f32 = tint_symbol_14(sb, ((544u * idx) + 144u));
const float2x3 mat2x3_f32 = tint_symbol_15(sb, ((544u * idx) + 160u));
const float2x4 mat2x4_f32 = tint_symbol_16(sb, ((544u * idx) + 192u));
const float3x2 mat3x2_f32 = tint_symbol_17(sb, ((544u * idx) + 224u));
const float3x3 mat3x3_f32 = tint_symbol_18(sb, ((544u * idx) + 256u));
const float3x4 mat3x4_f32 = tint_symbol_19(sb, ((544u * idx) + 304u));
const float4x2 mat4x2_f32 = tint_symbol_20(sb, ((544u * idx) + 352u));
const float4x3 mat4x3_f32 = tint_symbol_21(sb, ((544u * idx) + 384u));
const float4x4 mat4x4_f32 = tint_symbol_22(sb, ((544u * idx) + 448u));
const float3 arr2_vec3_f32[2] = tint_symbol_23(sb, ((544u * idx) + 512u));
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]

View File

@ -1,38 +1,79 @@
ByteAddressBuffer s : register(t0, space0); ByteAddressBuffer sb : register(t0, space0);
struct tint_symbol_1 { struct tint_symbol_1 {
uint idx : SV_GroupIndex; uint idx : SV_GroupIndex;
}; };
float2x3 tint_symbol_8(ByteAddressBuffer buffer, uint offset) { float2x2 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u)))); return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
} }
float3x2 tint_symbol_9(ByteAddressBuffer buffer, uint offset) { float2x4 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u)))); return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
} }
typedef int4 tint_symbol_11_ret[4]; float3x3 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
tint_symbol_11_ret tint_symbol_11(ByteAddressBuffer buffer, uint offset) { return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
int4 arr_1[4] = (int4[4])0; }
float3x4 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
typedef float3 tint_symbol_23_ret[2];
tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
float3 arr_1[2] = (float3[2])0;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr_1[i_1] = asint(buffer.Load4((offset + (i_1 * 16u)))); arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
} }
} }
return arr_1; return arr_1;
} }
void main_inner(uint idx) { void main_inner(uint idx) {
const int3 a = asint(s.Load3((176u * idx))); const float scalar_f32 = asfloat(sb.Load((544u * idx)));
const int b = asint(s.Load(((176u * idx) + 12u))); const int scalar_i32 = asint(sb.Load(((544u * idx) + 4u)));
const uint3 c = s.Load3(((176u * idx) + 16u)); const uint scalar_u32 = sb.Load(((544u * idx) + 8u));
const uint d = s.Load(((176u * idx) + 28u)); const float2 vec2_f32 = asfloat(sb.Load2(((544u * idx) + 16u)));
const float3 e = asfloat(s.Load3(((176u * idx) + 32u))); const int2 vec2_i32 = asint(sb.Load2(((544u * idx) + 24u)));
const float f = asfloat(s.Load(((176u * idx) + 44u))); const uint2 vec2_u32 = sb.Load2(((544u * idx) + 32u));
const float2x3 g = tint_symbol_8(s, ((176u * idx) + 48u)); const float3 vec3_f32 = asfloat(sb.Load3(((544u * idx) + 48u)));
const float3x2 h = tint_symbol_9(s, ((176u * idx) + 80u)); const int3 vec3_i32 = asint(sb.Load3(((544u * idx) + 64u)));
const int4 i[4] = tint_symbol_11(s, ((176u * idx) + 112u)); const uint3 vec3_u32 = sb.Load3(((544u * idx) + 80u));
const float4 vec4_f32 = asfloat(sb.Load4(((544u * idx) + 96u)));
const int4 vec4_i32 = asint(sb.Load4(((544u * idx) + 112u)));
const uint4 vec4_u32 = sb.Load4(((544u * idx) + 128u));
const float2x2 mat2x2_f32 = tint_symbol_14(sb, ((544u * idx) + 144u));
const float2x3 mat2x3_f32 = tint_symbol_15(sb, ((544u * idx) + 160u));
const float2x4 mat2x4_f32 = tint_symbol_16(sb, ((544u * idx) + 192u));
const float3x2 mat3x2_f32 = tint_symbol_17(sb, ((544u * idx) + 224u));
const float3x3 mat3x3_f32 = tint_symbol_18(sb, ((544u * idx) + 256u));
const float3x4 mat3x4_f32 = tint_symbol_19(sb, ((544u * idx) + 304u));
const float4x2 mat4x2_f32 = tint_symbol_20(sb, ((544u * idx) + 352u));
const float4x3 mat4x3_f32 = tint_symbol_21(sb, ((544u * idx) + 384u));
const float4x4 mat4x4_f32 = tint_symbol_22(sb, ((544u * idx) + 448u));
const float3 arr2_vec3_f32[2] = tint_symbol_23(sb, ((544u * idx) + 512u));
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]

View File

@ -1,33 +1,65 @@
#version 310 es #version 310 es
struct Inner { struct Inner {
ivec3 a; float scalar_f32;
int b; int scalar_i32;
uvec3 c; uint scalar_u32;
uint d;
vec3 e;
float f;
mat2x3 g;
mat3x2 h;
uint pad; uint pad;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_1; uint pad_1;
ivec4 i[4]; uint pad_2;
vec3 vec3_f32;
uint pad_3;
ivec3 vec3_i32;
uint pad_4;
uvec3 vec3_u32;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
mat2 mat2x2_f32;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_6;
uint pad_7;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
vec3 arr2_vec3_f32[2];
}; };
layout(binding = 0, std430) buffer S_ssbo { layout(binding = 0, std430) buffer S_ssbo {
Inner arr[]; Inner arr[];
} s; } sb;
void tint_symbol(uint idx) { void tint_symbol(uint idx) {
ivec3 a = s.arr[idx].a; float scalar_f32 = sb.arr[idx].scalar_f32;
int b = s.arr[idx].b; int scalar_i32 = sb.arr[idx].scalar_i32;
uvec3 c = s.arr[idx].c; uint scalar_u32 = sb.arr[idx].scalar_u32;
uint d = s.arr[idx].d; vec2 vec2_f32 = sb.arr[idx].vec2_f32;
vec3 e = s.arr[idx].e; ivec2 vec2_i32 = sb.arr[idx].vec2_i32;
float f = s.arr[idx].f; uvec2 vec2_u32 = sb.arr[idx].vec2_u32;
mat2x3 g = s.arr[idx].g; vec3 vec3_f32 = sb.arr[idx].vec3_f32;
mat3x2 h = s.arr[idx].h; ivec3 vec3_i32 = sb.arr[idx].vec3_i32;
ivec4 i[4] = s.arr[idx].i; uvec3 vec3_u32 = sb.arr[idx].vec3_u32;
vec4 vec4_f32 = sb.arr[idx].vec4_f32;
ivec4 vec4_i32 = sb.arr[idx].vec4_i32;
uvec4 vec4_u32 = sb.arr[idx].vec4_u32;
mat2 mat2x2_f32 = sb.arr[idx].mat2x2_f32;
mat2x3 mat2x3_f32 = sb.arr[idx].mat2x3_f32;
mat2x4 mat2x4_f32 = sb.arr[idx].mat2x4_f32;
mat3x2 mat3x2_f32 = sb.arr[idx].mat3x2_f32;
mat3 mat3x3_f32 = sb.arr[idx].mat3x3_f32;
mat3x4 mat3x4_f32 = sb.arr[idx].mat3x4_f32;
mat4x2 mat4x2_f32 = sb.arr[idx].mat4x2_f32;
mat4x3 mat4x3_f32 = sb.arr[idx].mat4x3_f32;
mat4 mat4x4_f32 = sb.arr[idx].mat4x4_f32;
vec3 arr2_vec3_f32[2] = sb.arr[idx].arr2_vec3_f32;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -15,16 +15,34 @@ struct tint_array {
}; };
struct Inner { struct Inner {
/* 0x0000 */ packed_int3 a; /* 0x0000 */ float scalar_f32;
/* 0x000c */ int b; /* 0x0004 */ int scalar_i32;
/* 0x0010 */ packed_uint3 c; /* 0x0008 */ uint scalar_u32;
/* 0x001c */ uint d; /* 0x000c */ tint_array<int8_t, 4> tint_pad;
/* 0x0020 */ packed_float3 e; /* 0x0010 */ float2 vec2_f32;
/* 0x002c */ float f; /* 0x0018 */ int2 vec2_i32;
/* 0x0030 */ float2x3 g; /* 0x0020 */ uint2 vec2_u32;
/* 0x0050 */ float3x2 h; /* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0068 */ tint_array<int8_t, 8> tint_pad; /* 0x0030 */ packed_float3 vec3_f32;
/* 0x0070 */ tint_array<int4, 4> i; /* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ float4 vec4_f32;
/* 0x0070 */ int4 vec4_i32;
/* 0x0080 */ uint4 vec4_u32;
/* 0x0090 */ float2x2 mat2x2_f32;
/* 0x00a0 */ float2x3 mat2x3_f32;
/* 0x00c0 */ float2x4 mat2x4_f32;
/* 0x00e0 */ float3x2 mat3x2_f32;
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
/* 0x0100 */ float3x3 mat3x3_f32;
/* 0x0130 */ float3x4 mat3x4_f32;
/* 0x0160 */ float4x2 mat4x2_f32;
/* 0x0180 */ float4x3 mat4x3_f32;
/* 0x01c0 */ float4x4 mat4x4_f32;
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
}; };
struct S { struct S {
@ -32,15 +50,28 @@ struct S {
}; };
void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) { void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
int3 const a = int3((*(tint_symbol_1)).arr[idx].a); float const scalar_f32 = (*(tint_symbol_1)).arr[idx].scalar_f32;
int const b = (*(tint_symbol_1)).arr[idx].b; int const scalar_i32 = (*(tint_symbol_1)).arr[idx].scalar_i32;
uint3 const c = uint3((*(tint_symbol_1)).arr[idx].c); uint const scalar_u32 = (*(tint_symbol_1)).arr[idx].scalar_u32;
uint const d = (*(tint_symbol_1)).arr[idx].d; float2 const vec2_f32 = (*(tint_symbol_1)).arr[idx].vec2_f32;
float3 const e = float3((*(tint_symbol_1)).arr[idx].e); int2 const vec2_i32 = (*(tint_symbol_1)).arr[idx].vec2_i32;
float const f = (*(tint_symbol_1)).arr[idx].f; uint2 const vec2_u32 = (*(tint_symbol_1)).arr[idx].vec2_u32;
float2x3 const g = (*(tint_symbol_1)).arr[idx].g; float3 const vec3_f32 = float3((*(tint_symbol_1)).arr[idx].vec3_f32);
float3x2 const h = (*(tint_symbol_1)).arr[idx].h; int3 const vec3_i32 = int3((*(tint_symbol_1)).arr[idx].vec3_i32);
tint_array<int4, 4> const i = (*(tint_symbol_1)).arr[idx].i; uint3 const vec3_u32 = uint3((*(tint_symbol_1)).arr[idx].vec3_u32);
float4 const vec4_f32 = (*(tint_symbol_1)).arr[idx].vec4_f32;
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;
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;
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;
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;
} }
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_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 65 ; Bound: 128
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -11,16 +11,29 @@
OpName %S "S" OpName %S "S"
OpMemberName %S 0 "arr" OpMemberName %S 0 "arr"
OpName %Inner "Inner" OpName %Inner "Inner"
OpMemberName %Inner 0 "a" OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "b" OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "c" OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "d" OpMemberName %Inner 3 "vec2_f32"
OpMemberName %Inner 4 "e" OpMemberName %Inner 4 "vec2_i32"
OpMemberName %Inner 5 "f" OpMemberName %Inner 5 "vec2_u32"
OpMemberName %Inner 6 "g" OpMemberName %Inner 6 "vec3_f32"
OpMemberName %Inner 7 "h" OpMemberName %Inner 7 "vec3_i32"
OpMemberName %Inner 8 "i" OpMemberName %Inner 8 "vec3_u32"
OpName %s "s" OpMemberName %Inner 9 "vec4_f32"
OpMemberName %Inner 10 "vec4_i32"
OpMemberName %Inner 11 "vec4_u32"
OpMemberName %Inner 12 "mat2x2_f32"
OpMemberName %Inner 13 "mat2x3_f32"
OpMemberName %Inner 14 "mat2x4_f32"
OpMemberName %Inner 15 "mat3x2_f32"
OpMemberName %Inner 16 "mat3x3_f32"
OpMemberName %Inner 17 "mat3x4_f32"
OpMemberName %Inner 18 "mat4x2_f32"
OpMemberName %Inner 19 "mat4x3_f32"
OpMemberName %Inner 20 "mat4x4_f32"
OpMemberName %Inner 21 "arr2_vec3_f32"
OpName %sb "sb"
OpName %main_inner "main_inner" OpName %main_inner "main_inner"
OpName %idx "idx" OpName %idx "idx"
OpName %main "main" OpName %main "main"
@ -28,88 +41,178 @@
OpDecorate %S Block OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0 OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0 OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 12 OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 16 OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 28 OpMemberDecorate %Inner 3 Offset 16
OpMemberDecorate %Inner 4 Offset 32 OpMemberDecorate %Inner 4 Offset 24
OpMemberDecorate %Inner 5 Offset 44 OpMemberDecorate %Inner 5 Offset 32
OpMemberDecorate %Inner 6 Offset 48 OpMemberDecorate %Inner 6 Offset 48
OpMemberDecorate %Inner 6 ColMajor OpMemberDecorate %Inner 7 Offset 64
OpMemberDecorate %Inner 6 MatrixStride 16 OpMemberDecorate %Inner 8 Offset 80
OpMemberDecorate %Inner 7 Offset 80 OpMemberDecorate %Inner 9 Offset 96
OpMemberDecorate %Inner 7 ColMajor OpMemberDecorate %Inner 10 Offset 112
OpMemberDecorate %Inner 7 MatrixStride 8 OpMemberDecorate %Inner 11 Offset 128
OpMemberDecorate %Inner 8 Offset 112 OpMemberDecorate %Inner 12 Offset 144
OpDecorate %_arr_v4int_uint_4 ArrayStride 16 OpMemberDecorate %Inner 12 ColMajor
OpDecorate %_runtimearr_Inner ArrayStride 176 OpMemberDecorate %Inner 12 MatrixStride 8
OpDecorate %s NonWritable OpMemberDecorate %Inner 13 Offset 160
OpDecorate %s Binding 0 OpMemberDecorate %Inner 13 ColMajor
OpDecorate %s DescriptorSet 0 OpMemberDecorate %Inner 13 MatrixStride 16
OpMemberDecorate %Inner 14 Offset 192
OpMemberDecorate %Inner 14 ColMajor
OpMemberDecorate %Inner 14 MatrixStride 16
OpMemberDecorate %Inner 15 Offset 224
OpMemberDecorate %Inner 15 ColMajor
OpMemberDecorate %Inner 15 MatrixStride 8
OpMemberDecorate %Inner 16 Offset 256
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 16
OpMemberDecorate %Inner 17 Offset 304
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 352
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 8
OpMemberDecorate %Inner 19 Offset 384
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 16
OpMemberDecorate %Inner 20 Offset 448
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 544
OpDecorate %sb NonWritable
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint %_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input %idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3 %v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3 %v3uint = OpTypeVector %uint 3
%float = OpTypeFloat 32 %v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%mat2v3float = OpTypeMatrix %v3float 2
%v2float = OpTypeVector %float 2
%mat3v2float = OpTypeMatrix %v2float 3
%v4int = OpTypeVector %int 4 %v4int = OpTypeVector %int 4
%uint_4 = OpConstant %uint 4 %v4uint = OpTypeVector %uint 4
%_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4 %mat2v2float = OpTypeMatrix %v2float 2
%Inner = OpTypeStruct %v3int %int %v3uint %uint %v3float %float %mat2v3float %mat3v2float %_arr_v4int_uint_4 %mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner %_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner %S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S %_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%s = OpVariable %_ptr_StorageBuffer_S StorageBuffer %sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid %void = OpTypeVoid
%20 = OpTypeFunction %void %uint %31 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0 %uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_2 = OpConstant %uint 2
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float %uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%uint_5 = OpConstant %uint 5 %uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float %_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_6 = OpConstant %uint 6 %uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_7 = OpConstant %uint 7 %uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float %_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_8 = OpConstant %uint 8 %uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer__arr_v4int_uint_4 = OpTypePointer StorageBuffer %_arr_v4int_uint_4 %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%60 = OpTypeFunction %void %uint_9 = OpConstant %uint 9
%main_inner = OpFunction %void None %20 %_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%123 = OpTypeFunction %void
%main_inner = OpFunction %void None %31
%idx = OpFunctionParameter %uint %idx = OpFunctionParameter %uint
%24 = OpLabel %35 = OpLabel
%27 = OpAccessChain %_ptr_StorageBuffer_v3int %s %uint_0 %idx %uint_0 %38 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
%28 = OpLoad %v3int %27 %39 = OpLoad %float %38
%31 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %idx %uint_1 %42 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
%32 = OpLoad %int %31 %43 = OpLoad %int %42
%35 = OpAccessChain %_ptr_StorageBuffer_v3uint %s %uint_0 %idx %uint_2 %45 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
%36 = OpLoad %v3uint %35 %46 = OpLoad %uint %45
%39 = OpAccessChain %_ptr_StorageBuffer_uint %s %uint_0 %idx %uint_3 %49 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_3
%40 = OpLoad %uint %39 %50 = OpLoad %v2float %49
%42 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %idx %uint_4 %53 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_4
%43 = OpLoad %v3float %42 %54 = OpLoad %v2int %53
%46 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %idx %uint_5 %57 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_5
%47 = OpLoad %float %46 %58 = OpLoad %v2uint %57
%50 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %idx %uint_6 %61 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_6
%51 = OpLoad %mat2v3float %50 %62 = OpLoad %v3float %61
%54 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %s %uint_0 %idx %uint_7 %65 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_7
%55 = OpLoad %mat3v2float %54 %66 = OpLoad %v3int %65
%58 = OpAccessChain %_ptr_StorageBuffer__arr_v4int_uint_4 %s %uint_0 %idx %uint_8 %69 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_8
%59 = OpLoad %_arr_v4int_uint_4 %58 %70 = OpLoad %v3uint %69
%73 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_9
%74 = OpLoad %v4float %73
%77 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_10
%78 = OpLoad %v4int %77
%81 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_11
%82 = OpLoad %v4uint %81
%85 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_12
%86 = OpLoad %mat2v2float %85
%89 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_13
%90 = OpLoad %mat2v3float %89
%93 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_14
%94 = OpLoad %mat2v4float %93
%97 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_15
%98 = OpLoad %mat3v2float %97
%101 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_16
%102 = OpLoad %mat3v3float %101
%105 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_17
%106 = OpLoad %mat3v4float %105
%109 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_18
%110 = OpLoad %mat4v2float %109
%113 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_19
%114 = OpLoad %mat4v3float %113
%117 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_20
%118 = OpLoad %mat4v4float %117
%121 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %idx %uint_21
%122 = OpLoad %_arr_v3float_uint_2 %121
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %60 %main = OpFunction %void None %123
%62 = OpLabel %125 = OpLabel
%64 = OpLoad %uint %idx_1 %127 = OpLoad %uint %idx_1
%63 = OpFunctionCall %void %main_inner %64 %126 = OpFunctionCall %void %main_inner %127
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,30 +1,56 @@
struct Inner { struct Inner {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : array<vec4<i32>, 4>, vec3_u32 : vec3<u32>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
} }
struct S { struct S {
arr : array<Inner>, arr : array<Inner>,
} }
@binding(0) @group(0) var<storage, read> s : S; @binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) { fn main(@builtin(local_invocation_index) idx : u32) {
let a = s.arr[idx].a; let scalar_f32 : f32 = sb.arr[idx].scalar_f32;
let b = s.arr[idx].b; let scalar_i32 : i32 = sb.arr[idx].scalar_i32;
let c = s.arr[idx].c; let scalar_u32 : u32 = sb.arr[idx].scalar_u32;
let d = s.arr[idx].d; let vec2_f32 : vec2<f32> = sb.arr[idx].vec2_f32;
let e = s.arr[idx].e; let vec2_i32 : vec2<i32> = sb.arr[idx].vec2_i32;
let f = s.arr[idx].f; let vec2_u32 : vec2<u32> = sb.arr[idx].vec2_u32;
let g = s.arr[idx].g; let vec3_f32 : vec3<f32> = sb.arr[idx].vec3_f32;
let h = s.arr[idx].h; let vec3_i32 : vec3<i32> = sb.arr[idx].vec3_i32;
let i = s.arr[idx].i; let vec3_u32 : vec3<u32> = sb.arr[idx].vec3_u32;
let vec4_f32 : vec4<f32> = sb.arr[idx].vec4_f32;
let vec4_i32 : vec4<i32> = sb.arr[idx].vec4_i32;
let vec4_u32 : vec4<u32> = sb.arr[idx].vec4_u32;
let mat2x2_f32 : mat2x2<f32> = sb.arr[idx].mat2x2_f32;
let mat2x3_f32 : mat2x3<f32> = sb.arr[idx].mat2x3_f32;
let mat2x4_f32 : mat2x4<f32> = sb.arr[idx].mat2x4_f32;
let mat3x2_f32 : mat3x2<f32> = sb.arr[idx].mat3x2_f32;
let mat3x3_f32 : mat3x3<f32> = sb.arr[idx].mat3x3_f32;
let mat3x4_f32 : mat3x4<f32> = sb.arr[idx].mat3x4_f32;
let mat4x2_f32 : mat4x2<f32> = sb.arr[idx].mat4x2_f32;
let mat4x3_f32 : mat4x3<f32> = sb.arr[idx].mat4x3_f32;
let mat4x4_f32 : mat4x4<f32> = sb.arr[idx].mat4x4_f32;
let arr2_vec3_f32 : array<vec3<f32>, 2> = sb.arr[idx].arr2_vec3_f32;
} }

View File

@ -0,0 +1,86 @@
enable f16;
struct Inner {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
};
struct S {
arr : array<Inner>,
};
@binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) {
let scalar_f32 : f32 = sb.arr[idx].scalar_f32;
let scalar_i32 : i32 = sb.arr[idx].scalar_i32;
let scalar_u32 : u32 = sb.arr[idx].scalar_u32;
let scalar_f16 : f16 = sb.arr[idx].scalar_f16;
let vec2_f32 : vec2<f32> = sb.arr[idx].vec2_f32;
let vec2_i32 : vec2<i32> = sb.arr[idx].vec2_i32;
let vec2_u32 : vec2<u32> = sb.arr[idx].vec2_u32;
let vec2_f16 : vec2<f16> = sb.arr[idx].vec2_f16;
let vec3_f32 : vec3<f32> = sb.arr[idx].vec3_f32;
let vec3_i32 : vec3<i32> = sb.arr[idx].vec3_i32;
let vec3_u32 : vec3<u32> = sb.arr[idx].vec3_u32;
let vec3_f16 : vec3<f16> = sb.arr[idx].vec3_f16;
let vec4_f32 : vec4<f32> = sb.arr[idx].vec4_f32;
let vec4_i32 : vec4<i32> = sb.arr[idx].vec4_i32;
let vec4_u32 : vec4<u32> = sb.arr[idx].vec4_u32;
let vec4_f16 : vec4<f16> = sb.arr[idx].vec4_f16;
let mat2x2_f32 : mat2x2<f32> = sb.arr[idx].mat2x2_f32;
let mat2x3_f32 : mat2x3<f32> = sb.arr[idx].mat2x3_f32;
let mat2x4_f32 : mat2x4<f32> = sb.arr[idx].mat2x4_f32;
let mat3x2_f32 : mat3x2<f32> = sb.arr[idx].mat3x2_f32;
let mat3x3_f32 : mat3x3<f32> = sb.arr[idx].mat3x3_f32;
let mat3x4_f32 : mat3x4<f32> = sb.arr[idx].mat3x4_f32;
let mat4x2_f32 : mat4x2<f32> = sb.arr[idx].mat4x2_f32;
let mat4x3_f32 : mat4x3<f32> = sb.arr[idx].mat4x3_f32;
let mat4x4_f32 : mat4x4<f32> = sb.arr[idx].mat4x4_f32;
let mat2x2_f16 : mat2x2<f16> = sb.arr[idx].mat2x2_f16;
let mat2x3_f16 : mat2x3<f16> = sb.arr[idx].mat2x3_f16;
let mat2x4_f16 : mat2x4<f16> = sb.arr[idx].mat2x4_f16;
let mat3x2_f16 : mat3x2<f16> = sb.arr[idx].mat3x2_f16;
let mat3x3_f16 : mat3x3<f16> = sb.arr[idx].mat3x3_f16;
let mat3x4_f16 : mat3x4<f16> = sb.arr[idx].mat3x4_f16;
let mat4x2_f16 : mat4x2<f16> = sb.arr[idx].mat4x2_f16;
let mat4x3_f16 : mat4x3<f16> = sb.arr[idx].mat4x3_f16;
let mat4x4_f16 : mat4x4<f16> = sb.arr[idx].mat4x4_f16;
let arr2_vec3_f32 : array<vec3<f32>, 2> = sb.arr[idx].arr2_vec3_f32;
let arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = sb.arr[idx].arr2_mat4x2_f16;
}

View File

@ -0,0 +1,144 @@
ByteAddressBuffer sb : register(t0, space0);
struct tint_symbol_1 {
uint idx : SV_GroupIndex;
};
float2x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
}
float2x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
}
float3x3 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
}
float3x4 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
matrix<float16_t, 2, 2> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
matrix<float16_t, 2, 3> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
matrix<float16_t, 2, 4> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
}
matrix<float16_t, 3, 2> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
}
matrix<float16_t, 3, 3> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
}
matrix<float16_t, 3, 4> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
}
matrix<float16_t, 4, 2> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
}
matrix<float16_t, 4, 3> tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
}
matrix<float16_t, 4, 4> tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
}
typedef float3 tint_symbol_36_ret[2];
tint_symbol_36_ret tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
}
}
return arr_1;
}
typedef matrix<float16_t, 4, 2> tint_symbol_37_ret[2];
tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
matrix<float16_t, 4, 2> arr_2[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
arr_2[i_1] = tint_symbol_33(buffer, (offset + (i_1 * 16u)));
}
}
return arr_2;
}
void main_inner(uint idx) {
const float scalar_f32 = asfloat(sb.Load((800u * idx)));
const int scalar_i32 = asint(sb.Load(((800u * idx) + 4u)));
const uint scalar_u32 = sb.Load(((800u * idx) + 8u));
const float16_t scalar_f16 = sb.Load<float16_t>(((800u * idx) + 12u));
const float2 vec2_f32 = asfloat(sb.Load2(((800u * idx) + 16u)));
const int2 vec2_i32 = asint(sb.Load2(((800u * idx) + 24u)));
const uint2 vec2_u32 = sb.Load2(((800u * idx) + 32u));
const vector<float16_t, 2> vec2_f16 = sb.Load<vector<float16_t, 2> >(((800u * idx) + 40u));
const float3 vec3_f32 = asfloat(sb.Load3(((800u * idx) + 48u)));
const int3 vec3_i32 = asint(sb.Load3(((800u * idx) + 64u)));
const uint3 vec3_u32 = sb.Load3(((800u * idx) + 80u));
const vector<float16_t, 3> vec3_f16 = sb.Load<vector<float16_t, 3> >(((800u * idx) + 96u));
const float4 vec4_f32 = asfloat(sb.Load4(((800u * idx) + 112u)));
const int4 vec4_i32 = asint(sb.Load4(((800u * idx) + 128u)));
const uint4 vec4_u32 = sb.Load4(((800u * idx) + 144u));
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(((800u * idx) + 160u));
const float2x2 mat2x2_f32 = tint_symbol_18(sb, ((800u * idx) + 168u));
const float2x3 mat2x3_f32 = tint_symbol_19(sb, ((800u * idx) + 192u));
const float2x4 mat2x4_f32 = tint_symbol_20(sb, ((800u * idx) + 224u));
const float3x2 mat3x2_f32 = tint_symbol_21(sb, ((800u * idx) + 256u));
const float3x3 mat3x3_f32 = tint_symbol_22(sb, ((800u * idx) + 288u));
const float3x4 mat3x4_f32 = tint_symbol_23(sb, ((800u * idx) + 336u));
const float4x2 mat4x2_f32 = tint_symbol_24(sb, ((800u * idx) + 384u));
const float4x3 mat4x3_f32 = tint_symbol_25(sb, ((800u * idx) + 416u));
const float4x4 mat4x4_f32 = tint_symbol_26(sb, ((800u * idx) + 480u));
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_27(sb, ((800u * idx) + 544u));
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_28(sb, ((800u * idx) + 552u));
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_29(sb, ((800u * idx) + 568u));
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_30(sb, ((800u * idx) + 584u));
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_31(sb, ((800u * idx) + 600u));
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_32(sb, ((800u * idx) + 624u));
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_33(sb, ((800u * idx) + 648u));
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_34(sb, ((800u * idx) + 664u));
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_35(sb, ((800u * idx) + 696u));
const float3 arr2_vec3_f32[2] = tint_symbol_36(sb, ((800u * idx) + 736u));
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_37(sb, ((800u * idx) + 768u));
}
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
main_inner(tint_symbol.idx);
return;
}

View File

@ -0,0 +1,149 @@
SKIP: FAILED
ByteAddressBuffer sb : register(t0, space0);
struct tint_symbol_1 {
uint idx : SV_GroupIndex;
};
float2x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
}
float2x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
}
float3x3 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
}
float3x4 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
matrix<float16_t, 2, 2> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
matrix<float16_t, 2, 3> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
matrix<float16_t, 2, 4> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
}
matrix<float16_t, 3, 2> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
}
matrix<float16_t, 3, 3> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
}
matrix<float16_t, 3, 4> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
}
matrix<float16_t, 4, 2> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
}
matrix<float16_t, 4, 3> tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
}
matrix<float16_t, 4, 4> tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
}
typedef float3 tint_symbol_36_ret[2];
tint_symbol_36_ret tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
}
}
return arr_1;
}
typedef matrix<float16_t, 4, 2> tint_symbol_37_ret[2];
tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
matrix<float16_t, 4, 2> arr_2[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
arr_2[i_1] = tint_symbol_33(buffer, (offset + (i_1 * 16u)));
}
}
return arr_2;
}
void main_inner(uint idx) {
const float scalar_f32 = asfloat(sb.Load((800u * idx)));
const int scalar_i32 = asint(sb.Load(((800u * idx) + 4u)));
const uint scalar_u32 = sb.Load(((800u * idx) + 8u));
const float16_t scalar_f16 = sb.Load<float16_t>(((800u * idx) + 12u));
const float2 vec2_f32 = asfloat(sb.Load2(((800u * idx) + 16u)));
const int2 vec2_i32 = asint(sb.Load2(((800u * idx) + 24u)));
const uint2 vec2_u32 = sb.Load2(((800u * idx) + 32u));
const vector<float16_t, 2> vec2_f16 = sb.Load<vector<float16_t, 2> >(((800u * idx) + 40u));
const float3 vec3_f32 = asfloat(sb.Load3(((800u * idx) + 48u)));
const int3 vec3_i32 = asint(sb.Load3(((800u * idx) + 64u)));
const uint3 vec3_u32 = sb.Load3(((800u * idx) + 80u));
const vector<float16_t, 3> vec3_f16 = sb.Load<vector<float16_t, 3> >(((800u * idx) + 96u));
const float4 vec4_f32 = asfloat(sb.Load4(((800u * idx) + 112u)));
const int4 vec4_i32 = asint(sb.Load4(((800u * idx) + 128u)));
const uint4 vec4_u32 = sb.Load4(((800u * idx) + 144u));
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(((800u * idx) + 160u));
const float2x2 mat2x2_f32 = tint_symbol_18(sb, ((800u * idx) + 168u));
const float2x3 mat2x3_f32 = tint_symbol_19(sb, ((800u * idx) + 192u));
const float2x4 mat2x4_f32 = tint_symbol_20(sb, ((800u * idx) + 224u));
const float3x2 mat3x2_f32 = tint_symbol_21(sb, ((800u * idx) + 256u));
const float3x3 mat3x3_f32 = tint_symbol_22(sb, ((800u * idx) + 288u));
const float3x4 mat3x4_f32 = tint_symbol_23(sb, ((800u * idx) + 336u));
const float4x2 mat4x2_f32 = tint_symbol_24(sb, ((800u * idx) + 384u));
const float4x3 mat4x3_f32 = tint_symbol_25(sb, ((800u * idx) + 416u));
const float4x4 mat4x4_f32 = tint_symbol_26(sb, ((800u * idx) + 480u));
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_27(sb, ((800u * idx) + 544u));
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_28(sb, ((800u * idx) + 552u));
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_29(sb, ((800u * idx) + 568u));
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_30(sb, ((800u * idx) + 584u));
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_31(sb, ((800u * idx) + 600u));
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_32(sb, ((800u * idx) + 624u));
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_33(sb, ((800u * idx) + 648u));
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_34(sb, ((800u * idx) + 664u));
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_35(sb, ((800u * idx) + 696u));
const float3 arr2_vec3_f32[2] = tint_symbol_36(sb, ((800u * idx) + 736u));
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_37(sb, ((800u * idx) + 768u));
}
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
main_inner(tint_symbol.idx);
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x0000018A2D5DB890(43,8-16): error X3000: syntax error: unexpected token 'float16_t'

View File

@ -0,0 +1,103 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
struct Inner {
float scalar_f32;
int scalar_i32;
uint scalar_u32;
float16_t scalar_f16;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
f16vec2 vec2_f16;
uint pad;
vec3 vec3_f32;
uint pad_1;
ivec3 vec3_i32;
uint pad_2;
uvec3 vec3_u32;
uint pad_3;
f16vec3 vec3_f16;
uint pad_4;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
mat2 mat2x2_f32;
uint pad_6;
uint pad_7;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_8;
uint pad_9;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
f16mat2 mat2x2_f16;
f16mat2x3 mat2x3_f16;
f16mat2x4 mat2x4_f16;
f16mat3x2 mat3x2_f16;
uint pad_10;
f16mat3 mat3x3_f16;
f16mat3x4 mat3x4_f16;
f16mat4x2 mat4x2_f16;
f16mat4x3 mat4x3_f16;
f16mat4 mat4x4_f16;
uint pad_11;
uint pad_12;
vec3 arr2_vec3_f32[2];
f16mat4x2 arr2_mat4x2_f16[2];
};
layout(binding = 0, std430) buffer S_ssbo {
Inner arr[];
} sb;
void tint_symbol(uint idx) {
float scalar_f32 = sb.arr[idx].scalar_f32;
int scalar_i32 = sb.arr[idx].scalar_i32;
uint scalar_u32 = sb.arr[idx].scalar_u32;
float16_t scalar_f16 = sb.arr[idx].scalar_f16;
vec2 vec2_f32 = sb.arr[idx].vec2_f32;
ivec2 vec2_i32 = sb.arr[idx].vec2_i32;
uvec2 vec2_u32 = sb.arr[idx].vec2_u32;
f16vec2 vec2_f16 = sb.arr[idx].vec2_f16;
vec3 vec3_f32 = sb.arr[idx].vec3_f32;
ivec3 vec3_i32 = sb.arr[idx].vec3_i32;
uvec3 vec3_u32 = sb.arr[idx].vec3_u32;
f16vec3 vec3_f16 = sb.arr[idx].vec3_f16;
vec4 vec4_f32 = sb.arr[idx].vec4_f32;
ivec4 vec4_i32 = sb.arr[idx].vec4_i32;
uvec4 vec4_u32 = sb.arr[idx].vec4_u32;
f16vec4 vec4_f16 = sb.arr[idx].vec4_f16;
mat2 mat2x2_f32 = sb.arr[idx].mat2x2_f32;
mat2x3 mat2x3_f32 = sb.arr[idx].mat2x3_f32;
mat2x4 mat2x4_f32 = sb.arr[idx].mat2x4_f32;
mat3x2 mat3x2_f32 = sb.arr[idx].mat3x2_f32;
mat3 mat3x3_f32 = sb.arr[idx].mat3x3_f32;
mat3x4 mat3x4_f32 = sb.arr[idx].mat3x4_f32;
mat4x2 mat4x2_f32 = sb.arr[idx].mat4x2_f32;
mat4x3 mat4x3_f32 = sb.arr[idx].mat4x3_f32;
mat4 mat4x4_f32 = sb.arr[idx].mat4x4_f32;
f16mat2 mat2x2_f16 = sb.arr[idx].mat2x2_f16;
f16mat2x3 mat2x3_f16 = sb.arr[idx].mat2x3_f16;
f16mat2x4 mat2x4_f16 = sb.arr[idx].mat2x4_f16;
f16mat3x2 mat3x2_f16 = sb.arr[idx].mat3x2_f16;
f16mat3 mat3x3_f16 = sb.arr[idx].mat3x3_f16;
f16mat3x4 mat3x4_f16 = sb.arr[idx].mat3x4_f16;
f16mat4x2 mat4x2_f16 = sb.arr[idx].mat4x2_f16;
f16mat4x3 mat4x3_f16 = sb.arr[idx].mat4x3_f16;
f16mat4 mat4x4_f16 = sb.arr[idx].mat4x4_f16;
vec3 arr2_vec3_f32[2] = sb.arr[idx].arr2_vec3_f32;
f16mat4x2 arr2_mat4x2_f16[2] = sb.arr[idx].arr2_mat4x2_f16;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol(gl_LocalInvocationIndex);
return;
}

View File

@ -0,0 +1,113 @@
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct Inner {
/* 0x0000 */ float scalar_f32;
/* 0x0004 */ int scalar_i32;
/* 0x0008 */ uint scalar_u32;
/* 0x000c */ half scalar_f16;
/* 0x000e */ tint_array<int8_t, 2> tint_pad;
/* 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;
/* 0x0030 */ packed_float3 vec3_f32;
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ packed_half3 vec3_f16;
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_5;
/* 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;
/* 0x00e0 */ float2x4 mat2x4_f32;
/* 0x0100 */ float3x2 mat3x2_f32;
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_7;
/* 0x0120 */ float3x3 mat3x3_f32;
/* 0x0150 */ float3x4 mat3x4_f32;
/* 0x0180 */ float4x2 mat4x2_f32;
/* 0x01a0 */ float4x3 mat4x3_f32;
/* 0x01e0 */ float4x4 mat4x4_f32;
/* 0x0220 */ half2x2 mat2x2_f16;
/* 0x0228 */ half2x3 mat2x3_f16;
/* 0x0238 */ half2x4 mat2x4_f16;
/* 0x0248 */ half3x2 mat3x2_f16;
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_8;
/* 0x0258 */ half3x3 mat3x3_f16;
/* 0x0270 */ half3x4 mat3x4_f16;
/* 0x0288 */ half4x2 mat4x2_f16;
/* 0x0298 */ half4x3 mat4x3_f16;
/* 0x02b8 */ half4x4 mat4x4_f16;
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_9;
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
};
struct S {
/* 0x0000 */ tint_array<Inner, 1> arr;
};
void tint_symbol_inner(uint idx, const device S* 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;
half const scalar_f16 = (*(tint_symbol_1)).arr[idx].scalar_f16;
float2 const vec2_f32 = (*(tint_symbol_1)).arr[idx].vec2_f32;
int2 const vec2_i32 = (*(tint_symbol_1)).arr[idx].vec2_i32;
uint2 const vec2_u32 = (*(tint_symbol_1)).arr[idx].vec2_u32;
half2 const vec2_f16 = (*(tint_symbol_1)).arr[idx].vec2_f16;
float3 const vec3_f32 = float3((*(tint_symbol_1)).arr[idx].vec3_f32);
int3 const vec3_i32 = int3((*(tint_symbol_1)).arr[idx].vec3_i32);
uint3 const vec3_u32 = uint3((*(tint_symbol_1)).arr[idx].vec3_u32);
half3 const vec3_f16 = half3((*(tint_symbol_1)).arr[idx].vec3_f16);
float4 const vec4_f32 = (*(tint_symbol_1)).arr[idx].vec4_f32;
int4 const vec4_i32 = (*(tint_symbol_1)).arr[idx].vec4_i32;
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;
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;
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;
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;
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;
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;
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<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]]) {
tint_symbol_inner(idx, tint_symbol_2);
return;
}

View File

@ -0,0 +1,341 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 198
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %idx_1
OpExecutionMode %main LocalSize 1 1 1
OpName %idx_1 "idx_1"
OpName %S "S"
OpMemberName %S 0 "arr"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "scalar_f16"
OpMemberName %Inner 4 "vec2_f32"
OpMemberName %Inner 5 "vec2_i32"
OpMemberName %Inner 6 "vec2_u32"
OpMemberName %Inner 7 "vec2_f16"
OpMemberName %Inner 8 "vec3_f32"
OpMemberName %Inner 9 "vec3_i32"
OpMemberName %Inner 10 "vec3_u32"
OpMemberName %Inner 11 "vec3_f16"
OpMemberName %Inner 12 "vec4_f32"
OpMemberName %Inner 13 "vec4_i32"
OpMemberName %Inner 14 "vec4_u32"
OpMemberName %Inner 15 "vec4_f16"
OpMemberName %Inner 16 "mat2x2_f32"
OpMemberName %Inner 17 "mat2x3_f32"
OpMemberName %Inner 18 "mat2x4_f32"
OpMemberName %Inner 19 "mat3x2_f32"
OpMemberName %Inner 20 "mat3x3_f32"
OpMemberName %Inner 21 "mat3x4_f32"
OpMemberName %Inner 22 "mat4x2_f32"
OpMemberName %Inner 23 "mat4x3_f32"
OpMemberName %Inner 24 "mat4x4_f32"
OpMemberName %Inner 25 "mat2x2_f16"
OpMemberName %Inner 26 "mat2x3_f16"
OpMemberName %Inner 27 "mat2x4_f16"
OpMemberName %Inner 28 "mat3x2_f16"
OpMemberName %Inner 29 "mat3x3_f16"
OpMemberName %Inner 30 "mat3x4_f16"
OpMemberName %Inner 31 "mat4x2_f16"
OpMemberName %Inner 32 "mat4x3_f16"
OpMemberName %Inner 33 "mat4x4_f16"
OpMemberName %Inner 34 "arr2_vec3_f32"
OpMemberName %Inner 35 "arr2_mat4x2_f16"
OpName %sb "sb"
OpName %main_inner "main_inner"
OpName %idx "idx"
OpName %main "main"
OpDecorate %idx_1 BuiltIn LocalInvocationIndex
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 12
OpMemberDecorate %Inner 4 Offset 16
OpMemberDecorate %Inner 5 Offset 24
OpMemberDecorate %Inner 6 Offset 32
OpMemberDecorate %Inner 7 Offset 40
OpMemberDecorate %Inner 8 Offset 48
OpMemberDecorate %Inner 9 Offset 64
OpMemberDecorate %Inner 10 Offset 80
OpMemberDecorate %Inner 11 Offset 96
OpMemberDecorate %Inner 12 Offset 112
OpMemberDecorate %Inner 13 Offset 128
OpMemberDecorate %Inner 14 Offset 144
OpMemberDecorate %Inner 15 Offset 160
OpMemberDecorate %Inner 16 Offset 168
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 8
OpMemberDecorate %Inner 17 Offset 192
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 224
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 16
OpMemberDecorate %Inner 19 Offset 256
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 8
OpMemberDecorate %Inner 20 Offset 288
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 336
OpMemberDecorate %Inner 21 ColMajor
OpMemberDecorate %Inner 21 MatrixStride 16
OpMemberDecorate %Inner 22 Offset 384
OpMemberDecorate %Inner 22 ColMajor
OpMemberDecorate %Inner 22 MatrixStride 8
OpMemberDecorate %Inner 23 Offset 416
OpMemberDecorate %Inner 23 ColMajor
OpMemberDecorate %Inner 23 MatrixStride 16
OpMemberDecorate %Inner 24 Offset 480
OpMemberDecorate %Inner 24 ColMajor
OpMemberDecorate %Inner 24 MatrixStride 16
OpMemberDecorate %Inner 25 Offset 544
OpMemberDecorate %Inner 25 ColMajor
OpMemberDecorate %Inner 25 MatrixStride 4
OpMemberDecorate %Inner 26 Offset 552
OpMemberDecorate %Inner 26 ColMajor
OpMemberDecorate %Inner 26 MatrixStride 8
OpMemberDecorate %Inner 27 Offset 568
OpMemberDecorate %Inner 27 ColMajor
OpMemberDecorate %Inner 27 MatrixStride 8
OpMemberDecorate %Inner 28 Offset 584
OpMemberDecorate %Inner 28 ColMajor
OpMemberDecorate %Inner 28 MatrixStride 4
OpMemberDecorate %Inner 29 Offset 600
OpMemberDecorate %Inner 29 ColMajor
OpMemberDecorate %Inner 29 MatrixStride 8
OpMemberDecorate %Inner 30 Offset 624
OpMemberDecorate %Inner 30 ColMajor
OpMemberDecorate %Inner 30 MatrixStride 8
OpMemberDecorate %Inner 31 Offset 648
OpMemberDecorate %Inner 31 ColMajor
OpMemberDecorate %Inner 31 MatrixStride 4
OpMemberDecorate %Inner 32 Offset 664
OpMemberDecorate %Inner 32 ColMajor
OpMemberDecorate %Inner 32 MatrixStride 8
OpMemberDecorate %Inner 33 Offset 696
OpMemberDecorate %Inner 33 ColMajor
OpMemberDecorate %Inner 33 MatrixStride 8
OpMemberDecorate %Inner 34 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %Inner 35 Offset 768
OpMemberDecorate %Inner 35 ColMajor
OpMemberDecorate %Inner 35 MatrixStride 4
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 800
OpDecorate %sb NonWritable
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%half = OpTypeFloat 16
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v2half = OpTypeVector %half 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v3half = OpTypeVector %half 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%v4half = OpTypeVector %half 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%mat2v2half = OpTypeMatrix %v2half 2
%mat2v3half = OpTypeMatrix %v3half 2
%mat2v4half = OpTypeMatrix %v4half 2
%mat3v2half = OpTypeMatrix %v2half 3
%mat3v3half = OpTypeMatrix %v3half 3
%mat3v4half = OpTypeMatrix %v4half 3
%mat4v2half = OpTypeMatrix %v2half 4
%mat4v3half = OpTypeMatrix %v3half 4
%mat4v4half = OpTypeMatrix %v4half 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%Inner = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %mat2v2half %mat2v3half %mat2v4half %mat3v2half %mat3v3half %mat3v4half %mat4v2half %mat4v3half %mat4v4half %_arr_v3float_uint_2 %_arr_mat4v2half_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%45 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_24 = OpConstant %uint 24
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_25 = OpConstant %uint 25
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%uint_26 = OpConstant %uint 26
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%uint_27 = OpConstant %uint 27
%_ptr_StorageBuffer_mat2v4half = OpTypePointer StorageBuffer %mat2v4half
%uint_28 = OpConstant %uint 28
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%uint_29 = OpConstant %uint 29
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
%uint_30 = OpConstant %uint 30
%_ptr_StorageBuffer_mat3v4half = OpTypePointer StorageBuffer %mat3v4half
%uint_31 = OpConstant %uint 31
%_ptr_StorageBuffer_mat4v2half = OpTypePointer StorageBuffer %mat4v2half
%uint_32 = OpConstant %uint 32
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
%uint_33 = OpConstant %uint 33
%_ptr_StorageBuffer_mat4v4half = OpTypePointer StorageBuffer %mat4v4half
%uint_34 = OpConstant %uint 34
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%uint_35 = OpConstant %uint 35
%_ptr_StorageBuffer__arr_mat4v2half_uint_2 = OpTypePointer StorageBuffer %_arr_mat4v2half_uint_2
%193 = OpTypeFunction %void
%main_inner = OpFunction %void None %45
%idx = OpFunctionParameter %uint
%49 = OpLabel
%52 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
%53 = OpLoad %float %52
%56 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
%57 = OpLoad %int %56
%59 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
%60 = OpLoad %uint %59
%63 = OpAccessChain %_ptr_StorageBuffer_half %sb %uint_0 %idx %uint_3
%64 = OpLoad %half %63
%67 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_4
%68 = OpLoad %v2float %67
%71 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_5
%72 = OpLoad %v2int %71
%75 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_6
%76 = OpLoad %v2uint %75
%79 = OpAccessChain %_ptr_StorageBuffer_v2half %sb %uint_0 %idx %uint_7
%80 = OpLoad %v2half %79
%83 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_8
%84 = OpLoad %v3float %83
%87 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_9
%88 = OpLoad %v3int %87
%91 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_10
%92 = OpLoad %v3uint %91
%95 = OpAccessChain %_ptr_StorageBuffer_v3half %sb %uint_0 %idx %uint_11
%96 = OpLoad %v3half %95
%99 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_12
%100 = OpLoad %v4float %99
%103 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_13
%104 = OpLoad %v4int %103
%107 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_14
%108 = OpLoad %v4uint %107
%111 = OpAccessChain %_ptr_StorageBuffer_v4half %sb %uint_0 %idx %uint_15
%112 = OpLoad %v4half %111
%115 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_16
%116 = OpLoad %mat2v2float %115
%119 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_17
%120 = OpLoad %mat2v3float %119
%123 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_18
%124 = OpLoad %mat2v4float %123
%127 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_19
%128 = OpLoad %mat3v2float %127
%131 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_20
%132 = OpLoad %mat3v3float %131
%135 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_21
%136 = OpLoad %mat3v4float %135
%139 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_22
%140 = OpLoad %mat4v2float %139
%143 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_23
%144 = OpLoad %mat4v3float %143
%147 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_24
%148 = OpLoad %mat4v4float %147
%151 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %sb %uint_0 %idx %uint_25
%152 = OpLoad %mat2v2half %151
%155 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %sb %uint_0 %idx %uint_26
%156 = OpLoad %mat2v3half %155
%159 = OpAccessChain %_ptr_StorageBuffer_mat2v4half %sb %uint_0 %idx %uint_27
%160 = OpLoad %mat2v4half %159
%163 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %sb %uint_0 %idx %uint_28
%164 = OpLoad %mat3v2half %163
%167 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %sb %uint_0 %idx %uint_29
%168 = OpLoad %mat3v3half %167
%171 = OpAccessChain %_ptr_StorageBuffer_mat3v4half %sb %uint_0 %idx %uint_30
%172 = OpLoad %mat3v4half %171
%175 = OpAccessChain %_ptr_StorageBuffer_mat4v2half %sb %uint_0 %idx %uint_31
%176 = OpLoad %mat4v2half %175
%179 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %sb %uint_0 %idx %uint_32
%180 = OpLoad %mat4v3half %179
%183 = OpAccessChain %_ptr_StorageBuffer_mat4v4half %sb %uint_0 %idx %uint_33
%184 = OpLoad %mat4v4half %183
%187 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %idx %uint_34
%188 = OpLoad %_arr_v3float_uint_2 %187
%191 = OpAccessChain %_ptr_StorageBuffer__arr_mat4v2half_uint_2 %sb %uint_0 %idx %uint_35
%192 = OpLoad %_arr_mat4v2half_uint_2 %191
OpReturn
OpFunctionEnd
%main = OpFunction %void None %193
%195 = OpLabel
%197 = OpLoad %uint %idx_1
%196 = OpFunctionCall %void %main_inner %197
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,86 @@
enable f16;
struct Inner {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
}
struct S {
arr : array<Inner>,
}
@binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) {
let scalar_f32 : f32 = sb.arr[idx].scalar_f32;
let scalar_i32 : i32 = sb.arr[idx].scalar_i32;
let scalar_u32 : u32 = sb.arr[idx].scalar_u32;
let scalar_f16 : f16 = sb.arr[idx].scalar_f16;
let vec2_f32 : vec2<f32> = sb.arr[idx].vec2_f32;
let vec2_i32 : vec2<i32> = sb.arr[idx].vec2_i32;
let vec2_u32 : vec2<u32> = sb.arr[idx].vec2_u32;
let vec2_f16 : vec2<f16> = sb.arr[idx].vec2_f16;
let vec3_f32 : vec3<f32> = sb.arr[idx].vec3_f32;
let vec3_i32 : vec3<i32> = sb.arr[idx].vec3_i32;
let vec3_u32 : vec3<u32> = sb.arr[idx].vec3_u32;
let vec3_f16 : vec3<f16> = sb.arr[idx].vec3_f16;
let vec4_f32 : vec4<f32> = sb.arr[idx].vec4_f32;
let vec4_i32 : vec4<i32> = sb.arr[idx].vec4_i32;
let vec4_u32 : vec4<u32> = sb.arr[idx].vec4_u32;
let vec4_f16 : vec4<f16> = sb.arr[idx].vec4_f16;
let mat2x2_f32 : mat2x2<f32> = sb.arr[idx].mat2x2_f32;
let mat2x3_f32 : mat2x3<f32> = sb.arr[idx].mat2x3_f32;
let mat2x4_f32 : mat2x4<f32> = sb.arr[idx].mat2x4_f32;
let mat3x2_f32 : mat3x2<f32> = sb.arr[idx].mat3x2_f32;
let mat3x3_f32 : mat3x3<f32> = sb.arr[idx].mat3x3_f32;
let mat3x4_f32 : mat3x4<f32> = sb.arr[idx].mat3x4_f32;
let mat4x2_f32 : mat4x2<f32> = sb.arr[idx].mat4x2_f32;
let mat4x3_f32 : mat4x3<f32> = sb.arr[idx].mat4x3_f32;
let mat4x4_f32 : mat4x4<f32> = sb.arr[idx].mat4x4_f32;
let mat2x2_f16 : mat2x2<f16> = sb.arr[idx].mat2x2_f16;
let mat2x3_f16 : mat2x3<f16> = sb.arr[idx].mat2x3_f16;
let mat2x4_f16 : mat2x4<f16> = sb.arr[idx].mat2x4_f16;
let mat3x2_f16 : mat3x2<f16> = sb.arr[idx].mat3x2_f16;
let mat3x3_f16 : mat3x3<f16> = sb.arr[idx].mat3x3_f16;
let mat3x4_f16 : mat3x4<f16> = sb.arr[idx].mat3x4_f16;
let mat4x2_f16 : mat4x2<f16> = sb.arr[idx].mat4x2_f16;
let mat4x3_f16 : mat4x3<f16> = sb.arr[idx].mat4x3_f16;
let mat4x4_f16 : mat4x4<f16> = sb.arr[idx].mat4x4_f16;
let arr2_vec3_f32 : array<vec3<f32>, 2> = sb.arr[idx].arr2_vec3_f32;
let arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = sb.arr[idx].arr2_mat4x2_f16;
}

View File

@ -1,30 +1,57 @@
struct Inner { struct Inner {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : array<vec4<i32>, 4>, vec3_u32 : vec3<u32>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
}; };
struct S { struct S {
arr : array<Inner>, arr : array<Inner>,
}; };
@binding(0) @group(0) var<storage, read_write> s : S; @binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) { fn main(@builtin(local_invocation_index) idx : u32) {
s.arr[idx].a = vec3<i32>(); sb.arr[idx].scalar_f32 = f32();
s.arr[idx].b = i32(); sb.arr[idx].scalar_i32 = i32();
s.arr[idx].c = vec3<u32>(); sb.arr[idx].scalar_u32 = u32();
s.arr[idx].d = u32(); sb.arr[idx].vec2_f32 = vec2<f32>();
s.arr[idx].e = vec3<f32>(); sb.arr[idx].vec2_i32 = vec2<i32>();
s.arr[idx].f = f32(); sb.arr[idx].vec2_u32 = vec2<u32>();
s.arr[idx].g = mat2x3<f32>(); sb.arr[idx].vec3_f32 = vec3<f32>();
s.arr[idx].h = mat3x2<f32>(); sb.arr[idx].vec3_i32 = vec3<i32>();
s.arr[idx].i = array<vec4<i32>, 4>(); sb.arr[idx].vec3_u32 = vec3<u32>();
sb.arr[idx].vec4_f32 = vec4<f32>();
sb.arr[idx].vec4_i32 = vec4<i32>();
sb.arr[idx].vec4_u32 = vec4<u32>();
sb.arr[idx].mat2x2_f32 = mat2x2<f32>();
sb.arr[idx].mat2x3_f32 = mat2x3<f32>();
sb.arr[idx].mat2x4_f32 = mat2x4<f32>();
sb.arr[idx].mat3x2_f32 = mat3x2<f32>();
sb.arr[idx].mat3x3_f32 = mat3x3<f32>();
sb.arr[idx].mat3x4_f32 = mat3x4<f32>();
sb.arr[idx].mat4x2_f32 = mat4x2<f32>();
sb.arr[idx].mat4x3_f32 = mat4x3<f32>();
sb.arr[idx].mat4x4_f32 = mat4x4<f32>();
sb.arr[idx].arr2_vec3_f32 = array<vec3<f32>, 2>();
} }

View File

@ -1,40 +1,96 @@
RWByteAddressBuffer s : register(u0, space0); RWByteAddressBuffer sb : register(u0, space0);
struct tint_symbol_1 { struct tint_symbol_1 {
uint idx : SV_GroupIndex; uint idx : SV_GroupIndex;
}; };
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, float2x3 value) { void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u])); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u])); buffer.Store3((offset + 16u), asuint(value[1u]));
} }
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, float3x2 value) { void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u])); buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u])); buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u])); buffer.Store2((offset + 16u), asuint(value[2u]));
} }
void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int4 value[4]) { void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
int4 array[4] = value; buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store4((offset + (i_1 * 16u)), asuint(array[i_1])); buffer.Store3((offset + (i * 16u)), asuint(array[i]));
} }
} }
} }
void main_inner(uint idx) { void main_inner(uint idx) {
s.Store3((176u * idx), asuint((0).xxx)); sb.Store((544u * idx), asuint(0.0f));
s.Store(((176u * idx) + 12u), asuint(0)); sb.Store(((544u * idx) + 4u), asuint(0));
s.Store3(((176u * idx) + 16u), asuint((0u).xxx)); sb.Store(((544u * idx) + 8u), asuint(0u));
s.Store(((176u * idx) + 28u), asuint(0u)); sb.Store2(((544u * idx) + 16u), asuint((0.0f).xx));
s.Store3(((176u * idx) + 32u), asuint((0.0f).xxx)); sb.Store2(((544u * idx) + 24u), asuint((0).xx));
s.Store(((176u * idx) + 44u), asuint(0.0f)); sb.Store2(((544u * idx) + 32u), asuint((0u).xx));
tint_symbol_8(s, ((176u * idx) + 48u), float2x3((0.0f).xxx, (0.0f).xxx)); sb.Store3(((544u * idx) + 48u), asuint((0.0f).xxx));
tint_symbol_9(s, ((176u * idx) + 80u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); sb.Store3(((544u * idx) + 64u), asuint((0).xxx));
const int4 tint_symbol_13[4] = (int4[4])0; sb.Store3(((544u * idx) + 80u), asuint((0u).xxx));
tint_symbol_11(s, ((176u * idx) + 112u), tint_symbol_13); sb.Store4(((544u * idx) + 96u), asuint((0.0f).xxxx));
sb.Store4(((544u * idx) + 112u), asuint((0).xxxx));
sb.Store4(((544u * idx) + 128u), asuint((0u).xxxx));
tint_symbol_14(sb, ((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_15(sb, ((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_16(sb, ((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_17(sb, ((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_18(sb, ((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_19(sb, ((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_20(sb, ((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_21(sb, ((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_22(sb, ((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
const float3 tint_symbol_24[2] = (float3[2])0;
tint_symbol_23(sb, ((544u * idx) + 512u), tint_symbol_24);
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]

View File

@ -1,40 +1,96 @@
RWByteAddressBuffer s : register(u0, space0); RWByteAddressBuffer sb : register(u0, space0);
struct tint_symbol_1 { struct tint_symbol_1 {
uint idx : SV_GroupIndex; uint idx : SV_GroupIndex;
}; };
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, float2x3 value) { void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u])); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u])); buffer.Store3((offset + 16u), asuint(value[1u]));
} }
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, float3x2 value) { void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u])); buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u])); buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u])); buffer.Store2((offset + 16u), asuint(value[2u]));
} }
void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int4 value[4]) { void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
int4 array[4] = value; buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store4((offset + (i_1 * 16u)), asuint(array[i_1])); buffer.Store3((offset + (i * 16u)), asuint(array[i]));
} }
} }
} }
void main_inner(uint idx) { void main_inner(uint idx) {
s.Store3((176u * idx), asuint((0).xxx)); sb.Store((544u * idx), asuint(0.0f));
s.Store(((176u * idx) + 12u), asuint(0)); sb.Store(((544u * idx) + 4u), asuint(0));
s.Store3(((176u * idx) + 16u), asuint((0u).xxx)); sb.Store(((544u * idx) + 8u), asuint(0u));
s.Store(((176u * idx) + 28u), asuint(0u)); sb.Store2(((544u * idx) + 16u), asuint((0.0f).xx));
s.Store3(((176u * idx) + 32u), asuint((0.0f).xxx)); sb.Store2(((544u * idx) + 24u), asuint((0).xx));
s.Store(((176u * idx) + 44u), asuint(0.0f)); sb.Store2(((544u * idx) + 32u), asuint((0u).xx));
tint_symbol_8(s, ((176u * idx) + 48u), float2x3((0.0f).xxx, (0.0f).xxx)); sb.Store3(((544u * idx) + 48u), asuint((0.0f).xxx));
tint_symbol_9(s, ((176u * idx) + 80u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); sb.Store3(((544u * idx) + 64u), asuint((0).xxx));
const int4 tint_symbol_13[4] = (int4[4])0; sb.Store3(((544u * idx) + 80u), asuint((0u).xxx));
tint_symbol_11(s, ((176u * idx) + 112u), tint_symbol_13); sb.Store4(((544u * idx) + 96u), asuint((0.0f).xxxx));
sb.Store4(((544u * idx) + 112u), asuint((0).xxxx));
sb.Store4(((544u * idx) + 128u), asuint((0u).xxxx));
tint_symbol_14(sb, ((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_15(sb, ((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_16(sb, ((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_17(sb, ((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_18(sb, ((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_19(sb, ((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_20(sb, ((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_21(sb, ((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_22(sb, ((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
const float3 tint_symbol_24[2] = (float3[2])0;
tint_symbol_23(sb, ((544u * idx) + 512u), tint_symbol_24);
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]

View File

@ -1,34 +1,66 @@
#version 310 es #version 310 es
struct Inner { struct Inner {
ivec3 a; float scalar_f32;
int b; int scalar_i32;
uvec3 c; uint scalar_u32;
uint d;
vec3 e;
float f;
mat2x3 g;
mat3x2 h;
uint pad; uint pad;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_1; uint pad_1;
ivec4 i[4]; uint pad_2;
vec3 vec3_f32;
uint pad_3;
ivec3 vec3_i32;
uint pad_4;
uvec3 vec3_u32;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
mat2 mat2x2_f32;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_6;
uint pad_7;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
vec3 arr2_vec3_f32[2];
}; };
layout(binding = 0, std430) buffer S_ssbo { layout(binding = 0, std430) buffer S_ssbo {
Inner arr[]; Inner arr[];
} s; } sb;
void tint_symbol(uint idx) { void tint_symbol(uint idx) {
s.arr[idx].a = ivec3(0); sb.arr[idx].scalar_f32 = 0.0f;
s.arr[idx].b = 0; sb.arr[idx].scalar_i32 = 0;
s.arr[idx].c = uvec3(0u); sb.arr[idx].scalar_u32 = 0u;
s.arr[idx].d = 0u; sb.arr[idx].vec2_f32 = vec2(0.0f);
s.arr[idx].e = vec3(0.0f); sb.arr[idx].vec2_i32 = ivec2(0);
s.arr[idx].f = 0.0f; sb.arr[idx].vec2_u32 = uvec2(0u);
s.arr[idx].g = mat2x3(vec3(0.0f), vec3(0.0f)); sb.arr[idx].vec3_f32 = vec3(0.0f);
s.arr[idx].h = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); sb.arr[idx].vec3_i32 = ivec3(0);
ivec4 tint_symbol_1[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)); sb.arr[idx].vec3_u32 = uvec3(0u);
s.arr[idx].i = tint_symbol_1; sb.arr[idx].vec4_f32 = vec4(0.0f);
sb.arr[idx].vec4_i32 = ivec4(0);
sb.arr[idx].vec4_u32 = uvec4(0u);
sb.arr[idx].mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat2x3_f32 = mat2x3(vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
sb.arr[idx].mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat3x3_f32 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.arr[idx].mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat4x3_f32 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
vec3 tint_symbol_1[2] = vec3[2](vec3(0.0f), vec3(0.0f));
sb.arr[idx].arr2_vec3_f32 = tint_symbol_1;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -15,16 +15,34 @@ struct tint_array {
}; };
struct Inner { struct Inner {
/* 0x0000 */ packed_int3 a; /* 0x0000 */ float scalar_f32;
/* 0x000c */ int b; /* 0x0004 */ int scalar_i32;
/* 0x0010 */ packed_uint3 c; /* 0x0008 */ uint scalar_u32;
/* 0x001c */ uint d; /* 0x000c */ tint_array<int8_t, 4> tint_pad;
/* 0x0020 */ packed_float3 e; /* 0x0010 */ float2 vec2_f32;
/* 0x002c */ float f; /* 0x0018 */ int2 vec2_i32;
/* 0x0030 */ float2x3 g; /* 0x0020 */ uint2 vec2_u32;
/* 0x0050 */ float3x2 h; /* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0068 */ tint_array<int8_t, 8> tint_pad; /* 0x0030 */ packed_float3 vec3_f32;
/* 0x0070 */ tint_array<int4, 4> i; /* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ float4 vec4_f32;
/* 0x0070 */ int4 vec4_i32;
/* 0x0080 */ uint4 vec4_u32;
/* 0x0090 */ float2x2 mat2x2_f32;
/* 0x00a0 */ float2x3 mat2x3_f32;
/* 0x00c0 */ float2x4 mat2x4_f32;
/* 0x00e0 */ float3x2 mat3x2_f32;
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
/* 0x0100 */ float3x3 mat3x3_f32;
/* 0x0130 */ float3x4 mat3x4_f32;
/* 0x0160 */ float4x2 mat4x2_f32;
/* 0x0180 */ float4x3 mat4x3_f32;
/* 0x01c0 */ float4x4 mat4x4_f32;
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
}; };
struct S { struct S {
@ -32,16 +50,29 @@ struct S {
}; };
void tint_symbol_inner(uint idx, device S* const tint_symbol_2) { void tint_symbol_inner(uint idx, device S* const tint_symbol_2) {
(*(tint_symbol_2)).arr[idx].a = int3(0); (*(tint_symbol_2)).arr[idx].scalar_f32 = 0.0f;
(*(tint_symbol_2)).arr[idx].b = 0; (*(tint_symbol_2)).arr[idx].scalar_i32 = 0;
(*(tint_symbol_2)).arr[idx].c = uint3(0u); (*(tint_symbol_2)).arr[idx].scalar_u32 = 0u;
(*(tint_symbol_2)).arr[idx].d = 0u; (*(tint_symbol_2)).arr[idx].vec2_f32 = float2(0.0f);
(*(tint_symbol_2)).arr[idx].e = float3(0.0f); (*(tint_symbol_2)).arr[idx].vec2_i32 = int2(0);
(*(tint_symbol_2)).arr[idx].f = 0.0f; (*(tint_symbol_2)).arr[idx].vec2_u32 = uint2(0u);
(*(tint_symbol_2)).arr[idx].g = float2x3(float3(0.0f), float3(0.0f)); (*(tint_symbol_2)).arr[idx].vec3_f32 = float3(0.0f);
(*(tint_symbol_2)).arr[idx].h = float3x2(float2(0.0f), float2(0.0f), float2(0.0f)); (*(tint_symbol_2)).arr[idx].vec3_i32 = int3(0);
tint_array<int4, 4> const tint_symbol_1 = tint_array<int4, 4>{}; (*(tint_symbol_2)).arr[idx].vec3_u32 = uint3(0u);
(*(tint_symbol_2)).arr[idx].i = tint_symbol_1; (*(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);
(*(tint_symbol_2)).arr[idx].mat2x2_f32 = float2x2(float2(0.0f), float2(0.0f));
(*(tint_symbol_2)).arr[idx].mat2x3_f32 = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_2)).arr[idx].mat2x4_f32 = float2x4(float4(0.0f), float4(0.0f));
(*(tint_symbol_2)).arr[idx].mat3x2_f32 = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_2)).arr[idx].mat3x3_f32 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_2)).arr[idx].mat3x4_f32 = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_2)).arr[idx].mat4x2_f32 = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_2)).arr[idx].mat4x3_f32 = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_2)).arr[idx].mat4x4_f32 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
tint_array<float3, 2> const tint_symbol_1 = tint_array<float3, 2>{};
(*(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_symbol_3 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 65 ; Bound: 128
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -11,16 +11,29 @@
OpName %S "S" OpName %S "S"
OpMemberName %S 0 "arr" OpMemberName %S 0 "arr"
OpName %Inner "Inner" OpName %Inner "Inner"
OpMemberName %Inner 0 "a" OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "b" OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "c" OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "d" OpMemberName %Inner 3 "vec2_f32"
OpMemberName %Inner 4 "e" OpMemberName %Inner 4 "vec2_i32"
OpMemberName %Inner 5 "f" OpMemberName %Inner 5 "vec2_u32"
OpMemberName %Inner 6 "g" OpMemberName %Inner 6 "vec3_f32"
OpMemberName %Inner 7 "h" OpMemberName %Inner 7 "vec3_i32"
OpMemberName %Inner 8 "i" OpMemberName %Inner 8 "vec3_u32"
OpName %s "s" OpMemberName %Inner 9 "vec4_f32"
OpMemberName %Inner 10 "vec4_i32"
OpMemberName %Inner 11 "vec4_u32"
OpMemberName %Inner 12 "mat2x2_f32"
OpMemberName %Inner 13 "mat2x3_f32"
OpMemberName %Inner 14 "mat2x4_f32"
OpMemberName %Inner 15 "mat3x2_f32"
OpMemberName %Inner 16 "mat3x3_f32"
OpMemberName %Inner 17 "mat3x4_f32"
OpMemberName %Inner 18 "mat4x2_f32"
OpMemberName %Inner 19 "mat4x3_f32"
OpMemberName %Inner 20 "mat4x4_f32"
OpMemberName %Inner 21 "arr2_vec3_f32"
OpName %sb "sb"
OpName %main_inner "main_inner" OpName %main_inner "main_inner"
OpName %idx "idx" OpName %idx "idx"
OpName %main "main" OpName %main "main"
@ -28,96 +41,199 @@
OpDecorate %S Block OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0 OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0 OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 12 OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 16 OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 28 OpMemberDecorate %Inner 3 Offset 16
OpMemberDecorate %Inner 4 Offset 32 OpMemberDecorate %Inner 4 Offset 24
OpMemberDecorate %Inner 5 Offset 44 OpMemberDecorate %Inner 5 Offset 32
OpMemberDecorate %Inner 6 Offset 48 OpMemberDecorate %Inner 6 Offset 48
OpMemberDecorate %Inner 6 ColMajor OpMemberDecorate %Inner 7 Offset 64
OpMemberDecorate %Inner 6 MatrixStride 16 OpMemberDecorate %Inner 8 Offset 80
OpMemberDecorate %Inner 7 Offset 80 OpMemberDecorate %Inner 9 Offset 96
OpMemberDecorate %Inner 7 ColMajor OpMemberDecorate %Inner 10 Offset 112
OpMemberDecorate %Inner 7 MatrixStride 8 OpMemberDecorate %Inner 11 Offset 128
OpMemberDecorate %Inner 8 Offset 112 OpMemberDecorate %Inner 12 Offset 144
OpDecorate %_arr_v4int_uint_4 ArrayStride 16 OpMemberDecorate %Inner 12 ColMajor
OpDecorate %_runtimearr_Inner ArrayStride 176 OpMemberDecorate %Inner 12 MatrixStride 8
OpDecorate %s Binding 0 OpMemberDecorate %Inner 13 Offset 160
OpDecorate %s DescriptorSet 0 OpMemberDecorate %Inner 13 ColMajor
OpMemberDecorate %Inner 13 MatrixStride 16
OpMemberDecorate %Inner 14 Offset 192
OpMemberDecorate %Inner 14 ColMajor
OpMemberDecorate %Inner 14 MatrixStride 16
OpMemberDecorate %Inner 15 Offset 224
OpMemberDecorate %Inner 15 ColMajor
OpMemberDecorate %Inner 15 MatrixStride 8
OpMemberDecorate %Inner 16 Offset 256
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 16
OpMemberDecorate %Inner 17 Offset 304
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 352
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 8
OpMemberDecorate %Inner 19 Offset 384
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 16
OpMemberDecorate %Inner 20 Offset 448
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 544
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint %_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input %idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3 %v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3 %v3uint = OpTypeVector %uint 3
%float = OpTypeFloat 32 %v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%mat2v3float = OpTypeMatrix %v3float 2
%v2float = OpTypeVector %float 2
%mat3v2float = OpTypeMatrix %v2float 3
%v4int = OpTypeVector %int 4 %v4int = OpTypeVector %int 4
%uint_4 = OpConstant %uint 4 %v4uint = OpTypeVector %uint 4
%_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4 %mat2v2float = OpTypeMatrix %v2float 2
%Inner = OpTypeStruct %v3int %int %v3uint %uint %v3float %float %mat2v3float %mat3v2float %_arr_v4int_uint_4 %mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner %_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner %S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S %_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%s = OpVariable %_ptr_StorageBuffer_S StorageBuffer %sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid %void = OpTypeVoid
%20 = OpTypeFunction %void %uint %31 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0 %uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%28 = OpConstantNull %v3int %39 = OpConstantNull %float
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%32 = OpConstantNull %int %43 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%36 = OpConstantNull %v3uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%40 = OpConstantNull %uint %46 = OpConstantNull %uint
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float %uint_3 = OpConstant %uint 3
%43 = OpConstantNull %v3float %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%50 = OpConstantNull %v2float
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%54 = OpConstantNull %v2int
%uint_5 = OpConstant %uint 5 %uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float %_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%47 = OpConstantNull %float %58 = OpConstantNull %v2uint
%uint_6 = OpConstant %uint 6 %uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%51 = OpConstantNull %mat2v3float %62 = OpConstantNull %v3float
%uint_7 = OpConstant %uint 7 %uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float %_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%55 = OpConstantNull %mat3v2float %66 = OpConstantNull %v3int
%uint_8 = OpConstant %uint 8 %uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer__arr_v4int_uint_4 = OpTypePointer StorageBuffer %_arr_v4int_uint_4 %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%59 = OpConstantNull %_arr_v4int_uint_4 %70 = OpConstantNull %v3uint
%60 = OpTypeFunction %void %uint_9 = OpConstant %uint 9
%main_inner = OpFunction %void None %20 %_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%74 = OpConstantNull %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%78 = OpConstantNull %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%82 = OpConstantNull %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%86 = OpConstantNull %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%90 = OpConstantNull %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%94 = OpConstantNull %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%98 = OpConstantNull %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%102 = OpConstantNull %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%106 = OpConstantNull %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%110 = OpConstantNull %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%114 = OpConstantNull %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%118 = OpConstantNull %mat4v4float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%122 = OpConstantNull %_arr_v3float_uint_2
%123 = OpTypeFunction %void
%main_inner = OpFunction %void None %31
%idx = OpFunctionParameter %uint %idx = OpFunctionParameter %uint
%24 = OpLabel %35 = OpLabel
%27 = OpAccessChain %_ptr_StorageBuffer_v3int %s %uint_0 %idx %uint_0 %38 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
OpStore %27 %28 OpStore %38 %39
%31 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %idx %uint_1 %42 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
OpStore %31 %32
%35 = OpAccessChain %_ptr_StorageBuffer_v3uint %s %uint_0 %idx %uint_2
OpStore %35 %36
%39 = OpAccessChain %_ptr_StorageBuffer_uint %s %uint_0 %idx %uint_3
OpStore %39 %40
%42 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %idx %uint_4
OpStore %42 %43 OpStore %42 %43
%46 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %idx %uint_5 %45 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
OpStore %46 %47 OpStore %45 %46
%50 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %idx %uint_6 %49 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_3
OpStore %50 %51 OpStore %49 %50
%54 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %s %uint_0 %idx %uint_7 %53 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_4
OpStore %54 %55 OpStore %53 %54
%58 = OpAccessChain %_ptr_StorageBuffer__arr_v4int_uint_4 %s %uint_0 %idx %uint_8 %57 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_5
OpStore %58 %59 OpStore %57 %58
%61 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_6
OpStore %61 %62
%65 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_7
OpStore %65 %66
%69 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_8
OpStore %69 %70
%73 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_9
OpStore %73 %74
%77 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_10
OpStore %77 %78
%81 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_11
OpStore %81 %82
%85 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_12
OpStore %85 %86
%89 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_13
OpStore %89 %90
%93 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_14
OpStore %93 %94
%97 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_15
OpStore %97 %98
%101 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_16
OpStore %101 %102
%105 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_17
OpStore %105 %106
%109 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_18
OpStore %109 %110
%113 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_19
OpStore %113 %114
%117 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_20
OpStore %117 %118
%121 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %idx %uint_21
OpStore %121 %122
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %60 %main = OpFunction %void None %123
%62 = OpLabel %125 = OpLabel
%64 = OpLoad %uint %idx_1 %127 = OpLoad %uint %idx_1
%63 = OpFunctionCall %void %main_inner %64 %126 = OpFunctionCall %void %main_inner %127
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,30 +1,56 @@
struct Inner { struct Inner {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : array<vec4<i32>, 4>, vec3_u32 : vec3<u32>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
} }
struct S { struct S {
arr : array<Inner>, arr : array<Inner>,
} }
@binding(0) @group(0) var<storage, read_write> s : S; @binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) { fn main(@builtin(local_invocation_index) idx : u32) {
s.arr[idx].a = vec3<i32>(); sb.arr[idx].scalar_f32 = f32();
s.arr[idx].b = i32(); sb.arr[idx].scalar_i32 = i32();
s.arr[idx].c = vec3<u32>(); sb.arr[idx].scalar_u32 = u32();
s.arr[idx].d = u32(); sb.arr[idx].vec2_f32 = vec2<f32>();
s.arr[idx].e = vec3<f32>(); sb.arr[idx].vec2_i32 = vec2<i32>();
s.arr[idx].f = f32(); sb.arr[idx].vec2_u32 = vec2<u32>();
s.arr[idx].g = mat2x3<f32>(); sb.arr[idx].vec3_f32 = vec3<f32>();
s.arr[idx].h = mat3x2<f32>(); sb.arr[idx].vec3_i32 = vec3<i32>();
s.arr[idx].i = array<vec4<i32>, 4>(); sb.arr[idx].vec3_u32 = vec3<u32>();
sb.arr[idx].vec4_f32 = vec4<f32>();
sb.arr[idx].vec4_i32 = vec4<i32>();
sb.arr[idx].vec4_u32 = vec4<u32>();
sb.arr[idx].mat2x2_f32 = mat2x2<f32>();
sb.arr[idx].mat2x3_f32 = mat2x3<f32>();
sb.arr[idx].mat2x4_f32 = mat2x4<f32>();
sb.arr[idx].mat3x2_f32 = mat3x2<f32>();
sb.arr[idx].mat3x3_f32 = mat3x3<f32>();
sb.arr[idx].mat3x4_f32 = mat3x4<f32>();
sb.arr[idx].mat4x2_f32 = mat4x2<f32>();
sb.arr[idx].mat4x3_f32 = mat4x3<f32>();
sb.arr[idx].mat4x4_f32 = mat4x4<f32>();
sb.arr[idx].arr2_vec3_f32 = array<vec3<f32>, 2>();
} }

View File

@ -0,0 +1,87 @@
enable f16;
struct Inner {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
};
struct S {
arr : array<Inner>,
};
@binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) {
sb.arr[idx].scalar_f32 = f32();
sb.arr[idx].scalar_i32 = i32();
sb.arr[idx].scalar_u32 = u32();
sb.arr[idx].scalar_f16 = f16();
sb.arr[idx].vec2_f32 = vec2<f32>();
sb.arr[idx].vec2_i32 = vec2<i32>();
sb.arr[idx].vec2_u32 = vec2<u32>();
sb.arr[idx].vec2_f16 = vec2<f16>();
sb.arr[idx].vec3_f32 = vec3<f32>();
sb.arr[idx].vec3_i32 = vec3<i32>();
sb.arr[idx].vec3_u32 = vec3<u32>();
sb.arr[idx].vec3_f16 = vec3<f16>();
sb.arr[idx].vec4_f32 = vec4<f32>();
sb.arr[idx].vec4_i32 = vec4<i32>();
sb.arr[idx].vec4_u32 = vec4<u32>();
sb.arr[idx].vec4_f16 = vec4<f16>();
sb.arr[idx].mat2x2_f32 = mat2x2<f32>();
sb.arr[idx].mat2x3_f32 = mat2x3<f32>();
sb.arr[idx].mat2x4_f32 = mat2x4<f32>();
sb.arr[idx].mat3x2_f32 = mat3x2<f32>();
sb.arr[idx].mat3x3_f32 = mat3x3<f32>();
sb.arr[idx].mat3x4_f32 = mat3x4<f32>();
sb.arr[idx].mat4x2_f32 = mat4x2<f32>();
sb.arr[idx].mat4x3_f32 = mat4x3<f32>();
sb.arr[idx].mat4x4_f32 = mat4x4<f32>();
sb.arr[idx].mat2x2_f16 = mat2x2<f16>();
sb.arr[idx].mat2x3_f16 = mat2x3<f16>();
sb.arr[idx].mat2x4_f16 = mat2x4<f16>();
sb.arr[idx].mat3x2_f16 = mat3x2<f16>();
sb.arr[idx].mat3x3_f16 = mat3x3<f16>();
sb.arr[idx].mat3x4_f16 = mat3x4<f16>();
sb.arr[idx].mat4x2_f16 = mat4x2<f16>();
sb.arr[idx].mat4x3_f16 = mat4x3<f16>();
sb.arr[idx].mat4x4_f16 = mat4x4<f16>();
sb.arr[idx].arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.arr[idx].arr2_mat4x2_f16 = array<mat4x2<f16>, 2>();
}

View File

@ -0,0 +1,178 @@
RWByteAddressBuffer sb : register(u0, space0);
struct tint_symbol_1 {
uint idx : SV_GroupIndex;
};
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
tint_symbol_33(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void main_inner(uint idx) {
sb.Store((800u * idx), asuint(0.0f));
sb.Store(((800u * idx) + 4u), asuint(0));
sb.Store(((800u * idx) + 8u), asuint(0u));
sb.Store<float16_t>(((800u * idx) + 12u), float16_t(0.0h));
sb.Store2(((800u * idx) + 16u), asuint((0.0f).xx));
sb.Store2(((800u * idx) + 24u), asuint((0).xx));
sb.Store2(((800u * idx) + 32u), asuint((0u).xx));
sb.Store<vector<float16_t, 2> >(((800u * idx) + 40u), (float16_t(0.0h)).xx);
sb.Store3(((800u * idx) + 48u), asuint((0.0f).xxx));
sb.Store3(((800u * idx) + 64u), asuint((0).xxx));
sb.Store3(((800u * idx) + 80u), asuint((0u).xxx));
sb.Store<vector<float16_t, 3> >(((800u * idx) + 96u), (float16_t(0.0h)).xxx);
sb.Store4(((800u * idx) + 112u), asuint((0.0f).xxxx));
sb.Store4(((800u * idx) + 128u), asuint((0).xxxx));
sb.Store4(((800u * idx) + 144u), asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(((800u * idx) + 160u), (float16_t(0.0h)).xxxx);
tint_symbol_18(sb, ((800u * idx) + 168u), float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_19(sb, ((800u * idx) + 192u), float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_20(sb, ((800u * idx) + 224u), float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_21(sb, ((800u * idx) + 256u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_22(sb, ((800u * idx) + 288u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_23(sb, ((800u * idx) + 336u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_24(sb, ((800u * idx) + 384u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_25(sb, ((800u * idx) + 416u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_26(sb, ((800u * idx) + 480u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_27(sb, ((800u * idx) + 544u), matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_28(sb, ((800u * idx) + 552u), matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_29(sb, ((800u * idx) + 568u), matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_30(sb, ((800u * idx) + 584u), matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_31(sb, ((800u * idx) + 600u), matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_32(sb, ((800u * idx) + 624u), matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_33(sb, ((800u * idx) + 648u), matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_34(sb, ((800u * idx) + 664u), matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_35(sb, ((800u * idx) + 696u), matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
const float3 tint_symbol_38[2] = (float3[2])0;
tint_symbol_36(sb, ((800u * idx) + 736u), tint_symbol_38);
const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
tint_symbol_37(sb, ((800u * idx) + 768u), tint_symbol_39);
}
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
main_inner(tint_symbol.idx);
return;
}

View File

@ -0,0 +1,184 @@
SKIP: FAILED
RWByteAddressBuffer sb : register(u0, space0);
struct tint_symbol_1 {
uint idx : SV_GroupIndex;
};
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
tint_symbol_33(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void main_inner(uint idx) {
sb.Store((800u * idx), asuint(0.0f));
sb.Store(((800u * idx) + 4u), asuint(0));
sb.Store(((800u * idx) + 8u), asuint(0u));
sb.Store<float16_t>(((800u * idx) + 12u), float16_t(0.0h));
sb.Store2(((800u * idx) + 16u), asuint((0.0f).xx));
sb.Store2(((800u * idx) + 24u), asuint((0).xx));
sb.Store2(((800u * idx) + 32u), asuint((0u).xx));
sb.Store<vector<float16_t, 2> >(((800u * idx) + 40u), (float16_t(0.0h)).xx);
sb.Store3(((800u * idx) + 48u), asuint((0.0f).xxx));
sb.Store3(((800u * idx) + 64u), asuint((0).xxx));
sb.Store3(((800u * idx) + 80u), asuint((0u).xxx));
sb.Store<vector<float16_t, 3> >(((800u * idx) + 96u), (float16_t(0.0h)).xxx);
sb.Store4(((800u * idx) + 112u), asuint((0.0f).xxxx));
sb.Store4(((800u * idx) + 128u), asuint((0).xxxx));
sb.Store4(((800u * idx) + 144u), asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(((800u * idx) + 160u), (float16_t(0.0h)).xxxx);
tint_symbol_18(sb, ((800u * idx) + 168u), float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_19(sb, ((800u * idx) + 192u), float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_20(sb, ((800u * idx) + 224u), float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_21(sb, ((800u * idx) + 256u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_22(sb, ((800u * idx) + 288u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_23(sb, ((800u * idx) + 336u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_24(sb, ((800u * idx) + 384u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_25(sb, ((800u * idx) + 416u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_26(sb, ((800u * idx) + 480u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_27(sb, ((800u * idx) + 544u), matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_28(sb, ((800u * idx) + 552u), matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_29(sb, ((800u * idx) + 568u), matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_30(sb, ((800u * idx) + 584u), matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_31(sb, ((800u * idx) + 600u), matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_32(sb, ((800u * idx) + 624u), matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_33(sb, ((800u * idx) + 648u), matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_34(sb, ((800u * idx) + 664u), matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_35(sb, ((800u * idx) + 696u), matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
const float3 tint_symbol_38[2] = (float3[2])0;
tint_symbol_36(sb, ((800u * idx) + 736u), tint_symbol_38);
const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
tint_symbol_37(sb, ((800u * idx) + 768u), tint_symbol_39);
}
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
main_inner(tint_symbol.idx);
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000002B00914B0D0(61,69-77): error X3000: syntax error: unexpected token 'float16_t'
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000002B00914B0D0(62,3-14): error X3018: invalid subscript 'Store'

View File

@ -0,0 +1,105 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
struct Inner {
float scalar_f32;
int scalar_i32;
uint scalar_u32;
float16_t scalar_f16;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
f16vec2 vec2_f16;
uint pad;
vec3 vec3_f32;
uint pad_1;
ivec3 vec3_i32;
uint pad_2;
uvec3 vec3_u32;
uint pad_3;
f16vec3 vec3_f16;
uint pad_4;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
mat2 mat2x2_f32;
uint pad_6;
uint pad_7;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_8;
uint pad_9;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
f16mat2 mat2x2_f16;
f16mat2x3 mat2x3_f16;
f16mat2x4 mat2x4_f16;
f16mat3x2 mat3x2_f16;
uint pad_10;
f16mat3 mat3x3_f16;
f16mat3x4 mat3x4_f16;
f16mat4x2 mat4x2_f16;
f16mat4x3 mat4x3_f16;
f16mat4 mat4x4_f16;
uint pad_11;
uint pad_12;
vec3 arr2_vec3_f32[2];
f16mat4x2 arr2_mat4x2_f16[2];
};
layout(binding = 0, std430) buffer S_ssbo {
Inner arr[];
} sb;
void tint_symbol(uint idx) {
sb.arr[idx].scalar_f32 = 0.0f;
sb.arr[idx].scalar_i32 = 0;
sb.arr[idx].scalar_u32 = 0u;
sb.arr[idx].scalar_f16 = 0.0hf;
sb.arr[idx].vec2_f32 = vec2(0.0f);
sb.arr[idx].vec2_i32 = ivec2(0);
sb.arr[idx].vec2_u32 = uvec2(0u);
sb.arr[idx].vec2_f16 = f16vec2(0.0hf);
sb.arr[idx].vec3_f32 = vec3(0.0f);
sb.arr[idx].vec3_i32 = ivec3(0);
sb.arr[idx].vec3_u32 = uvec3(0u);
sb.arr[idx].vec3_f16 = f16vec3(0.0hf);
sb.arr[idx].vec4_f32 = vec4(0.0f);
sb.arr[idx].vec4_i32 = ivec4(0);
sb.arr[idx].vec4_u32 = uvec4(0u);
sb.arr[idx].vec4_f16 = f16vec4(0.0hf);
sb.arr[idx].mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat2x3_f32 = mat2x3(vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
sb.arr[idx].mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat3x3_f32 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.arr[idx].mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.arr[idx].mat4x3_f32 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.arr[idx].mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.arr[idx].mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
sb.arr[idx].mat2x3_f16 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
sb.arr[idx].mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
sb.arr[idx].mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
sb.arr[idx].mat3x3_f16 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
sb.arr[idx].mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
sb.arr[idx].mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
sb.arr[idx].mat4x3_f16 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
sb.arr[idx].mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
vec3 tint_symbol_1[2] = vec3[2](vec3(0.0f), vec3(0.0f));
sb.arr[idx].arr2_vec3_f32 = tint_symbol_1;
f16mat4x2 tint_symbol_2[2] = f16mat4x2[2](f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
sb.arr[idx].arr2_mat4x2_f16 = tint_symbol_2;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol(gl_LocalInvocationIndex);
return;
}

View File

@ -0,0 +1,115 @@
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct Inner {
/* 0x0000 */ float scalar_f32;
/* 0x0004 */ int scalar_i32;
/* 0x0008 */ uint scalar_u32;
/* 0x000c */ half scalar_f16;
/* 0x000e */ tint_array<int8_t, 2> tint_pad;
/* 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;
/* 0x0030 */ packed_float3 vec3_f32;
/* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ packed_half3 vec3_f16;
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_5;
/* 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;
/* 0x00e0 */ float2x4 mat2x4_f32;
/* 0x0100 */ float3x2 mat3x2_f32;
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_7;
/* 0x0120 */ float3x3 mat3x3_f32;
/* 0x0150 */ float3x4 mat3x4_f32;
/* 0x0180 */ float4x2 mat4x2_f32;
/* 0x01a0 */ float4x3 mat4x3_f32;
/* 0x01e0 */ float4x4 mat4x4_f32;
/* 0x0220 */ half2x2 mat2x2_f16;
/* 0x0228 */ half2x3 mat2x3_f16;
/* 0x0238 */ half2x4 mat2x4_f16;
/* 0x0248 */ half3x2 mat3x2_f16;
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_8;
/* 0x0258 */ half3x3 mat3x3_f16;
/* 0x0270 */ half3x4 mat3x4_f16;
/* 0x0288 */ half4x2 mat4x2_f16;
/* 0x0298 */ half4x3 mat4x3_f16;
/* 0x02b8 */ half4x4 mat4x4_f16;
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_9;
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
};
struct S {
/* 0x0000 */ tint_array<Inner, 1> arr;
};
void tint_symbol_inner(uint idx, device S* 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;
(*(tint_symbol_3)).arr[idx].scalar_f16 = 0.0h;
(*(tint_symbol_3)).arr[idx].vec2_f32 = float2(0.0f);
(*(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].vec4_f32 = float4(0.0f);
(*(tint_symbol_3)).arr[idx].vec4_i32 = int4(0);
(*(tint_symbol_3)).arr[idx].vec4_u32 = uint4(0u);
(*(tint_symbol_3)).arr[idx].vec4_f16 = half4(0.0h);
(*(tint_symbol_3)).arr[idx].mat2x2_f32 = float2x2(float2(0.0f), float2(0.0f));
(*(tint_symbol_3)).arr[idx].mat2x3_f32 = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_3)).arr[idx].mat2x4_f32 = float2x4(float4(0.0f), float4(0.0f));
(*(tint_symbol_3)).arr[idx].mat3x2_f32 = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_3)).arr[idx].mat3x3_f32 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_3)).arr[idx].mat3x4_f32 = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_3)).arr[idx].mat4x2_f32 = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_3)).arr[idx].mat4x3_f32 = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_3)).arr[idx].mat4x4_f32 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_3)).arr[idx].mat2x2_f16 = half2x2(half2(0.0h), half2(0.0h));
(*(tint_symbol_3)).arr[idx].mat2x3_f16 = half2x3(half3(0.0h), half3(0.0h));
(*(tint_symbol_3)).arr[idx].mat2x4_f16 = half2x4(half4(0.0h), half4(0.0h));
(*(tint_symbol_3)).arr[idx].mat3x2_f16 = half3x2(half2(0.0h), half2(0.0h), half2(0.0h));
(*(tint_symbol_3)).arr[idx].mat3x3_f16 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
(*(tint_symbol_3)).arr[idx].mat3x4_f16 = half3x4(half4(0.0h), half4(0.0h), half4(0.0h));
(*(tint_symbol_3)).arr[idx].mat4x2_f16 = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h));
(*(tint_symbol_3)).arr[idx].mat4x3_f16 = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h));
(*(tint_symbol_3)).arr[idx].mat4x4_f16 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
tint_array<float3, 2> const tint_symbol_1 = tint_array<float3, 2>{};
(*(tint_symbol_3)).arr[idx].arr2_vec3_f32 = tint_symbol_1;
tint_array<half4x2, 2> const tint_symbol_2 = tint_array<half4x2, 2>{};
(*(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]]) {
tint_symbol_inner(idx, tint_symbol_4);
return;
}

View File

@ -0,0 +1,376 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 198
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %idx_1
OpExecutionMode %main LocalSize 1 1 1
OpName %idx_1 "idx_1"
OpName %S "S"
OpMemberName %S 0 "arr"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "scalar_f16"
OpMemberName %Inner 4 "vec2_f32"
OpMemberName %Inner 5 "vec2_i32"
OpMemberName %Inner 6 "vec2_u32"
OpMemberName %Inner 7 "vec2_f16"
OpMemberName %Inner 8 "vec3_f32"
OpMemberName %Inner 9 "vec3_i32"
OpMemberName %Inner 10 "vec3_u32"
OpMemberName %Inner 11 "vec3_f16"
OpMemberName %Inner 12 "vec4_f32"
OpMemberName %Inner 13 "vec4_i32"
OpMemberName %Inner 14 "vec4_u32"
OpMemberName %Inner 15 "vec4_f16"
OpMemberName %Inner 16 "mat2x2_f32"
OpMemberName %Inner 17 "mat2x3_f32"
OpMemberName %Inner 18 "mat2x4_f32"
OpMemberName %Inner 19 "mat3x2_f32"
OpMemberName %Inner 20 "mat3x3_f32"
OpMemberName %Inner 21 "mat3x4_f32"
OpMemberName %Inner 22 "mat4x2_f32"
OpMemberName %Inner 23 "mat4x3_f32"
OpMemberName %Inner 24 "mat4x4_f32"
OpMemberName %Inner 25 "mat2x2_f16"
OpMemberName %Inner 26 "mat2x3_f16"
OpMemberName %Inner 27 "mat2x4_f16"
OpMemberName %Inner 28 "mat3x2_f16"
OpMemberName %Inner 29 "mat3x3_f16"
OpMemberName %Inner 30 "mat3x4_f16"
OpMemberName %Inner 31 "mat4x2_f16"
OpMemberName %Inner 32 "mat4x3_f16"
OpMemberName %Inner 33 "mat4x4_f16"
OpMemberName %Inner 34 "arr2_vec3_f32"
OpMemberName %Inner 35 "arr2_mat4x2_f16"
OpName %sb "sb"
OpName %main_inner "main_inner"
OpName %idx "idx"
OpName %main "main"
OpDecorate %idx_1 BuiltIn LocalInvocationIndex
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 12
OpMemberDecorate %Inner 4 Offset 16
OpMemberDecorate %Inner 5 Offset 24
OpMemberDecorate %Inner 6 Offset 32
OpMemberDecorate %Inner 7 Offset 40
OpMemberDecorate %Inner 8 Offset 48
OpMemberDecorate %Inner 9 Offset 64
OpMemberDecorate %Inner 10 Offset 80
OpMemberDecorate %Inner 11 Offset 96
OpMemberDecorate %Inner 12 Offset 112
OpMemberDecorate %Inner 13 Offset 128
OpMemberDecorate %Inner 14 Offset 144
OpMemberDecorate %Inner 15 Offset 160
OpMemberDecorate %Inner 16 Offset 168
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 8
OpMemberDecorate %Inner 17 Offset 192
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 224
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 16
OpMemberDecorate %Inner 19 Offset 256
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 8
OpMemberDecorate %Inner 20 Offset 288
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 336
OpMemberDecorate %Inner 21 ColMajor
OpMemberDecorate %Inner 21 MatrixStride 16
OpMemberDecorate %Inner 22 Offset 384
OpMemberDecorate %Inner 22 ColMajor
OpMemberDecorate %Inner 22 MatrixStride 8
OpMemberDecorate %Inner 23 Offset 416
OpMemberDecorate %Inner 23 ColMajor
OpMemberDecorate %Inner 23 MatrixStride 16
OpMemberDecorate %Inner 24 Offset 480
OpMemberDecorate %Inner 24 ColMajor
OpMemberDecorate %Inner 24 MatrixStride 16
OpMemberDecorate %Inner 25 Offset 544
OpMemberDecorate %Inner 25 ColMajor
OpMemberDecorate %Inner 25 MatrixStride 4
OpMemberDecorate %Inner 26 Offset 552
OpMemberDecorate %Inner 26 ColMajor
OpMemberDecorate %Inner 26 MatrixStride 8
OpMemberDecorate %Inner 27 Offset 568
OpMemberDecorate %Inner 27 ColMajor
OpMemberDecorate %Inner 27 MatrixStride 8
OpMemberDecorate %Inner 28 Offset 584
OpMemberDecorate %Inner 28 ColMajor
OpMemberDecorate %Inner 28 MatrixStride 4
OpMemberDecorate %Inner 29 Offset 600
OpMemberDecorate %Inner 29 ColMajor
OpMemberDecorate %Inner 29 MatrixStride 8
OpMemberDecorate %Inner 30 Offset 624
OpMemberDecorate %Inner 30 ColMajor
OpMemberDecorate %Inner 30 MatrixStride 8
OpMemberDecorate %Inner 31 Offset 648
OpMemberDecorate %Inner 31 ColMajor
OpMemberDecorate %Inner 31 MatrixStride 4
OpMemberDecorate %Inner 32 Offset 664
OpMemberDecorate %Inner 32 ColMajor
OpMemberDecorate %Inner 32 MatrixStride 8
OpMemberDecorate %Inner 33 Offset 696
OpMemberDecorate %Inner 33 ColMajor
OpMemberDecorate %Inner 33 MatrixStride 8
OpMemberDecorate %Inner 34 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %Inner 35 Offset 768
OpMemberDecorate %Inner 35 ColMajor
OpMemberDecorate %Inner 35 MatrixStride 4
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 800
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%half = OpTypeFloat 16
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v2half = OpTypeVector %half 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v3half = OpTypeVector %half 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%v4half = OpTypeVector %half 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%mat2v2half = OpTypeMatrix %v2half 2
%mat2v3half = OpTypeMatrix %v3half 2
%mat2v4half = OpTypeMatrix %v4half 2
%mat3v2half = OpTypeMatrix %v2half 3
%mat3v3half = OpTypeMatrix %v3half 3
%mat3v4half = OpTypeMatrix %v4half 3
%mat4v2half = OpTypeMatrix %v2half 4
%mat4v3half = OpTypeMatrix %v3half 4
%mat4v4half = OpTypeMatrix %v4half 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%Inner = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %mat2v2half %mat2v3half %mat2v4half %mat3v2half %mat3v3half %mat3v4half %mat4v2half %mat4v3half %mat4v4half %_arr_v3float_uint_2 %_arr_mat4v2half_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%45 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%53 = OpConstantNull %float
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%57 = OpConstantNull %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%60 = OpConstantNull %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%64 = OpConstantNull %half
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%68 = OpConstantNull %v2float
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%72 = OpConstantNull %v2int
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%76 = OpConstantNull %v2uint
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%80 = OpConstantNull %v2half
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%84 = OpConstantNull %v3float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%88 = OpConstantNull %v3int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%92 = OpConstantNull %v3uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%96 = OpConstantNull %v3half
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%100 = OpConstantNull %v4float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%104 = OpConstantNull %v4int
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%108 = OpConstantNull %v4uint
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
%112 = OpConstantNull %v4half
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%116 = OpConstantNull %mat2v2float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%120 = OpConstantNull %mat2v3float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%124 = OpConstantNull %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%128 = OpConstantNull %mat3v2float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%132 = OpConstantNull %mat3v3float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%136 = OpConstantNull %mat3v4float
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%140 = OpConstantNull %mat4v2float
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%144 = OpConstantNull %mat4v3float
%uint_24 = OpConstant %uint 24
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%148 = OpConstantNull %mat4v4float
%uint_25 = OpConstant %uint 25
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%152 = OpConstantNull %mat2v2half
%uint_26 = OpConstant %uint 26
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%156 = OpConstantNull %mat2v3half
%uint_27 = OpConstant %uint 27
%_ptr_StorageBuffer_mat2v4half = OpTypePointer StorageBuffer %mat2v4half
%160 = OpConstantNull %mat2v4half
%uint_28 = OpConstant %uint 28
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%164 = OpConstantNull %mat3v2half
%uint_29 = OpConstant %uint 29
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
%168 = OpConstantNull %mat3v3half
%uint_30 = OpConstant %uint 30
%_ptr_StorageBuffer_mat3v4half = OpTypePointer StorageBuffer %mat3v4half
%172 = OpConstantNull %mat3v4half
%uint_31 = OpConstant %uint 31
%_ptr_StorageBuffer_mat4v2half = OpTypePointer StorageBuffer %mat4v2half
%176 = OpConstantNull %mat4v2half
%uint_32 = OpConstant %uint 32
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
%180 = OpConstantNull %mat4v3half
%uint_33 = OpConstant %uint 33
%_ptr_StorageBuffer_mat4v4half = OpTypePointer StorageBuffer %mat4v4half
%184 = OpConstantNull %mat4v4half
%uint_34 = OpConstant %uint 34
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%188 = OpConstantNull %_arr_v3float_uint_2
%uint_35 = OpConstant %uint 35
%_ptr_StorageBuffer__arr_mat4v2half_uint_2 = OpTypePointer StorageBuffer %_arr_mat4v2half_uint_2
%192 = OpConstantNull %_arr_mat4v2half_uint_2
%193 = OpTypeFunction %void
%main_inner = OpFunction %void None %45
%idx = OpFunctionParameter %uint
%49 = OpLabel
%52 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
OpStore %52 %53
%56 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
OpStore %56 %57
%59 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
OpStore %59 %60
%63 = OpAccessChain %_ptr_StorageBuffer_half %sb %uint_0 %idx %uint_3
OpStore %63 %64
%67 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_4
OpStore %67 %68
%71 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_5
OpStore %71 %72
%75 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_6
OpStore %75 %76
%79 = OpAccessChain %_ptr_StorageBuffer_v2half %sb %uint_0 %idx %uint_7
OpStore %79 %80
%83 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_8
OpStore %83 %84
%87 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_9
OpStore %87 %88
%91 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_10
OpStore %91 %92
%95 = OpAccessChain %_ptr_StorageBuffer_v3half %sb %uint_0 %idx %uint_11
OpStore %95 %96
%99 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_12
OpStore %99 %100
%103 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_13
OpStore %103 %104
%107 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_14
OpStore %107 %108
%111 = OpAccessChain %_ptr_StorageBuffer_v4half %sb %uint_0 %idx %uint_15
OpStore %111 %112
%115 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_16
OpStore %115 %116
%119 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_17
OpStore %119 %120
%123 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_18
OpStore %123 %124
%127 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_19
OpStore %127 %128
%131 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_20
OpStore %131 %132
%135 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_21
OpStore %135 %136
%139 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_22
OpStore %139 %140
%143 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_23
OpStore %143 %144
%147 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_24
OpStore %147 %148
%151 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %sb %uint_0 %idx %uint_25
OpStore %151 %152
%155 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %sb %uint_0 %idx %uint_26
OpStore %155 %156
%159 = OpAccessChain %_ptr_StorageBuffer_mat2v4half %sb %uint_0 %idx %uint_27
OpStore %159 %160
%163 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %sb %uint_0 %idx %uint_28
OpStore %163 %164
%167 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %sb %uint_0 %idx %uint_29
OpStore %167 %168
%171 = OpAccessChain %_ptr_StorageBuffer_mat3v4half %sb %uint_0 %idx %uint_30
OpStore %171 %172
%175 = OpAccessChain %_ptr_StorageBuffer_mat4v2half %sb %uint_0 %idx %uint_31
OpStore %175 %176
%179 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %sb %uint_0 %idx %uint_32
OpStore %179 %180
%183 = OpAccessChain %_ptr_StorageBuffer_mat4v4half %sb %uint_0 %idx %uint_33
OpStore %183 %184
%187 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %idx %uint_34
OpStore %187 %188
%191 = OpAccessChain %_ptr_StorageBuffer__arr_mat4v2half_uint_2 %sb %uint_0 %idx %uint_35
OpStore %191 %192
OpReturn
OpFunctionEnd
%main = OpFunction %void None %193
%195 = OpLabel
%197 = OpLoad %uint %idx_1
%196 = OpFunctionCall %void %main_inner %197
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,86 @@
enable f16;
struct Inner {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
}
struct S {
arr : array<Inner>,
}
@binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1)
fn main(@builtin(local_invocation_index) idx : u32) {
sb.arr[idx].scalar_f32 = f32();
sb.arr[idx].scalar_i32 = i32();
sb.arr[idx].scalar_u32 = u32();
sb.arr[idx].scalar_f16 = f16();
sb.arr[idx].vec2_f32 = vec2<f32>();
sb.arr[idx].vec2_i32 = vec2<i32>();
sb.arr[idx].vec2_u32 = vec2<u32>();
sb.arr[idx].vec2_f16 = vec2<f16>();
sb.arr[idx].vec3_f32 = vec3<f32>();
sb.arr[idx].vec3_i32 = vec3<i32>();
sb.arr[idx].vec3_u32 = vec3<u32>();
sb.arr[idx].vec3_f16 = vec3<f16>();
sb.arr[idx].vec4_f32 = vec4<f32>();
sb.arr[idx].vec4_i32 = vec4<i32>();
sb.arr[idx].vec4_u32 = vec4<u32>();
sb.arr[idx].vec4_f16 = vec4<f16>();
sb.arr[idx].mat2x2_f32 = mat2x2<f32>();
sb.arr[idx].mat2x3_f32 = mat2x3<f32>();
sb.arr[idx].mat2x4_f32 = mat2x4<f32>();
sb.arr[idx].mat3x2_f32 = mat3x2<f32>();
sb.arr[idx].mat3x3_f32 = mat3x3<f32>();
sb.arr[idx].mat3x4_f32 = mat3x4<f32>();
sb.arr[idx].mat4x2_f32 = mat4x2<f32>();
sb.arr[idx].mat4x3_f32 = mat4x3<f32>();
sb.arr[idx].mat4x4_f32 = mat4x4<f32>();
sb.arr[idx].mat2x2_f16 = mat2x2<f16>();
sb.arr[idx].mat2x3_f16 = mat2x3<f16>();
sb.arr[idx].mat2x4_f16 = mat2x4<f16>();
sb.arr[idx].mat3x2_f16 = mat3x2<f16>();
sb.arr[idx].mat3x3_f16 = mat3x3<f16>();
sb.arr[idx].mat3x4_f16 = mat3x4<f16>();
sb.arr[idx].mat4x2_f16 = mat4x2<f16>();
sb.arr[idx].mat4x3_f16 = mat4x3<f16>();
sb.arr[idx].mat4x4_f16 = mat4x4<f16>();
sb.arr[idx].arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.arr[idx].arr2_mat4x2_f16 = array<mat4x2<f16>, 2>();
}

View File

@ -1,32 +1,61 @@
struct Inner { struct Inner {
x : i32, scalar_i32 : i32,
scalar_f32 : f32,
}; };
struct S { struct S {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : Inner, vec3_u32 : vec3<u32>,
j : array<Inner, 4>, vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
}; };
@binding(0) @group(0) var<storage, read> s : S; @binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main() { fn main() {
let a = s.a; let scalar_f32 = sb.scalar_f32;
let b = s.b; let scalar_i32 = sb.scalar_i32;
let c = s.c; let scalar_u32 = sb.scalar_u32;
let d = s.d; let vec2_f32 = sb.vec2_f32;
let e = s.e; let vec2_i32 = sb.vec2_i32;
let f = s.f; let vec2_u32 = sb.vec2_u32;
let g = s.g; let vec3_f32 = sb.vec3_f32;
let h = s.h; let vec3_i32 = sb.vec3_i32;
let i = s.i; let vec3_u32 = sb.vec3_u32;
let j = s.j; let vec4_f32 = sb.vec4_f32;
let vec4_i32 = sb.vec4_i32;
let vec4_u32 = sb.vec4_u32;
let mat2x2_f32 = sb.mat2x2_f32;
let mat2x3_f32 = sb.mat2x3_f32;
let mat2x4_f32 = sb.mat2x4_f32;
let mat3x2_f32 = sb.mat3x2_f32;
let mat3x3_f32 = sb.mat3x3_f32;
let mat3x4_f32 = sb.mat3x4_f32;
let mat4x2_f32 = sb.mat4x2_f32;
let mat4x3_f32 = sb.mat4x3_f32;
let mat4x4_f32 = sb.mat4x4_f32;
let arr2_vec3_f32 = sb.arr2_vec3_f32;
let struct_inner = sb.struct_inner;
let array_struct_inner = sb.array_struct_inner;
} }

View File

@ -1,44 +1,98 @@
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
ByteAddressBuffer s : register(t0, space0); ByteAddressBuffer sb : register(t0, space0);
float2x3 tint_symbol_6(ByteAddressBuffer buffer, uint offset) { float2x2 tint_symbol_12(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_13(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u)))); return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
} }
float3x2 tint_symbol_7(ByteAddressBuffer buffer, uint offset) { float2x4 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u)))); return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
} }
Inner tint_symbol_9(ByteAddressBuffer buffer, uint offset) { float3x3 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_11 = {asint(buffer.Load((offset + 0u)))}; return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
return tint_symbol_11;
} }
typedef Inner tint_symbol_10_ret[4]; float3x4 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
tint_symbol_10_ret tint_symbol_10(ByteAddressBuffer buffer, uint offset) { return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
Inner arr[4] = (Inner[4])0; }
float4x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
typedef float3 tint_symbol_21_ret[2];
tint_symbol_21_ret tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
float3 arr[2] = (float3[2])0;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr[i_1] = tint_symbol_9(buffer, (offset + (i_1 * 4u))); arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
} }
} }
return arr; return arr;
} }
Inner tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_24 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u)))};
return tint_symbol_24;
}
typedef Inner tint_symbol_23_ret[4];
tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 8u)));
}
}
return arr_1;
}
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]
void main() { void main() {
const int3 a = asint(s.Load3(0u)); const float scalar_f32 = asfloat(sb.Load(0u));
const int b = asint(s.Load(12u)); const int scalar_i32 = asint(sb.Load(4u));
const uint3 c = s.Load3(16u); const uint scalar_u32 = sb.Load(8u);
const uint d = s.Load(28u); const float2 vec2_f32 = asfloat(sb.Load2(16u));
const float3 e = asfloat(s.Load3(32u)); const int2 vec2_i32 = asint(sb.Load2(24u));
const float f = asfloat(s.Load(44u)); const uint2 vec2_u32 = sb.Load2(32u);
const float2x3 g = tint_symbol_6(s, 48u); const float3 vec3_f32 = asfloat(sb.Load3(48u));
const float3x2 h = tint_symbol_7(s, 80u); const int3 vec3_i32 = asint(sb.Load3(64u));
const Inner i = tint_symbol_9(s, 104u); const uint3 vec3_u32 = sb.Load3(80u);
const Inner j[4] = tint_symbol_10(s, 108u); const float4 vec4_f32 = asfloat(sb.Load4(96u));
const int4 vec4_i32 = asint(sb.Load4(112u));
const uint4 vec4_u32 = sb.Load4(128u);
const float2x2 mat2x2_f32 = tint_symbol_12(sb, 144u);
const float2x3 mat2x3_f32 = tint_symbol_13(sb, 160u);
const float2x4 mat2x4_f32 = tint_symbol_14(sb, 192u);
const float3x2 mat3x2_f32 = tint_symbol_15(sb, 224u);
const float3x3 mat3x3_f32 = tint_symbol_16(sb, 256u);
const float3x4 mat3x4_f32 = tint_symbol_17(sb, 304u);
const float4x2 mat4x2_f32 = tint_symbol_18(sb, 352u);
const float4x3 mat4x3_f32 = tint_symbol_19(sb, 384u);
const float4x4 mat4x4_f32 = tint_symbol_20(sb, 448u);
const float3 arr2_vec3_f32[2] = tint_symbol_21(sb, 512u);
const Inner struct_inner = tint_symbol_22(sb, 544u);
const Inner array_struct_inner[4] = tint_symbol_23(sb, 552u);
return; return;
} }

View File

@ -1,44 +1,98 @@
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
ByteAddressBuffer s : register(t0, space0); ByteAddressBuffer sb : register(t0, space0);
float2x3 tint_symbol_6(ByteAddressBuffer buffer, uint offset) { float2x2 tint_symbol_12(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_13(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u)))); return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
} }
float3x2 tint_symbol_7(ByteAddressBuffer buffer, uint offset) { float2x4 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u)))); return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
} }
Inner tint_symbol_9(ByteAddressBuffer buffer, uint offset) { float3x3 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_11 = {asint(buffer.Load((offset + 0u)))}; return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
return tint_symbol_11;
} }
typedef Inner tint_symbol_10_ret[4]; float3x4 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
tint_symbol_10_ret tint_symbol_10(ByteAddressBuffer buffer, uint offset) { return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
Inner arr[4] = (Inner[4])0; }
float4x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
typedef float3 tint_symbol_21_ret[2];
tint_symbol_21_ret tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
float3 arr[2] = (float3[2])0;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr[i_1] = tint_symbol_9(buffer, (offset + (i_1 * 4u))); arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
} }
} }
return arr; return arr;
} }
Inner tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_24 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u)))};
return tint_symbol_24;
}
typedef Inner tint_symbol_23_ret[4];
tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 8u)));
}
}
return arr_1;
}
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]
void main() { void main() {
const int3 a = asint(s.Load3(0u)); const float scalar_f32 = asfloat(sb.Load(0u));
const int b = asint(s.Load(12u)); const int scalar_i32 = asint(sb.Load(4u));
const uint3 c = s.Load3(16u); const uint scalar_u32 = sb.Load(8u);
const uint d = s.Load(28u); const float2 vec2_f32 = asfloat(sb.Load2(16u));
const float3 e = asfloat(s.Load3(32u)); const int2 vec2_i32 = asint(sb.Load2(24u));
const float f = asfloat(s.Load(44u)); const uint2 vec2_u32 = sb.Load2(32u);
const float2x3 g = tint_symbol_6(s, 48u); const float3 vec3_f32 = asfloat(sb.Load3(48u));
const float3x2 h = tint_symbol_7(s, 80u); const int3 vec3_i32 = asint(sb.Load3(64u));
const Inner i = tint_symbol_9(s, 104u); const uint3 vec3_u32 = sb.Load3(80u);
const Inner j[4] = tint_symbol_10(s, 108u); const float4 vec4_f32 = asfloat(sb.Load4(96u));
const int4 vec4_i32 = asint(sb.Load4(112u));
const uint4 vec4_u32 = sb.Load4(128u);
const float2x2 mat2x2_f32 = tint_symbol_12(sb, 144u);
const float2x3 mat2x3_f32 = tint_symbol_13(sb, 160u);
const float2x4 mat2x4_f32 = tint_symbol_14(sb, 192u);
const float3x2 mat3x2_f32 = tint_symbol_15(sb, 224u);
const float3x3 mat3x3_f32 = tint_symbol_16(sb, 256u);
const float3x4 mat3x4_f32 = tint_symbol_17(sb, 304u);
const float4x2 mat4x2_f32 = tint_symbol_18(sb, 352u);
const float4x3 mat4x3_f32 = tint_symbol_19(sb, 384u);
const float4x4 mat4x4_f32 = tint_symbol_20(sb, 448u);
const float3 arr2_vec3_f32[2] = tint_symbol_21(sb, 512u);
const Inner struct_inner = tint_symbol_22(sb, 544u);
const Inner array_struct_inner[4] = tint_symbol_23(sb, 552u);
return; return;
} }

View File

@ -1,38 +1,76 @@
#version 310 es #version 310 es
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
struct S { struct S {
ivec3 a; float scalar_f32;
int b; int scalar_i32;
uvec3 c; uint scalar_u32;
uint d;
vec3 e;
float f;
mat2x3 g;
mat3x2 h;
Inner i;
Inner j[4];
uint pad; uint pad;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_1;
uint pad_2;
vec3 vec3_f32;
uint pad_3;
ivec3 vec3_i32;
uint pad_4;
uvec3 vec3_u32;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
mat2 mat2x2_f32;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_6;
uint pad_7;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
vec3 arr2_vec3_f32[2];
Inner struct_inner;
Inner array_struct_inner[4];
uint pad_8;
uint pad_9;
}; };
layout(binding = 0, std430) buffer s_block_ssbo { layout(binding = 0, std430) buffer sb_block_ssbo {
S inner; S inner;
} s; } sb;
void tint_symbol() { void tint_symbol() {
ivec3 a = s.inner.a; float scalar_f32 = sb.inner.scalar_f32;
int b = s.inner.b; int scalar_i32 = sb.inner.scalar_i32;
uvec3 c = s.inner.c; uint scalar_u32 = sb.inner.scalar_u32;
uint d = s.inner.d; vec2 vec2_f32 = sb.inner.vec2_f32;
vec3 e = s.inner.e; ivec2 vec2_i32 = sb.inner.vec2_i32;
float f = s.inner.f; uvec2 vec2_u32 = sb.inner.vec2_u32;
mat2x3 g = s.inner.g; vec3 vec3_f32 = sb.inner.vec3_f32;
mat3x2 h = s.inner.h; ivec3 vec3_i32 = sb.inner.vec3_i32;
Inner i = s.inner.i; uvec3 vec3_u32 = sb.inner.vec3_u32;
Inner j[4] = s.inner.j; vec4 vec4_f32 = sb.inner.vec4_f32;
ivec4 vec4_i32 = sb.inner.vec4_i32;
uvec4 vec4_u32 = sb.inner.vec4_u32;
mat2 mat2x2_f32 = sb.inner.mat2x2_f32;
mat2x3 mat2x3_f32 = sb.inner.mat2x3_f32;
mat2x4 mat2x4_f32 = sb.inner.mat2x4_f32;
mat3x2 mat3x2_f32 = sb.inner.mat3x2_f32;
mat3 mat3x3_f32 = sb.inner.mat3x3_f32;
mat3x4 mat3x4_f32 = sb.inner.mat3x4_f32;
mat4x2 mat4x2_f32 = sb.inner.mat4x2_f32;
mat4x3 mat4x3_f32 = sb.inner.mat4x3_f32;
mat4 mat4x4_f32 = sb.inner.mat4x4_f32;
vec3 arr2_vec3_f32[2] = sb.inner.arr2_vec3_f32;
Inner struct_inner = sb.inner.struct_inner;
Inner array_struct_inner[4] = sb.inner.array_struct_inner;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -15,34 +15,69 @@ struct tint_array {
}; };
struct Inner { struct Inner {
/* 0x0000 */ int x; /* 0x0000 */ int scalar_i32;
/* 0x0004 */ float scalar_f32;
}; };
struct S { struct S {
/* 0x0000 */ packed_int3 a; /* 0x0000 */ float scalar_f32;
/* 0x000c */ int b; /* 0x0004 */ int scalar_i32;
/* 0x0010 */ packed_uint3 c; /* 0x0008 */ uint scalar_u32;
/* 0x001c */ uint d; /* 0x000c */ tint_array<int8_t, 4> tint_pad;
/* 0x0020 */ packed_float3 e; /* 0x0010 */ float2 vec2_f32;
/* 0x002c */ float f; /* 0x0018 */ int2 vec2_i32;
/* 0x0030 */ float2x3 g; /* 0x0020 */ uint2 vec2_u32;
/* 0x0050 */ float3x2 h; /* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0068 */ Inner i; /* 0x0030 */ packed_float3 vec3_f32;
/* 0x006c */ tint_array<Inner, 4> j; /* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x007c */ tint_array<int8_t, 4> tint_pad; /* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ float4 vec4_f32;
/* 0x0070 */ int4 vec4_i32;
/* 0x0080 */ uint4 vec4_u32;
/* 0x0090 */ float2x2 mat2x2_f32;
/* 0x00a0 */ float2x3 mat2x3_f32;
/* 0x00c0 */ float2x4 mat2x4_f32;
/* 0x00e0 */ float3x2 mat3x2_f32;
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
/* 0x0100 */ float3x3 mat3x3_f32;
/* 0x0130 */ float3x4 mat3x4_f32;
/* 0x0160 */ float4x2 mat4x2_f32;
/* 0x0180 */ float4x3 mat4x3_f32;
/* 0x01c0 */ float4x4 mat4x4_f32;
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0220 */ Inner struct_inner;
/* 0x0228 */ tint_array<Inner, 4> array_struct_inner;
/* 0x0248 */ tint_array<int8_t, 8> tint_pad_6;
}; };
kernel void tint_symbol(const device S* tint_symbol_1 [[buffer(0)]]) { kernel void tint_symbol(const device S* tint_symbol_1 [[buffer(0)]]) {
int3 const a = int3((*(tint_symbol_1)).a); float const scalar_f32 = (*(tint_symbol_1)).scalar_f32;
int const b = (*(tint_symbol_1)).b; int const scalar_i32 = (*(tint_symbol_1)).scalar_i32;
uint3 const c = uint3((*(tint_symbol_1)).c); uint const scalar_u32 = (*(tint_symbol_1)).scalar_u32;
uint const d = (*(tint_symbol_1)).d; float2 const vec2_f32 = (*(tint_symbol_1)).vec2_f32;
float3 const e = float3((*(tint_symbol_1)).e); int2 const vec2_i32 = (*(tint_symbol_1)).vec2_i32;
float const f = (*(tint_symbol_1)).f; uint2 const vec2_u32 = (*(tint_symbol_1)).vec2_u32;
float2x3 const g = (*(tint_symbol_1)).g; float3 const vec3_f32 = float3((*(tint_symbol_1)).vec3_f32);
float3x2 const h = (*(tint_symbol_1)).h; int3 const vec3_i32 = int3((*(tint_symbol_1)).vec3_i32);
Inner const i = (*(tint_symbol_1)).i; uint3 const vec3_u32 = uint3((*(tint_symbol_1)).vec3_u32);
tint_array<Inner, 4> const j = (*(tint_symbol_1)).j; float4 const vec4_f32 = (*(tint_symbol_1)).vec4_f32;
int4 const vec4_i32 = (*(tint_symbol_1)).vec4_i32;
uint4 const vec4_u32 = (*(tint_symbol_1)).vec4_u32;
float2x2 const mat2x2_f32 = (*(tint_symbol_1)).mat2x2_f32;
float2x3 const mat2x3_f32 = (*(tint_symbol_1)).mat2x3_f32;
float2x4 const mat2x4_f32 = (*(tint_symbol_1)).mat2x4_f32;
float3x2 const mat3x2_f32 = (*(tint_symbol_1)).mat3x2_f32;
float3x3 const mat3x3_f32 = (*(tint_symbol_1)).mat3x3_f32;
float3x4 const mat3x4_f32 = (*(tint_symbol_1)).mat3x4_f32;
float4x2 const mat4x2_f32 = (*(tint_symbol_1)).mat4x2_f32;
float4x3 const mat4x3_f32 = (*(tint_symbol_1)).mat4x3_f32;
float4x4 const mat4x4_f32 = (*(tint_symbol_1)).mat4x4_f32;
tint_array<float3, 2> const arr2_vec3_f32 = (*(tint_symbol_1)).arr2_vec3_f32;
Inner const struct_inner = (*(tint_symbol_1)).struct_inner;
tint_array<Inner, 4> const array_struct_inner = (*(tint_symbol_1)).array_struct_inner;
return; return;
} }

View File

@ -1,108 +1,222 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 60 ; Bound: 129
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1 OpExecutionMode %main LocalSize 1 1 1
OpName %s_block "s_block" OpName %sb_block "sb_block"
OpMemberName %s_block 0 "inner" OpMemberName %sb_block 0 "inner"
OpName %S "S" OpName %S "S"
OpMemberName %S 0 "a" OpMemberName %S 0 "scalar_f32"
OpMemberName %S 1 "b" OpMemberName %S 1 "scalar_i32"
OpMemberName %S 2 "c" OpMemberName %S 2 "scalar_u32"
OpMemberName %S 3 "d" OpMemberName %S 3 "vec2_f32"
OpMemberName %S 4 "e" OpMemberName %S 4 "vec2_i32"
OpMemberName %S 5 "f" OpMemberName %S 5 "vec2_u32"
OpMemberName %S 6 "g" OpMemberName %S 6 "vec3_f32"
OpMemberName %S 7 "h" OpMemberName %S 7 "vec3_i32"
OpMemberName %S 8 "i" OpMemberName %S 8 "vec3_u32"
OpMemberName %S 9 "vec4_f32"
OpMemberName %S 10 "vec4_i32"
OpMemberName %S 11 "vec4_u32"
OpMemberName %S 12 "mat2x2_f32"
OpMemberName %S 13 "mat2x3_f32"
OpMemberName %S 14 "mat2x4_f32"
OpMemberName %S 15 "mat3x2_f32"
OpMemberName %S 16 "mat3x3_f32"
OpMemberName %S 17 "mat3x4_f32"
OpMemberName %S 18 "mat4x2_f32"
OpMemberName %S 19 "mat4x3_f32"
OpMemberName %S 20 "mat4x4_f32"
OpMemberName %S 21 "arr2_vec3_f32"
OpMemberName %S 22 "struct_inner"
OpName %Inner "Inner" OpName %Inner "Inner"
OpMemberName %Inner 0 "x" OpMemberName %Inner 0 "scalar_i32"
OpMemberName %S 9 "j" OpMemberName %Inner 1 "scalar_f32"
OpName %s "s" OpMemberName %S 23 "array_struct_inner"
OpName %sb "sb"
OpName %main "main" OpName %main "main"
OpDecorate %s_block Block OpDecorate %sb_block Block
OpMemberDecorate %s_block 0 Offset 0 OpMemberDecorate %sb_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0 OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 12 OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 16 OpMemberDecorate %S 2 Offset 8
OpMemberDecorate %S 3 Offset 28 OpMemberDecorate %S 3 Offset 16
OpMemberDecorate %S 4 Offset 32 OpMemberDecorate %S 4 Offset 24
OpMemberDecorate %S 5 Offset 44 OpMemberDecorate %S 5 Offset 32
OpMemberDecorate %S 6 Offset 48 OpMemberDecorate %S 6 Offset 48
OpMemberDecorate %S 6 ColMajor OpMemberDecorate %S 7 Offset 64
OpMemberDecorate %S 6 MatrixStride 16 OpMemberDecorate %S 8 Offset 80
OpMemberDecorate %S 7 Offset 80 OpMemberDecorate %S 9 Offset 96
OpMemberDecorate %S 7 ColMajor OpMemberDecorate %S 10 Offset 112
OpMemberDecorate %S 7 MatrixStride 8 OpMemberDecorate %S 11 Offset 128
OpMemberDecorate %S 8 Offset 104 OpMemberDecorate %S 12 Offset 144
OpMemberDecorate %S 12 ColMajor
OpMemberDecorate %S 12 MatrixStride 8
OpMemberDecorate %S 13 Offset 160
OpMemberDecorate %S 13 ColMajor
OpMemberDecorate %S 13 MatrixStride 16
OpMemberDecorate %S 14 Offset 192
OpMemberDecorate %S 14 ColMajor
OpMemberDecorate %S 14 MatrixStride 16
OpMemberDecorate %S 15 Offset 224
OpMemberDecorate %S 15 ColMajor
OpMemberDecorate %S 15 MatrixStride 8
OpMemberDecorate %S 16 Offset 256
OpMemberDecorate %S 16 ColMajor
OpMemberDecorate %S 16 MatrixStride 16
OpMemberDecorate %S 17 Offset 304
OpMemberDecorate %S 17 ColMajor
OpMemberDecorate %S 17 MatrixStride 16
OpMemberDecorate %S 18 Offset 352
OpMemberDecorate %S 18 ColMajor
OpMemberDecorate %S 18 MatrixStride 8
OpMemberDecorate %S 19 Offset 384
OpMemberDecorate %S 19 ColMajor
OpMemberDecorate %S 19 MatrixStride 16
OpMemberDecorate %S 20 Offset 448
OpMemberDecorate %S 20 ColMajor
OpMemberDecorate %S 20 MatrixStride 16
OpMemberDecorate %S 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S 22 Offset 544
OpMemberDecorate %Inner 0 Offset 0 OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %S 9 Offset 108 OpMemberDecorate %Inner 1 Offset 4
OpDecorate %_arr_Inner_uint_4 ArrayStride 4 OpMemberDecorate %S 23 Offset 552
OpDecorate %s NonWritable OpDecorate %_arr_Inner_uint_4 ArrayStride 8
OpDecorate %s Binding 0 OpDecorate %sb NonWritable
OpDecorate %s DescriptorSet 0 OpDecorate %sb Binding 0
%int = OpTypeInt 32 1 OpDecorate %sb DescriptorSet 0
%v3int = OpTypeVector %int 3
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%float = OpTypeFloat 32 %float = OpTypeFloat 32
%v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1
%mat2v3float = OpTypeMatrix %v3float 2 %uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3 %mat3v2float = OpTypeMatrix %v2float 3
%Inner = OpTypeStruct %int %mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %int %float
%uint_4 = OpConstant %uint 4 %uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4 %_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S = OpTypeStruct %v3int %int %v3uint %uint %v3float %float %mat2v3float %mat3v2float %Inner %_arr_Inner_uint_4 %S = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2 %Inner %_arr_Inner_uint_4
%s_block = OpTypeStruct %S %sb_block = OpTypeStruct %S
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block %_ptr_StorageBuffer_sb_block = OpTypePointer StorageBuffer %sb_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer %sb = OpVariable %_ptr_StorageBuffer_sb_block StorageBuffer
%void = OpTypeVoid %void = OpTypeVoid
%17 = OpTypeFunction %void %31 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0 %uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_2 = OpConstant %uint 2
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float %uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%uint_5 = OpConstant %uint 5 %uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float %_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_6 = OpConstant %uint 6 %uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_7 = OpConstant %uint 7 %uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float %_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_8 = OpConstant %uint 8 %uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_9 = OpConstant %uint 9 %uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4 %_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4
%main = OpFunction %void None %17 %main = OpFunction %void None %31
%20 = OpLabel %34 = OpLabel
%23 = OpAccessChain %_ptr_StorageBuffer_v3int %s %uint_0 %uint_0 %37 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %uint_0
%24 = OpLoad %v3int %23 %38 = OpLoad %float %37
%27 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %uint_1 %41 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %uint_1
%28 = OpLoad %int %27 %42 = OpLoad %int %41
%31 = OpAccessChain %_ptr_StorageBuffer_v3uint %s %uint_0 %uint_2 %44 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %uint_2
%32 = OpLoad %v3uint %31 %45 = OpLoad %uint %44
%35 = OpAccessChain %_ptr_StorageBuffer_uint %s %uint_0 %uint_3 %48 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %uint_3
%36 = OpLoad %uint %35 %49 = OpLoad %v2float %48
%38 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %uint_4 %51 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %uint_4
%39 = OpLoad %v3float %38 %52 = OpLoad %v2int %51
%42 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_5 %55 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %uint_5
%43 = OpLoad %float %42 %56 = OpLoad %v2uint %55
%46 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %uint_6 %59 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %uint_6
%47 = OpLoad %mat2v3float %46 %60 = OpLoad %v3float %59
%50 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %s %uint_0 %uint_7 %63 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %uint_7
%51 = OpLoad %mat3v2float %50 %64 = OpLoad %v3int %63
%54 = OpAccessChain %_ptr_StorageBuffer_Inner %s %uint_0 %uint_8 %67 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %uint_8
%55 = OpLoad %Inner %54 %68 = OpLoad %v3uint %67
%58 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %s %uint_0 %uint_9 %71 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %uint_9
%59 = OpLoad %_arr_Inner_uint_4 %58 %72 = OpLoad %v4float %71
%75 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %uint_10
%76 = OpLoad %v4int %75
%79 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %uint_11
%80 = OpLoad %v4uint %79
%83 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %uint_12
%84 = OpLoad %mat2v2float %83
%87 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %uint_13
%88 = OpLoad %mat2v3float %87
%91 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %uint_14
%92 = OpLoad %mat2v4float %91
%95 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %uint_15
%96 = OpLoad %mat3v2float %95
%99 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %uint_16
%100 = OpLoad %mat3v3float %99
%103 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %uint_17
%104 = OpLoad %mat3v4float %103
%107 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %uint_18
%108 = OpLoad %mat4v2float %107
%111 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %uint_19
%112 = OpLoad %mat4v3float %111
%115 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %uint_20
%116 = OpLoad %mat4v4float %115
%119 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %uint_21
%120 = OpLoad %_arr_v3float_uint_2 %119
%123 = OpAccessChain %_ptr_StorageBuffer_Inner %sb %uint_0 %uint_22
%124 = OpLoad %Inner %123
%127 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %sb %uint_0 %uint_23
%128 = OpLoad %_arr_Inner_uint_4 %127
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,32 +1,61 @@
struct Inner { struct Inner {
x : i32, scalar_i32 : i32,
scalar_f32 : f32,
} }
struct S { struct S {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : Inner, vec3_u32 : vec3<u32>,
j : array<Inner, 4>, vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
} }
@binding(0) @group(0) var<storage, read> s : S; @binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main() { fn main() {
let a = s.a; let scalar_f32 = sb.scalar_f32;
let b = s.b; let scalar_i32 = sb.scalar_i32;
let c = s.c; let scalar_u32 = sb.scalar_u32;
let d = s.d; let vec2_f32 = sb.vec2_f32;
let e = s.e; let vec2_i32 = sb.vec2_i32;
let f = s.f; let vec2_u32 = sb.vec2_u32;
let g = s.g; let vec3_f32 = sb.vec3_f32;
let h = s.h; let vec3_i32 = sb.vec3_i32;
let i = s.i; let vec3_u32 = sb.vec3_u32;
let j = s.j; let vec4_f32 = sb.vec4_f32;
let vec4_i32 = sb.vec4_i32;
let vec4_u32 = sb.vec4_u32;
let mat2x2_f32 = sb.mat2x2_f32;
let mat2x3_f32 = sb.mat2x3_f32;
let mat2x4_f32 = sb.mat2x4_f32;
let mat3x2_f32 = sb.mat3x2_f32;
let mat3x3_f32 = sb.mat3x3_f32;
let mat3x4_f32 = sb.mat3x4_f32;
let mat4x2_f32 = sb.mat4x2_f32;
let mat4x3_f32 = sb.mat4x3_f32;
let mat4x4_f32 = sb.mat4x4_f32;
let arr2_vec3_f32 = sb.arr2_vec3_f32;
let struct_inner = sb.struct_inner;
let array_struct_inner = sb.array_struct_inner;
} }

View File

@ -0,0 +1,92 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
scalar_f16 : f16,
};
struct S {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
};
@binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1)
fn main() {
let scalar_f32 = sb.scalar_f32;
let scalar_i32 = sb.scalar_i32;
let scalar_u32 = sb.scalar_u32;
let scalar_f16 = sb.scalar_f16;
let vec2_f32 = sb.vec2_f32;
let vec2_i32 = sb.vec2_i32;
let vec2_u32 = sb.vec2_u32;
let vec2_f16 = sb.vec2_f16;
let vec3_f32 = sb.vec3_f32;
let vec3_i32 = sb.vec3_i32;
let vec3_u32 = sb.vec3_u32;
let vec3_f16 = sb.vec3_f16;
let vec4_f32 = sb.vec4_f32;
let vec4_i32 = sb.vec4_i32;
let vec4_u32 = sb.vec4_u32;
let vec4_f16 = sb.vec4_f16;
let mat2x2_f32 = sb.mat2x2_f32;
let mat2x3_f32 = sb.mat2x3_f32;
let mat2x4_f32 = sb.mat2x4_f32;
let mat3x2_f32 = sb.mat3x2_f32;
let mat3x3_f32 = sb.mat3x3_f32;
let mat3x4_f32 = sb.mat3x4_f32;
let mat4x2_f32 = sb.mat4x2_f32;
let mat4x3_f32 = sb.mat4x3_f32;
let mat4x4_f32 = sb.mat4x4_f32;
let mat2x2_f16 = sb.mat2x2_f16;
let mat2x3_f16 = sb.mat2x3_f16;
let mat2x4_f16 = sb.mat2x4_f16;
let mat3x2_f16 = sb.mat3x2_f16;
let mat3x3_f16 = sb.mat3x3_f16;
let mat3x4_f16 = sb.mat3x4_f16;
let mat4x2_f16 = sb.mat4x2_f16;
let mat4x3_f16 = sb.mat4x3_f16;
let mat4x4_f16 = sb.mat4x4_f16;
let arr2_vec3_f32 = sb.arr2_vec3_f32;
let arr2_mat4x2_f16 = sb.arr2_mat4x2_f16;
let struct_inner = sb.struct_inner;
let array_struct_inner = sb.array_struct_inner;
}

View File

@ -0,0 +1,160 @@
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
ByteAddressBuffer sb : register(t0, space0);
float2x2 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
}
float2x4 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
}
float3x3 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
}
float3x4 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
matrix<float16_t, 2, 2> tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
matrix<float16_t, 2, 3> tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
matrix<float16_t, 2, 4> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
}
matrix<float16_t, 3, 2> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
}
matrix<float16_t, 3, 3> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
}
matrix<float16_t, 3, 4> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
}
matrix<float16_t, 4, 2> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
}
matrix<float16_t, 4, 3> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
}
matrix<float16_t, 4, 4> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
}
typedef float3 tint_symbol_34_ret[2];
tint_symbol_34_ret tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
}
}
return arr;
}
typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
tint_symbol_35_ret tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
matrix<float16_t, 4, 2> arr_1[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
}
}
return arr_1;
}
Inner tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_38 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u))), buffer.Load<float16_t>((offset + 8u))};
return tint_symbol_38;
}
typedef Inner tint_symbol_37_ret[4];
tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
Inner arr_2[4] = (Inner[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
arr_2[i_2] = tint_symbol_36(buffer, (offset + (i_2 * 12u)));
}
}
return arr_2;
}
[numthreads(1, 1, 1)]
void main() {
const float scalar_f32 = asfloat(sb.Load(0u));
const int scalar_i32 = asint(sb.Load(4u));
const uint scalar_u32 = sb.Load(8u);
const float16_t scalar_f16 = sb.Load<float16_t>(12u);
const float2 vec2_f32 = asfloat(sb.Load2(16u));
const int2 vec2_i32 = asint(sb.Load2(24u));
const uint2 vec2_u32 = sb.Load2(32u);
const vector<float16_t, 2> vec2_f16 = sb.Load<vector<float16_t, 2> >(40u);
const float3 vec3_f32 = asfloat(sb.Load3(48u));
const int3 vec3_i32 = asint(sb.Load3(64u));
const uint3 vec3_u32 = sb.Load3(80u);
const vector<float16_t, 3> vec3_f16 = sb.Load<vector<float16_t, 3> >(96u);
const float4 vec4_f32 = asfloat(sb.Load4(112u));
const int4 vec4_i32 = asint(sb.Load4(128u));
const uint4 vec4_u32 = sb.Load4(144u);
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(160u);
const float2x2 mat2x2_f32 = tint_symbol_16(sb, 168u);
const float2x3 mat2x3_f32 = tint_symbol_17(sb, 192u);
const float2x4 mat2x4_f32 = tint_symbol_18(sb, 224u);
const float3x2 mat3x2_f32 = tint_symbol_19(sb, 256u);
const float3x3 mat3x3_f32 = tint_symbol_20(sb, 288u);
const float3x4 mat3x4_f32 = tint_symbol_21(sb, 336u);
const float4x2 mat4x2_f32 = tint_symbol_22(sb, 384u);
const float4x3 mat4x3_f32 = tint_symbol_23(sb, 416u);
const float4x4 mat4x4_f32 = tint_symbol_24(sb, 480u);
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(sb, 544u);
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(sb, 552u);
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(sb, 568u);
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(sb, 584u);
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(sb, 600u);
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(sb, 624u);
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(sb, 648u);
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(sb, 664u);
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(sb, 696u);
const float3 arr2_vec3_f32[2] = tint_symbol_34(sb, 736u);
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(sb, 768u);
const Inner struct_inner = tint_symbol_36(sb, 800u);
const Inner array_struct_inner[4] = tint_symbol_37(sb, 812u);
return;
}

View File

@ -0,0 +1,165 @@
SKIP: FAILED
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
ByteAddressBuffer sb : register(t0, space0);
float2x2 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
}
float2x3 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
}
float2x4 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
}
float3x2 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
}
float3x3 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
}
float3x4 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
}
float4x2 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
}
float4x3 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
}
float4x4 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
}
matrix<float16_t, 2, 2> tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
matrix<float16_t, 2, 3> tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
matrix<float16_t, 2, 4> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
}
matrix<float16_t, 3, 2> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
}
matrix<float16_t, 3, 3> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
}
matrix<float16_t, 3, 4> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
}
matrix<float16_t, 4, 2> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
}
matrix<float16_t, 4, 3> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
}
matrix<float16_t, 4, 4> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
}
typedef float3 tint_symbol_34_ret[2];
tint_symbol_34_ret tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
}
}
return arr;
}
typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
tint_symbol_35_ret tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
matrix<float16_t, 4, 2> arr_1[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
}
}
return arr_1;
}
Inner tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
const Inner tint_symbol_38 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u))), buffer.Load<float16_t>((offset + 8u))};
return tint_symbol_38;
}
typedef Inner tint_symbol_37_ret[4];
tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
Inner arr_2[4] = (Inner[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
arr_2[i_2] = tint_symbol_36(buffer, (offset + (i_2 * 12u)));
}
}
return arr_2;
}
[numthreads(1, 1, 1)]
void main() {
const float scalar_f32 = asfloat(sb.Load(0u));
const int scalar_i32 = asint(sb.Load(4u));
const uint scalar_u32 = sb.Load(8u);
const float16_t scalar_f16 = sb.Load<float16_t>(12u);
const float2 vec2_f32 = asfloat(sb.Load2(16u));
const int2 vec2_i32 = asint(sb.Load2(24u));
const uint2 vec2_u32 = sb.Load2(32u);
const vector<float16_t, 2> vec2_f16 = sb.Load<vector<float16_t, 2> >(40u);
const float3 vec3_f32 = asfloat(sb.Load3(48u));
const int3 vec3_i32 = asint(sb.Load3(64u));
const uint3 vec3_u32 = sb.Load3(80u);
const vector<float16_t, 3> vec3_f16 = sb.Load<vector<float16_t, 3> >(96u);
const float4 vec4_f32 = asfloat(sb.Load4(112u));
const int4 vec4_i32 = asint(sb.Load4(128u));
const uint4 vec4_u32 = sb.Load4(144u);
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(160u);
const float2x2 mat2x2_f32 = tint_symbol_16(sb, 168u);
const float2x3 mat2x3_f32 = tint_symbol_17(sb, 192u);
const float2x4 mat2x4_f32 = tint_symbol_18(sb, 224u);
const float3x2 mat3x2_f32 = tint_symbol_19(sb, 256u);
const float3x3 mat3x3_f32 = tint_symbol_20(sb, 288u);
const float3x4 mat3x4_f32 = tint_symbol_21(sb, 336u);
const float4x2 mat4x2_f32 = tint_symbol_22(sb, 384u);
const float4x3 mat4x3_f32 = tint_symbol_23(sb, 416u);
const float4x4 mat4x4_f32 = tint_symbol_24(sb, 480u);
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(sb, 544u);
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(sb, 552u);
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(sb, 568u);
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(sb, 584u);
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(sb, 600u);
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(sb, 624u);
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(sb, 648u);
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(sb, 664u);
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(sb, 696u);
const float3 arr2_vec3_f32[2] = tint_symbol_34(sb, 736u);
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(sb, 768u);
const Inner struct_inner = tint_symbol_36(sb, 800u);
const Inner array_struct_inner[4] = tint_symbol_37(sb, 812u);
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000002348228CC10(4,3-11): error X3000: unrecognized identifier 'float16_t'

View File

@ -0,0 +1,114 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
struct S {
float scalar_f32;
int scalar_i32;
uint scalar_u32;
float16_t scalar_f16;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
f16vec2 vec2_f16;
uint pad;
vec3 vec3_f32;
uint pad_1;
ivec3 vec3_i32;
uint pad_2;
uvec3 vec3_u32;
uint pad_3;
f16vec3 vec3_f16;
uint pad_4;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
mat2 mat2x2_f32;
uint pad_6;
uint pad_7;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_8;
uint pad_9;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
f16mat2 mat2x2_f16;
f16mat2x3 mat2x3_f16;
f16mat2x4 mat2x4_f16;
f16mat3x2 mat3x2_f16;
uint pad_10;
f16mat3 mat3x3_f16;
f16mat3x4 mat3x4_f16;
f16mat4x2 mat4x2_f16;
f16mat4x3 mat4x3_f16;
f16mat4 mat4x4_f16;
uint pad_11;
uint pad_12;
vec3 arr2_vec3_f32[2];
f16mat4x2 arr2_mat4x2_f16[2];
Inner struct_inner;
Inner array_struct_inner[4];
uint pad_13;
};
layout(binding = 0, std430) buffer sb_block_ssbo {
S inner;
} sb;
void tint_symbol() {
float scalar_f32 = sb.inner.scalar_f32;
int scalar_i32 = sb.inner.scalar_i32;
uint scalar_u32 = sb.inner.scalar_u32;
float16_t scalar_f16 = sb.inner.scalar_f16;
vec2 vec2_f32 = sb.inner.vec2_f32;
ivec2 vec2_i32 = sb.inner.vec2_i32;
uvec2 vec2_u32 = sb.inner.vec2_u32;
f16vec2 vec2_f16 = sb.inner.vec2_f16;
vec3 vec3_f32 = sb.inner.vec3_f32;
ivec3 vec3_i32 = sb.inner.vec3_i32;
uvec3 vec3_u32 = sb.inner.vec3_u32;
f16vec3 vec3_f16 = sb.inner.vec3_f16;
vec4 vec4_f32 = sb.inner.vec4_f32;
ivec4 vec4_i32 = sb.inner.vec4_i32;
uvec4 vec4_u32 = sb.inner.vec4_u32;
f16vec4 vec4_f16 = sb.inner.vec4_f16;
mat2 mat2x2_f32 = sb.inner.mat2x2_f32;
mat2x3 mat2x3_f32 = sb.inner.mat2x3_f32;
mat2x4 mat2x4_f32 = sb.inner.mat2x4_f32;
mat3x2 mat3x2_f32 = sb.inner.mat3x2_f32;
mat3 mat3x3_f32 = sb.inner.mat3x3_f32;
mat3x4 mat3x4_f32 = sb.inner.mat3x4_f32;
mat4x2 mat4x2_f32 = sb.inner.mat4x2_f32;
mat4x3 mat4x3_f32 = sb.inner.mat4x3_f32;
mat4 mat4x4_f32 = sb.inner.mat4x4_f32;
f16mat2 mat2x2_f16 = sb.inner.mat2x2_f16;
f16mat2x3 mat2x3_f16 = sb.inner.mat2x3_f16;
f16mat2x4 mat2x4_f16 = sb.inner.mat2x4_f16;
f16mat3x2 mat3x2_f16 = sb.inner.mat3x2_f16;
f16mat3 mat3x3_f16 = sb.inner.mat3x3_f16;
f16mat3x4 mat3x4_f16 = sb.inner.mat3x4_f16;
f16mat4x2 mat4x2_f16 = sb.inner.mat4x2_f16;
f16mat4x3 mat4x3_f16 = sb.inner.mat4x3_f16;
f16mat4 mat4x4_f16 = sb.inner.mat4x4_f16;
vec3 arr2_vec3_f32[2] = sb.inner.arr2_vec3_f32;
f16mat4x2 arr2_mat4x2_f16[2] = sb.inner.arr2_mat4x2_f16;
Inner struct_inner = sb.inner.struct_inner;
Inner array_struct_inner[4] = sb.inner.array_struct_inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol();
return;
}

View File

@ -0,0 +1,117 @@
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct Inner {
/* 0x0000 */ int scalar_i32;
/* 0x0004 */ float scalar_f32;
/* 0x0008 */ half scalar_f16;
/* 0x000a */ tint_array<int8_t, 2> tint_pad;
};
struct S {
/* 0x0000 */ float scalar_f32;
/* 0x0004 */ int scalar_i32;
/* 0x0008 */ uint scalar_u32;
/* 0x000c */ half scalar_f16;
/* 0x000e */ tint_array<int8_t, 2> tint_pad_1;
/* 0x0010 */ float2 vec2_f32;
/* 0x0018 */ int2 vec2_i32;
/* 0x0020 */ uint2 vec2_u32;
/* 0x0028 */ half2 vec2_f16;
/* 0x002c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0030 */ packed_float3 vec3_f32;
/* 0x003c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_5;
/* 0x0060 */ packed_half3 vec3_f16;
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_6;
/* 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_7;
/* 0x00c0 */ float2x3 mat2x3_f32;
/* 0x00e0 */ float2x4 mat2x4_f32;
/* 0x0100 */ float3x2 mat3x2_f32;
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_8;
/* 0x0120 */ float3x3 mat3x3_f32;
/* 0x0150 */ float3x4 mat3x4_f32;
/* 0x0180 */ float4x2 mat4x2_f32;
/* 0x01a0 */ float4x3 mat4x3_f32;
/* 0x01e0 */ float4x4 mat4x4_f32;
/* 0x0220 */ half2x2 mat2x2_f16;
/* 0x0228 */ half2x3 mat2x3_f16;
/* 0x0238 */ half2x4 mat2x4_f16;
/* 0x0248 */ half3x2 mat3x2_f16;
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_9;
/* 0x0258 */ half3x3 mat3x3_f16;
/* 0x0270 */ half3x4 mat3x4_f16;
/* 0x0288 */ half4x2 mat4x2_f16;
/* 0x0298 */ half4x3 mat4x3_f16;
/* 0x02b8 */ half4x4 mat4x4_f16;
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_10;
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
/* 0x0320 */ Inner struct_inner;
/* 0x032c */ tint_array<Inner, 4> array_struct_inner;
/* 0x035c */ tint_array<int8_t, 4> tint_pad_11;
};
kernel void tint_symbol(const device S* tint_symbol_1 [[buffer(0)]]) {
float const scalar_f32 = (*(tint_symbol_1)).scalar_f32;
int const scalar_i32 = (*(tint_symbol_1)).scalar_i32;
uint const scalar_u32 = (*(tint_symbol_1)).scalar_u32;
half const scalar_f16 = (*(tint_symbol_1)).scalar_f16;
float2 const vec2_f32 = (*(tint_symbol_1)).vec2_f32;
int2 const vec2_i32 = (*(tint_symbol_1)).vec2_i32;
uint2 const vec2_u32 = (*(tint_symbol_1)).vec2_u32;
half2 const vec2_f16 = (*(tint_symbol_1)).vec2_f16;
float3 const vec3_f32 = float3((*(tint_symbol_1)).vec3_f32);
int3 const vec3_i32 = int3((*(tint_symbol_1)).vec3_i32);
uint3 const vec3_u32 = uint3((*(tint_symbol_1)).vec3_u32);
half3 const vec3_f16 = half3((*(tint_symbol_1)).vec3_f16);
float4 const vec4_f32 = (*(tint_symbol_1)).vec4_f32;
int4 const vec4_i32 = (*(tint_symbol_1)).vec4_i32;
uint4 const vec4_u32 = (*(tint_symbol_1)).vec4_u32;
half4 const vec4_f16 = (*(tint_symbol_1)).vec4_f16;
float2x2 const mat2x2_f32 = (*(tint_symbol_1)).mat2x2_f32;
float2x3 const mat2x3_f32 = (*(tint_symbol_1)).mat2x3_f32;
float2x4 const mat2x4_f32 = (*(tint_symbol_1)).mat2x4_f32;
float3x2 const mat3x2_f32 = (*(tint_symbol_1)).mat3x2_f32;
float3x3 const mat3x3_f32 = (*(tint_symbol_1)).mat3x3_f32;
float3x4 const mat3x4_f32 = (*(tint_symbol_1)).mat3x4_f32;
float4x2 const mat4x2_f32 = (*(tint_symbol_1)).mat4x2_f32;
float4x3 const mat4x3_f32 = (*(tint_symbol_1)).mat4x3_f32;
float4x4 const mat4x4_f32 = (*(tint_symbol_1)).mat4x4_f32;
half2x2 const mat2x2_f16 = (*(tint_symbol_1)).mat2x2_f16;
half2x3 const mat2x3_f16 = (*(tint_symbol_1)).mat2x3_f16;
half2x4 const mat2x4_f16 = (*(tint_symbol_1)).mat2x4_f16;
half3x2 const mat3x2_f16 = (*(tint_symbol_1)).mat3x2_f16;
half3x3 const mat3x3_f16 = (*(tint_symbol_1)).mat3x3_f16;
half3x4 const mat3x4_f16 = (*(tint_symbol_1)).mat3x4_f16;
half4x2 const mat4x2_f16 = (*(tint_symbol_1)).mat4x2_f16;
half4x3 const mat4x3_f16 = (*(tint_symbol_1)).mat4x3_f16;
half4x4 const mat4x4_f16 = (*(tint_symbol_1)).mat4x4_f16;
tint_array<float3, 2> const arr2_vec3_f32 = (*(tint_symbol_1)).arr2_vec3_f32;
tint_array<half4x2, 2> const arr2_mat4x2_f16 = (*(tint_symbol_1)).arr2_mat4x2_f16;
Inner const struct_inner = (*(tint_symbol_1)).struct_inner;
tint_array<Inner, 4> const array_struct_inner = (*(tint_symbol_1)).array_struct_inner;
return;
}

View File

@ -0,0 +1,347 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 199
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %sb_block "sb_block"
OpMemberName %sb_block 0 "inner"
OpName %S "S"
OpMemberName %S 0 "scalar_f32"
OpMemberName %S 1 "scalar_i32"
OpMemberName %S 2 "scalar_u32"
OpMemberName %S 3 "scalar_f16"
OpMemberName %S 4 "vec2_f32"
OpMemberName %S 5 "vec2_i32"
OpMemberName %S 6 "vec2_u32"
OpMemberName %S 7 "vec2_f16"
OpMemberName %S 8 "vec3_f32"
OpMemberName %S 9 "vec3_i32"
OpMemberName %S 10 "vec3_u32"
OpMemberName %S 11 "vec3_f16"
OpMemberName %S 12 "vec4_f32"
OpMemberName %S 13 "vec4_i32"
OpMemberName %S 14 "vec4_u32"
OpMemberName %S 15 "vec4_f16"
OpMemberName %S 16 "mat2x2_f32"
OpMemberName %S 17 "mat2x3_f32"
OpMemberName %S 18 "mat2x4_f32"
OpMemberName %S 19 "mat3x2_f32"
OpMemberName %S 20 "mat3x3_f32"
OpMemberName %S 21 "mat3x4_f32"
OpMemberName %S 22 "mat4x2_f32"
OpMemberName %S 23 "mat4x3_f32"
OpMemberName %S 24 "mat4x4_f32"
OpMemberName %S 25 "mat2x2_f16"
OpMemberName %S 26 "mat2x3_f16"
OpMemberName %S 27 "mat2x4_f16"
OpMemberName %S 28 "mat3x2_f16"
OpMemberName %S 29 "mat3x3_f16"
OpMemberName %S 30 "mat3x4_f16"
OpMemberName %S 31 "mat4x2_f16"
OpMemberName %S 32 "mat4x3_f16"
OpMemberName %S 33 "mat4x4_f16"
OpMemberName %S 34 "arr2_vec3_f32"
OpMemberName %S 35 "arr2_mat4x2_f16"
OpMemberName %S 36 "struct_inner"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_i32"
OpMemberName %Inner 1 "scalar_f32"
OpMemberName %Inner 2 "scalar_f16"
OpMemberName %S 37 "array_struct_inner"
OpName %sb "sb"
OpName %main "main"
OpDecorate %sb_block Block
OpMemberDecorate %sb_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpMemberDecorate %S 3 Offset 12
OpMemberDecorate %S 4 Offset 16
OpMemberDecorate %S 5 Offset 24
OpMemberDecorate %S 6 Offset 32
OpMemberDecorate %S 7 Offset 40
OpMemberDecorate %S 8 Offset 48
OpMemberDecorate %S 9 Offset 64
OpMemberDecorate %S 10 Offset 80
OpMemberDecorate %S 11 Offset 96
OpMemberDecorate %S 12 Offset 112
OpMemberDecorate %S 13 Offset 128
OpMemberDecorate %S 14 Offset 144
OpMemberDecorate %S 15 Offset 160
OpMemberDecorate %S 16 Offset 168
OpMemberDecorate %S 16 ColMajor
OpMemberDecorate %S 16 MatrixStride 8
OpMemberDecorate %S 17 Offset 192
OpMemberDecorate %S 17 ColMajor
OpMemberDecorate %S 17 MatrixStride 16
OpMemberDecorate %S 18 Offset 224
OpMemberDecorate %S 18 ColMajor
OpMemberDecorate %S 18 MatrixStride 16
OpMemberDecorate %S 19 Offset 256
OpMemberDecorate %S 19 ColMajor
OpMemberDecorate %S 19 MatrixStride 8
OpMemberDecorate %S 20 Offset 288
OpMemberDecorate %S 20 ColMajor
OpMemberDecorate %S 20 MatrixStride 16
OpMemberDecorate %S 21 Offset 336
OpMemberDecorate %S 21 ColMajor
OpMemberDecorate %S 21 MatrixStride 16
OpMemberDecorate %S 22 Offset 384
OpMemberDecorate %S 22 ColMajor
OpMemberDecorate %S 22 MatrixStride 8
OpMemberDecorate %S 23 Offset 416
OpMemberDecorate %S 23 ColMajor
OpMemberDecorate %S 23 MatrixStride 16
OpMemberDecorate %S 24 Offset 480
OpMemberDecorate %S 24 ColMajor
OpMemberDecorate %S 24 MatrixStride 16
OpMemberDecorate %S 25 Offset 544
OpMemberDecorate %S 25 ColMajor
OpMemberDecorate %S 25 MatrixStride 4
OpMemberDecorate %S 26 Offset 552
OpMemberDecorate %S 26 ColMajor
OpMemberDecorate %S 26 MatrixStride 8
OpMemberDecorate %S 27 Offset 568
OpMemberDecorate %S 27 ColMajor
OpMemberDecorate %S 27 MatrixStride 8
OpMemberDecorate %S 28 Offset 584
OpMemberDecorate %S 28 ColMajor
OpMemberDecorate %S 28 MatrixStride 4
OpMemberDecorate %S 29 Offset 600
OpMemberDecorate %S 29 ColMajor
OpMemberDecorate %S 29 MatrixStride 8
OpMemberDecorate %S 30 Offset 624
OpMemberDecorate %S 30 ColMajor
OpMemberDecorate %S 30 MatrixStride 8
OpMemberDecorate %S 31 Offset 648
OpMemberDecorate %S 31 ColMajor
OpMemberDecorate %S 31 MatrixStride 4
OpMemberDecorate %S 32 Offset 664
OpMemberDecorate %S 32 ColMajor
OpMemberDecorate %S 32 MatrixStride 8
OpMemberDecorate %S 33 Offset 696
OpMemberDecorate %S 33 ColMajor
OpMemberDecorate %S 33 MatrixStride 8
OpMemberDecorate %S 34 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S 35 Offset 768
OpMemberDecorate %S 35 ColMajor
OpMemberDecorate %S 35 MatrixStride 4
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
OpMemberDecorate %S 36 Offset 800
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %S 37 Offset 812
OpDecorate %_arr_Inner_uint_4 ArrayStride 12
OpDecorate %sb NonWritable
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%half = OpTypeFloat 16
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v2half = OpTypeVector %half 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v3half = OpTypeVector %half 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%v4half = OpTypeVector %half 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%mat2v2half = OpTypeMatrix %v2half 2
%mat2v3half = OpTypeMatrix %v3half 2
%mat2v4half = OpTypeMatrix %v4half 2
%mat3v2half = OpTypeMatrix %v2half 3
%mat3v3half = OpTypeMatrix %v3half 3
%mat3v4half = OpTypeMatrix %v4half 3
%mat4v2half = OpTypeMatrix %v2half 4
%mat4v3half = OpTypeMatrix %v3half 4
%mat4v4half = OpTypeMatrix %v4half 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%Inner = OpTypeStruct %int %float %half
%uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %mat2v2half %mat2v3half %mat2v4half %mat3v2half %mat3v3half %mat3v4half %mat4v2half %mat4v3half %mat4v4half %_arr_v3float_uint_2 %_arr_mat4v2half_uint_2 %Inner %_arr_Inner_uint_4
%sb_block = OpTypeStruct %S
%_ptr_StorageBuffer_sb_block = OpTypePointer StorageBuffer %sb_block
%sb = OpVariable %_ptr_StorageBuffer_sb_block StorageBuffer
%void = OpTypeVoid
%45 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_24 = OpConstant %uint 24
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_25 = OpConstant %uint 25
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%uint_26 = OpConstant %uint 26
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%uint_27 = OpConstant %uint 27
%_ptr_StorageBuffer_mat2v4half = OpTypePointer StorageBuffer %mat2v4half
%uint_28 = OpConstant %uint 28
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%uint_29 = OpConstant %uint 29
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
%uint_30 = OpConstant %uint 30
%_ptr_StorageBuffer_mat3v4half = OpTypePointer StorageBuffer %mat3v4half
%uint_31 = OpConstant %uint 31
%_ptr_StorageBuffer_mat4v2half = OpTypePointer StorageBuffer %mat4v2half
%uint_32 = OpConstant %uint 32
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
%uint_33 = OpConstant %uint 33
%_ptr_StorageBuffer_mat4v4half = OpTypePointer StorageBuffer %mat4v4half
%uint_34 = OpConstant %uint 34
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%uint_35 = OpConstant %uint 35
%_ptr_StorageBuffer__arr_mat4v2half_uint_2 = OpTypePointer StorageBuffer %_arr_mat4v2half_uint_2
%uint_36 = OpConstant %uint 36
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner
%uint_37 = OpConstant %uint 37
%_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4
%main = OpFunction %void None %45
%48 = OpLabel
%51 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %uint_0
%52 = OpLoad %float %51
%55 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %uint_1
%56 = OpLoad %int %55
%58 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %uint_2
%59 = OpLoad %uint %58
%62 = OpAccessChain %_ptr_StorageBuffer_half %sb %uint_0 %uint_3
%63 = OpLoad %half %62
%65 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %uint_4
%66 = OpLoad %v2float %65
%69 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %uint_5
%70 = OpLoad %v2int %69
%73 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %uint_6
%74 = OpLoad %v2uint %73
%77 = OpAccessChain %_ptr_StorageBuffer_v2half %sb %uint_0 %uint_7
%78 = OpLoad %v2half %77
%81 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %uint_8
%82 = OpLoad %v3float %81
%85 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %uint_9
%86 = OpLoad %v3int %85
%89 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %uint_10
%90 = OpLoad %v3uint %89
%93 = OpAccessChain %_ptr_StorageBuffer_v3half %sb %uint_0 %uint_11
%94 = OpLoad %v3half %93
%97 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %uint_12
%98 = OpLoad %v4float %97
%101 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %uint_13
%102 = OpLoad %v4int %101
%105 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %uint_14
%106 = OpLoad %v4uint %105
%109 = OpAccessChain %_ptr_StorageBuffer_v4half %sb %uint_0 %uint_15
%110 = OpLoad %v4half %109
%113 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %uint_16
%114 = OpLoad %mat2v2float %113
%117 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %uint_17
%118 = OpLoad %mat2v3float %117
%121 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %uint_18
%122 = OpLoad %mat2v4float %121
%125 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %uint_19
%126 = OpLoad %mat3v2float %125
%129 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %uint_20
%130 = OpLoad %mat3v3float %129
%133 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %uint_21
%134 = OpLoad %mat3v4float %133
%137 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %uint_22
%138 = OpLoad %mat4v2float %137
%141 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %uint_23
%142 = OpLoad %mat4v3float %141
%145 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %uint_24
%146 = OpLoad %mat4v4float %145
%149 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %sb %uint_0 %uint_25
%150 = OpLoad %mat2v2half %149
%153 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %sb %uint_0 %uint_26
%154 = OpLoad %mat2v3half %153
%157 = OpAccessChain %_ptr_StorageBuffer_mat2v4half %sb %uint_0 %uint_27
%158 = OpLoad %mat2v4half %157
%161 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %sb %uint_0 %uint_28
%162 = OpLoad %mat3v2half %161
%165 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %sb %uint_0 %uint_29
%166 = OpLoad %mat3v3half %165
%169 = OpAccessChain %_ptr_StorageBuffer_mat3v4half %sb %uint_0 %uint_30
%170 = OpLoad %mat3v4half %169
%173 = OpAccessChain %_ptr_StorageBuffer_mat4v2half %sb %uint_0 %uint_31
%174 = OpLoad %mat4v2half %173
%177 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %sb %uint_0 %uint_32
%178 = OpLoad %mat4v3half %177
%181 = OpAccessChain %_ptr_StorageBuffer_mat4v4half %sb %uint_0 %uint_33
%182 = OpLoad %mat4v4half %181
%185 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %uint_34
%186 = OpLoad %_arr_v3float_uint_2 %185
%189 = OpAccessChain %_ptr_StorageBuffer__arr_mat4v2half_uint_2 %sb %uint_0 %uint_35
%190 = OpLoad %_arr_mat4v2half_uint_2 %189
%193 = OpAccessChain %_ptr_StorageBuffer_Inner %sb %uint_0 %uint_36
%194 = OpLoad %Inner %193
%197 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %sb %uint_0 %uint_37
%198 = OpLoad %_arr_Inner_uint_4 %197
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,92 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
scalar_f16 : f16,
}
struct S {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
}
@binding(0) @group(0) var<storage, read> sb : S;
@compute @workgroup_size(1)
fn main() {
let scalar_f32 = sb.scalar_f32;
let scalar_i32 = sb.scalar_i32;
let scalar_u32 = sb.scalar_u32;
let scalar_f16 = sb.scalar_f16;
let vec2_f32 = sb.vec2_f32;
let vec2_i32 = sb.vec2_i32;
let vec2_u32 = sb.vec2_u32;
let vec2_f16 = sb.vec2_f16;
let vec3_f32 = sb.vec3_f32;
let vec3_i32 = sb.vec3_i32;
let vec3_u32 = sb.vec3_u32;
let vec3_f16 = sb.vec3_f16;
let vec4_f32 = sb.vec4_f32;
let vec4_i32 = sb.vec4_i32;
let vec4_u32 = sb.vec4_u32;
let vec4_f16 = sb.vec4_f16;
let mat2x2_f32 = sb.mat2x2_f32;
let mat2x3_f32 = sb.mat2x3_f32;
let mat2x4_f32 = sb.mat2x4_f32;
let mat3x2_f32 = sb.mat3x2_f32;
let mat3x3_f32 = sb.mat3x3_f32;
let mat3x4_f32 = sb.mat3x4_f32;
let mat4x2_f32 = sb.mat4x2_f32;
let mat4x3_f32 = sb.mat4x3_f32;
let mat4x4_f32 = sb.mat4x4_f32;
let mat2x2_f16 = sb.mat2x2_f16;
let mat2x3_f16 = sb.mat2x3_f16;
let mat2x4_f16 = sb.mat2x4_f16;
let mat3x2_f16 = sb.mat3x2_f16;
let mat3x3_f16 = sb.mat3x3_f16;
let mat3x4_f16 = sb.mat3x4_f16;
let mat4x2_f16 = sb.mat4x2_f16;
let mat4x3_f16 = sb.mat4x3_f16;
let mat4x4_f16 = sb.mat4x4_f16;
let arr2_vec3_f32 = sb.arr2_vec3_f32;
let arr2_mat4x2_f16 = sb.arr2_mat4x2_f16;
let struct_inner = sb.struct_inner;
let array_struct_inner = sb.array_struct_inner;
}

View File

@ -1,32 +1,61 @@
struct Inner { struct Inner {
x : i32, scalar_i32 : i32,
scalar_f32 : f32,
}; };
struct S { struct S {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : Inner, vec3_u32 : vec3<u32>,
j : array<Inner, 4>, vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
}; };
@binding(0) @group(0) var<storage, read_write> s : S; @binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main() { fn main() {
s.a = vec3<i32>(); sb.scalar_f32 = f32();
s.b = i32(); sb.scalar_i32 = i32();
s.c = vec3<u32>(); sb.scalar_u32 = u32();
s.d = u32(); sb.vec2_f32 = vec2<f32>();
s.e = vec3<f32>(); sb.vec2_i32 = vec2<i32>();
s.f = f32(); sb.vec2_u32 = vec2<u32>();
s.g = mat2x3<f32>(); sb.vec3_f32 = vec3<f32>();
s.h = mat3x2<f32>(); sb.vec3_i32 = vec3<i32>();
s.i = Inner(); sb.vec3_u32 = vec3<u32>();
s.j = array<Inner, 4>(); sb.vec4_f32 = vec4<f32>();
sb.vec4_i32 = vec4<i32>();
sb.vec4_u32 = vec4<u32>();
sb.mat2x2_f32 = mat2x2<f32>();
sb.mat2x3_f32 = mat2x3<f32>();
sb.mat2x4_f32 = mat2x4<f32>();
sb.mat3x2_f32 = mat3x2<f32>();
sb.mat3x3_f32 = mat3x3<f32>();
sb.mat3x4_f32 = mat3x4<f32>();
sb.mat4x2_f32 = mat4x2<f32>();
sb.mat4x3_f32 = mat4x3<f32>();
sb.mat4x4_f32 = mat4x4<f32>();
sb.arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.struct_inner = Inner();
sb.array_struct_inner = array<Inner, 4>();
} }

View File

@ -1,46 +1,115 @@
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
RWByteAddressBuffer s : register(u0, space0); RWByteAddressBuffer sb : register(u0, space0);
void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, float2x3 value) { void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_13(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u])); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u])); buffer.Store3((offset + 16u), asuint(value[1u]));
} }
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, float3x2 value) { void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u])); buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u])); buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u])); buffer.Store2((offset + 16u), asuint(value[2u]));
} }
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) { void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store((offset + 0u), asuint(value.x)); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
} }
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, Inner value[4]) { void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
Inner array[4] = value; buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, Inner value) {
buffer.Store((offset + 0u), asuint(value.scalar_i32));
buffer.Store((offset + 4u), asuint(value.scalar_f32));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
Inner array_1[4] = value;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
tint_symbol_9(buffer, (offset + (i_1 * 4u)), array[i_1]); tint_symbol_22(buffer, (offset + (i_1 * 8u)), array_1[i_1]);
} }
} }
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]
void main() { void main() {
s.Store3(0u, asuint((0).xxx)); sb.Store(0u, asuint(0.0f));
s.Store(12u, asuint(0)); sb.Store(4u, asuint(0));
s.Store3(16u, asuint((0u).xxx)); sb.Store(8u, asuint(0u));
s.Store(28u, asuint(0u)); sb.Store2(16u, asuint((0.0f).xx));
s.Store3(32u, asuint((0.0f).xxx)); sb.Store2(24u, asuint((0).xx));
s.Store(44u, asuint(0.0f)); sb.Store2(32u, asuint((0u).xx));
tint_symbol_6(s, 48u, float2x3((0.0f).xxx, (0.0f).xxx)); sb.Store3(48u, asuint((0.0f).xxx));
tint_symbol_7(s, 80u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); sb.Store3(64u, asuint((0).xxx));
const Inner tint_symbol_11 = (Inner)0; sb.Store3(80u, asuint((0u).xxx));
tint_symbol_9(s, 104u, tint_symbol_11); sb.Store4(96u, asuint((0.0f).xxxx));
const Inner tint_symbol_12[4] = (Inner[4])0; sb.Store4(112u, asuint((0).xxxx));
tint_symbol_10(s, 108u, tint_symbol_12); sb.Store4(128u, asuint((0u).xxxx));
tint_symbol_12(sb, 144u, float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_13(sb, 160u, float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_14(sb, 192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_15(sb, 224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_16(sb, 256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_17(sb, 304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_18(sb, 352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_19(sb, 384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_20(sb, 448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
const float3 tint_symbol_24[2] = (float3[2])0;
tint_symbol_21(sb, 512u, tint_symbol_24);
const Inner tint_symbol_25 = (Inner)0;
tint_symbol_22(sb, 544u, tint_symbol_25);
const Inner tint_symbol_26[4] = (Inner[4])0;
tint_symbol_23(sb, 552u, tint_symbol_26);
return; return;
} }

View File

@ -1,46 +1,115 @@
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
RWByteAddressBuffer s : register(u0, space0); RWByteAddressBuffer sb : register(u0, space0);
void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, float2x3 value) { void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_13(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u])); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u])); buffer.Store3((offset + 16u), asuint(value[1u]));
} }
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, float3x2 value) { void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u])); buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u])); buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u])); buffer.Store2((offset + 16u), asuint(value[2u]));
} }
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) { void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store((offset + 0u), asuint(value.x)); buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
} }
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, Inner value[4]) { void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
Inner array[4] = value; buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, Inner value) {
buffer.Store((offset + 0u), asuint(value.scalar_i32));
buffer.Store((offset + 4u), asuint(value.scalar_f32));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
Inner array_1[4] = value;
{ {
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
tint_symbol_9(buffer, (offset + (i_1 * 4u)), array[i_1]); tint_symbol_22(buffer, (offset + (i_1 * 8u)), array_1[i_1]);
} }
} }
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]
void main() { void main() {
s.Store3(0u, asuint((0).xxx)); sb.Store(0u, asuint(0.0f));
s.Store(12u, asuint(0)); sb.Store(4u, asuint(0));
s.Store3(16u, asuint((0u).xxx)); sb.Store(8u, asuint(0u));
s.Store(28u, asuint(0u)); sb.Store2(16u, asuint((0.0f).xx));
s.Store3(32u, asuint((0.0f).xxx)); sb.Store2(24u, asuint((0).xx));
s.Store(44u, asuint(0.0f)); sb.Store2(32u, asuint((0u).xx));
tint_symbol_6(s, 48u, float2x3((0.0f).xxx, (0.0f).xxx)); sb.Store3(48u, asuint((0.0f).xxx));
tint_symbol_7(s, 80u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); sb.Store3(64u, asuint((0).xxx));
const Inner tint_symbol_11 = (Inner)0; sb.Store3(80u, asuint((0u).xxx));
tint_symbol_9(s, 104u, tint_symbol_11); sb.Store4(96u, asuint((0.0f).xxxx));
const Inner tint_symbol_12[4] = (Inner[4])0; sb.Store4(112u, asuint((0).xxxx));
tint_symbol_10(s, 108u, tint_symbol_12); sb.Store4(128u, asuint((0u).xxxx));
tint_symbol_12(sb, 144u, float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_13(sb, 160u, float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_14(sb, 192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_15(sb, 224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_16(sb, 256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_17(sb, 304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_18(sb, 352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_19(sb, 384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_20(sb, 448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
const float3 tint_symbol_24[2] = (float3[2])0;
tint_symbol_21(sb, 512u, tint_symbol_24);
const Inner tint_symbol_25 = (Inner)0;
tint_symbol_22(sb, 544u, tint_symbol_25);
const Inner tint_symbol_26[4] = (Inner[4])0;
tint_symbol_23(sb, 552u, tint_symbol_26);
return; return;
} }

View File

@ -1,40 +1,79 @@
#version 310 es #version 310 es
struct Inner { struct Inner {
int x; int scalar_i32;
float scalar_f32;
}; };
struct S { struct S {
ivec3 a; float scalar_f32;
int b; int scalar_i32;
uvec3 c; uint scalar_u32;
uint d;
vec3 e;
float f;
mat2x3 g;
mat3x2 h;
Inner i;
Inner j[4];
uint pad; uint pad;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_1;
uint pad_2;
vec3 vec3_f32;
uint pad_3;
ivec3 vec3_i32;
uint pad_4;
uvec3 vec3_u32;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
mat2 mat2x2_f32;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_6;
uint pad_7;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
vec3 arr2_vec3_f32[2];
Inner struct_inner;
Inner array_struct_inner[4];
uint pad_8;
uint pad_9;
}; };
layout(binding = 0, std430) buffer s_block_ssbo { layout(binding = 0, std430) buffer sb_block_ssbo {
S inner; S inner;
} s; } sb;
void tint_symbol() { void tint_symbol() {
s.inner.a = ivec3(0); sb.inner.scalar_f32 = 0.0f;
s.inner.b = 0; sb.inner.scalar_i32 = 0;
s.inner.c = uvec3(0u); sb.inner.scalar_u32 = 0u;
s.inner.d = 0u; sb.inner.vec2_f32 = vec2(0.0f);
s.inner.e = vec3(0.0f); sb.inner.vec2_i32 = ivec2(0);
s.inner.f = 0.0f; sb.inner.vec2_u32 = uvec2(0u);
s.inner.g = mat2x3(vec3(0.0f), vec3(0.0f)); sb.inner.vec3_f32 = vec3(0.0f);
s.inner.h = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); sb.inner.vec3_i32 = ivec3(0);
Inner tint_symbol_1 = Inner(0); sb.inner.vec3_u32 = uvec3(0u);
s.inner.i = tint_symbol_1; sb.inner.vec4_f32 = vec4(0.0f);
Inner tint_symbol_2[4] = Inner[4](Inner(0), Inner(0), Inner(0), Inner(0)); sb.inner.vec4_i32 = ivec4(0);
s.inner.j = tint_symbol_2; sb.inner.vec4_u32 = uvec4(0u);
sb.inner.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
sb.inner.mat2x3_f32 = mat2x3(vec3(0.0f), vec3(0.0f));
sb.inner.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
sb.inner.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.inner.mat3x3_f32 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.inner.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.inner.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.inner.mat4x3_f32 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.inner.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
vec3 tint_symbol_1[2] = vec3[2](vec3(0.0f), vec3(0.0f));
sb.inner.arr2_vec3_f32 = tint_symbol_1;
Inner tint_symbol_2 = Inner(0, 0.0f);
sb.inner.struct_inner = tint_symbol_2;
Inner tint_symbol_3[4] = Inner[4](Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f));
sb.inner.array_struct_inner = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -15,36 +15,72 @@ struct tint_array {
}; };
struct Inner { struct Inner {
/* 0x0000 */ int x; /* 0x0000 */ int scalar_i32;
/* 0x0004 */ float scalar_f32;
}; };
struct S { struct S {
/* 0x0000 */ packed_int3 a; /* 0x0000 */ float scalar_f32;
/* 0x000c */ int b; /* 0x0004 */ int scalar_i32;
/* 0x0010 */ packed_uint3 c; /* 0x0008 */ uint scalar_u32;
/* 0x001c */ uint d; /* 0x000c */ tint_array<int8_t, 4> tint_pad;
/* 0x0020 */ packed_float3 e; /* 0x0010 */ float2 vec2_f32;
/* 0x002c */ float f; /* 0x0018 */ int2 vec2_i32;
/* 0x0030 */ float2x3 g; /* 0x0020 */ uint2 vec2_u32;
/* 0x0050 */ float3x2 h; /* 0x0028 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0068 */ Inner i; /* 0x0030 */ packed_float3 vec3_f32;
/* 0x006c */ tint_array<Inner, 4> j; /* 0x003c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x007c */ tint_array<int8_t, 4> tint_pad; /* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0060 */ float4 vec4_f32;
/* 0x0070 */ int4 vec4_i32;
/* 0x0080 */ uint4 vec4_u32;
/* 0x0090 */ float2x2 mat2x2_f32;
/* 0x00a0 */ float2x3 mat2x3_f32;
/* 0x00c0 */ float2x4 mat2x4_f32;
/* 0x00e0 */ float3x2 mat3x2_f32;
/* 0x00f8 */ tint_array<int8_t, 8> tint_pad_5;
/* 0x0100 */ float3x3 mat3x3_f32;
/* 0x0130 */ float3x4 mat3x4_f32;
/* 0x0160 */ float4x2 mat4x2_f32;
/* 0x0180 */ float4x3 mat4x3_f32;
/* 0x01c0 */ float4x4 mat4x4_f32;
/* 0x0200 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0220 */ Inner struct_inner;
/* 0x0228 */ tint_array<Inner, 4> array_struct_inner;
/* 0x0248 */ tint_array<int8_t, 8> tint_pad_6;
}; };
kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]]) { kernel void tint_symbol(device S* tint_symbol_4 [[buffer(0)]]) {
(*(tint_symbol_3)).a = int3(0); (*(tint_symbol_4)).scalar_f32 = 0.0f;
(*(tint_symbol_3)).b = 0; (*(tint_symbol_4)).scalar_i32 = 0;
(*(tint_symbol_3)).c = uint3(0u); (*(tint_symbol_4)).scalar_u32 = 0u;
(*(tint_symbol_3)).d = 0u; (*(tint_symbol_4)).vec2_f32 = float2(0.0f);
(*(tint_symbol_3)).e = float3(0.0f); (*(tint_symbol_4)).vec2_i32 = int2(0);
(*(tint_symbol_3)).f = 0.0f; (*(tint_symbol_4)).vec2_u32 = uint2(0u);
(*(tint_symbol_3)).g = float2x3(float3(0.0f), float3(0.0f)); (*(tint_symbol_4)).vec3_f32 = float3(0.0f);
(*(tint_symbol_3)).h = float3x2(float2(0.0f), float2(0.0f), float2(0.0f)); (*(tint_symbol_4)).vec3_i32 = int3(0);
Inner const tint_symbol_1 = Inner{}; (*(tint_symbol_4)).vec3_u32 = uint3(0u);
(*(tint_symbol_3)).i = tint_symbol_1; (*(tint_symbol_4)).vec4_f32 = float4(0.0f);
tint_array<Inner, 4> const tint_symbol_2 = tint_array<Inner, 4>{}; (*(tint_symbol_4)).vec4_i32 = int4(0);
(*(tint_symbol_3)).j = tint_symbol_2; (*(tint_symbol_4)).vec4_u32 = uint4(0u);
(*(tint_symbol_4)).mat2x2_f32 = float2x2(float2(0.0f), float2(0.0f));
(*(tint_symbol_4)).mat2x3_f32 = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_4)).mat2x4_f32 = float2x4(float4(0.0f), float4(0.0f));
(*(tint_symbol_4)).mat3x2_f32 = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_4)).mat3x3_f32 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_4)).mat3x4_f32 = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_4)).mat4x2_f32 = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_4)).mat4x3_f32 = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_4)).mat4x4_f32 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
tint_array<float3, 2> const tint_symbol_1 = tint_array<float3, 2>{};
(*(tint_symbol_4)).arr2_vec3_f32 = tint_symbol_1;
Inner const tint_symbol_2 = Inner{};
(*(tint_symbol_4)).struct_inner = tint_symbol_2;
tint_array<Inner, 4> const tint_symbol_3 = tint_array<Inner, 4>{};
(*(tint_symbol_4)).array_struct_inner = tint_symbol_3;
return; return;
} }

View File

@ -1,117 +1,245 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 60 ; Bound: 129
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1 OpExecutionMode %main LocalSize 1 1 1
OpName %s_block "s_block" OpName %sb_block "sb_block"
OpMemberName %s_block 0 "inner" OpMemberName %sb_block 0 "inner"
OpName %S "S" OpName %S "S"
OpMemberName %S 0 "a" OpMemberName %S 0 "scalar_f32"
OpMemberName %S 1 "b" OpMemberName %S 1 "scalar_i32"
OpMemberName %S 2 "c" OpMemberName %S 2 "scalar_u32"
OpMemberName %S 3 "d" OpMemberName %S 3 "vec2_f32"
OpMemberName %S 4 "e" OpMemberName %S 4 "vec2_i32"
OpMemberName %S 5 "f" OpMemberName %S 5 "vec2_u32"
OpMemberName %S 6 "g" OpMemberName %S 6 "vec3_f32"
OpMemberName %S 7 "h" OpMemberName %S 7 "vec3_i32"
OpMemberName %S 8 "i" OpMemberName %S 8 "vec3_u32"
OpMemberName %S 9 "vec4_f32"
OpMemberName %S 10 "vec4_i32"
OpMemberName %S 11 "vec4_u32"
OpMemberName %S 12 "mat2x2_f32"
OpMemberName %S 13 "mat2x3_f32"
OpMemberName %S 14 "mat2x4_f32"
OpMemberName %S 15 "mat3x2_f32"
OpMemberName %S 16 "mat3x3_f32"
OpMemberName %S 17 "mat3x4_f32"
OpMemberName %S 18 "mat4x2_f32"
OpMemberName %S 19 "mat4x3_f32"
OpMemberName %S 20 "mat4x4_f32"
OpMemberName %S 21 "arr2_vec3_f32"
OpMemberName %S 22 "struct_inner"
OpName %Inner "Inner" OpName %Inner "Inner"
OpMemberName %Inner 0 "x" OpMemberName %Inner 0 "scalar_i32"
OpMemberName %S 9 "j" OpMemberName %Inner 1 "scalar_f32"
OpName %s "s" OpMemberName %S 23 "array_struct_inner"
OpName %sb "sb"
OpName %main "main" OpName %main "main"
OpDecorate %s_block Block OpDecorate %sb_block Block
OpMemberDecorate %s_block 0 Offset 0 OpMemberDecorate %sb_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0 OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 12 OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 16 OpMemberDecorate %S 2 Offset 8
OpMemberDecorate %S 3 Offset 28 OpMemberDecorate %S 3 Offset 16
OpMemberDecorate %S 4 Offset 32 OpMemberDecorate %S 4 Offset 24
OpMemberDecorate %S 5 Offset 44 OpMemberDecorate %S 5 Offset 32
OpMemberDecorate %S 6 Offset 48 OpMemberDecorate %S 6 Offset 48
OpMemberDecorate %S 6 ColMajor OpMemberDecorate %S 7 Offset 64
OpMemberDecorate %S 6 MatrixStride 16 OpMemberDecorate %S 8 Offset 80
OpMemberDecorate %S 7 Offset 80 OpMemberDecorate %S 9 Offset 96
OpMemberDecorate %S 7 ColMajor OpMemberDecorate %S 10 Offset 112
OpMemberDecorate %S 7 MatrixStride 8 OpMemberDecorate %S 11 Offset 128
OpMemberDecorate %S 8 Offset 104 OpMemberDecorate %S 12 Offset 144
OpMemberDecorate %S 12 ColMajor
OpMemberDecorate %S 12 MatrixStride 8
OpMemberDecorate %S 13 Offset 160
OpMemberDecorate %S 13 ColMajor
OpMemberDecorate %S 13 MatrixStride 16
OpMemberDecorate %S 14 Offset 192
OpMemberDecorate %S 14 ColMajor
OpMemberDecorate %S 14 MatrixStride 16
OpMemberDecorate %S 15 Offset 224
OpMemberDecorate %S 15 ColMajor
OpMemberDecorate %S 15 MatrixStride 8
OpMemberDecorate %S 16 Offset 256
OpMemberDecorate %S 16 ColMajor
OpMemberDecorate %S 16 MatrixStride 16
OpMemberDecorate %S 17 Offset 304
OpMemberDecorate %S 17 ColMajor
OpMemberDecorate %S 17 MatrixStride 16
OpMemberDecorate %S 18 Offset 352
OpMemberDecorate %S 18 ColMajor
OpMemberDecorate %S 18 MatrixStride 8
OpMemberDecorate %S 19 Offset 384
OpMemberDecorate %S 19 ColMajor
OpMemberDecorate %S 19 MatrixStride 16
OpMemberDecorate %S 20 Offset 448
OpMemberDecorate %S 20 ColMajor
OpMemberDecorate %S 20 MatrixStride 16
OpMemberDecorate %S 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S 22 Offset 544
OpMemberDecorate %Inner 0 Offset 0 OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %S 9 Offset 108 OpMemberDecorate %Inner 1 Offset 4
OpDecorate %_arr_Inner_uint_4 ArrayStride 4 OpMemberDecorate %S 23 Offset 552
OpDecorate %s Binding 0 OpDecorate %_arr_Inner_uint_4 ArrayStride 8
OpDecorate %s DescriptorSet 0 OpDecorate %sb Binding 0
%int = OpTypeInt 32 1 OpDecorate %sb DescriptorSet 0
%v3int = OpTypeVector %int 3
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%float = OpTypeFloat 32 %float = OpTypeFloat 32
%v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1
%mat2v3float = OpTypeMatrix %v3float 2 %uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3 %mat3v2float = OpTypeMatrix %v2float 3
%Inner = OpTypeStruct %int %mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %int %float
%uint_4 = OpConstant %uint 4 %uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4 %_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S = OpTypeStruct %v3int %int %v3uint %uint %v3float %float %mat2v3float %mat3v2float %Inner %_arr_Inner_uint_4 %S = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2 %Inner %_arr_Inner_uint_4
%s_block = OpTypeStruct %S %sb_block = OpTypeStruct %S
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block %_ptr_StorageBuffer_sb_block = OpTypePointer StorageBuffer %sb_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer %sb = OpVariable %_ptr_StorageBuffer_sb_block StorageBuffer
%void = OpTypeVoid %void = OpTypeVoid
%17 = OpTypeFunction %void %31 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0 %uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%24 = OpConstantNull %v3int %38 = OpConstantNull %float
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%28 = OpConstantNull %int %42 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%32 = OpConstantNull %v3uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%36 = OpConstantNull %uint %45 = OpConstantNull %uint
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float %uint_3 = OpConstant %uint 3
%39 = OpConstantNull %v3float %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%49 = OpConstantNull %v2float
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%52 = OpConstantNull %v2int
%uint_5 = OpConstant %uint 5 %uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float %_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%43 = OpConstantNull %float %56 = OpConstantNull %v2uint
%uint_6 = OpConstant %uint 6 %uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%47 = OpConstantNull %mat2v3float %60 = OpConstantNull %v3float
%uint_7 = OpConstant %uint 7 %uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float %_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%51 = OpConstantNull %mat3v2float %64 = OpConstantNull %v3int
%uint_8 = OpConstant %uint 8 %uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%55 = OpConstantNull %Inner %68 = OpConstantNull %v3uint
%uint_9 = OpConstant %uint 9 %uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%72 = OpConstantNull %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%76 = OpConstantNull %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%80 = OpConstantNull %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%84 = OpConstantNull %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%88 = OpConstantNull %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%92 = OpConstantNull %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%96 = OpConstantNull %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%100 = OpConstantNull %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%104 = OpConstantNull %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%108 = OpConstantNull %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%112 = OpConstantNull %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%116 = OpConstantNull %mat4v4float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%120 = OpConstantNull %_arr_v3float_uint_2
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner
%124 = OpConstantNull %Inner
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4 %_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4
%59 = OpConstantNull %_arr_Inner_uint_4 %128 = OpConstantNull %_arr_Inner_uint_4
%main = OpFunction %void None %17 %main = OpFunction %void None %31
%20 = OpLabel %34 = OpLabel
%23 = OpAccessChain %_ptr_StorageBuffer_v3int %s %uint_0 %uint_0 %37 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %uint_0
OpStore %23 %24 OpStore %37 %38
%27 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %uint_1 %41 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %uint_1
OpStore %27 %28 OpStore %41 %42
%31 = OpAccessChain %_ptr_StorageBuffer_v3uint %s %uint_0 %uint_2 %44 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %uint_2
OpStore %31 %32 OpStore %44 %45
%35 = OpAccessChain %_ptr_StorageBuffer_uint %s %uint_0 %uint_3 %48 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %uint_3
OpStore %35 %36 OpStore %48 %49
%38 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %uint_4 %51 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %uint_4
OpStore %38 %39 OpStore %51 %52
%42 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_5 %55 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %uint_5
OpStore %42 %43 OpStore %55 %56
%46 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %uint_6 %59 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %uint_6
OpStore %46 %47 OpStore %59 %60
%50 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %s %uint_0 %uint_7 %63 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %uint_7
OpStore %50 %51 OpStore %63 %64
%54 = OpAccessChain %_ptr_StorageBuffer_Inner %s %uint_0 %uint_8 %67 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %uint_8
OpStore %54 %55 OpStore %67 %68
%58 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %s %uint_0 %uint_9 %71 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %uint_9
OpStore %58 %59 OpStore %71 %72
%75 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %uint_10
OpStore %75 %76
%79 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %uint_11
OpStore %79 %80
%83 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %uint_12
OpStore %83 %84
%87 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %uint_13
OpStore %87 %88
%91 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %uint_14
OpStore %91 %92
%95 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %uint_15
OpStore %95 %96
%99 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %uint_16
OpStore %99 %100
%103 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %uint_17
OpStore %103 %104
%107 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %uint_18
OpStore %107 %108
%111 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %uint_19
OpStore %111 %112
%115 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %uint_20
OpStore %115 %116
%119 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %uint_21
OpStore %119 %120
%123 = OpAccessChain %_ptr_StorageBuffer_Inner %sb %uint_0 %uint_22
OpStore %123 %124
%127 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %sb %uint_0 %uint_23
OpStore %127 %128
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,32 +1,61 @@
struct Inner { struct Inner {
x : i32, scalar_i32 : i32,
scalar_f32 : f32,
} }
struct S { struct S {
a : vec3<i32>, scalar_f32 : f32,
b : i32, scalar_i32 : i32,
c : vec3<u32>, scalar_u32 : u32,
d : u32, vec2_f32 : vec2<f32>,
e : vec3<f32>, vec2_i32 : vec2<i32>,
f : f32, vec2_u32 : vec2<u32>,
g : mat2x3<f32>, vec3_f32 : vec3<f32>,
h : mat3x2<f32>, vec3_i32 : vec3<i32>,
i : Inner, vec3_u32 : vec3<u32>,
j : array<Inner, 4>, vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
} }
@binding(0) @group(0) var<storage, read_write> s : S; @binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1) @compute @workgroup_size(1)
fn main() { fn main() {
s.a = vec3<i32>(); sb.scalar_f32 = f32();
s.b = i32(); sb.scalar_i32 = i32();
s.c = vec3<u32>(); sb.scalar_u32 = u32();
s.d = u32(); sb.vec2_f32 = vec2<f32>();
s.e = vec3<f32>(); sb.vec2_i32 = vec2<i32>();
s.f = f32(); sb.vec2_u32 = vec2<u32>();
s.g = mat2x3<f32>(); sb.vec3_f32 = vec3<f32>();
s.h = mat3x2<f32>(); sb.vec3_i32 = vec3<i32>();
s.i = Inner(); sb.vec3_u32 = vec3<u32>();
s.j = array<Inner, 4>(); sb.vec4_f32 = vec4<f32>();
sb.vec4_i32 = vec4<i32>();
sb.vec4_u32 = vec4<u32>();
sb.mat2x2_f32 = mat2x2<f32>();
sb.mat2x3_f32 = mat2x3<f32>();
sb.mat2x4_f32 = mat2x4<f32>();
sb.mat3x2_f32 = mat3x2<f32>();
sb.mat3x3_f32 = mat3x3<f32>();
sb.mat3x4_f32 = mat3x4<f32>();
sb.mat4x2_f32 = mat4x2<f32>();
sb.mat4x3_f32 = mat4x3<f32>();
sb.mat4x4_f32 = mat4x4<f32>();
sb.arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.struct_inner = Inner();
sb.array_struct_inner = array<Inner, 4>();
} }

View File

@ -0,0 +1,92 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
scalar_f16 : f16,
};
struct S {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
};
@binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1)
fn main() {
sb.scalar_f32 = f32();
sb.scalar_i32 = i32();
sb.scalar_u32 = u32();
sb.scalar_f16 = f16();
sb.vec2_f32 = vec2<f32>();
sb.vec2_i32 = vec2<i32>();
sb.vec2_u32 = vec2<u32>();
sb.vec2_f16 = vec2<f16>();
sb.vec3_f32 = vec3<f32>();
sb.vec3_i32 = vec3<i32>();
sb.vec3_u32 = vec3<u32>();
sb.vec3_f16 = vec3<f16>();
sb.vec4_f32 = vec4<f32>();
sb.vec4_i32 = vec4<i32>();
sb.vec4_u32 = vec4<u32>();
sb.vec4_f16 = vec4<f16>();
sb.mat2x2_f32 = mat2x2<f32>();
sb.mat2x3_f32 = mat2x3<f32>();
sb.mat2x4_f32 = mat2x4<f32>();
sb.mat3x2_f32 = mat3x2<f32>();
sb.mat3x3_f32 = mat3x3<f32>();
sb.mat3x4_f32 = mat3x4<f32>();
sb.mat4x2_f32 = mat4x2<f32>();
sb.mat4x3_f32 = mat4x3<f32>();
sb.mat4x4_f32 = mat4x4<f32>();
sb.mat2x2_f16 = mat2x2<f16>();
sb.mat2x3_f16 = mat2x3<f16>();
sb.mat2x4_f16 = mat2x4<f16>();
sb.mat3x2_f16 = mat3x2<f16>();
sb.mat3x3_f16 = mat3x3<f16>();
sb.mat3x4_f16 = mat3x4<f16>();
sb.mat4x2_f16 = mat4x2<f16>();
sb.mat4x3_f16 = mat4x3<f16>();
sb.mat4x4_f16 = mat4x4<f16>();
sb.arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.arr2_mat4x2_f16 = array<mat4x2<f16>, 2>();
sb.struct_inner = Inner();
sb.array_struct_inner = array<Inner, 4>();
}

View File

@ -0,0 +1,195 @@
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
RWByteAddressBuffer sb : register(u0, space0);
void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
}
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
tint_symbol_31(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, Inner value) {
buffer.Store((offset + 0u), asuint(value.scalar_i32));
buffer.Store((offset + 4u), asuint(value.scalar_f32));
buffer.Store<float16_t>((offset + 8u), value.scalar_f16);
}
void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
Inner array_2[4] = value;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
tint_symbol_36(buffer, (offset + (i_2 * 12u)), array_2[i_2]);
}
}
}
[numthreads(1, 1, 1)]
void main() {
sb.Store(0u, asuint(0.0f));
sb.Store(4u, asuint(0));
sb.Store(8u, asuint(0u));
sb.Store<float16_t>(12u, float16_t(0.0h));
sb.Store2(16u, asuint((0.0f).xx));
sb.Store2(24u, asuint((0).xx));
sb.Store2(32u, asuint((0u).xx));
sb.Store<vector<float16_t, 2> >(40u, (float16_t(0.0h)).xx);
sb.Store3(48u, asuint((0.0f).xxx));
sb.Store3(64u, asuint((0).xxx));
sb.Store3(80u, asuint((0u).xxx));
sb.Store<vector<float16_t, 3> >(96u, (float16_t(0.0h)).xxx);
sb.Store4(112u, asuint((0.0f).xxxx));
sb.Store4(128u, asuint((0).xxxx));
sb.Store4(144u, asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(160u, (float16_t(0.0h)).xxxx);
tint_symbol_16(sb, 168u, float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_17(sb, 192u, float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_18(sb, 224u, float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_19(sb, 256u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_20(sb, 288u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_21(sb, 336u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_22(sb, 384u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_23(sb, 416u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_24(sb, 480u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_25(sb, 544u, matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_26(sb, 552u, matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_27(sb, 568u, matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_28(sb, 584u, matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_29(sb, 600u, matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_30(sb, 624u, matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_31(sb, 648u, matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_32(sb, 664u, matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_33(sb, 696u, matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
const float3 tint_symbol_38[2] = (float3[2])0;
tint_symbol_34(sb, 736u, tint_symbol_38);
const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
tint_symbol_35(sb, 768u, tint_symbol_39);
const Inner tint_symbol_40 = (Inner)0;
tint_symbol_36(sb, 800u, tint_symbol_40);
const Inner tint_symbol_41[4] = (Inner[4])0;
tint_symbol_37(sb, 812u, tint_symbol_41);
return;
}

View File

@ -0,0 +1,200 @@
SKIP: FAILED
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
RWByteAddressBuffer sb : register(u0, space0);
void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
}
void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
}
void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
}
void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
}
void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
}
void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
}
void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
buffer.Store2((offset + 0u), asuint(value[0u]));
buffer.Store2((offset + 8u), asuint(value[1u]));
buffer.Store2((offset + 16u), asuint(value[2u]));
buffer.Store2((offset + 24u), asuint(value[3u]));
}
void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
buffer.Store3((offset + 0u), asuint(value[0u]));
buffer.Store3((offset + 16u), asuint(value[1u]));
buffer.Store3((offset + 32u), asuint(value[2u]));
buffer.Store3((offset + 48u), asuint(value[3u]));
}
void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
buffer.Store4((offset + 0u), asuint(value[0u]));
buffer.Store4((offset + 16u), asuint(value[1u]));
buffer.Store4((offset + 32u), asuint(value[2u]));
buffer.Store4((offset + 48u), asuint(value[3u]));
}
void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
float3 array[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
buffer.Store3((offset + (i * 16u)), asuint(array[i]));
}
}
}
void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
tint_symbol_31(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, Inner value) {
buffer.Store((offset + 0u), asuint(value.scalar_i32));
buffer.Store((offset + 4u), asuint(value.scalar_f32));
buffer.Store<float16_t>((offset + 8u), value.scalar_f16);
}
void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
Inner array_2[4] = value;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
tint_symbol_36(buffer, (offset + (i_2 * 12u)), array_2[i_2]);
}
}
}
[numthreads(1, 1, 1)]
void main() {
sb.Store(0u, asuint(0.0f));
sb.Store(4u, asuint(0));
sb.Store(8u, asuint(0u));
sb.Store<float16_t>(12u, float16_t(0.0h));
sb.Store2(16u, asuint((0.0f).xx));
sb.Store2(24u, asuint((0).xx));
sb.Store2(32u, asuint((0u).xx));
sb.Store<vector<float16_t, 2> >(40u, (float16_t(0.0h)).xx);
sb.Store3(48u, asuint((0.0f).xxx));
sb.Store3(64u, asuint((0).xxx));
sb.Store3(80u, asuint((0u).xxx));
sb.Store<vector<float16_t, 3> >(96u, (float16_t(0.0h)).xxx);
sb.Store4(112u, asuint((0.0f).xxxx));
sb.Store4(128u, asuint((0).xxxx));
sb.Store4(144u, asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(160u, (float16_t(0.0h)).xxxx);
tint_symbol_16(sb, 168u, float2x2((0.0f).xx, (0.0f).xx));
tint_symbol_17(sb, 192u, float2x3((0.0f).xxx, (0.0f).xxx));
tint_symbol_18(sb, 224u, float2x4((0.0f).xxxx, (0.0f).xxxx));
tint_symbol_19(sb, 256u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_20(sb, 288u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_21(sb, 336u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_22(sb, 384u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
tint_symbol_23(sb, 416u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
tint_symbol_24(sb, 480u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
tint_symbol_25(sb, 544u, matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_26(sb, 552u, matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_27(sb, 568u, matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_28(sb, 584u, matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_29(sb, 600u, matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_30(sb, 624u, matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
tint_symbol_31(sb, 648u, matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
tint_symbol_32(sb, 664u, matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
tint_symbol_33(sb, 696u, matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
const float3 tint_symbol_38[2] = (float3[2])0;
tint_symbol_34(sb, 736u, tint_symbol_38);
const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
tint_symbol_35(sb, 768u, tint_symbol_39);
const Inner tint_symbol_40 = (Inner)0;
tint_symbol_36(sb, 800u, tint_symbol_40);
const Inner tint_symbol_41[4] = (Inner[4])0;
tint_symbol_37(sb, 812u, tint_symbol_41);
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000002416606A770(4,3-11): error X3000: unrecognized identifier 'float16_t'

View File

@ -0,0 +1,118 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
struct S {
float scalar_f32;
int scalar_i32;
uint scalar_u32;
float16_t scalar_f16;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
f16vec2 vec2_f16;
uint pad;
vec3 vec3_f32;
uint pad_1;
ivec3 vec3_i32;
uint pad_2;
uvec3 vec3_u32;
uint pad_3;
f16vec3 vec3_f16;
uint pad_4;
uint pad_5;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
mat2 mat2x2_f32;
uint pad_6;
uint pad_7;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_8;
uint pad_9;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
mat4x2 mat4x2_f32;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
f16mat2 mat2x2_f16;
f16mat2x3 mat2x3_f16;
f16mat2x4 mat2x4_f16;
f16mat3x2 mat3x2_f16;
uint pad_10;
f16mat3 mat3x3_f16;
f16mat3x4 mat3x4_f16;
f16mat4x2 mat4x2_f16;
f16mat4x3 mat4x3_f16;
f16mat4 mat4x4_f16;
uint pad_11;
uint pad_12;
vec3 arr2_vec3_f32[2];
f16mat4x2 arr2_mat4x2_f16[2];
Inner struct_inner;
Inner array_struct_inner[4];
uint pad_13;
};
layout(binding = 0, std430) buffer sb_block_ssbo {
S inner;
} sb;
void tint_symbol() {
sb.inner.scalar_f32 = 0.0f;
sb.inner.scalar_i32 = 0;
sb.inner.scalar_u32 = 0u;
sb.inner.scalar_f16 = 0.0hf;
sb.inner.vec2_f32 = vec2(0.0f);
sb.inner.vec2_i32 = ivec2(0);
sb.inner.vec2_u32 = uvec2(0u);
sb.inner.vec2_f16 = f16vec2(0.0hf);
sb.inner.vec3_f32 = vec3(0.0f);
sb.inner.vec3_i32 = ivec3(0);
sb.inner.vec3_u32 = uvec3(0u);
sb.inner.vec3_f16 = f16vec3(0.0hf);
sb.inner.vec4_f32 = vec4(0.0f);
sb.inner.vec4_i32 = ivec4(0);
sb.inner.vec4_u32 = uvec4(0u);
sb.inner.vec4_f16 = f16vec4(0.0hf);
sb.inner.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
sb.inner.mat2x3_f32 = mat2x3(vec3(0.0f), vec3(0.0f));
sb.inner.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
sb.inner.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.inner.mat3x3_f32 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.inner.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.inner.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
sb.inner.mat4x3_f32 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
sb.inner.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
sb.inner.mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
sb.inner.mat2x3_f16 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
sb.inner.mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
sb.inner.mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
sb.inner.mat3x3_f16 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
sb.inner.mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
sb.inner.mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
sb.inner.mat4x3_f16 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
sb.inner.mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
vec3 tint_symbol_1[2] = vec3[2](vec3(0.0f), vec3(0.0f));
sb.inner.arr2_vec3_f32 = tint_symbol_1;
f16mat4x2 tint_symbol_2[2] = f16mat4x2[2](f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
sb.inner.arr2_mat4x2_f16 = tint_symbol_2;
Inner tint_symbol_3 = Inner(0, 0.0f, 0.0hf);
sb.inner.struct_inner = tint_symbol_3;
Inner tint_symbol_4[4] = Inner[4](Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf));
sb.inner.array_struct_inner = tint_symbol_4;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol();
return;
}

View File

@ -0,0 +1,121 @@
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct Inner {
/* 0x0000 */ int scalar_i32;
/* 0x0004 */ float scalar_f32;
/* 0x0008 */ half scalar_f16;
/* 0x000a */ tint_array<int8_t, 2> tint_pad;
};
struct S {
/* 0x0000 */ float scalar_f32;
/* 0x0004 */ int scalar_i32;
/* 0x0008 */ uint scalar_u32;
/* 0x000c */ half scalar_f16;
/* 0x000e */ tint_array<int8_t, 2> tint_pad_1;
/* 0x0010 */ float2 vec2_f32;
/* 0x0018 */ int2 vec2_i32;
/* 0x0020 */ uint2 vec2_u32;
/* 0x0028 */ half2 vec2_f16;
/* 0x002c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0030 */ packed_float3 vec3_f32;
/* 0x003c */ tint_array<int8_t, 4> tint_pad_3;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_5;
/* 0x0060 */ packed_half3 vec3_f16;
/* 0x0066 */ tint_array<int8_t, 10> tint_pad_6;
/* 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_7;
/* 0x00c0 */ float2x3 mat2x3_f32;
/* 0x00e0 */ float2x4 mat2x4_f32;
/* 0x0100 */ float3x2 mat3x2_f32;
/* 0x0118 */ tint_array<int8_t, 8> tint_pad_8;
/* 0x0120 */ float3x3 mat3x3_f32;
/* 0x0150 */ float3x4 mat3x4_f32;
/* 0x0180 */ float4x2 mat4x2_f32;
/* 0x01a0 */ float4x3 mat4x3_f32;
/* 0x01e0 */ float4x4 mat4x4_f32;
/* 0x0220 */ half2x2 mat2x2_f16;
/* 0x0228 */ half2x3 mat2x3_f16;
/* 0x0238 */ half2x4 mat2x4_f16;
/* 0x0248 */ half3x2 mat3x2_f16;
/* 0x0254 */ tint_array<int8_t, 4> tint_pad_9;
/* 0x0258 */ half3x3 mat3x3_f16;
/* 0x0270 */ half3x4 mat3x4_f16;
/* 0x0288 */ half4x2 mat4x2_f16;
/* 0x0298 */ half4x3 mat4x3_f16;
/* 0x02b8 */ half4x4 mat4x4_f16;
/* 0x02d8 */ tint_array<int8_t, 8> tint_pad_10;
/* 0x02e0 */ tint_array<float3, 2> arr2_vec3_f32;
/* 0x0300 */ tint_array<half4x2, 2> arr2_mat4x2_f16;
/* 0x0320 */ Inner struct_inner;
/* 0x032c */ tint_array<Inner, 4> array_struct_inner;
/* 0x035c */ tint_array<int8_t, 4> tint_pad_11;
};
kernel void tint_symbol(device S* tint_symbol_5 [[buffer(0)]]) {
(*(tint_symbol_5)).scalar_f32 = 0.0f;
(*(tint_symbol_5)).scalar_i32 = 0;
(*(tint_symbol_5)).scalar_u32 = 0u;
(*(tint_symbol_5)).scalar_f16 = 0.0h;
(*(tint_symbol_5)).vec2_f32 = float2(0.0f);
(*(tint_symbol_5)).vec2_i32 = int2(0);
(*(tint_symbol_5)).vec2_u32 = uint2(0u);
(*(tint_symbol_5)).vec2_f16 = half2(0.0h);
(*(tint_symbol_5)).vec3_f32 = float3(0.0f);
(*(tint_symbol_5)).vec3_i32 = int3(0);
(*(tint_symbol_5)).vec3_u32 = uint3(0u);
(*(tint_symbol_5)).vec3_f16 = half3(0.0h);
(*(tint_symbol_5)).vec4_f32 = float4(0.0f);
(*(tint_symbol_5)).vec4_i32 = int4(0);
(*(tint_symbol_5)).vec4_u32 = uint4(0u);
(*(tint_symbol_5)).vec4_f16 = half4(0.0h);
(*(tint_symbol_5)).mat2x2_f32 = float2x2(float2(0.0f), float2(0.0f));
(*(tint_symbol_5)).mat2x3_f32 = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_5)).mat2x4_f32 = float2x4(float4(0.0f), float4(0.0f));
(*(tint_symbol_5)).mat3x2_f32 = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_5)).mat3x3_f32 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_5)).mat3x4_f32 = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_5)).mat4x2_f32 = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
(*(tint_symbol_5)).mat4x3_f32 = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
(*(tint_symbol_5)).mat4x4_f32 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
(*(tint_symbol_5)).mat2x2_f16 = half2x2(half2(0.0h), half2(0.0h));
(*(tint_symbol_5)).mat2x3_f16 = half2x3(half3(0.0h), half3(0.0h));
(*(tint_symbol_5)).mat2x4_f16 = half2x4(half4(0.0h), half4(0.0h));
(*(tint_symbol_5)).mat3x2_f16 = half3x2(half2(0.0h), half2(0.0h), half2(0.0h));
(*(tint_symbol_5)).mat3x3_f16 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
(*(tint_symbol_5)).mat3x4_f16 = half3x4(half4(0.0h), half4(0.0h), half4(0.0h));
(*(tint_symbol_5)).mat4x2_f16 = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h));
(*(tint_symbol_5)).mat4x3_f16 = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h));
(*(tint_symbol_5)).mat4x4_f16 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
tint_array<float3, 2> const tint_symbol_1 = tint_array<float3, 2>{};
(*(tint_symbol_5)).arr2_vec3_f32 = tint_symbol_1;
tint_array<half4x2, 2> const tint_symbol_2 = tint_array<half4x2, 2>{};
(*(tint_symbol_5)).arr2_mat4x2_f16 = tint_symbol_2;
Inner const tint_symbol_3 = Inner{};
(*(tint_symbol_5)).struct_inner = tint_symbol_3;
tint_array<Inner, 4> const tint_symbol_4 = tint_array<Inner, 4>{};
(*(tint_symbol_5)).array_struct_inner = tint_symbol_4;
return;
}

View File

@ -0,0 +1,384 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 199
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %sb_block "sb_block"
OpMemberName %sb_block 0 "inner"
OpName %S "S"
OpMemberName %S 0 "scalar_f32"
OpMemberName %S 1 "scalar_i32"
OpMemberName %S 2 "scalar_u32"
OpMemberName %S 3 "scalar_f16"
OpMemberName %S 4 "vec2_f32"
OpMemberName %S 5 "vec2_i32"
OpMemberName %S 6 "vec2_u32"
OpMemberName %S 7 "vec2_f16"
OpMemberName %S 8 "vec3_f32"
OpMemberName %S 9 "vec3_i32"
OpMemberName %S 10 "vec3_u32"
OpMemberName %S 11 "vec3_f16"
OpMemberName %S 12 "vec4_f32"
OpMemberName %S 13 "vec4_i32"
OpMemberName %S 14 "vec4_u32"
OpMemberName %S 15 "vec4_f16"
OpMemberName %S 16 "mat2x2_f32"
OpMemberName %S 17 "mat2x3_f32"
OpMemberName %S 18 "mat2x4_f32"
OpMemberName %S 19 "mat3x2_f32"
OpMemberName %S 20 "mat3x3_f32"
OpMemberName %S 21 "mat3x4_f32"
OpMemberName %S 22 "mat4x2_f32"
OpMemberName %S 23 "mat4x3_f32"
OpMemberName %S 24 "mat4x4_f32"
OpMemberName %S 25 "mat2x2_f16"
OpMemberName %S 26 "mat2x3_f16"
OpMemberName %S 27 "mat2x4_f16"
OpMemberName %S 28 "mat3x2_f16"
OpMemberName %S 29 "mat3x3_f16"
OpMemberName %S 30 "mat3x4_f16"
OpMemberName %S 31 "mat4x2_f16"
OpMemberName %S 32 "mat4x3_f16"
OpMemberName %S 33 "mat4x4_f16"
OpMemberName %S 34 "arr2_vec3_f32"
OpMemberName %S 35 "arr2_mat4x2_f16"
OpMemberName %S 36 "struct_inner"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_i32"
OpMemberName %Inner 1 "scalar_f32"
OpMemberName %Inner 2 "scalar_f16"
OpMemberName %S 37 "array_struct_inner"
OpName %sb "sb"
OpName %main "main"
OpDecorate %sb_block Block
OpMemberDecorate %sb_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpMemberDecorate %S 3 Offset 12
OpMemberDecorate %S 4 Offset 16
OpMemberDecorate %S 5 Offset 24
OpMemberDecorate %S 6 Offset 32
OpMemberDecorate %S 7 Offset 40
OpMemberDecorate %S 8 Offset 48
OpMemberDecorate %S 9 Offset 64
OpMemberDecorate %S 10 Offset 80
OpMemberDecorate %S 11 Offset 96
OpMemberDecorate %S 12 Offset 112
OpMemberDecorate %S 13 Offset 128
OpMemberDecorate %S 14 Offset 144
OpMemberDecorate %S 15 Offset 160
OpMemberDecorate %S 16 Offset 168
OpMemberDecorate %S 16 ColMajor
OpMemberDecorate %S 16 MatrixStride 8
OpMemberDecorate %S 17 Offset 192
OpMemberDecorate %S 17 ColMajor
OpMemberDecorate %S 17 MatrixStride 16
OpMemberDecorate %S 18 Offset 224
OpMemberDecorate %S 18 ColMajor
OpMemberDecorate %S 18 MatrixStride 16
OpMemberDecorate %S 19 Offset 256
OpMemberDecorate %S 19 ColMajor
OpMemberDecorate %S 19 MatrixStride 8
OpMemberDecorate %S 20 Offset 288
OpMemberDecorate %S 20 ColMajor
OpMemberDecorate %S 20 MatrixStride 16
OpMemberDecorate %S 21 Offset 336
OpMemberDecorate %S 21 ColMajor
OpMemberDecorate %S 21 MatrixStride 16
OpMemberDecorate %S 22 Offset 384
OpMemberDecorate %S 22 ColMajor
OpMemberDecorate %S 22 MatrixStride 8
OpMemberDecorate %S 23 Offset 416
OpMemberDecorate %S 23 ColMajor
OpMemberDecorate %S 23 MatrixStride 16
OpMemberDecorate %S 24 Offset 480
OpMemberDecorate %S 24 ColMajor
OpMemberDecorate %S 24 MatrixStride 16
OpMemberDecorate %S 25 Offset 544
OpMemberDecorate %S 25 ColMajor
OpMemberDecorate %S 25 MatrixStride 4
OpMemberDecorate %S 26 Offset 552
OpMemberDecorate %S 26 ColMajor
OpMemberDecorate %S 26 MatrixStride 8
OpMemberDecorate %S 27 Offset 568
OpMemberDecorate %S 27 ColMajor
OpMemberDecorate %S 27 MatrixStride 8
OpMemberDecorate %S 28 Offset 584
OpMemberDecorate %S 28 ColMajor
OpMemberDecorate %S 28 MatrixStride 4
OpMemberDecorate %S 29 Offset 600
OpMemberDecorate %S 29 ColMajor
OpMemberDecorate %S 29 MatrixStride 8
OpMemberDecorate %S 30 Offset 624
OpMemberDecorate %S 30 ColMajor
OpMemberDecorate %S 30 MatrixStride 8
OpMemberDecorate %S 31 Offset 648
OpMemberDecorate %S 31 ColMajor
OpMemberDecorate %S 31 MatrixStride 4
OpMemberDecorate %S 32 Offset 664
OpMemberDecorate %S 32 ColMajor
OpMemberDecorate %S 32 MatrixStride 8
OpMemberDecorate %S 33 Offset 696
OpMemberDecorate %S 33 ColMajor
OpMemberDecorate %S 33 MatrixStride 8
OpMemberDecorate %S 34 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S 35 Offset 768
OpMemberDecorate %S 35 ColMajor
OpMemberDecorate %S 35 MatrixStride 4
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
OpMemberDecorate %S 36 Offset 800
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %S 37 Offset 812
OpDecorate %_arr_Inner_uint_4 ArrayStride 12
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%half = OpTypeFloat 16
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v2half = OpTypeVector %half 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v3half = OpTypeVector %half 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%v4half = OpTypeVector %half 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%mat2v2half = OpTypeMatrix %v2half 2
%mat2v3half = OpTypeMatrix %v3half 2
%mat2v4half = OpTypeMatrix %v4half 2
%mat3v2half = OpTypeMatrix %v2half 3
%mat3v3half = OpTypeMatrix %v3half 3
%mat3v4half = OpTypeMatrix %v4half 3
%mat4v2half = OpTypeMatrix %v2half 4
%mat4v3half = OpTypeMatrix %v3half 4
%mat4v4half = OpTypeMatrix %v4half 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%Inner = OpTypeStruct %int %float %half
%uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %mat2v2half %mat2v3half %mat2v4half %mat3v2half %mat3v3half %mat3v4half %mat4v2half %mat4v3half %mat4v4half %_arr_v3float_uint_2 %_arr_mat4v2half_uint_2 %Inner %_arr_Inner_uint_4
%sb_block = OpTypeStruct %S
%_ptr_StorageBuffer_sb_block = OpTypePointer StorageBuffer %sb_block
%sb = OpVariable %_ptr_StorageBuffer_sb_block StorageBuffer
%void = OpTypeVoid
%45 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%52 = OpConstantNull %float
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%56 = OpConstantNull %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%59 = OpConstantNull %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%63 = OpConstantNull %half
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%66 = OpConstantNull %v2float
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%70 = OpConstantNull %v2int
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%74 = OpConstantNull %v2uint
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%78 = OpConstantNull %v2half
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%82 = OpConstantNull %v3float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%86 = OpConstantNull %v3int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%90 = OpConstantNull %v3uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%94 = OpConstantNull %v3half
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%98 = OpConstantNull %v4float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%102 = OpConstantNull %v4int
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%106 = OpConstantNull %v4uint
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
%110 = OpConstantNull %v4half
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%114 = OpConstantNull %mat2v2float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%118 = OpConstantNull %mat2v3float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%122 = OpConstantNull %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%126 = OpConstantNull %mat3v2float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%130 = OpConstantNull %mat3v3float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%134 = OpConstantNull %mat3v4float
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%138 = OpConstantNull %mat4v2float
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%142 = OpConstantNull %mat4v3float
%uint_24 = OpConstant %uint 24
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%146 = OpConstantNull %mat4v4float
%uint_25 = OpConstant %uint 25
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%150 = OpConstantNull %mat2v2half
%uint_26 = OpConstant %uint 26
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%154 = OpConstantNull %mat2v3half
%uint_27 = OpConstant %uint 27
%_ptr_StorageBuffer_mat2v4half = OpTypePointer StorageBuffer %mat2v4half
%158 = OpConstantNull %mat2v4half
%uint_28 = OpConstant %uint 28
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%162 = OpConstantNull %mat3v2half
%uint_29 = OpConstant %uint 29
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
%166 = OpConstantNull %mat3v3half
%uint_30 = OpConstant %uint 30
%_ptr_StorageBuffer_mat3v4half = OpTypePointer StorageBuffer %mat3v4half
%170 = OpConstantNull %mat3v4half
%uint_31 = OpConstant %uint 31
%_ptr_StorageBuffer_mat4v2half = OpTypePointer StorageBuffer %mat4v2half
%174 = OpConstantNull %mat4v2half
%uint_32 = OpConstant %uint 32
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
%178 = OpConstantNull %mat4v3half
%uint_33 = OpConstant %uint 33
%_ptr_StorageBuffer_mat4v4half = OpTypePointer StorageBuffer %mat4v4half
%182 = OpConstantNull %mat4v4half
%uint_34 = OpConstant %uint 34
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%186 = OpConstantNull %_arr_v3float_uint_2
%uint_35 = OpConstant %uint 35
%_ptr_StorageBuffer__arr_mat4v2half_uint_2 = OpTypePointer StorageBuffer %_arr_mat4v2half_uint_2
%190 = OpConstantNull %_arr_mat4v2half_uint_2
%uint_36 = OpConstant %uint 36
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner
%194 = OpConstantNull %Inner
%uint_37 = OpConstant %uint 37
%_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4
%198 = OpConstantNull %_arr_Inner_uint_4
%main = OpFunction %void None %45
%48 = OpLabel
%51 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %uint_0
OpStore %51 %52
%55 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %uint_1
OpStore %55 %56
%58 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %uint_2
OpStore %58 %59
%62 = OpAccessChain %_ptr_StorageBuffer_half %sb %uint_0 %uint_3
OpStore %62 %63
%65 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %uint_4
OpStore %65 %66
%69 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %uint_5
OpStore %69 %70
%73 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %uint_6
OpStore %73 %74
%77 = OpAccessChain %_ptr_StorageBuffer_v2half %sb %uint_0 %uint_7
OpStore %77 %78
%81 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %uint_8
OpStore %81 %82
%85 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %uint_9
OpStore %85 %86
%89 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %uint_10
OpStore %89 %90
%93 = OpAccessChain %_ptr_StorageBuffer_v3half %sb %uint_0 %uint_11
OpStore %93 %94
%97 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %uint_12
OpStore %97 %98
%101 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %uint_13
OpStore %101 %102
%105 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %uint_14
OpStore %105 %106
%109 = OpAccessChain %_ptr_StorageBuffer_v4half %sb %uint_0 %uint_15
OpStore %109 %110
%113 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %uint_16
OpStore %113 %114
%117 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %uint_17
OpStore %117 %118
%121 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %uint_18
OpStore %121 %122
%125 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %uint_19
OpStore %125 %126
%129 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %uint_20
OpStore %129 %130
%133 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %uint_21
OpStore %133 %134
%137 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %uint_22
OpStore %137 %138
%141 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %uint_23
OpStore %141 %142
%145 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %uint_24
OpStore %145 %146
%149 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %sb %uint_0 %uint_25
OpStore %149 %150
%153 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %sb %uint_0 %uint_26
OpStore %153 %154
%157 = OpAccessChain %_ptr_StorageBuffer_mat2v4half %sb %uint_0 %uint_27
OpStore %157 %158
%161 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %sb %uint_0 %uint_28
OpStore %161 %162
%165 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %sb %uint_0 %uint_29
OpStore %165 %166
%169 = OpAccessChain %_ptr_StorageBuffer_mat3v4half %sb %uint_0 %uint_30
OpStore %169 %170
%173 = OpAccessChain %_ptr_StorageBuffer_mat4v2half %sb %uint_0 %uint_31
OpStore %173 %174
%177 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %sb %uint_0 %uint_32
OpStore %177 %178
%181 = OpAccessChain %_ptr_StorageBuffer_mat4v4half %sb %uint_0 %uint_33
OpStore %181 %182
%185 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %uint_34
OpStore %185 %186
%189 = OpAccessChain %_ptr_StorageBuffer__arr_mat4v2half_uint_2 %sb %uint_0 %uint_35
OpStore %189 %190
%193 = OpAccessChain %_ptr_StorageBuffer_Inner %sb %uint_0 %uint_36
OpStore %193 %194
%197 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %sb %uint_0 %uint_37
OpStore %197 %198
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,92 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
scalar_f16 : f16,
}
struct S {
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
scalar_f16 : f16,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec2_f16 : vec2<f16>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
vec3_u32 : vec3<u32>,
vec3_f16 : vec3<f16>,
vec4_f32 : vec4<f32>,
vec4_i32 : vec4<i32>,
vec4_u32 : vec4<u32>,
vec4_f16 : vec4<f16>,
mat2x2_f32 : mat2x2<f32>,
mat2x3_f32 : mat2x3<f32>,
mat2x4_f32 : mat2x4<f32>,
mat3x2_f32 : mat3x2<f32>,
mat3x3_f32 : mat3x3<f32>,
mat3x4_f32 : mat3x4<f32>,
mat4x2_f32 : mat4x2<f32>,
mat4x3_f32 : mat4x3<f32>,
mat4x4_f32 : mat4x4<f32>,
mat2x2_f16 : mat2x2<f16>,
mat2x3_f16 : mat2x3<f16>,
mat2x4_f16 : mat2x4<f16>,
mat3x2_f16 : mat3x2<f16>,
mat3x3_f16 : mat3x3<f16>,
mat3x4_f16 : mat3x4<f16>,
mat4x2_f16 : mat4x2<f16>,
mat4x3_f16 : mat4x3<f16>,
mat4x4_f16 : mat4x4<f16>,
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
struct_inner : Inner,
array_struct_inner : array<Inner, 4>,
}
@binding(0) @group(0) var<storage, read_write> sb : S;
@compute @workgroup_size(1)
fn main() {
sb.scalar_f32 = f32();
sb.scalar_i32 = i32();
sb.scalar_u32 = u32();
sb.scalar_f16 = f16();
sb.vec2_f32 = vec2<f32>();
sb.vec2_i32 = vec2<i32>();
sb.vec2_u32 = vec2<u32>();
sb.vec2_f16 = vec2<f16>();
sb.vec3_f32 = vec3<f32>();
sb.vec3_i32 = vec3<i32>();
sb.vec3_u32 = vec3<u32>();
sb.vec3_f16 = vec3<f16>();
sb.vec4_f32 = vec4<f32>();
sb.vec4_i32 = vec4<i32>();
sb.vec4_u32 = vec4<u32>();
sb.vec4_f16 = vec4<f16>();
sb.mat2x2_f32 = mat2x2<f32>();
sb.mat2x3_f32 = mat2x3<f32>();
sb.mat2x4_f32 = mat2x4<f32>();
sb.mat3x2_f32 = mat3x2<f32>();
sb.mat3x3_f32 = mat3x3<f32>();
sb.mat3x4_f32 = mat3x4<f32>();
sb.mat4x2_f32 = mat4x2<f32>();
sb.mat4x3_f32 = mat4x3<f32>();
sb.mat4x4_f32 = mat4x4<f32>();
sb.mat2x2_f16 = mat2x2<f16>();
sb.mat2x3_f16 = mat2x3<f16>();
sb.mat2x4_f16 = mat2x4<f16>();
sb.mat3x2_f16 = mat3x2<f16>();
sb.mat3x3_f16 = mat3x3<f16>();
sb.mat3x4_f16 = mat3x4<f16>();
sb.mat4x2_f16 = mat4x2<f16>();
sb.mat4x3_f16 = mat4x3<f16>();
sb.mat4x4_f16 = mat4x4<f16>();
sb.arr2_vec3_f32 = array<vec3<f32>, 2>();
sb.arr2_mat4x2_f16 = array<mat4x2<f16>, 2>();
sb.struct_inner = Inner();
sb.array_struct_inner = array<Inner, 4>();
}

View File

@ -0,0 +1,12 @@
enable f16;
@group(0) @binding(0)
var<storage, read> in : array<f16, 4>;
@group(0) @binding(1)
var<storage, read_write> out : array<f16, 4>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,28 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float16_t value[4]) {
float16_t array[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
buffer.Store<float16_t>((offset + (i * 2u)), array[i]);
}
}
}
typedef float16_t tint_symbol_4_ret[4];
tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
float16_t arr[4] = (float16_t[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr[i_1] = buffer.Load<float16_t>((offset + (i_1 * 2u)));
}
}
return arr;
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}

View File

@ -0,0 +1,33 @@
SKIP: FAILED
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float16_t value[4]) {
float16_t array[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
buffer.Store<float16_t>((offset + (i * 2u)), array[i]);
}
}
}
typedef float16_t tint_symbol_4_ret[4];
tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
float16_t arr[4] = (float16_t[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr[i_1] = buffer.Load<float16_t>((offset + (i_1 * 2u)));
}
}
return arr;
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x0000026D14358AA0(4,61-69): error X3000: unrecognized identifier 'float16_t'

View File

@ -0,0 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
layout(binding = 0, std430) buffer tint_symbol_block_ssbo {
float16_t inner[4];
} tint_symbol;
layout(binding = 1, std430) buffer tint_symbol_block_ssbo_1 {
float16_t inner[4];
} tint_symbol_1;
void tint_symbol_2() {
tint_symbol_1.inner = tint_symbol.inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol_2();
return;
}

View File

@ -14,8 +14,8 @@ struct tint_array {
T elements[N]; T elements[N];
}; };
kernel void tint_symbol(const constant tint_array<float4, 4>* tint_symbol_1 [[buffer(0)]]) { kernel void tint_symbol(device tint_array<half, 4>* tint_symbol_1 [[buffer(0)]], const device tint_array<half, 4>* tint_symbol_2 [[buffer(1)]]) {
tint_array<float4, 4> const x = *(tint_symbol_1); *(tint_symbol_1) = *(tint_symbol_2);
return; return;
} }

View File

@ -0,0 +1,46 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 18
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %in_block "in_block"
OpMemberName %in_block 0 "inner"
OpName %in "in"
OpName %out "out"
OpName %main "main"
OpDecorate %in_block Block
OpMemberDecorate %in_block 0 Offset 0
OpDecorate %_arr_half_uint_4 ArrayStride 2
OpDecorate %in NonWritable
OpDecorate %in DescriptorSet 0
OpDecorate %in Binding 0
OpDecorate %out DescriptorSet 0
OpDecorate %out Binding 1
%half = OpTypeFloat 16
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_half_uint_4 = OpTypeArray %half %uint_4
%in_block = OpTypeStruct %_arr_half_uint_4
%_ptr_StorageBuffer_in_block = OpTypePointer StorageBuffer %in_block
%in = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%out = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%void = OpTypeVoid
%9 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer__arr_half_uint_4 = OpTypePointer StorageBuffer %_arr_half_uint_4
%main = OpFunction %void None %9
%12 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer__arr_half_uint_4 %out %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer__arr_half_uint_4 %in %uint_0
%17 = OpLoad %_arr_half_uint_4 %16
OpStore %15 %17
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,10 @@
enable f16;
@group(0) @binding(0) var<storage, read> in : array<f16, 4>;
@group(0) @binding(1) var<storage, read_write> out : array<f16, 4>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,12 @@
enable f16;
@group(0) @binding(0)
var<storage, read> in : f16;
@group(0) @binding(1)
var<storage, read_write> out : f16;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,8 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
[numthreads(1, 1, 1)]
void main() {
tint_symbol_1.Store<float16_t>(0u, tint_symbol.Load<float16_t>(0u));
return;
}

View File

@ -0,0 +1,13 @@
SKIP: FAILED
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
[numthreads(1, 1, 1)]
void main() {
tint_symbol_1.Store<float16_t>(0u, tint_symbol.Load<float16_t>(0u));
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x0000020E4EF78E80(6,3-21): error X3018: invalid subscript 'Store'

View File

@ -0,0 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
layout(binding = 0, std430) buffer tint_symbol_block_ssbo {
float16_t inner;
} tint_symbol;
layout(binding = 1, std430) buffer tint_symbol_block_ssbo_1 {
float16_t inner;
} tint_symbol_1;
void tint_symbol_2() {
tint_symbol_1.inner = tint_symbol.inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol_2();
return;
}

View File

@ -0,0 +1,8 @@
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol(device half* tint_symbol_1 [[buffer(0)]], const device half* tint_symbol_2 [[buffer(1)]]) {
*(tint_symbol_1) = *(tint_symbol_2);
return;
}

View File

@ -0,0 +1,43 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 16
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %in_block "in_block"
OpMemberName %in_block 0 "inner"
OpName %in "in"
OpName %out "out"
OpName %main "main"
OpDecorate %in_block Block
OpMemberDecorate %in_block 0 Offset 0
OpDecorate %in NonWritable
OpDecorate %in DescriptorSet 0
OpDecorate %in Binding 0
OpDecorate %out DescriptorSet 0
OpDecorate %out Binding 1
%half = OpTypeFloat 16
%in_block = OpTypeStruct %half
%_ptr_StorageBuffer_in_block = OpTypePointer StorageBuffer %in_block
%in = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%out = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%main = OpFunction %void None %6
%9 = OpLabel
%13 = OpAccessChain %_ptr_StorageBuffer_half %out %uint_0
%14 = OpAccessChain %_ptr_StorageBuffer_half %in %uint_0
%15 = OpLoad %half %14
OpStore %13 %15
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,10 @@
enable f16;
@group(0) @binding(0) var<storage, read> in : f16;
@group(0) @binding(1) var<storage, read_write> out : f16;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,12 @@
enable f16;
@group(0) @binding(0)
var<storage, read> in : mat2x2<f16>;
@group(0) @binding(1)
var<storage, read_write> out : mat2x2<f16>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
matrix<float16_t, 2, 2> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}

View File

@ -0,0 +1,23 @@
SKIP: FAILED
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
matrix<float16_t, 2, 2> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000001C807B6A460(4,68-76): error X3000: syntax error: unexpected token 'float16_t'
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000001C807B6A460(5,3-14): error X3018: invalid subscript 'Store'

View File

@ -0,0 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
layout(binding = 0, std430) buffer tint_symbol_block_ssbo {
f16mat2 inner;
} tint_symbol;
layout(binding = 1, std430) buffer tint_symbol_block_ssbo_1 {
f16mat2 inner;
} tint_symbol_1;
void tint_symbol_2() {
tint_symbol_1.inner = tint_symbol.inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol_2();
return;
}

View File

@ -0,0 +1,8 @@
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol(device half2x2* tint_symbol_1 [[buffer(0)]], const device half2x2* tint_symbol_2 [[buffer(1)]]) {
*(tint_symbol_1) = *(tint_symbol_2);
return;
}

View File

@ -0,0 +1,47 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 18
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %in_block "in_block"
OpMemberName %in_block 0 "inner"
OpName %in "in"
OpName %out "out"
OpName %main "main"
OpDecorate %in_block Block
OpMemberDecorate %in_block 0 Offset 0
OpMemberDecorate %in_block 0 ColMajor
OpMemberDecorate %in_block 0 MatrixStride 4
OpDecorate %in NonWritable
OpDecorate %in DescriptorSet 0
OpDecorate %in Binding 0
OpDecorate %out DescriptorSet 0
OpDecorate %out Binding 1
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%mat2v2half = OpTypeMatrix %v2half 2
%in_block = OpTypeStruct %mat2v2half
%_ptr_StorageBuffer_in_block = OpTypePointer StorageBuffer %in_block
%in = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%out = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%void = OpTypeVoid
%8 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%main = OpFunction %void None %8
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %out %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %in %uint_0
%17 = OpLoad %mat2v2half %16
OpStore %15 %17
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,10 @@
enable f16;
@group(0) @binding(0) var<storage, read> in : mat2x2<f16>;
@group(0) @binding(1) var<storage, read_write> out : mat2x2<f16>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,12 @@
enable f16;
@group(0) @binding(0)
var<storage, read> in : mat2x3<f16>;
@group(0) @binding(1)
var<storage, read_write> out : mat2x3<f16>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

View File

@ -0,0 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
matrix<float16_t, 2, 3> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}

View File

@ -0,0 +1,23 @@
SKIP: FAILED
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
matrix<float16_t, 2, 3> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
void main() {
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x0000020545EDA130(4,68-76): error X3000: syntax error: unexpected token 'float16_t'
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x0000020545EDA130(5,3-14): error X3018: invalid subscript 'Store'

View File

@ -0,0 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
layout(binding = 0, std430) buffer tint_symbol_block_ssbo {
f16mat2x3 inner;
} tint_symbol;
layout(binding = 1, std430) buffer tint_symbol_block_ssbo_1 {
f16mat2x3 inner;
} tint_symbol_1;
void tint_symbol_2() {
tint_symbol_1.inner = tint_symbol.inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol_2();
return;
}

View File

@ -0,0 +1,8 @@
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol(device half2x3* tint_symbol_1 [[buffer(0)]], const device half2x3* tint_symbol_2 [[buffer(1)]]) {
*(tint_symbol_1) = *(tint_symbol_2);
return;
}

View File

@ -0,0 +1,47 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 18
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %in_block "in_block"
OpMemberName %in_block 0 "inner"
OpName %in "in"
OpName %out "out"
OpName %main "main"
OpDecorate %in_block Block
OpMemberDecorate %in_block 0 Offset 0
OpMemberDecorate %in_block 0 ColMajor
OpMemberDecorate %in_block 0 MatrixStride 8
OpDecorate %in NonWritable
OpDecorate %in DescriptorSet 0
OpDecorate %in Binding 0
OpDecorate %out DescriptorSet 0
OpDecorate %out Binding 1
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%mat2v3half = OpTypeMatrix %v3half 2
%in_block = OpTypeStruct %mat2v3half
%_ptr_StorageBuffer_in_block = OpTypePointer StorageBuffer %in_block
%in = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%out = OpVariable %_ptr_StorageBuffer_in_block StorageBuffer
%void = OpTypeVoid
%8 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%main = OpFunction %void None %8
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %out %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %in %uint_0
%17 = OpLoad %mat2v3half %16
OpStore %15 %17
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,10 @@
enable f16;
@group(0) @binding(0) var<storage, read> in : mat2x3<f16>;
@group(0) @binding(1) var<storage, read_write> out : mat2x3<f16>;
@compute @workgroup_size(1)
fn main() {
out = in;
}

Some files were not shown because too many files have changed in this diff Show More