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,36 +1,62 @@
struct Inner {
@size(16) x : i32,
scalar_i32 : i32,
@align(16) @size(16)
scalar_f32 : f32,
};
struct S {
a : vec3<i32>,
b : i32,
c : vec3<u32>,
d : u32,
e : vec3<f32>,
f : f32,
g : vec2<i32>,
h : vec2<i32>,
i : mat2x3<f32>,
j : mat3x2<f32>,
@align(16) k : Inner,
@align(16) l : array<Inner, 4>,
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
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>,
@align(16) arr2_vec3_f32 : array<vec3<f32>, 2>,
@align(16) struct_inner : Inner,
@align(16) array_struct_inner : array<Inner, 4>,
};
@binding(0) @group(0) var<uniform> s : S;
@binding(0) @group(0) var<uniform> ub : S;
@compute @workgroup_size(1)
fn main() {
let a = s.a;
let b = s.b;
let c = s.c;
let d = s.d;
let e = s.e;
let f = s.f;
let g = s.g;
let h = s.h;
let i = s.i;
let j = s.j;
let k = s.k;
let l = s.l;
let scalar_f32 = ub.scalar_f32;
let scalar_i32 = ub.scalar_i32;
let scalar_u32 = ub.scalar_u32;
let vec2_f32 = ub.vec2_f32;
let vec2_i32 = ub.vec2_i32;
let vec2_u32 = ub.vec2_u32;
let vec3_f32 = ub.vec3_f32;
let vec3_i32 = ub.vec3_i32;
let vec3_u32 = ub.vec3_u32;
let vec4_f32 = ub.vec4_f32;
let vec4_i32 = ub.vec4_i32;
let vec4_u32 = ub.vec4_u32;
let mat2x2_f32 = ub.mat2x2_f32;
let mat2x3_f32 = ub.mat2x3_f32;
let mat2x4_f32 = ub.mat2x4_f32;
let mat3x2_f32 = ub.mat3x2_f32;
let mat3x3_f32 = ub.mat3x3_f32;
let mat3x4_f32 = ub.mat3x4_f32;
let mat4x2_f32 = ub.mat4x2_f32;
let mat4x3_f32 = ub.mat4x3_f32;
let mat4x4_f32 = ub.mat4x4_f32;
let arr2_vec3_f32 = ub.arr2_vec3_f32;
let struct_inner = ub.struct_inner;
let array_struct_inner = ub.array_struct_inner;
}

View File

@@ -1,57 +1,139 @@
struct Inner {
int x;
int scalar_i32;
float scalar_f32;
};
cbuffer cbuffer_s : register(b0, space0) {
uint4 s[13];
cbuffer cbuffer_ub : register(b0, space0) {
uint4 ub[44];
};
float2x3 tint_symbol_7(uint4 buffer[13], uint offset) {
float2x2 tint_symbol_12(uint4 buffer[44], uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
uint4 ubo_load = buffer[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
float3x2 tint_symbol_8(uint4 buffer[13], uint offset) {
float2x3 tint_symbol_13(uint4 buffer[44], uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_3 / 4];
const uint scalar_offset_4 = ((offset + 16u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_4 / 4];
return float3x2(asfloat(((scalar_offset_2 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_4 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
const uint scalar_offset_3 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
}
Inner tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_5 = ((offset + 0u)) / 4;
const Inner tint_symbol_12 = {asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
return tint_symbol_12;
float2x4 tint_symbol_14(uint4 buffer[44], uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
}
typedef Inner tint_symbol_11_ret[4];
tint_symbol_11_ret tint_symbol_11(uint4 buffer[13], uint offset) {
Inner arr[4] = (Inner[4])0;
float3x2 tint_symbol_15(uint4 buffer[44], uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
float3x3 tint_symbol_16(uint4 buffer[44], uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
}
float3x4 tint_symbol_17(uint4 buffer[44], uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
}
float4x2 tint_symbol_18(uint4 buffer[44], uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
float4x3 tint_symbol_19(uint4 buffer[44], uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
}
float4x4 tint_symbol_20(uint4 buffer[44], uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
}
typedef float3 tint_symbol_21_ret[2];
tint_symbol_21_ret tint_symbol_21(uint4 buffer[44], uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr[i_1] = tint_symbol_10(buffer, (offset + (i_1 * 16u)));
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
arr[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
}
}
return arr;
}
Inner tint_symbol_22(uint4 buffer[44], uint offset) {
const uint scalar_offset_28 = ((offset + 0u)) / 4;
const uint scalar_offset_29 = ((offset + 16u)) / 4;
const Inner tint_symbol_24 = {asint(buffer[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(buffer[scalar_offset_29 / 4][scalar_offset_29 % 4])};
return tint_symbol_24;
}
typedef Inner tint_symbol_23_ret[4];
tint_symbol_23_ret tint_symbol_23(uint4 buffer[44], 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 * 32u)));
}
}
return arr_1;
}
[numthreads(1, 1, 1)]
void main() {
const int3 a = asint(s[0].xyz);
const int b = asint(s[0].w);
const uint3 c = s[1].xyz;
const uint d = s[1].w;
const float3 e = asfloat(s[2].xyz);
const float f = asfloat(s[2].w);
const int2 g = asint(s[3].xy);
const int2 h = asint(s[3].zw);
const float2x3 i = tint_symbol_7(s, 64u);
const float3x2 j = tint_symbol_8(s, 96u);
const Inner k = tint_symbol_10(s, 128u);
const Inner l[4] = tint_symbol_11(s, 144u);
const float scalar_f32 = asfloat(ub[0].x);
const int scalar_i32 = asint(ub[0].y);
const uint scalar_u32 = ub[0].z;
const float2 vec2_f32 = asfloat(ub[1].xy);
const int2 vec2_i32 = asint(ub[1].zw);
const uint2 vec2_u32 = ub[2].xy;
const float3 vec3_f32 = asfloat(ub[3].xyz);
const int3 vec3_i32 = asint(ub[4].xyz);
const uint3 vec3_u32 = ub[5].xyz;
const float4 vec4_f32 = asfloat(ub[6]);
const int4 vec4_i32 = asint(ub[7]);
const uint4 vec4_u32 = ub[8];
const float2x2 mat2x2_f32 = tint_symbol_12(ub, 144u);
const float2x3 mat2x3_f32 = tint_symbol_13(ub, 160u);
const float2x4 mat2x4_f32 = tint_symbol_14(ub, 192u);
const float3x2 mat3x2_f32 = tint_symbol_15(ub, 224u);
const float3x3 mat3x3_f32 = tint_symbol_16(ub, 256u);
const float3x4 mat3x4_f32 = tint_symbol_17(ub, 304u);
const float4x2 mat4x2_f32 = tint_symbol_18(ub, 352u);
const float4x3 mat4x3_f32 = tint_symbol_19(ub, 384u);
const float4x4 mat4x4_f32 = tint_symbol_20(ub, 448u);
const float3 arr2_vec3_f32[2] = tint_symbol_21(ub, 512u);
const Inner struct_inner = tint_symbol_22(ub, 544u);
const Inner array_struct_inner[4] = tint_symbol_23(ub, 576u);
return;
}

View File

@@ -1,57 +1,139 @@
struct Inner {
int x;
int scalar_i32;
float scalar_f32;
};
cbuffer cbuffer_s : register(b0, space0) {
uint4 s[13];
cbuffer cbuffer_ub : register(b0, space0) {
uint4 ub[44];
};
float2x3 tint_symbol_7(uint4 buffer[13], uint offset) {
float2x2 tint_symbol_12(uint4 buffer[44], uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
uint4 ubo_load = buffer[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
float3x2 tint_symbol_8(uint4 buffer[13], uint offset) {
float2x3 tint_symbol_13(uint4 buffer[44], uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_3 / 4];
const uint scalar_offset_4 = ((offset + 16u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_4 / 4];
return float3x2(asfloat(((scalar_offset_2 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_4 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
const uint scalar_offset_3 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
}
Inner tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_5 = ((offset + 0u)) / 4;
const Inner tint_symbol_12 = {asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
return tint_symbol_12;
float2x4 tint_symbol_14(uint4 buffer[44], uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
}
typedef Inner tint_symbol_11_ret[4];
tint_symbol_11_ret tint_symbol_11(uint4 buffer[13], uint offset) {
Inner arr[4] = (Inner[4])0;
float3x2 tint_symbol_15(uint4 buffer[44], uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
float3x3 tint_symbol_16(uint4 buffer[44], uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
}
float3x4 tint_symbol_17(uint4 buffer[44], uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
}
float4x2 tint_symbol_18(uint4 buffer[44], uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
float4x3 tint_symbol_19(uint4 buffer[44], uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
}
float4x4 tint_symbol_20(uint4 buffer[44], uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
}
typedef float3 tint_symbol_21_ret[2];
tint_symbol_21_ret tint_symbol_21(uint4 buffer[44], uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
arr[i_1] = tint_symbol_10(buffer, (offset + (i_1 * 16u)));
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
arr[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
}
}
return arr;
}
Inner tint_symbol_22(uint4 buffer[44], uint offset) {
const uint scalar_offset_28 = ((offset + 0u)) / 4;
const uint scalar_offset_29 = ((offset + 16u)) / 4;
const Inner tint_symbol_24 = {asint(buffer[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(buffer[scalar_offset_29 / 4][scalar_offset_29 % 4])};
return tint_symbol_24;
}
typedef Inner tint_symbol_23_ret[4];
tint_symbol_23_ret tint_symbol_23(uint4 buffer[44], 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 * 32u)));
}
}
return arr_1;
}
[numthreads(1, 1, 1)]
void main() {
const int3 a = asint(s[0].xyz);
const int b = asint(s[0].w);
const uint3 c = s[1].xyz;
const uint d = s[1].w;
const float3 e = asfloat(s[2].xyz);
const float f = asfloat(s[2].w);
const int2 g = asint(s[3].xy);
const int2 h = asint(s[3].zw);
const float2x3 i = tint_symbol_7(s, 64u);
const float3x2 j = tint_symbol_8(s, 96u);
const Inner k = tint_symbol_10(s, 128u);
const Inner l[4] = tint_symbol_11(s, 144u);
const float scalar_f32 = asfloat(ub[0].x);
const int scalar_i32 = asint(ub[0].y);
const uint scalar_u32 = ub[0].z;
const float2 vec2_f32 = asfloat(ub[1].xy);
const int2 vec2_i32 = asint(ub[1].zw);
const uint2 vec2_u32 = ub[2].xy;
const float3 vec3_f32 = asfloat(ub[3].xyz);
const int3 vec3_i32 = asint(ub[4].xyz);
const uint3 vec3_u32 = ub[5].xyz;
const float4 vec4_f32 = asfloat(ub[6]);
const int4 vec4_i32 = asint(ub[7]);
const uint4 vec4_u32 = ub[8];
const float2x2 mat2x2_f32 = tint_symbol_12(ub, 144u);
const float2x3 mat2x3_f32 = tint_symbol_13(ub, 160u);
const float2x4 mat2x4_f32 = tint_symbol_14(ub, 192u);
const float3x2 mat3x2_f32 = tint_symbol_15(ub, 224u);
const float3x3 mat3x3_f32 = tint_symbol_16(ub, 256u);
const float3x4 mat3x4_f32 = tint_symbol_17(ub, 304u);
const float4x2 mat4x2_f32 = tint_symbol_18(ub, 352u);
const float4x3 mat4x3_f32 = tint_symbol_19(ub, 384u);
const float4x4 mat4x4_f32 = tint_symbol_20(ub, 448u);
const float3 arr2_vec3_f32[2] = tint_symbol_21(ub, 512u);
const Inner struct_inner = tint_symbol_22(ub, 544u);
const Inner array_struct_inner[4] = tint_symbol_23(ub, 576u);
return;
}

View File

@@ -1,69 +1,133 @@
#version 310 es
struct Inner {
int x;
int scalar_i32;
uint pad;
uint pad_1;
uint pad_2;
float scalar_f32;
uint pad_3;
uint pad_4;
uint pad_5;
};
struct S {
ivec3 a;
int b;
uvec3 c;
uint d;
vec3 e;
float f;
ivec2 g;
ivec2 h;
mat2x3 i;
mat3x2 j;
uint pad_3;
uint pad_4;
Inner k;
Inner l[4];
float scalar_f32;
int scalar_i32;
uint scalar_u32;
uint pad_6;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_7;
uint pad_8;
vec3 vec3_f32;
uint pad_9;
ivec3 vec3_i32;
uint pad_10;
uvec3 vec3_u32;
uint pad_11;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
mat2 mat2x2_f32;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_12;
uint pad_13;
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];
};
struct S_std140 {
ivec3 a;
int b;
uvec3 c;
uint d;
vec3 e;
float f;
ivec2 g;
ivec2 h;
mat2x3 i;
vec2 j_0;
vec2 j_1;
vec2 j_2;
uint pad_3;
uint pad_4;
Inner k;
Inner l[4];
float scalar_f32;
int scalar_i32;
uint scalar_u32;
uint pad_6;
vec2 vec2_f32;
ivec2 vec2_i32;
uvec2 vec2_u32;
uint pad_7;
uint pad_8;
vec3 vec3_f32;
uint pad_9;
ivec3 vec3_i32;
uint pad_10;
uvec3 vec3_u32;
uint pad_11;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
vec2 mat2x2_f32_0;
vec2 mat2x2_f32_1;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
vec2 mat3x2_f32_0;
vec2 mat3x2_f32_1;
vec2 mat3x2_f32_2;
uint pad_12;
uint pad_13;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
vec2 mat4x2_f32_0;
vec2 mat4x2_f32_1;
vec2 mat4x2_f32_2;
vec2 mat4x2_f32_3;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
vec3 arr2_vec3_f32[2];
Inner struct_inner;
Inner array_struct_inner[4];
};
layout(binding = 0, std140) uniform s_block_std140_ubo {
layout(binding = 0, std140) uniform ub_block_std140_ubo {
S_std140 inner;
} s;
} ub;
mat3x2 load_s_inner_j() {
return mat3x2(s.inner.j_0, s.inner.j_1, s.inner.j_2);
mat2 load_ub_inner_mat2x2_f32() {
return mat2(ub.inner.mat2x2_f32_0, ub.inner.mat2x2_f32_1);
}
mat3x2 load_ub_inner_mat3x2_f32() {
return mat3x2(ub.inner.mat3x2_f32_0, ub.inner.mat3x2_f32_1, ub.inner.mat3x2_f32_2);
}
mat4x2 load_ub_inner_mat4x2_f32() {
return mat4x2(ub.inner.mat4x2_f32_0, ub.inner.mat4x2_f32_1, ub.inner.mat4x2_f32_2, ub.inner.mat4x2_f32_3);
}
void tint_symbol() {
ivec3 a = s.inner.a;
int b = s.inner.b;
uvec3 c = s.inner.c;
uint d = s.inner.d;
vec3 e = s.inner.e;
float f = s.inner.f;
ivec2 g = s.inner.g;
ivec2 h = s.inner.h;
mat2x3 i = s.inner.i;
mat3x2 j = load_s_inner_j();
Inner k = s.inner.k;
Inner l[4] = s.inner.l;
float scalar_f32 = ub.inner.scalar_f32;
int scalar_i32 = ub.inner.scalar_i32;
uint scalar_u32 = ub.inner.scalar_u32;
vec2 vec2_f32 = ub.inner.vec2_f32;
ivec2 vec2_i32 = ub.inner.vec2_i32;
uvec2 vec2_u32 = ub.inner.vec2_u32;
vec3 vec3_f32 = ub.inner.vec3_f32;
ivec3 vec3_i32 = ub.inner.vec3_i32;
uvec3 vec3_u32 = ub.inner.vec3_u32;
vec4 vec4_f32 = ub.inner.vec4_f32;
ivec4 vec4_i32 = ub.inner.vec4_i32;
uvec4 vec4_u32 = ub.inner.vec4_u32;
mat2 mat2x2_f32 = load_ub_inner_mat2x2_f32();
mat2x3 mat2x3_f32 = ub.inner.mat2x3_f32;
mat2x4 mat2x4_f32 = ub.inner.mat2x4_f32;
mat3x2 mat3x2_f32 = load_ub_inner_mat3x2_f32();
mat3 mat3x3_f32 = ub.inner.mat3x3_f32;
mat3x4 mat3x4_f32 = ub.inner.mat3x4_f32;
mat4x2 mat4x2_f32 = load_ub_inner_mat4x2_f32();
mat4x3 mat4x3_f32 = ub.inner.mat4x3_f32;
mat4 mat4x4_f32 = ub.inner.mat4x4_f32;
vec3 arr2_vec3_f32[2] = ub.inner.arr2_vec3_f32;
Inner struct_inner = ub.inner.struct_inner;
Inner array_struct_inner[4] = ub.inner.array_struct_inner;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -15,39 +15,70 @@ struct tint_array {
};
struct Inner {
/* 0x0000 */ int x;
/* 0x0000 */ int scalar_i32;
/* 0x0004 */ tint_array<int8_t, 12> tint_pad;
/* 0x0010 */ float scalar_f32;
/* 0x0014 */ tint_array<int8_t, 12> tint_pad_1;
};
struct S {
/* 0x0000 */ packed_int3 a;
/* 0x000c */ int b;
/* 0x0010 */ packed_uint3 c;
/* 0x001c */ uint d;
/* 0x0020 */ packed_float3 e;
/* 0x002c */ float f;
/* 0x0030 */ int2 g;
/* 0x0038 */ int2 h;
/* 0x0040 */ float2x3 i;
/* 0x0060 */ float3x2 j;
/* 0x0078 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0080 */ Inner k;
/* 0x0090 */ tint_array<Inner, 4> l;
/* 0x0000 */ float scalar_f32;
/* 0x0004 */ int scalar_i32;
/* 0x0008 */ uint scalar_u32;
/* 0x000c */ tint_array<int8_t, 4> tint_pad_2;
/* 0x0010 */ float2 vec2_f32;
/* 0x0018 */ int2 vec2_i32;
/* 0x0020 */ uint2 vec2_u32;
/* 0x0028 */ tint_array<int8_t, 8> tint_pad_3;
/* 0x0030 */ packed_float3 vec3_f32;
/* 0x003c */ tint_array<int8_t, 4> tint_pad_4;
/* 0x0040 */ packed_int3 vec3_i32;
/* 0x004c */ tint_array<int8_t, 4> tint_pad_5;
/* 0x0050 */ packed_uint3 vec3_u32;
/* 0x005c */ tint_array<int8_t, 4> tint_pad_6;
/* 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_7;
/* 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;
/* 0x0240 */ tint_array<Inner, 4> array_struct_inner;
};
kernel void tint_symbol(const constant S* tint_symbol_1 [[buffer(0)]]) {
int3 const a = int3((*(tint_symbol_1)).a);
int const b = (*(tint_symbol_1)).b;
uint3 const c = uint3((*(tint_symbol_1)).c);
uint const d = (*(tint_symbol_1)).d;
float3 const e = float3((*(tint_symbol_1)).e);
float const f = (*(tint_symbol_1)).f;
int2 const g = (*(tint_symbol_1)).g;
int2 const h = (*(tint_symbol_1)).h;
float2x3 const i = (*(tint_symbol_1)).i;
float3x2 const j = (*(tint_symbol_1)).j;
Inner const k = (*(tint_symbol_1)).k;
tint_array<Inner, 4> const l = (*(tint_symbol_1)).l;
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;
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;
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);
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;
}

View File

@@ -1,138 +1,271 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 85
; Bound: 175
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %s_block_std140 "s_block_std140"
OpMemberName %s_block_std140 0 "inner"
OpName %ub_block_std140 "ub_block_std140"
OpMemberName %ub_block_std140 0 "inner"
OpName %S_std140 "S_std140"
OpMemberName %S_std140 0 "a"
OpMemberName %S_std140 1 "b"
OpMemberName %S_std140 2 "c"
OpMemberName %S_std140 3 "d"
OpMemberName %S_std140 4 "e"
OpMemberName %S_std140 5 "f"
OpMemberName %S_std140 6 "g"
OpMemberName %S_std140 7 "h"
OpMemberName %S_std140 8 "i"
OpMemberName %S_std140 9 "j_0"
OpMemberName %S_std140 10 "j_1"
OpMemberName %S_std140 11 "j_2"
OpMemberName %S_std140 12 "k"
OpMemberName %S_std140 0 "scalar_f32"
OpMemberName %S_std140 1 "scalar_i32"
OpMemberName %S_std140 2 "scalar_u32"
OpMemberName %S_std140 3 "vec2_f32"
OpMemberName %S_std140 4 "vec2_i32"
OpMemberName %S_std140 5 "vec2_u32"
OpMemberName %S_std140 6 "vec3_f32"
OpMemberName %S_std140 7 "vec3_i32"
OpMemberName %S_std140 8 "vec3_u32"
OpMemberName %S_std140 9 "vec4_f32"
OpMemberName %S_std140 10 "vec4_i32"
OpMemberName %S_std140 11 "vec4_u32"
OpMemberName %S_std140 12 "mat2x2_f32_0"
OpMemberName %S_std140 13 "mat2x2_f32_1"
OpMemberName %S_std140 14 "mat2x3_f32"
OpMemberName %S_std140 15 "mat2x4_f32"
OpMemberName %S_std140 16 "mat3x2_f32_0"
OpMemberName %S_std140 17 "mat3x2_f32_1"
OpMemberName %S_std140 18 "mat3x2_f32_2"
OpMemberName %S_std140 19 "mat3x3_f32"
OpMemberName %S_std140 20 "mat3x4_f32"
OpMemberName %S_std140 21 "mat4x2_f32_0"
OpMemberName %S_std140 22 "mat4x2_f32_1"
OpMemberName %S_std140 23 "mat4x2_f32_2"
OpMemberName %S_std140 24 "mat4x2_f32_3"
OpMemberName %S_std140 25 "mat4x3_f32"
OpMemberName %S_std140 26 "mat4x4_f32"
OpMemberName %S_std140 27 "arr2_vec3_f32"
OpMemberName %S_std140 28 "struct_inner"
OpName %Inner "Inner"
OpMemberName %Inner 0 "x"
OpMemberName %S_std140 13 "l"
OpName %s "s"
OpName %load_s_inner_j "load_s_inner_j"
OpMemberName %Inner 0 "scalar_i32"
OpMemberName %Inner 1 "scalar_f32"
OpMemberName %S_std140 29 "array_struct_inner"
OpName %ub "ub"
OpName %load_ub_inner_mat2x2_f32 "load_ub_inner_mat2x2_f32"
OpName %load_ub_inner_mat3x2_f32 "load_ub_inner_mat3x2_f32"
OpName %load_ub_inner_mat4x2_f32 "load_ub_inner_mat4x2_f32"
OpName %main "main"
OpDecorate %s_block_std140 Block
OpMemberDecorate %s_block_std140 0 Offset 0
OpDecorate %ub_block_std140 Block
OpMemberDecorate %ub_block_std140 0 Offset 0
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 12
OpMemberDecorate %S_std140 2 Offset 16
OpMemberDecorate %S_std140 3 Offset 28
OpMemberDecorate %S_std140 4 Offset 32
OpMemberDecorate %S_std140 5 Offset 44
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
OpMemberDecorate %S_std140 3 Offset 16
OpMemberDecorate %S_std140 4 Offset 24
OpMemberDecorate %S_std140 5 Offset 32
OpMemberDecorate %S_std140 6 Offset 48
OpMemberDecorate %S_std140 7 Offset 56
OpMemberDecorate %S_std140 8 Offset 64
OpMemberDecorate %S_std140 8 ColMajor
OpMemberDecorate %S_std140 8 MatrixStride 16
OpMemberDecorate %S_std140 7 Offset 64
OpMemberDecorate %S_std140 8 Offset 80
OpMemberDecorate %S_std140 9 Offset 96
OpMemberDecorate %S_std140 10 Offset 104
OpMemberDecorate %S_std140 11 Offset 112
OpMemberDecorate %S_std140 12 Offset 128
OpMemberDecorate %S_std140 10 Offset 112
OpMemberDecorate %S_std140 11 Offset 128
OpMemberDecorate %S_std140 12 Offset 144
OpMemberDecorate %S_std140 13 Offset 152
OpMemberDecorate %S_std140 14 Offset 160
OpMemberDecorate %S_std140 14 ColMajor
OpMemberDecorate %S_std140 14 MatrixStride 16
OpMemberDecorate %S_std140 15 Offset 192
OpMemberDecorate %S_std140 15 ColMajor
OpMemberDecorate %S_std140 15 MatrixStride 16
OpMemberDecorate %S_std140 16 Offset 224
OpMemberDecorate %S_std140 17 Offset 232
OpMemberDecorate %S_std140 18 Offset 240
OpMemberDecorate %S_std140 19 Offset 256
OpMemberDecorate %S_std140 19 ColMajor
OpMemberDecorate %S_std140 19 MatrixStride 16
OpMemberDecorate %S_std140 20 Offset 304
OpMemberDecorate %S_std140 20 ColMajor
OpMemberDecorate %S_std140 20 MatrixStride 16
OpMemberDecorate %S_std140 21 Offset 352
OpMemberDecorate %S_std140 22 Offset 360
OpMemberDecorate %S_std140 23 Offset 368
OpMemberDecorate %S_std140 24 Offset 376
OpMemberDecorate %S_std140 25 Offset 384
OpMemberDecorate %S_std140 25 ColMajor
OpMemberDecorate %S_std140 25 MatrixStride 16
OpMemberDecorate %S_std140 26 Offset 448
OpMemberDecorate %S_std140 26 ColMajor
OpMemberDecorate %S_std140 26 MatrixStride 16
OpMemberDecorate %S_std140 27 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S_std140 28 Offset 544
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %S_std140 13 Offset 144
OpDecorate %_arr_Inner_uint_4 ArrayStride 16
OpDecorate %s NonWritable
OpDecorate %s Binding 0
OpDecorate %s DescriptorSet 0
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
OpMemberDecorate %Inner 1 Offset 16
OpMemberDecorate %S_std140 29 Offset 576
OpDecorate %_arr_Inner_uint_4 ArrayStride 32
OpDecorate %ub NonWritable
OpDecorate %ub Binding 0
OpDecorate %ub DescriptorSet 0
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
%mat2v3float = OpTypeMatrix %v3float 2
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2
%Inner = OpTypeStruct %int
%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
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%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
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S_std140 = OpTypeStruct %v3int %int %v3uint %uint %v3float %float %v2int %v2int %mat2v3float %v2float %v2float %v2float %Inner %_arr_Inner_uint_4
%s_block_std140 = OpTypeStruct %S_std140
%_ptr_Uniform_s_block_std140 = OpTypePointer Uniform %s_block_std140
%s = OpVariable %_ptr_Uniform_s_block_std140 Uniform
%mat3v2float = OpTypeMatrix %v2float 3
%17 = OpTypeFunction %mat3v2float
%S_std140 = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %v2float %v2float %mat2v3float %mat2v4float %v2float %v2float %v2float %mat3v3float %mat3v4float %v2float %v2float %v2float %v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2 %Inner %_arr_Inner_uint_4
%ub_block_std140 = OpTypeStruct %S_std140
%_ptr_Uniform_ub_block_std140 = OpTypePointer Uniform %ub_block_std140
%ub = OpVariable %_ptr_Uniform_ub_block_std140 Uniform
%mat2v2float = OpTypeMatrix %v2float 2
%28 = OpTypeFunction %mat2v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
%uint_9 = OpConstant %uint 9
%uint_12 = OpConstant %uint 12
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_10 = OpConstant %uint 10
%uint_11 = OpConstant %uint 11
%uint_13 = OpConstant %uint 13
%mat3v2float = OpTypeMatrix %v2float 3
%46 = OpTypeFunction %mat3v2float
%uint_16 = OpConstant %uint 16
%uint_17 = OpConstant %uint 17
%uint_18 = OpConstant %uint 18
%mat4v2float = OpTypeMatrix %v2float 4
%65 = OpTypeFunction %mat4v2float
%uint_21 = OpConstant %uint 21
%uint_22 = OpConstant %uint 22
%uint_23 = OpConstant %uint 23
%uint_24 = OpConstant %uint 24
%void = OpTypeVoid
%39 = OpTypeFunction %void
%_ptr_Uniform_v3int = OpTypePointer Uniform %v3int
%88 = OpTypeFunction %void
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_v3uint = OpTypePointer Uniform %v3uint
%uint_3 = OpConstant %uint 3
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_5 = OpConstant %uint 5
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_6 = OpConstant %uint 6
%uint_3 = OpConstant %uint 3
%_ptr_Uniform_v2int = OpTypePointer Uniform %v2int
%uint_5 = OpConstant %uint 5
%_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint
%uint_6 = OpConstant %uint 6
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_7 = OpConstant %uint 7
%_ptr_Uniform_v3int = OpTypePointer Uniform %v3int
%uint_8 = OpConstant %uint 8
%_ptr_Uniform_v3uint = OpTypePointer Uniform %v3uint
%uint_9 = OpConstant %uint 9
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%uint_10 = OpConstant %uint 10
%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int
%uint_11 = OpConstant %uint 11
%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint
%uint_14 = OpConstant %uint 14
%_ptr_Uniform_mat2v3float = OpTypePointer Uniform %mat2v3float
%uint_12 = OpConstant %uint 12
%uint_15 = OpConstant %uint 15
%_ptr_Uniform_mat2v4float = OpTypePointer Uniform %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
%uint_20 = OpConstant %uint 20
%_ptr_Uniform_mat3v4float = OpTypePointer Uniform %mat3v4float
%uint_25 = OpConstant %uint 25
%_ptr_Uniform_mat4v3float = OpTypePointer Uniform %mat4v3float
%uint_26 = OpConstant %uint 26
%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float
%uint_27 = OpConstant %uint 27
%_ptr_Uniform__arr_v3float_uint_2 = OpTypePointer Uniform %_arr_v3float_uint_2
%uint_28 = OpConstant %uint 28
%_ptr_Uniform_Inner = OpTypePointer Uniform %Inner
%uint_13 = OpConstant %uint 13
%uint_29 = OpConstant %uint 29
%_ptr_Uniform__arr_Inner_uint_4 = OpTypePointer Uniform %_arr_Inner_uint_4
%load_s_inner_j = OpFunction %mat3v2float None %17
%20 = OpLabel
%24 = OpAccessChain %_ptr_Uniform_S_std140 %s %uint_0
%28 = OpAccessChain %_ptr_Uniform_v2float %24 %uint_9
%29 = OpLoad %v2float %28
%32 = OpAccessChain %_ptr_Uniform_v2float %24 %uint_10
%33 = OpLoad %v2float %32
%36 = OpAccessChain %_ptr_Uniform_v2float %24 %uint_11
%37 = OpLoad %v2float %36
%38 = OpCompositeConstruct %mat3v2float %29 %33 %37
OpReturnValue %38
%load_ub_inner_mat2x2_f32 = OpFunction %mat2v2float None %28
%31 = OpLabel
%35 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%39 = OpAccessChain %_ptr_Uniform_v2float %35 %uint_12
%40 = OpLoad %v2float %39
%43 = OpAccessChain %_ptr_Uniform_v2float %35 %uint_13
%44 = OpLoad %v2float %43
%45 = OpCompositeConstruct %mat2v2float %40 %44
OpReturnValue %45
OpFunctionEnd
%main = OpFunction %void None %39
%42 = OpLabel
%44 = OpAccessChain %_ptr_Uniform_v3int %s %uint_0 %uint_0
%45 = OpLoad %v3int %44
%48 = OpAccessChain %_ptr_Uniform_int %s %uint_0 %uint_1
%49 = OpLoad %int %48
%52 = OpAccessChain %_ptr_Uniform_v3uint %s %uint_0 %uint_2
%53 = OpLoad %v3uint %52
%56 = OpAccessChain %_ptr_Uniform_uint %s %uint_0 %uint_3
%57 = OpLoad %uint %56
%59 = OpAccessChain %_ptr_Uniform_v3float %s %uint_0 %uint_4
%60 = OpLoad %v3float %59
%63 = OpAccessChain %_ptr_Uniform_float %s %uint_0 %uint_5
%64 = OpLoad %float %63
%67 = OpAccessChain %_ptr_Uniform_v2int %s %uint_0 %uint_6
%68 = OpLoad %v2int %67
%70 = OpAccessChain %_ptr_Uniform_v2int %s %uint_0 %uint_7
%71 = OpLoad %v2int %70
%74 = OpAccessChain %_ptr_Uniform_mat2v3float %s %uint_0 %uint_8
%75 = OpLoad %mat2v3float %74
%76 = OpFunctionCall %mat3v2float %load_s_inner_j
%79 = OpAccessChain %_ptr_Uniform_Inner %s %uint_0 %uint_12
%80 = OpLoad %Inner %79
%83 = OpAccessChain %_ptr_Uniform__arr_Inner_uint_4 %s %uint_0 %uint_13
%84 = OpLoad %_arr_Inner_uint_4 %83
%load_ub_inner_mat3x2_f32 = OpFunction %mat3v2float None %46
%49 = OpLabel
%51 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%54 = OpAccessChain %_ptr_Uniform_v2float %51 %uint_16
%55 = OpLoad %v2float %54
%58 = OpAccessChain %_ptr_Uniform_v2float %51 %uint_17
%59 = OpLoad %v2float %58
%62 = OpAccessChain %_ptr_Uniform_v2float %51 %uint_18
%63 = OpLoad %v2float %62
%64 = OpCompositeConstruct %mat3v2float %55 %59 %63
OpReturnValue %64
OpFunctionEnd
%load_ub_inner_mat4x2_f32 = OpFunction %mat4v2float None %65
%68 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%73 = OpAccessChain %_ptr_Uniform_v2float %70 %uint_21
%74 = OpLoad %v2float %73
%77 = OpAccessChain %_ptr_Uniform_v2float %70 %uint_22
%78 = OpLoad %v2float %77
%81 = OpAccessChain %_ptr_Uniform_v2float %70 %uint_23
%82 = OpLoad %v2float %81
%85 = OpAccessChain %_ptr_Uniform_v2float %70 %uint_24
%86 = OpLoad %v2float %85
%87 = OpCompositeConstruct %mat4v2float %74 %78 %82 %86
OpReturnValue %87
OpFunctionEnd
%main = OpFunction %void None %88
%91 = OpLabel
%93 = OpAccessChain %_ptr_Uniform_float %ub %uint_0 %uint_0
%94 = OpLoad %float %93
%97 = OpAccessChain %_ptr_Uniform_int %ub %uint_0 %uint_1
%98 = OpLoad %int %97
%100 = OpAccessChain %_ptr_Uniform_uint %ub %uint_0 %uint_2
%101 = OpLoad %uint %100
%103 = OpAccessChain %_ptr_Uniform_v2float %ub %uint_0 %uint_3
%104 = OpLoad %v2float %103
%106 = OpAccessChain %_ptr_Uniform_v2int %ub %uint_0 %uint_4
%107 = OpLoad %v2int %106
%110 = OpAccessChain %_ptr_Uniform_v2uint %ub %uint_0 %uint_5
%111 = OpLoad %v2uint %110
%114 = OpAccessChain %_ptr_Uniform_v3float %ub %uint_0 %uint_6
%115 = OpLoad %v3float %114
%118 = OpAccessChain %_ptr_Uniform_v3int %ub %uint_0 %uint_7
%119 = OpLoad %v3int %118
%122 = OpAccessChain %_ptr_Uniform_v3uint %ub %uint_0 %uint_8
%123 = OpLoad %v3uint %122
%126 = OpAccessChain %_ptr_Uniform_v4float %ub %uint_0 %uint_9
%127 = OpLoad %v4float %126
%130 = OpAccessChain %_ptr_Uniform_v4int %ub %uint_0 %uint_10
%131 = OpLoad %v4int %130
%134 = OpAccessChain %_ptr_Uniform_v4uint %ub %uint_0 %uint_11
%135 = OpLoad %v4uint %134
%136 = OpFunctionCall %mat2v2float %load_ub_inner_mat2x2_f32
%139 = OpAccessChain %_ptr_Uniform_mat2v3float %ub %uint_0 %uint_14
%140 = OpLoad %mat2v3float %139
%143 = OpAccessChain %_ptr_Uniform_mat2v4float %ub %uint_0 %uint_15
%144 = OpLoad %mat2v4float %143
%145 = OpFunctionCall %mat3v2float %load_ub_inner_mat3x2_f32
%148 = OpAccessChain %_ptr_Uniform_mat3v3float %ub %uint_0 %uint_19
%149 = OpLoad %mat3v3float %148
%152 = OpAccessChain %_ptr_Uniform_mat3v4float %ub %uint_0 %uint_20
%153 = OpLoad %mat3v4float %152
%154 = OpFunctionCall %mat4v2float %load_ub_inner_mat4x2_f32
%157 = OpAccessChain %_ptr_Uniform_mat4v3float %ub %uint_0 %uint_25
%158 = OpLoad %mat4v3float %157
%161 = OpAccessChain %_ptr_Uniform_mat4v4float %ub %uint_0 %uint_26
%162 = OpLoad %mat4v4float %161
%165 = OpAccessChain %_ptr_Uniform__arr_v3float_uint_2 %ub %uint_0 %uint_27
%166 = OpLoad %_arr_v3float_uint_2 %165
%169 = OpAccessChain %_ptr_Uniform_Inner %ub %uint_0 %uint_28
%170 = OpLoad %Inner %169
%173 = OpAccessChain %_ptr_Uniform__arr_Inner_uint_4 %ub %uint_0 %uint_29
%174 = OpLoad %_arr_Inner_uint_4 %173
OpReturn
OpFunctionEnd

View File

@@ -1,39 +1,65 @@
struct Inner {
@size(16)
x : i32,
scalar_i32 : i32,
@align(16) @size(16)
scalar_f32 : f32,
}
struct S {
a : vec3<i32>,
b : i32,
c : vec3<u32>,
d : u32,
e : vec3<f32>,
f : f32,
g : vec2<i32>,
h : vec2<i32>,
i : mat2x3<f32>,
j : mat3x2<f32>,
scalar_f32 : f32,
scalar_i32 : i32,
scalar_u32 : u32,
vec2_f32 : vec2<f32>,
vec2_i32 : vec2<i32>,
vec2_u32 : vec2<u32>,
vec3_f32 : vec3<f32>,
vec3_i32 : vec3<i32>,
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>,
@align(16)
k : Inner,
arr2_vec3_f32 : array<vec3<f32>, 2>,
@align(16)
l : array<Inner, 4>,
struct_inner : Inner,
@align(16)
array_struct_inner : array<Inner, 4>,
}
@binding(0) @group(0) var<uniform> s : S;
@binding(0) @group(0) var<uniform> ub : S;
@compute @workgroup_size(1)
fn main() {
let a = s.a;
let b = s.b;
let c = s.c;
let d = s.d;
let e = s.e;
let f = s.f;
let g = s.g;
let h = s.h;
let i = s.i;
let j = s.j;
let k = s.k;
let l = s.l;
let scalar_f32 = ub.scalar_f32;
let scalar_i32 = ub.scalar_i32;
let scalar_u32 = ub.scalar_u32;
let vec2_f32 = ub.vec2_f32;
let vec2_i32 = ub.vec2_i32;
let vec2_u32 = ub.vec2_u32;
let vec3_f32 = ub.vec3_f32;
let vec3_i32 = ub.vec3_i32;
let vec3_u32 = ub.vec3_u32;
let vec4_f32 = ub.vec4_f32;
let vec4_i32 = ub.vec4_i32;
let vec4_u32 = ub.vec4_u32;
let mat2x2_f32 = ub.mat2x2_f32;
let mat2x3_f32 = ub.mat2x3_f32;
let mat2x4_f32 = ub.mat2x4_f32;
let mat3x2_f32 = ub.mat3x2_f32;
let mat3x3_f32 = ub.mat3x3_f32;
let mat3x4_f32 = ub.mat3x4_f32;
let mat4x2_f32 = ub.mat4x2_f32;
let mat4x3_f32 = ub.mat4x3_f32;
let mat4x4_f32 = ub.mat4x4_f32;
let arr2_vec3_f32 = ub.arr2_vec3_f32;
let struct_inner = ub.struct_inner;
let array_struct_inner = ub.array_struct_inner;
}

View File

@@ -0,0 +1,92 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
@size(8) 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>,
@align(16) arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
@align(16) struct_inner : Inner,
@align(16) array_struct_inner : array<Inner, 4>,
};
@binding(0) @group(0) var<uniform> ub : S;
@compute @workgroup_size(1)
fn main() {
let scalar_f32 = ub.scalar_f32;
let scalar_i32 = ub.scalar_i32;
let scalar_u32 = ub.scalar_u32;
let scalar_f16 = ub.scalar_f16;
let vec2_f32 = ub.vec2_f32;
let vec2_i32 = ub.vec2_i32;
let vec2_u32 = ub.vec2_u32;
let vec2_f16 = ub.vec2_f16;
let vec3_f32 = ub.vec3_f32;
let vec3_i32 = ub.vec3_i32;
let vec3_u32 = ub.vec3_u32;
let vec3_f16 = ub.vec3_f16;
let vec4_f32 = ub.vec4_f32;
let vec4_i32 = ub.vec4_i32;
let vec4_u32 = ub.vec4_u32;
let vec4_f16 = ub.vec4_f16;
let mat2x2_f32 = ub.mat2x2_f32;
let mat2x3_f32 = ub.mat2x3_f32;
let mat2x4_f32 = ub.mat2x4_f32;
let mat3x2_f32 = ub.mat3x2_f32;
let mat3x3_f32 = ub.mat3x3_f32;
let mat3x4_f32 = ub.mat3x4_f32;
let mat4x2_f32 = ub.mat4x2_f32;
let mat4x3_f32 = ub.mat4x3_f32;
let mat4x4_f32 = ub.mat4x4_f32;
let mat2x2_f16 = ub.mat2x2_f16;
let mat2x3_f16 = ub.mat2x3_f16;
let mat2x4_f16 = ub.mat2x4_f16;
let mat3x2_f16 = ub.mat3x2_f16;
let mat3x3_f16 = ub.mat3x3_f16;
let mat3x4_f16 = ub.mat3x4_f16;
let mat4x2_f16 = ub.mat4x2_f16;
let mat4x3_f16 = ub.mat4x3_f16;
let mat4x4_f16 = ub.mat4x4_f16;
let arr2_vec3_f32 = ub.arr2_vec3_f32;
let arr2_mat4x2_f16 = ub.arr2_mat4x2_f16;
let struct_inner = ub.struct_inner;
let array_struct_inner = ub.array_struct_inner;
}

View File

@@ -0,0 +1,318 @@
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
cbuffer cbuffer_ub : register(b0, space0) {
uint4 ub[55];
};
float2x2 tint_symbol_16(uint4 buffer[55], uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
float2x3 tint_symbol_17(uint4 buffer[55], uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
}
float2x4 tint_symbol_18(uint4 buffer[55], uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
}
float3x2 tint_symbol_19(uint4 buffer[55], uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
float3x3 tint_symbol_20(uint4 buffer[55], uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
}
float3x4 tint_symbol_21(uint4 buffer[55], uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
}
float4x2 tint_symbol_22(uint4 buffer[55], uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
float4x3 tint_symbol_23(uint4 buffer[55], uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
}
float4x4 tint_symbol_24(uint4 buffer[55], uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
}
matrix<float16_t, 2, 2> tint_symbol_25(uint4 buffer[55], uint offset) {
const uint scalar_offset_27 = ((offset + 0u)) / 4;
uint ubo_load_9 = buffer[scalar_offset_27 / 4][scalar_offset_27 % 4];
const uint scalar_offset_28 = ((offset + 4u)) / 4;
uint ubo_load_10 = buffer[scalar_offset_28 / 4][scalar_offset_28 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_9 & 0xFFFF)), float16_t(f16tof32(ubo_load_9 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_10 & 0xFFFF)), float16_t(f16tof32(ubo_load_10 >> 16))));
}
matrix<float16_t, 2, 3> tint_symbol_26(uint4 buffer[55], uint offset) {
const uint scalar_offset_29 = ((offset + 0u)) / 4;
uint4 ubo_load_12 = buffer[scalar_offset_29 / 4];
uint2 ubo_load_11 = ((scalar_offset_29 & 2) ? ubo_load_12.zw : ubo_load_12.xy);
vector<float16_t, 2> ubo_load_11_xz = vector<float16_t, 2>(f16tof32(ubo_load_11 & 0xFFFF));
float16_t ubo_load_11_y = f16tof32(ubo_load_11[0] >> 16);
const uint scalar_offset_30 = ((offset + 8u)) / 4;
uint4 ubo_load_14 = buffer[scalar_offset_30 / 4];
uint2 ubo_load_13 = ((scalar_offset_30 & 2) ? ubo_load_14.zw : ubo_load_14.xy);
vector<float16_t, 2> ubo_load_13_xz = vector<float16_t, 2>(f16tof32(ubo_load_13 & 0xFFFF));
float16_t ubo_load_13_y = f16tof32(ubo_load_13[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_11_xz[0], ubo_load_11_y, ubo_load_11_xz[1]), vector<float16_t, 3>(ubo_load_13_xz[0], ubo_load_13_y, ubo_load_13_xz[1]));
}
matrix<float16_t, 2, 4> tint_symbol_27(uint4 buffer[55], uint offset) {
const uint scalar_offset_31 = ((offset + 0u)) / 4;
uint4 ubo_load_16 = buffer[scalar_offset_31 / 4];
uint2 ubo_load_15 = ((scalar_offset_31 & 2) ? ubo_load_16.zw : ubo_load_16.xy);
vector<float16_t, 2> ubo_load_15_xz = vector<float16_t, 2>(f16tof32(ubo_load_15 & 0xFFFF));
vector<float16_t, 2> ubo_load_15_yw = vector<float16_t, 2>(f16tof32(ubo_load_15 >> 16));
const uint scalar_offset_32 = ((offset + 8u)) / 4;
uint4 ubo_load_18 = buffer[scalar_offset_32 / 4];
uint2 ubo_load_17 = ((scalar_offset_32 & 2) ? ubo_load_18.zw : ubo_load_18.xy);
vector<float16_t, 2> ubo_load_17_xz = vector<float16_t, 2>(f16tof32(ubo_load_17 & 0xFFFF));
vector<float16_t, 2> ubo_load_17_yw = vector<float16_t, 2>(f16tof32(ubo_load_17 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_15_xz[0], ubo_load_15_yw[0], ubo_load_15_xz[1], ubo_load_15_yw[1]), vector<float16_t, 4>(ubo_load_17_xz[0], ubo_load_17_yw[0], ubo_load_17_xz[1], ubo_load_17_yw[1]));
}
matrix<float16_t, 3, 2> tint_symbol_28(uint4 buffer[55], uint offset) {
const uint scalar_offset_33 = ((offset + 0u)) / 4;
uint ubo_load_19 = buffer[scalar_offset_33 / 4][scalar_offset_33 % 4];
const uint scalar_offset_34 = ((offset + 4u)) / 4;
uint ubo_load_20 = buffer[scalar_offset_34 / 4][scalar_offset_34 % 4];
const uint scalar_offset_35 = ((offset + 8u)) / 4;
uint ubo_load_21 = buffer[scalar_offset_35 / 4][scalar_offset_35 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_19 & 0xFFFF)), float16_t(f16tof32(ubo_load_19 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_20 & 0xFFFF)), float16_t(f16tof32(ubo_load_20 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_21 & 0xFFFF)), float16_t(f16tof32(ubo_load_21 >> 16))));
}
matrix<float16_t, 3, 3> tint_symbol_29(uint4 buffer[55], uint offset) {
const uint scalar_offset_36 = ((offset + 0u)) / 4;
uint4 ubo_load_23 = buffer[scalar_offset_36 / 4];
uint2 ubo_load_22 = ((scalar_offset_36 & 2) ? ubo_load_23.zw : ubo_load_23.xy);
vector<float16_t, 2> ubo_load_22_xz = vector<float16_t, 2>(f16tof32(ubo_load_22 & 0xFFFF));
float16_t ubo_load_22_y = f16tof32(ubo_load_22[0] >> 16);
const uint scalar_offset_37 = ((offset + 8u)) / 4;
uint4 ubo_load_25 = buffer[scalar_offset_37 / 4];
uint2 ubo_load_24 = ((scalar_offset_37 & 2) ? ubo_load_25.zw : ubo_load_25.xy);
vector<float16_t, 2> ubo_load_24_xz = vector<float16_t, 2>(f16tof32(ubo_load_24 & 0xFFFF));
float16_t ubo_load_24_y = f16tof32(ubo_load_24[0] >> 16);
const uint scalar_offset_38 = ((offset + 16u)) / 4;
uint4 ubo_load_27 = buffer[scalar_offset_38 / 4];
uint2 ubo_load_26 = ((scalar_offset_38 & 2) ? ubo_load_27.zw : ubo_load_27.xy);
vector<float16_t, 2> ubo_load_26_xz = vector<float16_t, 2>(f16tof32(ubo_load_26 & 0xFFFF));
float16_t ubo_load_26_y = f16tof32(ubo_load_26[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_22_xz[0], ubo_load_22_y, ubo_load_22_xz[1]), vector<float16_t, 3>(ubo_load_24_xz[0], ubo_load_24_y, ubo_load_24_xz[1]), vector<float16_t, 3>(ubo_load_26_xz[0], ubo_load_26_y, ubo_load_26_xz[1]));
}
matrix<float16_t, 3, 4> tint_symbol_30(uint4 buffer[55], uint offset) {
const uint scalar_offset_39 = ((offset + 0u)) / 4;
uint4 ubo_load_29 = buffer[scalar_offset_39 / 4];
uint2 ubo_load_28 = ((scalar_offset_39 & 2) ? ubo_load_29.zw : ubo_load_29.xy);
vector<float16_t, 2> ubo_load_28_xz = vector<float16_t, 2>(f16tof32(ubo_load_28 & 0xFFFF));
vector<float16_t, 2> ubo_load_28_yw = vector<float16_t, 2>(f16tof32(ubo_load_28 >> 16));
const uint scalar_offset_40 = ((offset + 8u)) / 4;
uint4 ubo_load_31 = buffer[scalar_offset_40 / 4];
uint2 ubo_load_30 = ((scalar_offset_40 & 2) ? ubo_load_31.zw : ubo_load_31.xy);
vector<float16_t, 2> ubo_load_30_xz = vector<float16_t, 2>(f16tof32(ubo_load_30 & 0xFFFF));
vector<float16_t, 2> ubo_load_30_yw = vector<float16_t, 2>(f16tof32(ubo_load_30 >> 16));
const uint scalar_offset_41 = ((offset + 16u)) / 4;
uint4 ubo_load_33 = buffer[scalar_offset_41 / 4];
uint2 ubo_load_32 = ((scalar_offset_41 & 2) ? ubo_load_33.zw : ubo_load_33.xy);
vector<float16_t, 2> ubo_load_32_xz = vector<float16_t, 2>(f16tof32(ubo_load_32 & 0xFFFF));
vector<float16_t, 2> ubo_load_32_yw = vector<float16_t, 2>(f16tof32(ubo_load_32 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_28_xz[0], ubo_load_28_yw[0], ubo_load_28_xz[1], ubo_load_28_yw[1]), vector<float16_t, 4>(ubo_load_30_xz[0], ubo_load_30_yw[0], ubo_load_30_xz[1], ubo_load_30_yw[1]), vector<float16_t, 4>(ubo_load_32_xz[0], ubo_load_32_yw[0], ubo_load_32_xz[1], ubo_load_32_yw[1]));
}
matrix<float16_t, 4, 2> tint_symbol_31(uint4 buffer[55], uint offset) {
const uint scalar_offset_42 = ((offset + 0u)) / 4;
uint ubo_load_34 = buffer[scalar_offset_42 / 4][scalar_offset_42 % 4];
const uint scalar_offset_43 = ((offset + 4u)) / 4;
uint ubo_load_35 = buffer[scalar_offset_43 / 4][scalar_offset_43 % 4];
const uint scalar_offset_44 = ((offset + 8u)) / 4;
uint ubo_load_36 = buffer[scalar_offset_44 / 4][scalar_offset_44 % 4];
const uint scalar_offset_45 = ((offset + 12u)) / 4;
uint ubo_load_37 = buffer[scalar_offset_45 / 4][scalar_offset_45 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_34 & 0xFFFF)), float16_t(f16tof32(ubo_load_34 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_35 & 0xFFFF)), float16_t(f16tof32(ubo_load_35 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_36 & 0xFFFF)), float16_t(f16tof32(ubo_load_36 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_37 & 0xFFFF)), float16_t(f16tof32(ubo_load_37 >> 16))));
}
matrix<float16_t, 4, 3> tint_symbol_32(uint4 buffer[55], uint offset) {
const uint scalar_offset_46 = ((offset + 0u)) / 4;
uint4 ubo_load_39 = buffer[scalar_offset_46 / 4];
uint2 ubo_load_38 = ((scalar_offset_46 & 2) ? ubo_load_39.zw : ubo_load_39.xy);
vector<float16_t, 2> ubo_load_38_xz = vector<float16_t, 2>(f16tof32(ubo_load_38 & 0xFFFF));
float16_t ubo_load_38_y = f16tof32(ubo_load_38[0] >> 16);
const uint scalar_offset_47 = ((offset + 8u)) / 4;
uint4 ubo_load_41 = buffer[scalar_offset_47 / 4];
uint2 ubo_load_40 = ((scalar_offset_47 & 2) ? ubo_load_41.zw : ubo_load_41.xy);
vector<float16_t, 2> ubo_load_40_xz = vector<float16_t, 2>(f16tof32(ubo_load_40 & 0xFFFF));
float16_t ubo_load_40_y = f16tof32(ubo_load_40[0] >> 16);
const uint scalar_offset_48 = ((offset + 16u)) / 4;
uint4 ubo_load_43 = buffer[scalar_offset_48 / 4];
uint2 ubo_load_42 = ((scalar_offset_48 & 2) ? ubo_load_43.zw : ubo_load_43.xy);
vector<float16_t, 2> ubo_load_42_xz = vector<float16_t, 2>(f16tof32(ubo_load_42 & 0xFFFF));
float16_t ubo_load_42_y = f16tof32(ubo_load_42[0] >> 16);
const uint scalar_offset_49 = ((offset + 24u)) / 4;
uint4 ubo_load_45 = buffer[scalar_offset_49 / 4];
uint2 ubo_load_44 = ((scalar_offset_49 & 2) ? ubo_load_45.zw : ubo_load_45.xy);
vector<float16_t, 2> ubo_load_44_xz = vector<float16_t, 2>(f16tof32(ubo_load_44 & 0xFFFF));
float16_t ubo_load_44_y = f16tof32(ubo_load_44[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_38_xz[0], ubo_load_38_y, ubo_load_38_xz[1]), vector<float16_t, 3>(ubo_load_40_xz[0], ubo_load_40_y, ubo_load_40_xz[1]), vector<float16_t, 3>(ubo_load_42_xz[0], ubo_load_42_y, ubo_load_42_xz[1]), vector<float16_t, 3>(ubo_load_44_xz[0], ubo_load_44_y, ubo_load_44_xz[1]));
}
matrix<float16_t, 4, 4> tint_symbol_33(uint4 buffer[55], uint offset) {
const uint scalar_offset_50 = ((offset + 0u)) / 4;
uint4 ubo_load_47 = buffer[scalar_offset_50 / 4];
uint2 ubo_load_46 = ((scalar_offset_50 & 2) ? ubo_load_47.zw : ubo_load_47.xy);
vector<float16_t, 2> ubo_load_46_xz = vector<float16_t, 2>(f16tof32(ubo_load_46 & 0xFFFF));
vector<float16_t, 2> ubo_load_46_yw = vector<float16_t, 2>(f16tof32(ubo_load_46 >> 16));
const uint scalar_offset_51 = ((offset + 8u)) / 4;
uint4 ubo_load_49 = buffer[scalar_offset_51 / 4];
uint2 ubo_load_48 = ((scalar_offset_51 & 2) ? ubo_load_49.zw : ubo_load_49.xy);
vector<float16_t, 2> ubo_load_48_xz = vector<float16_t, 2>(f16tof32(ubo_load_48 & 0xFFFF));
vector<float16_t, 2> ubo_load_48_yw = vector<float16_t, 2>(f16tof32(ubo_load_48 >> 16));
const uint scalar_offset_52 = ((offset + 16u)) / 4;
uint4 ubo_load_51 = buffer[scalar_offset_52 / 4];
uint2 ubo_load_50 = ((scalar_offset_52 & 2) ? ubo_load_51.zw : ubo_load_51.xy);
vector<float16_t, 2> ubo_load_50_xz = vector<float16_t, 2>(f16tof32(ubo_load_50 & 0xFFFF));
vector<float16_t, 2> ubo_load_50_yw = vector<float16_t, 2>(f16tof32(ubo_load_50 >> 16));
const uint scalar_offset_53 = ((offset + 24u)) / 4;
uint4 ubo_load_53 = buffer[scalar_offset_53 / 4];
uint2 ubo_load_52 = ((scalar_offset_53 & 2) ? ubo_load_53.zw : ubo_load_53.xy);
vector<float16_t, 2> ubo_load_52_xz = vector<float16_t, 2>(f16tof32(ubo_load_52 & 0xFFFF));
vector<float16_t, 2> ubo_load_52_yw = vector<float16_t, 2>(f16tof32(ubo_load_52 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_46_xz[0], ubo_load_46_yw[0], ubo_load_46_xz[1], ubo_load_46_yw[1]), vector<float16_t, 4>(ubo_load_48_xz[0], ubo_load_48_yw[0], ubo_load_48_xz[1], ubo_load_48_yw[1]), vector<float16_t, 4>(ubo_load_50_xz[0], ubo_load_50_yw[0], ubo_load_50_xz[1], ubo_load_50_yw[1]), vector<float16_t, 4>(ubo_load_52_xz[0], ubo_load_52_yw[0], ubo_load_52_xz[1], ubo_load_52_yw[1]));
}
typedef float3 tint_symbol_34_ret[2];
tint_symbol_34_ret tint_symbol_34(uint4 buffer[55], uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_54 = ((offset + (i * 16u))) / 4;
arr[i] = asfloat(buffer[scalar_offset_54 / 4].xyz);
}
}
return arr;
}
typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
tint_symbol_35_ret tint_symbol_35(uint4 buffer[55], 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(uint4 buffer[55], uint offset) {
const uint scalar_offset_55 = ((offset + 0u)) / 4;
const uint scalar_offset_56 = ((offset + 4u)) / 4;
const uint scalar_offset_bytes = ((offset + 8u));
const uint scalar_offset_index = scalar_offset_bytes / 4;
const Inner tint_symbol_38 = {asint(buffer[scalar_offset_55 / 4][scalar_offset_55 % 4]), asfloat(buffer[scalar_offset_56 / 4][scalar_offset_56 % 4]), float16_t(f16tof32(((buffer[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF)))};
return tint_symbol_38;
}
typedef Inner tint_symbol_37_ret[4];
tint_symbol_37_ret tint_symbol_37(uint4 buffer[55], 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 * 16u)));
}
}
return arr_2;
}
[numthreads(1, 1, 1)]
void main() {
const float scalar_f32 = asfloat(ub[0].x);
const int scalar_i32 = asint(ub[0].y);
const uint scalar_u32 = ub[0].z;
const float16_t scalar_f16 = float16_t(f16tof32(((ub[0].w) & 0xFFFF)));
const float2 vec2_f32 = asfloat(ub[1].xy);
const int2 vec2_i32 = asint(ub[1].zw);
const uint2 vec2_u32 = ub[2].xy;
uint ubo_load_54 = ub[2].z;
const vector<float16_t, 2> vec2_f16 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_54 & 0xFFFF)), float16_t(f16tof32(ubo_load_54 >> 16)));
const float3 vec3_f32 = asfloat(ub[3].xyz);
const int3 vec3_i32 = asint(ub[4].xyz);
const uint3 vec3_u32 = ub[5].xyz;
uint2 ubo_load_55 = ub[6].xy;
vector<float16_t, 2> ubo_load_55_xz = vector<float16_t, 2>(f16tof32(ubo_load_55 & 0xFFFF));
float16_t ubo_load_55_y = f16tof32(ubo_load_55[0] >> 16);
const vector<float16_t, 3> vec3_f16 = vector<float16_t, 3>(ubo_load_55_xz[0], ubo_load_55_y, ubo_load_55_xz[1]);
const float4 vec4_f32 = asfloat(ub[7]);
const int4 vec4_i32 = asint(ub[8]);
const uint4 vec4_u32 = ub[9];
uint2 ubo_load_56 = ub[10].xy;
vector<float16_t, 2> ubo_load_56_xz = vector<float16_t, 2>(f16tof32(ubo_load_56 & 0xFFFF));
vector<float16_t, 2> ubo_load_56_yw = vector<float16_t, 2>(f16tof32(ubo_load_56 >> 16));
const vector<float16_t, 4> vec4_f16 = vector<float16_t, 4>(ubo_load_56_xz[0], ubo_load_56_yw[0], ubo_load_56_xz[1], ubo_load_56_yw[1]);
const float2x2 mat2x2_f32 = tint_symbol_16(ub, 168u);
const float2x3 mat2x3_f32 = tint_symbol_17(ub, 192u);
const float2x4 mat2x4_f32 = tint_symbol_18(ub, 224u);
const float3x2 mat3x2_f32 = tint_symbol_19(ub, 256u);
const float3x3 mat3x3_f32 = tint_symbol_20(ub, 288u);
const float3x4 mat3x4_f32 = tint_symbol_21(ub, 336u);
const float4x2 mat4x2_f32 = tint_symbol_22(ub, 384u);
const float4x3 mat4x3_f32 = tint_symbol_23(ub, 416u);
const float4x4 mat4x4_f32 = tint_symbol_24(ub, 480u);
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(ub, 544u);
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(ub, 552u);
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(ub, 568u);
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(ub, 584u);
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(ub, 600u);
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(ub, 624u);
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(ub, 648u);
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(ub, 664u);
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(ub, 696u);
const float3 arr2_vec3_f32[2] = tint_symbol_34(ub, 736u);
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(ub, 768u);
const Inner struct_inner = tint_symbol_36(ub, 800u);
const Inner array_struct_inner[4] = tint_symbol_37(ub, 816u);
return;
}

View File

@@ -0,0 +1,323 @@
SKIP: FAILED
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
};
cbuffer cbuffer_ub : register(b0, space0) {
uint4 ub[55];
};
float2x2 tint_symbol_16(uint4 buffer[55], uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
float2x3 tint_symbol_17(uint4 buffer[55], uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
}
float2x4 tint_symbol_18(uint4 buffer[55], uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
}
float3x2 tint_symbol_19(uint4 buffer[55], uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
float3x3 tint_symbol_20(uint4 buffer[55], uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
}
float3x4 tint_symbol_21(uint4 buffer[55], uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
}
float4x2 tint_symbol_22(uint4 buffer[55], uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
float4x3 tint_symbol_23(uint4 buffer[55], uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
}
float4x4 tint_symbol_24(uint4 buffer[55], uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
}
matrix<float16_t, 2, 2> tint_symbol_25(uint4 buffer[55], uint offset) {
const uint scalar_offset_27 = ((offset + 0u)) / 4;
uint ubo_load_9 = buffer[scalar_offset_27 / 4][scalar_offset_27 % 4];
const uint scalar_offset_28 = ((offset + 4u)) / 4;
uint ubo_load_10 = buffer[scalar_offset_28 / 4][scalar_offset_28 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_9 & 0xFFFF)), float16_t(f16tof32(ubo_load_9 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_10 & 0xFFFF)), float16_t(f16tof32(ubo_load_10 >> 16))));
}
matrix<float16_t, 2, 3> tint_symbol_26(uint4 buffer[55], uint offset) {
const uint scalar_offset_29 = ((offset + 0u)) / 4;
uint4 ubo_load_12 = buffer[scalar_offset_29 / 4];
uint2 ubo_load_11 = ((scalar_offset_29 & 2) ? ubo_load_12.zw : ubo_load_12.xy);
vector<float16_t, 2> ubo_load_11_xz = vector<float16_t, 2>(f16tof32(ubo_load_11 & 0xFFFF));
float16_t ubo_load_11_y = f16tof32(ubo_load_11[0] >> 16);
const uint scalar_offset_30 = ((offset + 8u)) / 4;
uint4 ubo_load_14 = buffer[scalar_offset_30 / 4];
uint2 ubo_load_13 = ((scalar_offset_30 & 2) ? ubo_load_14.zw : ubo_load_14.xy);
vector<float16_t, 2> ubo_load_13_xz = vector<float16_t, 2>(f16tof32(ubo_load_13 & 0xFFFF));
float16_t ubo_load_13_y = f16tof32(ubo_load_13[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_11_xz[0], ubo_load_11_y, ubo_load_11_xz[1]), vector<float16_t, 3>(ubo_load_13_xz[0], ubo_load_13_y, ubo_load_13_xz[1]));
}
matrix<float16_t, 2, 4> tint_symbol_27(uint4 buffer[55], uint offset) {
const uint scalar_offset_31 = ((offset + 0u)) / 4;
uint4 ubo_load_16 = buffer[scalar_offset_31 / 4];
uint2 ubo_load_15 = ((scalar_offset_31 & 2) ? ubo_load_16.zw : ubo_load_16.xy);
vector<float16_t, 2> ubo_load_15_xz = vector<float16_t, 2>(f16tof32(ubo_load_15 & 0xFFFF));
vector<float16_t, 2> ubo_load_15_yw = vector<float16_t, 2>(f16tof32(ubo_load_15 >> 16));
const uint scalar_offset_32 = ((offset + 8u)) / 4;
uint4 ubo_load_18 = buffer[scalar_offset_32 / 4];
uint2 ubo_load_17 = ((scalar_offset_32 & 2) ? ubo_load_18.zw : ubo_load_18.xy);
vector<float16_t, 2> ubo_load_17_xz = vector<float16_t, 2>(f16tof32(ubo_load_17 & 0xFFFF));
vector<float16_t, 2> ubo_load_17_yw = vector<float16_t, 2>(f16tof32(ubo_load_17 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_15_xz[0], ubo_load_15_yw[0], ubo_load_15_xz[1], ubo_load_15_yw[1]), vector<float16_t, 4>(ubo_load_17_xz[0], ubo_load_17_yw[0], ubo_load_17_xz[1], ubo_load_17_yw[1]));
}
matrix<float16_t, 3, 2> tint_symbol_28(uint4 buffer[55], uint offset) {
const uint scalar_offset_33 = ((offset + 0u)) / 4;
uint ubo_load_19 = buffer[scalar_offset_33 / 4][scalar_offset_33 % 4];
const uint scalar_offset_34 = ((offset + 4u)) / 4;
uint ubo_load_20 = buffer[scalar_offset_34 / 4][scalar_offset_34 % 4];
const uint scalar_offset_35 = ((offset + 8u)) / 4;
uint ubo_load_21 = buffer[scalar_offset_35 / 4][scalar_offset_35 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_19 & 0xFFFF)), float16_t(f16tof32(ubo_load_19 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_20 & 0xFFFF)), float16_t(f16tof32(ubo_load_20 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_21 & 0xFFFF)), float16_t(f16tof32(ubo_load_21 >> 16))));
}
matrix<float16_t, 3, 3> tint_symbol_29(uint4 buffer[55], uint offset) {
const uint scalar_offset_36 = ((offset + 0u)) / 4;
uint4 ubo_load_23 = buffer[scalar_offset_36 / 4];
uint2 ubo_load_22 = ((scalar_offset_36 & 2) ? ubo_load_23.zw : ubo_load_23.xy);
vector<float16_t, 2> ubo_load_22_xz = vector<float16_t, 2>(f16tof32(ubo_load_22 & 0xFFFF));
float16_t ubo_load_22_y = f16tof32(ubo_load_22[0] >> 16);
const uint scalar_offset_37 = ((offset + 8u)) / 4;
uint4 ubo_load_25 = buffer[scalar_offset_37 / 4];
uint2 ubo_load_24 = ((scalar_offset_37 & 2) ? ubo_load_25.zw : ubo_load_25.xy);
vector<float16_t, 2> ubo_load_24_xz = vector<float16_t, 2>(f16tof32(ubo_load_24 & 0xFFFF));
float16_t ubo_load_24_y = f16tof32(ubo_load_24[0] >> 16);
const uint scalar_offset_38 = ((offset + 16u)) / 4;
uint4 ubo_load_27 = buffer[scalar_offset_38 / 4];
uint2 ubo_load_26 = ((scalar_offset_38 & 2) ? ubo_load_27.zw : ubo_load_27.xy);
vector<float16_t, 2> ubo_load_26_xz = vector<float16_t, 2>(f16tof32(ubo_load_26 & 0xFFFF));
float16_t ubo_load_26_y = f16tof32(ubo_load_26[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_22_xz[0], ubo_load_22_y, ubo_load_22_xz[1]), vector<float16_t, 3>(ubo_load_24_xz[0], ubo_load_24_y, ubo_load_24_xz[1]), vector<float16_t, 3>(ubo_load_26_xz[0], ubo_load_26_y, ubo_load_26_xz[1]));
}
matrix<float16_t, 3, 4> tint_symbol_30(uint4 buffer[55], uint offset) {
const uint scalar_offset_39 = ((offset + 0u)) / 4;
uint4 ubo_load_29 = buffer[scalar_offset_39 / 4];
uint2 ubo_load_28 = ((scalar_offset_39 & 2) ? ubo_load_29.zw : ubo_load_29.xy);
vector<float16_t, 2> ubo_load_28_xz = vector<float16_t, 2>(f16tof32(ubo_load_28 & 0xFFFF));
vector<float16_t, 2> ubo_load_28_yw = vector<float16_t, 2>(f16tof32(ubo_load_28 >> 16));
const uint scalar_offset_40 = ((offset + 8u)) / 4;
uint4 ubo_load_31 = buffer[scalar_offset_40 / 4];
uint2 ubo_load_30 = ((scalar_offset_40 & 2) ? ubo_load_31.zw : ubo_load_31.xy);
vector<float16_t, 2> ubo_load_30_xz = vector<float16_t, 2>(f16tof32(ubo_load_30 & 0xFFFF));
vector<float16_t, 2> ubo_load_30_yw = vector<float16_t, 2>(f16tof32(ubo_load_30 >> 16));
const uint scalar_offset_41 = ((offset + 16u)) / 4;
uint4 ubo_load_33 = buffer[scalar_offset_41 / 4];
uint2 ubo_load_32 = ((scalar_offset_41 & 2) ? ubo_load_33.zw : ubo_load_33.xy);
vector<float16_t, 2> ubo_load_32_xz = vector<float16_t, 2>(f16tof32(ubo_load_32 & 0xFFFF));
vector<float16_t, 2> ubo_load_32_yw = vector<float16_t, 2>(f16tof32(ubo_load_32 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_28_xz[0], ubo_load_28_yw[0], ubo_load_28_xz[1], ubo_load_28_yw[1]), vector<float16_t, 4>(ubo_load_30_xz[0], ubo_load_30_yw[0], ubo_load_30_xz[1], ubo_load_30_yw[1]), vector<float16_t, 4>(ubo_load_32_xz[0], ubo_load_32_yw[0], ubo_load_32_xz[1], ubo_load_32_yw[1]));
}
matrix<float16_t, 4, 2> tint_symbol_31(uint4 buffer[55], uint offset) {
const uint scalar_offset_42 = ((offset + 0u)) / 4;
uint ubo_load_34 = buffer[scalar_offset_42 / 4][scalar_offset_42 % 4];
const uint scalar_offset_43 = ((offset + 4u)) / 4;
uint ubo_load_35 = buffer[scalar_offset_43 / 4][scalar_offset_43 % 4];
const uint scalar_offset_44 = ((offset + 8u)) / 4;
uint ubo_load_36 = buffer[scalar_offset_44 / 4][scalar_offset_44 % 4];
const uint scalar_offset_45 = ((offset + 12u)) / 4;
uint ubo_load_37 = buffer[scalar_offset_45 / 4][scalar_offset_45 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_34 & 0xFFFF)), float16_t(f16tof32(ubo_load_34 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_35 & 0xFFFF)), float16_t(f16tof32(ubo_load_35 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_36 & 0xFFFF)), float16_t(f16tof32(ubo_load_36 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_37 & 0xFFFF)), float16_t(f16tof32(ubo_load_37 >> 16))));
}
matrix<float16_t, 4, 3> tint_symbol_32(uint4 buffer[55], uint offset) {
const uint scalar_offset_46 = ((offset + 0u)) / 4;
uint4 ubo_load_39 = buffer[scalar_offset_46 / 4];
uint2 ubo_load_38 = ((scalar_offset_46 & 2) ? ubo_load_39.zw : ubo_load_39.xy);
vector<float16_t, 2> ubo_load_38_xz = vector<float16_t, 2>(f16tof32(ubo_load_38 & 0xFFFF));
float16_t ubo_load_38_y = f16tof32(ubo_load_38[0] >> 16);
const uint scalar_offset_47 = ((offset + 8u)) / 4;
uint4 ubo_load_41 = buffer[scalar_offset_47 / 4];
uint2 ubo_load_40 = ((scalar_offset_47 & 2) ? ubo_load_41.zw : ubo_load_41.xy);
vector<float16_t, 2> ubo_load_40_xz = vector<float16_t, 2>(f16tof32(ubo_load_40 & 0xFFFF));
float16_t ubo_load_40_y = f16tof32(ubo_load_40[0] >> 16);
const uint scalar_offset_48 = ((offset + 16u)) / 4;
uint4 ubo_load_43 = buffer[scalar_offset_48 / 4];
uint2 ubo_load_42 = ((scalar_offset_48 & 2) ? ubo_load_43.zw : ubo_load_43.xy);
vector<float16_t, 2> ubo_load_42_xz = vector<float16_t, 2>(f16tof32(ubo_load_42 & 0xFFFF));
float16_t ubo_load_42_y = f16tof32(ubo_load_42[0] >> 16);
const uint scalar_offset_49 = ((offset + 24u)) / 4;
uint4 ubo_load_45 = buffer[scalar_offset_49 / 4];
uint2 ubo_load_44 = ((scalar_offset_49 & 2) ? ubo_load_45.zw : ubo_load_45.xy);
vector<float16_t, 2> ubo_load_44_xz = vector<float16_t, 2>(f16tof32(ubo_load_44 & 0xFFFF));
float16_t ubo_load_44_y = f16tof32(ubo_load_44[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_38_xz[0], ubo_load_38_y, ubo_load_38_xz[1]), vector<float16_t, 3>(ubo_load_40_xz[0], ubo_load_40_y, ubo_load_40_xz[1]), vector<float16_t, 3>(ubo_load_42_xz[0], ubo_load_42_y, ubo_load_42_xz[1]), vector<float16_t, 3>(ubo_load_44_xz[0], ubo_load_44_y, ubo_load_44_xz[1]));
}
matrix<float16_t, 4, 4> tint_symbol_33(uint4 buffer[55], uint offset) {
const uint scalar_offset_50 = ((offset + 0u)) / 4;
uint4 ubo_load_47 = buffer[scalar_offset_50 / 4];
uint2 ubo_load_46 = ((scalar_offset_50 & 2) ? ubo_load_47.zw : ubo_load_47.xy);
vector<float16_t, 2> ubo_load_46_xz = vector<float16_t, 2>(f16tof32(ubo_load_46 & 0xFFFF));
vector<float16_t, 2> ubo_load_46_yw = vector<float16_t, 2>(f16tof32(ubo_load_46 >> 16));
const uint scalar_offset_51 = ((offset + 8u)) / 4;
uint4 ubo_load_49 = buffer[scalar_offset_51 / 4];
uint2 ubo_load_48 = ((scalar_offset_51 & 2) ? ubo_load_49.zw : ubo_load_49.xy);
vector<float16_t, 2> ubo_load_48_xz = vector<float16_t, 2>(f16tof32(ubo_load_48 & 0xFFFF));
vector<float16_t, 2> ubo_load_48_yw = vector<float16_t, 2>(f16tof32(ubo_load_48 >> 16));
const uint scalar_offset_52 = ((offset + 16u)) / 4;
uint4 ubo_load_51 = buffer[scalar_offset_52 / 4];
uint2 ubo_load_50 = ((scalar_offset_52 & 2) ? ubo_load_51.zw : ubo_load_51.xy);
vector<float16_t, 2> ubo_load_50_xz = vector<float16_t, 2>(f16tof32(ubo_load_50 & 0xFFFF));
vector<float16_t, 2> ubo_load_50_yw = vector<float16_t, 2>(f16tof32(ubo_load_50 >> 16));
const uint scalar_offset_53 = ((offset + 24u)) / 4;
uint4 ubo_load_53 = buffer[scalar_offset_53 / 4];
uint2 ubo_load_52 = ((scalar_offset_53 & 2) ? ubo_load_53.zw : ubo_load_53.xy);
vector<float16_t, 2> ubo_load_52_xz = vector<float16_t, 2>(f16tof32(ubo_load_52 & 0xFFFF));
vector<float16_t, 2> ubo_load_52_yw = vector<float16_t, 2>(f16tof32(ubo_load_52 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_46_xz[0], ubo_load_46_yw[0], ubo_load_46_xz[1], ubo_load_46_yw[1]), vector<float16_t, 4>(ubo_load_48_xz[0], ubo_load_48_yw[0], ubo_load_48_xz[1], ubo_load_48_yw[1]), vector<float16_t, 4>(ubo_load_50_xz[0], ubo_load_50_yw[0], ubo_load_50_xz[1], ubo_load_50_yw[1]), vector<float16_t, 4>(ubo_load_52_xz[0], ubo_load_52_yw[0], ubo_load_52_xz[1], ubo_load_52_yw[1]));
}
typedef float3 tint_symbol_34_ret[2];
tint_symbol_34_ret tint_symbol_34(uint4 buffer[55], uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_54 = ((offset + (i * 16u))) / 4;
arr[i] = asfloat(buffer[scalar_offset_54 / 4].xyz);
}
}
return arr;
}
typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
tint_symbol_35_ret tint_symbol_35(uint4 buffer[55], 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(uint4 buffer[55], uint offset) {
const uint scalar_offset_55 = ((offset + 0u)) / 4;
const uint scalar_offset_56 = ((offset + 4u)) / 4;
const uint scalar_offset_bytes = ((offset + 8u));
const uint scalar_offset_index = scalar_offset_bytes / 4;
const Inner tint_symbol_38 = {asint(buffer[scalar_offset_55 / 4][scalar_offset_55 % 4]), asfloat(buffer[scalar_offset_56 / 4][scalar_offset_56 % 4]), float16_t(f16tof32(((buffer[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF)))};
return tint_symbol_38;
}
typedef Inner tint_symbol_37_ret[4];
tint_symbol_37_ret tint_symbol_37(uint4 buffer[55], 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 * 16u)));
}
}
return arr_2;
}
[numthreads(1, 1, 1)]
void main() {
const float scalar_f32 = asfloat(ub[0].x);
const int scalar_i32 = asint(ub[0].y);
const uint scalar_u32 = ub[0].z;
const float16_t scalar_f16 = float16_t(f16tof32(((ub[0].w) & 0xFFFF)));
const float2 vec2_f32 = asfloat(ub[1].xy);
const int2 vec2_i32 = asint(ub[1].zw);
const uint2 vec2_u32 = ub[2].xy;
uint ubo_load_54 = ub[2].z;
const vector<float16_t, 2> vec2_f16 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_54 & 0xFFFF)), float16_t(f16tof32(ubo_load_54 >> 16)));
const float3 vec3_f32 = asfloat(ub[3].xyz);
const int3 vec3_i32 = asint(ub[4].xyz);
const uint3 vec3_u32 = ub[5].xyz;
uint2 ubo_load_55 = ub[6].xy;
vector<float16_t, 2> ubo_load_55_xz = vector<float16_t, 2>(f16tof32(ubo_load_55 & 0xFFFF));
float16_t ubo_load_55_y = f16tof32(ubo_load_55[0] >> 16);
const vector<float16_t, 3> vec3_f16 = vector<float16_t, 3>(ubo_load_55_xz[0], ubo_load_55_y, ubo_load_55_xz[1]);
const float4 vec4_f32 = asfloat(ub[7]);
const int4 vec4_i32 = asint(ub[8]);
const uint4 vec4_u32 = ub[9];
uint2 ubo_load_56 = ub[10].xy;
vector<float16_t, 2> ubo_load_56_xz = vector<float16_t, 2>(f16tof32(ubo_load_56 & 0xFFFF));
vector<float16_t, 2> ubo_load_56_yw = vector<float16_t, 2>(f16tof32(ubo_load_56 >> 16));
const vector<float16_t, 4> vec4_f16 = vector<float16_t, 4>(ubo_load_56_xz[0], ubo_load_56_yw[0], ubo_load_56_xz[1], ubo_load_56_yw[1]);
const float2x2 mat2x2_f32 = tint_symbol_16(ub, 168u);
const float2x3 mat2x3_f32 = tint_symbol_17(ub, 192u);
const float2x4 mat2x4_f32 = tint_symbol_18(ub, 224u);
const float3x2 mat3x2_f32 = tint_symbol_19(ub, 256u);
const float3x3 mat3x3_f32 = tint_symbol_20(ub, 288u);
const float3x4 mat3x4_f32 = tint_symbol_21(ub, 336u);
const float4x2 mat4x2_f32 = tint_symbol_22(ub, 384u);
const float4x3 mat4x3_f32 = tint_symbol_23(ub, 416u);
const float4x4 mat4x4_f32 = tint_symbol_24(ub, 480u);
const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(ub, 544u);
const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(ub, 552u);
const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(ub, 568u);
const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(ub, 584u);
const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(ub, 600u);
const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(ub, 624u);
const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(ub, 648u);
const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(ub, 664u);
const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(ub, 696u);
const float3 arr2_vec3_f32[2] = tint_symbol_34(ub, 736u);
const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(ub, 768u);
const Inner struct_inner = tint_symbol_36(ub, 800u);
const Inner array_struct_inner[4] = tint_symbol_37(ub, 816u);
return;
}
FXC validation failure:
D:\Projects\RampUp\dawn\test\tint\buffer\Shader@0x000001A0147F5100(4,3-11): error X3000: unrecognized identifier 'float16_t'

View File

@@ -0,0 +1,261 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
struct mat4x2_f16_4 {
f16vec2 col0;
f16vec2 col1;
f16vec2 col2;
f16vec2 col3;
};
struct Inner {
int scalar_i32;
float scalar_f32;
float16_t scalar_f16;
uint pad;
};
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_1;
vec3 vec3_f32;
uint pad_2;
ivec3 vec3_i32;
uint pad_3;
uvec3 vec3_u32;
uint pad_4;
f16vec3 vec3_f16;
uint pad_5;
uint pad_6;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
mat2 mat2x2_f32;
uint pad_7;
uint pad_8;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
mat3x2 mat3x2_f32;
uint pad_9;
uint pad_10;
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_11;
f16mat3 mat3x3_f16;
f16mat3x4 mat3x4_f16;
f16mat4x2 mat4x2_f16;
f16mat4x3 mat4x3_f16;
f16mat4 mat4x4_f16;
uint pad_12;
uint pad_13;
vec3 arr2_vec3_f32[2];
f16mat4x2 arr2_mat4x2_f16[2];
Inner struct_inner;
Inner array_struct_inner[4];
};
struct S_std140 {
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_1;
vec3 vec3_f32;
uint pad_2;
ivec3 vec3_i32;
uint pad_3;
uvec3 vec3_u32;
uint pad_4;
f16vec3 vec3_f16;
uint pad_5;
uint pad_6;
vec4 vec4_f32;
ivec4 vec4_i32;
uvec4 vec4_u32;
f16vec4 vec4_f16;
vec2 mat2x2_f32_0;
vec2 mat2x2_f32_1;
uint pad_7;
uint pad_8;
mat2x3 mat2x3_f32;
mat2x4 mat2x4_f32;
vec2 mat3x2_f32_0;
vec2 mat3x2_f32_1;
vec2 mat3x2_f32_2;
uint pad_9;
uint pad_10;
mat3 mat3x3_f32;
mat3x4 mat3x4_f32;
vec2 mat4x2_f32_0;
vec2 mat4x2_f32_1;
vec2 mat4x2_f32_2;
vec2 mat4x2_f32_3;
mat4x3 mat4x3_f32;
mat4 mat4x4_f32;
f16vec2 mat2x2_f16_0;
f16vec2 mat2x2_f16_1;
f16vec3 mat2x3_f16_0;
f16vec3 mat2x3_f16_1;
f16vec4 mat2x4_f16_0;
f16vec4 mat2x4_f16_1;
f16vec2 mat3x2_f16_0;
f16vec2 mat3x2_f16_1;
f16vec2 mat3x2_f16_2;
uint pad_11;
f16vec3 mat3x3_f16_0;
f16vec3 mat3x3_f16_1;
f16vec3 mat3x3_f16_2;
f16vec4 mat3x4_f16_0;
f16vec4 mat3x4_f16_1;
f16vec4 mat3x4_f16_2;
f16vec2 mat4x2_f16_0;
f16vec2 mat4x2_f16_1;
f16vec2 mat4x2_f16_2;
f16vec2 mat4x2_f16_3;
f16vec3 mat4x3_f16_0;
f16vec3 mat4x3_f16_1;
f16vec3 mat4x3_f16_2;
f16vec3 mat4x3_f16_3;
f16vec4 mat4x4_f16_0;
f16vec4 mat4x4_f16_1;
f16vec4 mat4x4_f16_2;
f16vec4 mat4x4_f16_3;
uint pad_12;
uint pad_13;
vec3 arr2_vec3_f32[2];
mat4x2_f16_4 arr2_mat4x2_f16[2];
Inner struct_inner;
Inner array_struct_inner[4];
};
layout(binding = 0, std140) uniform ub_block_std140_ubo {
S_std140 inner;
} ub;
mat2 load_ub_inner_mat2x2_f32() {
return mat2(ub.inner.mat2x2_f32_0, ub.inner.mat2x2_f32_1);
}
mat3x2 load_ub_inner_mat3x2_f32() {
return mat3x2(ub.inner.mat3x2_f32_0, ub.inner.mat3x2_f32_1, ub.inner.mat3x2_f32_2);
}
mat4x2 load_ub_inner_mat4x2_f32() {
return mat4x2(ub.inner.mat4x2_f32_0, ub.inner.mat4x2_f32_1, ub.inner.mat4x2_f32_2, ub.inner.mat4x2_f32_3);
}
f16mat2 load_ub_inner_mat2x2_f16() {
return f16mat2(ub.inner.mat2x2_f16_0, ub.inner.mat2x2_f16_1);
}
f16mat2x3 load_ub_inner_mat2x3_f16() {
return f16mat2x3(ub.inner.mat2x3_f16_0, ub.inner.mat2x3_f16_1);
}
f16mat2x4 load_ub_inner_mat2x4_f16() {
return f16mat2x4(ub.inner.mat2x4_f16_0, ub.inner.mat2x4_f16_1);
}
f16mat3x2 load_ub_inner_mat3x2_f16() {
return f16mat3x2(ub.inner.mat3x2_f16_0, ub.inner.mat3x2_f16_1, ub.inner.mat3x2_f16_2);
}
f16mat3 load_ub_inner_mat3x3_f16() {
return f16mat3(ub.inner.mat3x3_f16_0, ub.inner.mat3x3_f16_1, ub.inner.mat3x3_f16_2);
}
f16mat3x4 load_ub_inner_mat3x4_f16() {
return f16mat3x4(ub.inner.mat3x4_f16_0, ub.inner.mat3x4_f16_1, ub.inner.mat3x4_f16_2);
}
f16mat4x2 load_ub_inner_mat4x2_f16() {
return f16mat4x2(ub.inner.mat4x2_f16_0, ub.inner.mat4x2_f16_1, ub.inner.mat4x2_f16_2, ub.inner.mat4x2_f16_3);
}
f16mat4x3 load_ub_inner_mat4x3_f16() {
return f16mat4x3(ub.inner.mat4x3_f16_0, ub.inner.mat4x3_f16_1, ub.inner.mat4x3_f16_2, ub.inner.mat4x3_f16_3);
}
f16mat4 load_ub_inner_mat4x4_f16() {
return f16mat4(ub.inner.mat4x4_f16_0, ub.inner.mat4x4_f16_1, ub.inner.mat4x4_f16_2, ub.inner.mat4x4_f16_3);
}
f16mat4x2 conv_mat4x2_f16(mat4x2_f16_4 val) {
return f16mat4x2(val.col0, val.col1, val.col2, val.col3);
}
f16mat4x2[2] conv_arr2_mat4x2_f16(mat4x2_f16_4 val[2]) {
f16mat4x2 arr[2] = f16mat4x2[2](f16mat4x2(0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf), f16mat4x2(0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf, 0.0hf));
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
arr[i] = conv_mat4x2_f16(val[i]);
}
}
return arr;
}
void tint_symbol() {
float scalar_f32 = ub.inner.scalar_f32;
int scalar_i32 = ub.inner.scalar_i32;
uint scalar_u32 = ub.inner.scalar_u32;
float16_t scalar_f16 = ub.inner.scalar_f16;
vec2 vec2_f32 = ub.inner.vec2_f32;
ivec2 vec2_i32 = ub.inner.vec2_i32;
uvec2 vec2_u32 = ub.inner.vec2_u32;
f16vec2 vec2_f16 = ub.inner.vec2_f16;
vec3 vec3_f32 = ub.inner.vec3_f32;
ivec3 vec3_i32 = ub.inner.vec3_i32;
uvec3 vec3_u32 = ub.inner.vec3_u32;
f16vec3 vec3_f16 = ub.inner.vec3_f16;
vec4 vec4_f32 = ub.inner.vec4_f32;
ivec4 vec4_i32 = ub.inner.vec4_i32;
uvec4 vec4_u32 = ub.inner.vec4_u32;
f16vec4 vec4_f16 = ub.inner.vec4_f16;
mat2 mat2x2_f32 = load_ub_inner_mat2x2_f32();
mat2x3 mat2x3_f32 = ub.inner.mat2x3_f32;
mat2x4 mat2x4_f32 = ub.inner.mat2x4_f32;
mat3x2 mat3x2_f32 = load_ub_inner_mat3x2_f32();
mat3 mat3x3_f32 = ub.inner.mat3x3_f32;
mat3x4 mat3x4_f32 = ub.inner.mat3x4_f32;
mat4x2 mat4x2_f32 = load_ub_inner_mat4x2_f32();
mat4x3 mat4x3_f32 = ub.inner.mat4x3_f32;
mat4 mat4x4_f32 = ub.inner.mat4x4_f32;
f16mat2 mat2x2_f16 = load_ub_inner_mat2x2_f16();
f16mat2x3 mat2x3_f16 = load_ub_inner_mat2x3_f16();
f16mat2x4 mat2x4_f16 = load_ub_inner_mat2x4_f16();
f16mat3x2 mat3x2_f16 = load_ub_inner_mat3x2_f16();
f16mat3 mat3x3_f16 = load_ub_inner_mat3x3_f16();
f16mat3x4 mat3x4_f16 = load_ub_inner_mat3x4_f16();
f16mat4x2 mat4x2_f16 = load_ub_inner_mat4x2_f16();
f16mat4x3 mat4x3_f16 = load_ub_inner_mat4x3_f16();
f16mat4 mat4x4_f16 = load_ub_inner_mat4x4_f16();
vec3 arr2_vec3_f32[2] = ub.inner.arr2_vec3_f32;
f16mat4x2 arr2_mat4x2_f16[2] = conv_arr2_mat4x2_f16(ub.inner.arr2_mat4x2_f16);
Inner struct_inner = ub.inner.struct_inner;
Inner array_struct_inner[4] = ub.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,116 @@
#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, 6> 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;
/* 0x0330 */ tint_array<Inner, 4> array_struct_inner;
};
kernel void tint_symbol(const constant 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,616 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 426
; 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 %ub_block_std140 "ub_block_std140"
OpMemberName %ub_block_std140 0 "inner"
OpName %S_std140 "S_std140"
OpMemberName %S_std140 0 "scalar_f32"
OpMemberName %S_std140 1 "scalar_i32"
OpMemberName %S_std140 2 "scalar_u32"
OpMemberName %S_std140 3 "scalar_f16"
OpMemberName %S_std140 4 "vec2_f32"
OpMemberName %S_std140 5 "vec2_i32"
OpMemberName %S_std140 6 "vec2_u32"
OpMemberName %S_std140 7 "vec2_f16"
OpMemberName %S_std140 8 "vec3_f32"
OpMemberName %S_std140 9 "vec3_i32"
OpMemberName %S_std140 10 "vec3_u32"
OpMemberName %S_std140 11 "vec3_f16"
OpMemberName %S_std140 12 "vec4_f32"
OpMemberName %S_std140 13 "vec4_i32"
OpMemberName %S_std140 14 "vec4_u32"
OpMemberName %S_std140 15 "vec4_f16"
OpMemberName %S_std140 16 "mat2x2_f32_0"
OpMemberName %S_std140 17 "mat2x2_f32_1"
OpMemberName %S_std140 18 "mat2x3_f32"
OpMemberName %S_std140 19 "mat2x4_f32"
OpMemberName %S_std140 20 "mat3x2_f32_0"
OpMemberName %S_std140 21 "mat3x2_f32_1"
OpMemberName %S_std140 22 "mat3x2_f32_2"
OpMemberName %S_std140 23 "mat3x3_f32"
OpMemberName %S_std140 24 "mat3x4_f32"
OpMemberName %S_std140 25 "mat4x2_f32_0"
OpMemberName %S_std140 26 "mat4x2_f32_1"
OpMemberName %S_std140 27 "mat4x2_f32_2"
OpMemberName %S_std140 28 "mat4x2_f32_3"
OpMemberName %S_std140 29 "mat4x3_f32"
OpMemberName %S_std140 30 "mat4x4_f32"
OpMemberName %S_std140 31 "mat2x2_f16_0"
OpMemberName %S_std140 32 "mat2x2_f16_1"
OpMemberName %S_std140 33 "mat2x3_f16_0"
OpMemberName %S_std140 34 "mat2x3_f16_1"
OpMemberName %S_std140 35 "mat2x4_f16_0"
OpMemberName %S_std140 36 "mat2x4_f16_1"
OpMemberName %S_std140 37 "mat3x2_f16_0"
OpMemberName %S_std140 38 "mat3x2_f16_1"
OpMemberName %S_std140 39 "mat3x2_f16_2"
OpMemberName %S_std140 40 "mat3x3_f16_0"
OpMemberName %S_std140 41 "mat3x3_f16_1"
OpMemberName %S_std140 42 "mat3x3_f16_2"
OpMemberName %S_std140 43 "mat3x4_f16_0"
OpMemberName %S_std140 44 "mat3x4_f16_1"
OpMemberName %S_std140 45 "mat3x4_f16_2"
OpMemberName %S_std140 46 "mat4x2_f16_0"
OpMemberName %S_std140 47 "mat4x2_f16_1"
OpMemberName %S_std140 48 "mat4x2_f16_2"
OpMemberName %S_std140 49 "mat4x2_f16_3"
OpMemberName %S_std140 50 "mat4x3_f16_0"
OpMemberName %S_std140 51 "mat4x3_f16_1"
OpMemberName %S_std140 52 "mat4x3_f16_2"
OpMemberName %S_std140 53 "mat4x3_f16_3"
OpMemberName %S_std140 54 "mat4x4_f16_0"
OpMemberName %S_std140 55 "mat4x4_f16_1"
OpMemberName %S_std140 56 "mat4x4_f16_2"
OpMemberName %S_std140 57 "mat4x4_f16_3"
OpMemberName %S_std140 58 "arr2_vec3_f32"
OpMemberName %S_std140 59 "arr2_mat4x2_f16"
OpName %mat4x2_f16_4 "mat4x2_f16_4"
OpMemberName %mat4x2_f16_4 0 "col0"
OpMemberName %mat4x2_f16_4 1 "col1"
OpMemberName %mat4x2_f16_4 2 "col2"
OpMemberName %mat4x2_f16_4 3 "col3"
OpMemberName %S_std140 60 "struct_inner"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_i32"
OpMemberName %Inner 1 "scalar_f32"
OpMemberName %Inner 2 "scalar_f16"
OpMemberName %S_std140 61 "array_struct_inner"
OpName %ub "ub"
OpName %load_ub_inner_mat2x2_f32 "load_ub_inner_mat2x2_f32"
OpName %load_ub_inner_mat3x2_f32 "load_ub_inner_mat3x2_f32"
OpName %load_ub_inner_mat4x2_f32 "load_ub_inner_mat4x2_f32"
OpName %load_ub_inner_mat2x2_f16 "load_ub_inner_mat2x2_f16"
OpName %load_ub_inner_mat2x3_f16 "load_ub_inner_mat2x3_f16"
OpName %load_ub_inner_mat2x4_f16 "load_ub_inner_mat2x4_f16"
OpName %load_ub_inner_mat3x2_f16 "load_ub_inner_mat3x2_f16"
OpName %load_ub_inner_mat3x3_f16 "load_ub_inner_mat3x3_f16"
OpName %load_ub_inner_mat3x4_f16 "load_ub_inner_mat3x4_f16"
OpName %load_ub_inner_mat4x2_f16 "load_ub_inner_mat4x2_f16"
OpName %load_ub_inner_mat4x3_f16 "load_ub_inner_mat4x3_f16"
OpName %load_ub_inner_mat4x4_f16 "load_ub_inner_mat4x4_f16"
OpName %conv_mat4x2_f16 "conv_mat4x2_f16"
OpName %val "val"
OpName %conv_arr2_mat4x2_f16 "conv_arr2_mat4x2_f16"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %main "main"
OpDecorate %ub_block_std140 Block
OpMemberDecorate %ub_block_std140 0 Offset 0
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
OpMemberDecorate %S_std140 3 Offset 12
OpMemberDecorate %S_std140 4 Offset 16
OpMemberDecorate %S_std140 5 Offset 24
OpMemberDecorate %S_std140 6 Offset 32
OpMemberDecorate %S_std140 7 Offset 40
OpMemberDecorate %S_std140 8 Offset 48
OpMemberDecorate %S_std140 9 Offset 64
OpMemberDecorate %S_std140 10 Offset 80
OpMemberDecorate %S_std140 11 Offset 96
OpMemberDecorate %S_std140 12 Offset 112
OpMemberDecorate %S_std140 13 Offset 128
OpMemberDecorate %S_std140 14 Offset 144
OpMemberDecorate %S_std140 15 Offset 160
OpMemberDecorate %S_std140 16 Offset 168
OpMemberDecorate %S_std140 17 Offset 176
OpMemberDecorate %S_std140 18 Offset 192
OpMemberDecorate %S_std140 18 ColMajor
OpMemberDecorate %S_std140 18 MatrixStride 16
OpMemberDecorate %S_std140 19 Offset 224
OpMemberDecorate %S_std140 19 ColMajor
OpMemberDecorate %S_std140 19 MatrixStride 16
OpMemberDecorate %S_std140 20 Offset 256
OpMemberDecorate %S_std140 21 Offset 264
OpMemberDecorate %S_std140 22 Offset 272
OpMemberDecorate %S_std140 23 Offset 288
OpMemberDecorate %S_std140 23 ColMajor
OpMemberDecorate %S_std140 23 MatrixStride 16
OpMemberDecorate %S_std140 24 Offset 336
OpMemberDecorate %S_std140 24 ColMajor
OpMemberDecorate %S_std140 24 MatrixStride 16
OpMemberDecorate %S_std140 25 Offset 384
OpMemberDecorate %S_std140 26 Offset 392
OpMemberDecorate %S_std140 27 Offset 400
OpMemberDecorate %S_std140 28 Offset 408
OpMemberDecorate %S_std140 29 Offset 416
OpMemberDecorate %S_std140 29 ColMajor
OpMemberDecorate %S_std140 29 MatrixStride 16
OpMemberDecorate %S_std140 30 Offset 480
OpMemberDecorate %S_std140 30 ColMajor
OpMemberDecorate %S_std140 30 MatrixStride 16
OpMemberDecorate %S_std140 31 Offset 544
OpMemberDecorate %S_std140 32 Offset 548
OpMemberDecorate %S_std140 33 Offset 552
OpMemberDecorate %S_std140 34 Offset 560
OpMemberDecorate %S_std140 35 Offset 568
OpMemberDecorate %S_std140 36 Offset 576
OpMemberDecorate %S_std140 37 Offset 584
OpMemberDecorate %S_std140 38 Offset 588
OpMemberDecorate %S_std140 39 Offset 592
OpMemberDecorate %S_std140 40 Offset 600
OpMemberDecorate %S_std140 41 Offset 608
OpMemberDecorate %S_std140 42 Offset 616
OpMemberDecorate %S_std140 43 Offset 624
OpMemberDecorate %S_std140 44 Offset 632
OpMemberDecorate %S_std140 45 Offset 640
OpMemberDecorate %S_std140 46 Offset 648
OpMemberDecorate %S_std140 47 Offset 652
OpMemberDecorate %S_std140 48 Offset 656
OpMemberDecorate %S_std140 49 Offset 660
OpMemberDecorate %S_std140 50 Offset 664
OpMemberDecorate %S_std140 51 Offset 672
OpMemberDecorate %S_std140 52 Offset 680
OpMemberDecorate %S_std140 53 Offset 688
OpMemberDecorate %S_std140 54 Offset 696
OpMemberDecorate %S_std140 55 Offset 704
OpMemberDecorate %S_std140 56 Offset 712
OpMemberDecorate %S_std140 57 Offset 720
OpMemberDecorate %S_std140 58 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S_std140 59 Offset 768
OpMemberDecorate %mat4x2_f16_4 0 Offset 0
OpMemberDecorate %mat4x2_f16_4 1 Offset 4
OpMemberDecorate %mat4x2_f16_4 2 Offset 8
OpMemberDecorate %mat4x2_f16_4 3 Offset 12
OpDecorate %_arr_mat4x2_f16_4_uint_2 ArrayStride 16
OpMemberDecorate %S_std140 60 Offset 800
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %S_std140 61 Offset 816
OpDecorate %_arr_Inner_uint_4 ArrayStride 16
OpDecorate %ub NonWritable
OpDecorate %ub Binding 0
OpDecorate %ub DescriptorSet 0
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
%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
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%mat4x2_f16_4 = OpTypeStruct %v2half %v2half %v2half %v2half
%_arr_mat4x2_f16_4_uint_2 = OpTypeArray %mat4x2_f16_4 %uint_2
%Inner = OpTypeStruct %int %float %half
%uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S_std140 = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %v2float %v2float %mat2v3float %mat2v4float %v2float %v2float %v2float %mat3v3float %mat3v4float %v2float %v2float %v2float %v2float %mat4v3float %mat4v4float %v2half %v2half %v3half %v3half %v4half %v4half %v2half %v2half %v2half %v3half %v3half %v3half %v4half %v4half %v4half %v2half %v2half %v2half %v2half %v3half %v3half %v3half %v3half %v4half %v4half %v4half %v4half %_arr_v3float_uint_2 %_arr_mat4x2_f16_4_uint_2 %Inner %_arr_Inner_uint_4
%ub_block_std140 = OpTypeStruct %S_std140
%_ptr_Uniform_ub_block_std140 = OpTypePointer Uniform %ub_block_std140
%ub = OpVariable %_ptr_Uniform_ub_block_std140 Uniform
%mat2v2float = OpTypeMatrix %v2float 2
%34 = OpTypeFunction %mat2v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
%uint_16 = OpConstant %uint 16
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_17 = OpConstant %uint 17
%mat3v2float = OpTypeMatrix %v2float 3
%52 = OpTypeFunction %mat3v2float
%uint_20 = OpConstant %uint 20
%uint_21 = OpConstant %uint 21
%uint_22 = OpConstant %uint 22
%mat4v2float = OpTypeMatrix %v2float 4
%71 = OpTypeFunction %mat4v2float
%uint_25 = OpConstant %uint 25
%uint_26 = OpConstant %uint 26
%uint_27 = OpConstant %uint 27
%uint_28 = OpConstant %uint 28
%mat2v2half = OpTypeMatrix %v2half 2
%94 = OpTypeFunction %mat2v2half
%uint_31 = OpConstant %uint 31
%_ptr_Uniform_v2half = OpTypePointer Uniform %v2half
%uint_32 = OpConstant %uint 32
%mat2v3half = OpTypeMatrix %v3half 2
%110 = OpTypeFunction %mat2v3half
%uint_33 = OpConstant %uint 33
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
%uint_34 = OpConstant %uint 34
%mat2v4half = OpTypeMatrix %v4half 2
%126 = OpTypeFunction %mat2v4half
%uint_35 = OpConstant %uint 35
%_ptr_Uniform_v4half = OpTypePointer Uniform %v4half
%uint_36 = OpConstant %uint 36
%mat3v2half = OpTypeMatrix %v2half 3
%142 = OpTypeFunction %mat3v2half
%uint_37 = OpConstant %uint 37
%uint_38 = OpConstant %uint 38
%uint_39 = OpConstant %uint 39
%mat3v3half = OpTypeMatrix %v3half 3
%161 = OpTypeFunction %mat3v3half
%uint_40 = OpConstant %uint 40
%uint_41 = OpConstant %uint 41
%uint_42 = OpConstant %uint 42
%mat3v4half = OpTypeMatrix %v4half 3
%180 = OpTypeFunction %mat3v4half
%uint_43 = OpConstant %uint 43
%uint_44 = OpConstant %uint 44
%uint_45 = OpConstant %uint 45
%mat4v2half = OpTypeMatrix %v2half 4
%199 = OpTypeFunction %mat4v2half
%uint_46 = OpConstant %uint 46
%uint_47 = OpConstant %uint 47
%uint_48 = OpConstant %uint 48
%uint_49 = OpConstant %uint 49
%mat4v3half = OpTypeMatrix %v3half 4
%222 = OpTypeFunction %mat4v3half
%uint_50 = OpConstant %uint 50
%uint_51 = OpConstant %uint 51
%uint_52 = OpConstant %uint 52
%uint_53 = OpConstant %uint 53
%mat4v4half = OpTypeMatrix %v4half 4
%245 = OpTypeFunction %mat4v4half
%uint_54 = OpConstant %uint 54
%uint_55 = OpConstant %uint 55
%uint_56 = OpConstant %uint 56
%uint_57 = OpConstant %uint 57
%268 = OpTypeFunction %mat4v2half %mat4x2_f16_4
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%277 = OpTypeFunction %_arr_mat4v2half_uint_2 %_arr_mat4x2_f16_4_uint_2
%_ptr_Function__arr_mat4v2half_uint_2 = OpTypePointer Function %_arr_mat4v2half_uint_2
%284 = OpConstantNull %_arr_mat4v2half_uint_2
%_ptr_Function_uint = OpTypePointer Function %uint
%287 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat4x2_f16_4_uint_2 = OpTypePointer Function %_arr_mat4x2_f16_4_uint_2
%300 = OpConstantNull %_arr_mat4x2_f16_4_uint_2
%_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half
%_ptr_Function_mat4x2_f16_4 = OpTypePointer Function %mat4x2_f16_4
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%313 = OpTypeFunction %void
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%uint_3 = OpConstant %uint 3
%_ptr_Uniform_half = OpTypePointer Uniform %half
%uint_5 = OpConstant %uint 5
%_ptr_Uniform_v2int = OpTypePointer Uniform %v2int
%uint_6 = OpConstant %uint 6
%_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint
%uint_7 = OpConstant %uint 7
%uint_8 = OpConstant %uint 8
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_9 = OpConstant %uint 9
%_ptr_Uniform_v3int = OpTypePointer Uniform %v3int
%uint_10 = OpConstant %uint 10
%_ptr_Uniform_v3uint = OpTypePointer Uniform %v3uint
%uint_11 = OpConstant %uint 11
%uint_12 = OpConstant %uint 12
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%uint_13 = OpConstant %uint 13
%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int
%uint_14 = OpConstant %uint 14
%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint
%uint_15 = OpConstant %uint 15
%uint_18 = OpConstant %uint 18
%_ptr_Uniform_mat2v3float = OpTypePointer Uniform %mat2v3float
%uint_19 = OpConstant %uint 19
%_ptr_Uniform_mat2v4float = OpTypePointer Uniform %mat2v4float
%uint_23 = OpConstant %uint 23
%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
%uint_24 = OpConstant %uint 24
%_ptr_Uniform_mat3v4float = OpTypePointer Uniform %mat3v4float
%uint_29 = OpConstant %uint 29
%_ptr_Uniform_mat4v3float = OpTypePointer Uniform %mat4v3float
%uint_30 = OpConstant %uint 30
%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float
%uint_58 = OpConstant %uint 58
%_ptr_Uniform__arr_v3float_uint_2 = OpTypePointer Uniform %_arr_v3float_uint_2
%uint_59 = OpConstant %uint 59
%_ptr_Uniform__arr_mat4x2_f16_4_uint_2 = OpTypePointer Uniform %_arr_mat4x2_f16_4_uint_2
%uint_60 = OpConstant %uint 60
%_ptr_Uniform_Inner = OpTypePointer Uniform %Inner
%uint_61 = OpConstant %uint 61
%_ptr_Uniform__arr_Inner_uint_4 = OpTypePointer Uniform %_arr_Inner_uint_4
%load_ub_inner_mat2x2_f32 = OpFunction %mat2v2float None %34
%37 = OpLabel
%41 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%45 = OpAccessChain %_ptr_Uniform_v2float %41 %uint_16
%46 = OpLoad %v2float %45
%49 = OpAccessChain %_ptr_Uniform_v2float %41 %uint_17
%50 = OpLoad %v2float %49
%51 = OpCompositeConstruct %mat2v2float %46 %50
OpReturnValue %51
OpFunctionEnd
%load_ub_inner_mat3x2_f32 = OpFunction %mat3v2float None %52
%55 = OpLabel
%57 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%60 = OpAccessChain %_ptr_Uniform_v2float %57 %uint_20
%61 = OpLoad %v2float %60
%64 = OpAccessChain %_ptr_Uniform_v2float %57 %uint_21
%65 = OpLoad %v2float %64
%68 = OpAccessChain %_ptr_Uniform_v2float %57 %uint_22
%69 = OpLoad %v2float %68
%70 = OpCompositeConstruct %mat3v2float %61 %65 %69
OpReturnValue %70
OpFunctionEnd
%load_ub_inner_mat4x2_f32 = OpFunction %mat4v2float None %71
%74 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%79 = OpAccessChain %_ptr_Uniform_v2float %76 %uint_25
%80 = OpLoad %v2float %79
%83 = OpAccessChain %_ptr_Uniform_v2float %76 %uint_26
%84 = OpLoad %v2float %83
%87 = OpAccessChain %_ptr_Uniform_v2float %76 %uint_27
%88 = OpLoad %v2float %87
%91 = OpAccessChain %_ptr_Uniform_v2float %76 %uint_28
%92 = OpLoad %v2float %91
%93 = OpCompositeConstruct %mat4v2float %80 %84 %88 %92
OpReturnValue %93
OpFunctionEnd
%load_ub_inner_mat2x2_f16 = OpFunction %mat2v2half None %94
%97 = OpLabel
%99 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%103 = OpAccessChain %_ptr_Uniform_v2half %99 %uint_31
%104 = OpLoad %v2half %103
%107 = OpAccessChain %_ptr_Uniform_v2half %99 %uint_32
%108 = OpLoad %v2half %107
%109 = OpCompositeConstruct %mat2v2half %104 %108
OpReturnValue %109
OpFunctionEnd
%load_ub_inner_mat2x3_f16 = OpFunction %mat2v3half None %110
%113 = OpLabel
%115 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%119 = OpAccessChain %_ptr_Uniform_v3half %115 %uint_33
%120 = OpLoad %v3half %119
%123 = OpAccessChain %_ptr_Uniform_v3half %115 %uint_34
%124 = OpLoad %v3half %123
%125 = OpCompositeConstruct %mat2v3half %120 %124
OpReturnValue %125
OpFunctionEnd
%load_ub_inner_mat2x4_f16 = OpFunction %mat2v4half None %126
%129 = OpLabel
%131 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%135 = OpAccessChain %_ptr_Uniform_v4half %131 %uint_35
%136 = OpLoad %v4half %135
%139 = OpAccessChain %_ptr_Uniform_v4half %131 %uint_36
%140 = OpLoad %v4half %139
%141 = OpCompositeConstruct %mat2v4half %136 %140
OpReturnValue %141
OpFunctionEnd
%load_ub_inner_mat3x2_f16 = OpFunction %mat3v2half None %142
%145 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%150 = OpAccessChain %_ptr_Uniform_v2half %147 %uint_37
%151 = OpLoad %v2half %150
%154 = OpAccessChain %_ptr_Uniform_v2half %147 %uint_38
%155 = OpLoad %v2half %154
%158 = OpAccessChain %_ptr_Uniform_v2half %147 %uint_39
%159 = OpLoad %v2half %158
%160 = OpCompositeConstruct %mat3v2half %151 %155 %159
OpReturnValue %160
OpFunctionEnd
%load_ub_inner_mat3x3_f16 = OpFunction %mat3v3half None %161
%164 = OpLabel
%166 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%169 = OpAccessChain %_ptr_Uniform_v3half %166 %uint_40
%170 = OpLoad %v3half %169
%173 = OpAccessChain %_ptr_Uniform_v3half %166 %uint_41
%174 = OpLoad %v3half %173
%177 = OpAccessChain %_ptr_Uniform_v3half %166 %uint_42
%178 = OpLoad %v3half %177
%179 = OpCompositeConstruct %mat3v3half %170 %174 %178
OpReturnValue %179
OpFunctionEnd
%load_ub_inner_mat3x4_f16 = OpFunction %mat3v4half None %180
%183 = OpLabel
%185 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%188 = OpAccessChain %_ptr_Uniform_v4half %185 %uint_43
%189 = OpLoad %v4half %188
%192 = OpAccessChain %_ptr_Uniform_v4half %185 %uint_44
%193 = OpLoad %v4half %192
%196 = OpAccessChain %_ptr_Uniform_v4half %185 %uint_45
%197 = OpLoad %v4half %196
%198 = OpCompositeConstruct %mat3v4half %189 %193 %197
OpReturnValue %198
OpFunctionEnd
%load_ub_inner_mat4x2_f16 = OpFunction %mat4v2half None %199
%202 = OpLabel
%204 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%207 = OpAccessChain %_ptr_Uniform_v2half %204 %uint_46
%208 = OpLoad %v2half %207
%211 = OpAccessChain %_ptr_Uniform_v2half %204 %uint_47
%212 = OpLoad %v2half %211
%215 = OpAccessChain %_ptr_Uniform_v2half %204 %uint_48
%216 = OpLoad %v2half %215
%219 = OpAccessChain %_ptr_Uniform_v2half %204 %uint_49
%220 = OpLoad %v2half %219
%221 = OpCompositeConstruct %mat4v2half %208 %212 %216 %220
OpReturnValue %221
OpFunctionEnd
%load_ub_inner_mat4x3_f16 = OpFunction %mat4v3half None %222
%225 = OpLabel
%227 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%230 = OpAccessChain %_ptr_Uniform_v3half %227 %uint_50
%231 = OpLoad %v3half %230
%234 = OpAccessChain %_ptr_Uniform_v3half %227 %uint_51
%235 = OpLoad %v3half %234
%238 = OpAccessChain %_ptr_Uniform_v3half %227 %uint_52
%239 = OpLoad %v3half %238
%242 = OpAccessChain %_ptr_Uniform_v3half %227 %uint_53
%243 = OpLoad %v3half %242
%244 = OpCompositeConstruct %mat4v3half %231 %235 %239 %243
OpReturnValue %244
OpFunctionEnd
%load_ub_inner_mat4x4_f16 = OpFunction %mat4v4half None %245
%248 = OpLabel
%250 = OpAccessChain %_ptr_Uniform_S_std140 %ub %uint_0
%253 = OpAccessChain %_ptr_Uniform_v4half %250 %uint_54
%254 = OpLoad %v4half %253
%257 = OpAccessChain %_ptr_Uniform_v4half %250 %uint_55
%258 = OpLoad %v4half %257
%261 = OpAccessChain %_ptr_Uniform_v4half %250 %uint_56
%262 = OpLoad %v4half %261
%265 = OpAccessChain %_ptr_Uniform_v4half %250 %uint_57
%266 = OpLoad %v4half %265
%267 = OpCompositeConstruct %mat4v4half %254 %258 %262 %266
OpReturnValue %267
OpFunctionEnd
%conv_mat4x2_f16 = OpFunction %mat4v2half None %268
%val = OpFunctionParameter %mat4x2_f16_4
%271 = OpLabel
%272 = OpCompositeExtract %v2half %val 0
%273 = OpCompositeExtract %v2half %val 1
%274 = OpCompositeExtract %v2half %val 2
%275 = OpCompositeExtract %v2half %val 3
%276 = OpCompositeConstruct %mat4v2half %272 %273 %274 %275
OpReturnValue %276
OpFunctionEnd
%conv_arr2_mat4x2_f16 = OpFunction %_arr_mat4v2half_uint_2 None %277
%val_0 = OpFunctionParameter %_arr_mat4x2_f16_4_uint_2
%281 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat4v2half_uint_2 Function %284
%i = OpVariable %_ptr_Function_uint Function %287
%var_for_index = OpVariable %_ptr_Function__arr_mat4x2_f16_4_uint_2 Function %300
OpBranch %288
%288 = OpLabel
OpLoopMerge %289 %290 None
OpBranch %291
%291 = OpLabel
%293 = OpLoad %uint %i
%294 = OpULessThan %bool %293 %uint_2
%292 = OpLogicalNot %bool %294
OpSelectionMerge %296 None
OpBranchConditional %292 %297 %296
%297 = OpLabel
OpBranch %289
%296 = OpLabel
OpStore %var_for_index %val_0
%301 = OpLoad %uint %i
%303 = OpAccessChain %_ptr_Function_mat4v2half %arr %301
%305 = OpLoad %uint %i
%307 = OpAccessChain %_ptr_Function_mat4x2_f16_4 %var_for_index %305
%308 = OpLoad %mat4x2_f16_4 %307
%304 = OpFunctionCall %mat4v2half %conv_mat4x2_f16 %308
OpStore %303 %304
OpBranch %290
%290 = OpLabel
%309 = OpLoad %uint %i
%311 = OpIAdd %uint %309 %uint_1
OpStore %i %311
OpBranch %288
%289 = OpLabel
%312 = OpLoad %_arr_mat4v2half_uint_2 %arr
OpReturnValue %312
OpFunctionEnd
%main = OpFunction %void None %313
%316 = OpLabel
%318 = OpAccessChain %_ptr_Uniform_float %ub %uint_0 %uint_0
%319 = OpLoad %float %318
%321 = OpAccessChain %_ptr_Uniform_int %ub %uint_0 %uint_1
%322 = OpLoad %int %321
%324 = OpAccessChain %_ptr_Uniform_uint %ub %uint_0 %uint_2
%325 = OpLoad %uint %324
%328 = OpAccessChain %_ptr_Uniform_half %ub %uint_0 %uint_3
%329 = OpLoad %half %328
%330 = OpAccessChain %_ptr_Uniform_v2float %ub %uint_0 %uint_4
%331 = OpLoad %v2float %330
%334 = OpAccessChain %_ptr_Uniform_v2int %ub %uint_0 %uint_5
%335 = OpLoad %v2int %334
%338 = OpAccessChain %_ptr_Uniform_v2uint %ub %uint_0 %uint_6
%339 = OpLoad %v2uint %338
%341 = OpAccessChain %_ptr_Uniform_v2half %ub %uint_0 %uint_7
%342 = OpLoad %v2half %341
%345 = OpAccessChain %_ptr_Uniform_v3float %ub %uint_0 %uint_8
%346 = OpLoad %v3float %345
%349 = OpAccessChain %_ptr_Uniform_v3int %ub %uint_0 %uint_9
%350 = OpLoad %v3int %349
%353 = OpAccessChain %_ptr_Uniform_v3uint %ub %uint_0 %uint_10
%354 = OpLoad %v3uint %353
%356 = OpAccessChain %_ptr_Uniform_v3half %ub %uint_0 %uint_11
%357 = OpLoad %v3half %356
%360 = OpAccessChain %_ptr_Uniform_v4float %ub %uint_0 %uint_12
%361 = OpLoad %v4float %360
%364 = OpAccessChain %_ptr_Uniform_v4int %ub %uint_0 %uint_13
%365 = OpLoad %v4int %364
%368 = OpAccessChain %_ptr_Uniform_v4uint %ub %uint_0 %uint_14
%369 = OpLoad %v4uint %368
%371 = OpAccessChain %_ptr_Uniform_v4half %ub %uint_0 %uint_15
%372 = OpLoad %v4half %371
%373 = OpFunctionCall %mat2v2float %load_ub_inner_mat2x2_f32
%376 = OpAccessChain %_ptr_Uniform_mat2v3float %ub %uint_0 %uint_18
%377 = OpLoad %mat2v3float %376
%380 = OpAccessChain %_ptr_Uniform_mat2v4float %ub %uint_0 %uint_19
%381 = OpLoad %mat2v4float %380
%382 = OpFunctionCall %mat3v2float %load_ub_inner_mat3x2_f32
%385 = OpAccessChain %_ptr_Uniform_mat3v3float %ub %uint_0 %uint_23
%386 = OpLoad %mat3v3float %385
%389 = OpAccessChain %_ptr_Uniform_mat3v4float %ub %uint_0 %uint_24
%390 = OpLoad %mat3v4float %389
%391 = OpFunctionCall %mat4v2float %load_ub_inner_mat4x2_f32
%394 = OpAccessChain %_ptr_Uniform_mat4v3float %ub %uint_0 %uint_29
%395 = OpLoad %mat4v3float %394
%398 = OpAccessChain %_ptr_Uniform_mat4v4float %ub %uint_0 %uint_30
%399 = OpLoad %mat4v4float %398
%400 = OpFunctionCall %mat2v2half %load_ub_inner_mat2x2_f16
%401 = OpFunctionCall %mat2v3half %load_ub_inner_mat2x3_f16
%402 = OpFunctionCall %mat2v4half %load_ub_inner_mat2x4_f16
%403 = OpFunctionCall %mat3v2half %load_ub_inner_mat3x2_f16
%404 = OpFunctionCall %mat3v3half %load_ub_inner_mat3x3_f16
%405 = OpFunctionCall %mat3v4half %load_ub_inner_mat3x4_f16
%406 = OpFunctionCall %mat4v2half %load_ub_inner_mat4x2_f16
%407 = OpFunctionCall %mat4v3half %load_ub_inner_mat4x3_f16
%408 = OpFunctionCall %mat4v4half %load_ub_inner_mat4x4_f16
%411 = OpAccessChain %_ptr_Uniform__arr_v3float_uint_2 %ub %uint_0 %uint_58
%412 = OpLoad %_arr_v3float_uint_2 %411
%416 = OpAccessChain %_ptr_Uniform__arr_mat4x2_f16_4_uint_2 %ub %uint_0 %uint_59
%417 = OpLoad %_arr_mat4x2_f16_4_uint_2 %416
%413 = OpFunctionCall %_arr_mat4v2half_uint_2 %conv_arr2_mat4x2_f16 %417
%420 = OpAccessChain %_ptr_Uniform_Inner %ub %uint_0 %uint_60
%421 = OpLoad %Inner %420
%424 = OpAccessChain %_ptr_Uniform__arr_Inner_uint_4 %ub %uint_0 %uint_61
%425 = OpLoad %_arr_Inner_uint_4 %424
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,96 @@
enable f16;
struct Inner {
scalar_i32 : i32,
scalar_f32 : f32,
@size(8)
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>,
@align(16)
arr2_vec3_f32 : array<vec3<f32>, 2>,
arr2_mat4x2_f16 : array<mat4x2<f16>, 2>,
@align(16)
struct_inner : Inner,
@align(16)
array_struct_inner : array<Inner, 4>,
}
@binding(0) @group(0) var<uniform> ub : S;
@compute @workgroup_size(1)
fn main() {
let scalar_f32 = ub.scalar_f32;
let scalar_i32 = ub.scalar_i32;
let scalar_u32 = ub.scalar_u32;
let scalar_f16 = ub.scalar_f16;
let vec2_f32 = ub.vec2_f32;
let vec2_i32 = ub.vec2_i32;
let vec2_u32 = ub.vec2_u32;
let vec2_f16 = ub.vec2_f16;
let vec3_f32 = ub.vec3_f32;
let vec3_i32 = ub.vec3_i32;
let vec3_u32 = ub.vec3_u32;
let vec3_f16 = ub.vec3_f16;
let vec4_f32 = ub.vec4_f32;
let vec4_i32 = ub.vec4_i32;
let vec4_u32 = ub.vec4_u32;
let vec4_f16 = ub.vec4_f16;
let mat2x2_f32 = ub.mat2x2_f32;
let mat2x3_f32 = ub.mat2x3_f32;
let mat2x4_f32 = ub.mat2x4_f32;
let mat3x2_f32 = ub.mat3x2_f32;
let mat3x3_f32 = ub.mat3x3_f32;
let mat3x4_f32 = ub.mat3x4_f32;
let mat4x2_f32 = ub.mat4x2_f32;
let mat4x3_f32 = ub.mat4x3_f32;
let mat4x4_f32 = ub.mat4x4_f32;
let mat2x2_f16 = ub.mat2x2_f16;
let mat2x3_f16 = ub.mat2x3_f16;
let mat2x4_f16 = ub.mat2x4_f16;
let mat3x2_f16 = ub.mat3x2_f16;
let mat3x3_f16 = ub.mat3x3_f16;
let mat3x4_f16 = ub.mat3x4_f16;
let mat4x2_f16 = ub.mat4x2_f16;
let mat4x3_f16 = ub.mat4x3_f16;
let mat4x4_f16 = ub.mat4x4_f16;
let arr2_vec3_f32 = ub.arr2_vec3_f32;
let arr2_mat4x2_f16 = ub.arr2_mat4x2_f16;
let struct_inner = ub.struct_inner;
let array_struct_inner = ub.array_struct_inner;
}