diff --git a/src/front/wgsl/lower/mod.rs b/src/front/wgsl/lower/mod.rs index f6c27caa82..e066a29f1b 100644 --- a/src/front/wgsl/lower/mod.rs +++ b/src/front/wgsl/lower/mod.rs @@ -1133,36 +1133,16 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { let (expr, is_reference) = match *expr { ast::Expression::Literal(literal) => { - let inner = match literal { - ast::Literal::Number(Number::F32(f)) => crate::ConstantInner::Scalar { - width: 4, - value: crate::ScalarValue::Float(f as _), - }, - ast::Literal::Number(Number::I32(i)) => crate::ConstantInner::Scalar { - width: 4, - value: crate::ScalarValue::Sint(i as _), - }, - ast::Literal::Number(Number::U32(u)) => crate::ConstantInner::Scalar { - width: 4, - value: crate::ScalarValue::Uint(u as _), - }, + let literal = match literal { + ast::Literal::Number(Number::F32(f)) => crate::Literal::F32(f), + ast::Literal::Number(Number::I32(i)) => crate::Literal::I32(i), + ast::Literal::Number(Number::U32(u)) => crate::Literal::U32(u), ast::Literal::Number(_) => { unreachable!("got abstract numeric type when not expected"); } - ast::Literal::Bool(b) => crate::ConstantInner::Scalar { - width: 1, - value: crate::ScalarValue::Bool(b), - }, + ast::Literal::Bool(b) => crate::Literal::Bool(b), }; - let handle = ctx.module.constants.fetch_or_append( - crate::Constant { - name: None, - specialization: None, - inner, - }, - Span::UNDEFINED, - ); - let handle = ctx.interrupt_emitter(crate::Expression::Constant(handle), span); + let handle = ctx.interrupt_emitter(crate::Expression::Literal(literal), span); return Ok(TypedExpression::non_reference(handle)); } ast::Expression::Ident(ast::IdentExpr::Local(local)) => { @@ -1264,35 +1244,54 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { )); } - if let crate::Expression::Constant(constant) = ctx.naga_expressions[index] { - let span = ctx.naga_expressions.get_span(index); - let index = match ctx.module.constants[constant].inner { - crate::ConstantInner::Scalar { - value: crate::ScalarValue::Uint(int), - .. - } => u32::try_from(int).map_err(|_| Error::BadU32Constant(span)), - crate::ConstantInner::Scalar { - value: crate::ScalarValue::Sint(int), - .. - } => u32::try_from(int).map_err(|_| Error::BadU32Constant(span)), - _ => Err(Error::BadU32Constant(span)), - }?; + match ctx.naga_expressions[index] { + crate::Expression::Constant(constant) => { + let span = ctx.naga_expressions.get_span(index); + let index = match ctx.module.constants[constant].inner { + crate::ConstantInner::Scalar { + value: crate::ScalarValue::Uint(int), + .. + } => u32::try_from(int).map_err(|_| Error::BadU32Constant(span)), + crate::ConstantInner::Scalar { + value: crate::ScalarValue::Sint(int), + .. + } => u32::try_from(int).map_err(|_| Error::BadU32Constant(span)), + _ => Err(Error::BadU32Constant(span)), + }?; - ( - crate::Expression::AccessIndex { - base: expr.handle, - index, - }, - expr.is_reference, - ) - } else { - ( + ( + crate::Expression::AccessIndex { + base: expr.handle, + index, + }, + expr.is_reference, + ) + } + crate::Expression::Literal(literal) => { + let span = ctx.naga_expressions.get_span(index); + let index = match literal { + crate::Literal::U32(n) => n, + crate::Literal::I32(n) => { + u32::try_from(n).map_err(|_| Error::BadU32Constant(span))? + } + _ => return Err(Error::BadU32Constant(span)), + }; + + ( + crate::Expression::AccessIndex { + base: expr.handle, + index, + }, + expr.is_reference, + ) + } + _ => ( crate::Expression::Access { base: expr.handle, index, }, expr.is_reference, - ) + ), } } ast::Expression::Member { base, ref field } => { diff --git a/tests/out/dot/quad.dot b/tests/out/dot/quad.dot index 4f2cde18c9..9864089781 100644 --- a/tests/out/dot/quad.dot +++ b/tests/out/dot/quad.dot @@ -13,8 +13,8 @@ digraph Module { ep0_e3 [ color="#fdb462" label="[4] Multiply" ] ep0_e0 -> ep0_e3 [ label="right" ] ep0_e2 -> ep0_e3 [ label="left" ] - ep0_e4 [ fillcolor="#ffffb3" label="[5] Constant" ] - ep0_e5 [ fillcolor="#ffffb3" label="[6] Constant" ] + ep0_e4 [ fillcolor="#ffffb3" label="[5] Literal" ] + ep0_e5 [ fillcolor="#ffffb3" label="[6] Literal" ] ep0_e6 [ color="#bebada" label="[7] Compose" ] { ep0_e3 ep0_e4 ep0_e5 } -> ep0_e6 ep0_e7 [ color="#bebada" label="[8] Compose" ] @@ -45,7 +45,7 @@ digraph Module { ep1_e0 -> ep1_e3 [ label="coordinate" ] ep1_e4 [ color="#8dd3c7" label="[5] AccessIndex[3]" ] ep1_e3 -> ep1_e4 [ label="base" ] - ep1_e5 [ fillcolor="#ffffb3" label="[6] Constant" ] + ep1_e5 [ fillcolor="#ffffb3" label="[6] Literal" ] ep1_e6 [ color="#fdb462" label="[7] Equal" ] ep1_e5 -> ep1_e6 [ label="right" ] ep1_e4 -> ep1_e6 [ label="left" ] @@ -87,10 +87,10 @@ digraph Module { subgraph cluster_ep2 { label="Fragment/'fs_extra'" node [ style=filled ] - ep2_e0 [ fillcolor="#ffffb3" label="[1] Constant" ] - ep2_e1 [ fillcolor="#ffffb3" label="[2] Constant" ] - ep2_e2 [ fillcolor="#ffffb3" label="[3] Constant" ] - ep2_e3 [ fillcolor="#ffffb3" label="[4] Constant" ] + ep2_e0 [ fillcolor="#ffffb3" label="[1] Literal" ] + ep2_e1 [ fillcolor="#ffffb3" label="[2] Literal" ] + ep2_e2 [ fillcolor="#ffffb3" label="[3] Literal" ] + ep2_e3 [ fillcolor="#ffffb3" label="[4] Literal" ] ep2_e4 [ fillcolor="#bebada" label="[5] Compose" ] { ep2_e0 ep2_e1 ep2_e2 ep2_e3 } -> ep2_e4 ep2_s0 [ shape=square label="Root" ] diff --git a/tests/out/glsl/boids.main.Compute.glsl b/tests/out/glsl/boids.main.Compute.glsl index c8df993f54..0f64853619 100644 --- a/tests/out/glsl/boids.main.Compute.glsl +++ b/tests/out/glsl/boids.main.Compute.glsl @@ -129,7 +129,7 @@ void main() { vVel = (((_e112 + (_e113 * _e116)) + (_e119 * _e122)) + (_e125 * _e128)); vec2 _e131 = vVel; vec2 _e133 = vVel; - vVel = (normalize(_e131) * clamp(length(_e133), 0.0, 0.10000000149011612)); + vVel = (normalize(_e131) * clamp(length(_e133), 0.0, 0.1)); vec2 _e139 = vPos; vec2 _e140 = vVel; float _e143 = _group_0_binding_0_cs.deltaT; diff --git a/tests/out/glsl/image.texture_sample.Fragment.glsl b/tests/out/glsl/image.texture_sample.Fragment.glsl index 72aa8fa166..97be5a59d0 100644 --- a/tests/out/glsl/image.texture_sample.Fragment.glsl +++ b/tests/out/glsl/image.texture_sample.Fragment.glsl @@ -27,10 +27,10 @@ void main() { vec4 _e19 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1)); vec4 _e20 = a; a = (_e20 + _e19); - vec4 _e24 = textureLod(_group_0_binding_1_fs, vec2(tc), 2.299999952316284); + vec4 _e24 = textureLod(_group_0_binding_1_fs, vec2(tc), 2.3); vec4 _e25 = a; a = (_e25 + _e24); - vec4 _e29 = textureLodOffset(_group_0_binding_1_fs, vec2(tc), 2.299999952316284, ivec2(3, 1)); + vec4 _e29 = textureLodOffset(_group_0_binding_1_fs, vec2(tc), 2.3, ivec2(3, 1)); vec4 _e30 = a; a = (_e30 + _e29); vec4 _e35 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1), 2.0); @@ -42,10 +42,10 @@ void main() { vec4 _e47 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1)); vec4 _e48 = a; a = (_e48 + _e47); - vec4 _e53 = textureLod(_group_0_binding_4_fs, vec3(tc, 0u), 2.299999952316284); + vec4 _e53 = textureLod(_group_0_binding_4_fs, vec3(tc, 0u), 2.3); vec4 _e54 = a; a = (_e54 + _e53); - vec4 _e59 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0u), 2.299999952316284, ivec2(3, 1)); + vec4 _e59 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0u), 2.3, ivec2(3, 1)); vec4 _e60 = a; a = (_e60 + _e59); vec4 _e66 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1), 2.0); @@ -57,10 +57,10 @@ void main() { vec4 _e78 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1)); vec4 _e79 = a; a = (_e79 + _e78); - vec4 _e84 = textureLod(_group_0_binding_4_fs, vec3(tc, 0), 2.299999952316284); + vec4 _e84 = textureLod(_group_0_binding_4_fs, vec3(tc, 0), 2.3); vec4 _e85 = a; a = (_e85 + _e84); - vec4 _e90 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0), 2.299999952316284, ivec2(3, 1)); + vec4 _e90 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0), 2.3, ivec2(3, 1)); vec4 _e91 = a; a = (_e91 + _e90); vec4 _e97 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1), 2.0); @@ -69,7 +69,7 @@ void main() { vec4 _e103 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u)); vec4 _e104 = a; a = (_e104 + _e103); - vec4 _e109 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.299999952316284); + vec4 _e109 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.3); vec4 _e110 = a; a = (_e110 + _e109); vec4 _e116 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.0); @@ -78,7 +78,7 @@ void main() { vec4 _e122 = texture(_group_0_binding_6_fs, vec4(tc3_, 0)); vec4 _e123 = a; a = (_e123 + _e122); - vec4 _e128 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0), 2.299999952316284); + vec4 _e128 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0), 2.3); vec4 _e129 = a; a = (_e129 + _e128); vec4 _e135 = texture(_group_0_binding_6_fs, vec4(tc3_, 0), 2.0); diff --git a/tests/out/glsl/operators.main.Compute.glsl b/tests/out/glsl/operators.main.Compute.glsl index a76465d95e..9754ae2bbb 100644 --- a/tests/out/glsl/operators.main.Compute.glsl +++ b/tests/out/glsl/operators.main.Compute.glsl @@ -15,7 +15,7 @@ vec4 builtins() { vec4 s2_ = (true ? vec4(1.0, 1.0, 1.0, 1.0) : vec4(0.0, 0.0, 0.0, 0.0)); vec4 s3_ = mix(vec4(1.0, 1.0, 1.0, 1.0), vec4(0.0, 0.0, 0.0, 0.0), bvec4(false, false, false, false)); vec4 m1_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), vec4(0.5, 0.5, 0.5, 0.5)); - vec4 m2_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612); + vec4 m2_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.1); float b1_ = intBitsToFloat(ivec4(1, 1, 1, 1).x); vec4 b2_ = intBitsToFloat(ivec4(1, 1, 1, 1)); ivec4 v_i32_zero = ivec4(vec4(0.0, 0.0, 0.0, 0.0)); diff --git a/tests/out/hlsl/boids.hlsl b/tests/out/hlsl/boids.hlsl index d9f1340480..d6bac1cb26 100644 --- a/tests/out/hlsl/boids.hlsl +++ b/tests/out/hlsl/boids.hlsl @@ -121,7 +121,7 @@ void main(uint3 global_invocation_id : SV_DispatchThreadID) vVel = (((_expr112 + (_expr113 * _expr116)) + (_expr119 * _expr122)) + (_expr125 * _expr128)); float2 _expr131 = vVel; float2 _expr133 = vVel; - vVel = (normalize(_expr131) * clamp(length(_expr133), 0.0, 0.10000000149011612)); + vVel = (normalize(_expr131) * clamp(length(_expr133), 0.0, 0.1)); float2 _expr139 = vPos; float2 _expr140 = vVel; float _expr143 = params.deltaT; diff --git a/tests/out/hlsl/image.hlsl b/tests/out/hlsl/image.hlsl index 79e490e249..75672b9be8 100644 --- a/tests/out/hlsl/image.hlsl +++ b/tests/out/hlsl/image.hlsl @@ -256,10 +256,10 @@ float4 texture_sample() : SV_Target0 float4 _expr19 = image_2d.Sample(sampler_reg, tc, int2(3, 1)); float4 _expr20 = a; a = (_expr20 + _expr19); - float4 _expr24 = image_2d.SampleLevel(sampler_reg, tc, 2.299999952316284); + float4 _expr24 = image_2d.SampleLevel(sampler_reg, tc, 2.3); float4 _expr25 = a; a = (_expr25 + _expr24); - float4 _expr29 = image_2d.SampleLevel(sampler_reg, tc, 2.299999952316284, int2(3, 1)); + float4 _expr29 = image_2d.SampleLevel(sampler_reg, tc, 2.3, int2(3, 1)); float4 _expr30 = a; a = (_expr30 + _expr29); float4 _expr35 = image_2d.SampleBias(sampler_reg, tc, 2.0, int2(3, 1)); @@ -271,10 +271,10 @@ float4 texture_sample() : SV_Target0 float4 _expr47 = image_2d_array.Sample(sampler_reg, float3(tc, 0u), int2(3, 1)); float4 _expr48 = a; a = (_expr48 + _expr47); - float4 _expr53 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.299999952316284); + float4 _expr53 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3); float4 _expr54 = a; a = (_expr54 + _expr53); - float4 _expr59 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.299999952316284, int2(3, 1)); + float4 _expr59 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3, int2(3, 1)); float4 _expr60 = a; a = (_expr60 + _expr59); float4 _expr66 = image_2d_array.SampleBias(sampler_reg, float3(tc, 0u), 2.0, int2(3, 1)); @@ -286,10 +286,10 @@ float4 texture_sample() : SV_Target0 float4 _expr78 = image_2d_array.Sample(sampler_reg, float3(tc, 0), int2(3, 1)); float4 _expr79 = a; a = (_expr79 + _expr78); - float4 _expr84 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0), 2.299999952316284); + float4 _expr84 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0), 2.3); float4 _expr85 = a; a = (_expr85 + _expr84); - float4 _expr90 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0), 2.299999952316284, int2(3, 1)); + float4 _expr90 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0), 2.3, int2(3, 1)); float4 _expr91 = a; a = (_expr91 + _expr90); float4 _expr97 = image_2d_array.SampleBias(sampler_reg, float3(tc, 0), 2.0, int2(3, 1)); @@ -298,7 +298,7 @@ float4 texture_sample() : SV_Target0 float4 _expr103 = image_cube_array.Sample(sampler_reg, float4(tc3_, 0u)); float4 _expr104 = a; a = (_expr104 + _expr103); - float4 _expr109 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0u), 2.299999952316284); + float4 _expr109 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0u), 2.3); float4 _expr110 = a; a = (_expr110 + _expr109); float4 _expr116 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, 0u), 2.0); @@ -307,7 +307,7 @@ float4 texture_sample() : SV_Target0 float4 _expr122 = image_cube_array.Sample(sampler_reg, float4(tc3_, 0)); float4 _expr123 = a; a = (_expr123 + _expr122); - float4 _expr128 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0), 2.299999952316284); + float4 _expr128 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0), 2.3); float4 _expr129 = a; a = (_expr129 + _expr128); float4 _expr135 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, 0), 2.0); diff --git a/tests/out/hlsl/operators.hlsl b/tests/out/hlsl/operators.hlsl index 73d7211c35..abfbec61ee 100644 --- a/tests/out/hlsl/operators.hlsl +++ b/tests/out/hlsl/operators.hlsl @@ -17,7 +17,7 @@ float4 builtins() float4 s2_ = (true ? float4(1.0, 1.0, 1.0, 1.0) : float4(0.0, 0.0, 0.0, 0.0)); float4 s3_ = (bool4(false, false, false, false) ? float4(0.0, 0.0, 0.0, 0.0) : float4(1.0, 1.0, 1.0, 1.0)); float4 m1_ = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), float4(0.5, 0.5, 0.5, 0.5)); - float4 m2_ = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612); + float4 m2_ = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), 0.1); float b1_ = asfloat(int4(1, 1, 1, 1).x); float4 b2_ = asfloat(int4(1, 1, 1, 1)); int4 v_i32_zero = int4(float4(0.0, 0.0, 0.0, 0.0)); diff --git a/tests/out/ir/access.ron b/tests/out/ir/access.ron index 8b18746019..417a706ff1 100644 --- a/tests/out/ir/access.ron +++ b/tests/out/ir/access.ron @@ -263,7 +263,7 @@ name: None, inner: Array( base: 24, - size: Constant(22), + size: Constant(8), stride: 40, ), ), @@ -290,7 +290,7 @@ name: None, inner: Array( base: 3, - size: Constant(22), + size: Constant(8), stride: 4, ), ), @@ -402,118 +402,6 @@ value: Sint(1), ), ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(1.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(2.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(3.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(6.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(5.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(4.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(9.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(90.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(10.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(20.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(30.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(40.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(8.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(7.0), - ), - ), ( name: None, specialization: None, @@ -522,78 +410,6 @@ value: Sint(5), ), ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Sint(4), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Sint(9), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Float(0.0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(3), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(2), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Sint(3), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(1), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Sint(42), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(42), - ), - ), ], global_variables: [ ( @@ -677,7 +493,7 @@ ), ], expressions: [ - Constant(7), + Literal(I32(1)), LocalVariable(1), Load( pointer: 2, @@ -701,7 +517,7 @@ base: 9, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 10, index: 0, @@ -729,12 +545,12 @@ base: 19, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 20, index: 0, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 22, index: 1, @@ -747,7 +563,7 @@ base: 26, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 27, index: 0, @@ -774,7 +590,7 @@ base: 34, index: 35, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 36, index: 1, @@ -804,17 +620,17 @@ Load( pointer: 45, ), - Constant(8), + Literal(F32(1.0)), Splat( size: Bi, value: 47, ), - Constant(9), + Literal(F32(2.0)), Splat( size: Bi, value: 49, ), - Constant(10), + Literal(F32(3.0)), Splat( size: Bi, value: 51, @@ -847,17 +663,17 @@ base: 55, index: 0, ), - Constant(11), + Literal(F32(6.0)), Splat( size: Bi, value: 60, ), - Constant(12), + Literal(F32(5.0)), Splat( size: Bi, value: 62, ), - Constant(13), + Literal(F32(4.0)), Splat( size: Bi, value: 64, @@ -874,12 +690,12 @@ base: 55, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 67, index: 0, ), - Constant(14), + Literal(F32(9.0)), Splat( size: Bi, value: 70, @@ -895,7 +711,7 @@ base: 72, index: 73, ), - Constant(15), + Literal(F32(90.0)), Splat( size: Bi, value: 75, @@ -904,22 +720,22 @@ base: 55, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 77, index: 0, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 79, index: 1, ), - Constant(16), + Literal(F32(10.0)), AccessIndex( base: 55, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 83, index: 0, @@ -931,7 +747,7 @@ base: 85, index: 86, ), - Constant(17), + Literal(F32(20.0)), AccessIndex( base: 55, index: 0, @@ -943,12 +759,12 @@ base: 89, index: 90, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 91, index: 1, ), - Constant(18), + Literal(F32(30.0)), AccessIndex( base: 55, index: 0, @@ -967,7 +783,7 @@ base: 97, index: 98, ), - Constant(19), + Literal(F32(40.0)), ], named_expressions: {}, body: [ @@ -1181,7 +997,7 @@ ), ], expressions: [ - Constant(7), + Literal(I32(1)), LocalVariable(1), Load( pointer: 2, @@ -1205,7 +1021,7 @@ base: 9, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 10, index: 0, @@ -1218,12 +1034,12 @@ base: 14, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 15, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 17, index: 0, @@ -1236,7 +1052,7 @@ base: 21, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 22, index: 0, @@ -1256,17 +1072,17 @@ base: 28, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 29, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 31, index: 0, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 33, index: 1, @@ -1279,12 +1095,12 @@ base: 37, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 38, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 40, index: 0, @@ -1304,7 +1120,7 @@ base: 46, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 47, index: 0, @@ -1316,7 +1132,7 @@ base: 49, index: 50, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 51, index: 1, @@ -1329,7 +1145,7 @@ base: 55, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 56, index: 0, @@ -1377,27 +1193,27 @@ base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 72, index: 0, ), - Constant(20), + Literal(F32(8.0)), Splat( size: Bi, value: 75, ), - Constant(21), + Literal(F32(7.0)), Splat( size: Bi, value: 77, ), - Constant(11), + Literal(F32(6.0)), Splat( size: Bi, value: 79, ), - Constant(12), + Literal(F32(5.0)), Splat( size: Bi, value: 81, @@ -1415,17 +1231,17 @@ base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 84, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 86, index: 0, ), - Constant(14), + Literal(F32(9.0)), Splat( size: Bi, value: 89, @@ -1434,7 +1250,7 @@ base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 91, index: 0, @@ -1446,7 +1262,7 @@ base: 93, index: 94, ), - Constant(15), + Literal(F32(90.0)), Splat( size: Bi, value: 96, @@ -1455,32 +1271,32 @@ base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 98, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 100, index: 0, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 102, index: 1, ), - Constant(16), + Literal(F32(10.0)), AccessIndex( base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 106, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 108, index: 0, @@ -1492,12 +1308,12 @@ base: 110, index: 111, ), - Constant(17), + Literal(F32(20.0)), AccessIndex( base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 114, index: 0, @@ -1509,17 +1325,17 @@ base: 116, index: 117, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 118, index: 1, ), - Constant(18), + Literal(F32(30.0)), AccessIndex( base: 66, index: 0, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 122, index: 0, @@ -1538,7 +1354,7 @@ base: 126, index: 127, ), - Constant(19), + Literal(F32(40.0)), ], named_expressions: {}, body: [ @@ -1848,12 +1664,12 @@ local_variables: [], expressions: [ FunctionArgument(0), - Constant(23), + Literal(I32(4)), AccessIndex( base: 1, index: 4, ), - Constant(24), + Literal(I32(9)), AccessIndex( base: 3, index: 9, @@ -1889,7 +1705,7 @@ local_variables: [], expressions: [ FunctionArgument(0), - Constant(31), + Literal(U32(42)), ], named_expressions: { 1: "p", @@ -1917,12 +1733,12 @@ local_variables: [], expressions: [ FunctionArgument(0), - Constant(8), + Literal(F32(1.0)), Splat( size: Quad, value: 2, ), - Constant(9), + Literal(F32(2.0)), Splat( size: Quad, value: 4, @@ -1992,12 +1808,12 @@ ], expressions: [ FunctionArgument(0), - Constant(25), + Literal(F32(0.0)), LocalVariable(1), Load( pointer: 3, ), - Constant(8), + Literal(F32(1.0)), GlobalVariable(2), AccessIndex( base: 6, @@ -2014,7 +1830,7 @@ Load( pointer: 10, ), - Constant(26), + Literal(U32(3)), GlobalVariable(2), AccessIndex( base: 13, @@ -2042,7 +1858,7 @@ index: 5, ), ArrayLength(21), - Constant(27), + Literal(U32(2)), Binary( op: Subtract, left: 22, @@ -2068,7 +1884,7 @@ base: 30, index: 5, ), - Constant(3), + Literal(I32(0)), AccessIndex( base: 31, index: 0, @@ -2083,9 +1899,9 @@ kind: Sint, convert: Some(4), ), - Constant(28), - Constant(23), - Constant(22), + Literal(I32(3)), + Literal(I32(4)), + Literal(I32(5)), Compose( ty: 28, components: [ @@ -2097,7 +1913,7 @@ ], ), LocalVariable(2), - Constant(29), + Literal(U32(1)), Binary( op: Add, left: 1, @@ -2107,7 +1923,7 @@ base: 41, index: 43, ), - Constant(30), + Literal(I32(42)), Access( base: 41, index: 1, @@ -2131,7 +1947,7 @@ left: 8, right: 51, ), - Constant(9), + Literal(F32(2.0)), Compose( ty: 26, components: [ @@ -2287,7 +2103,7 @@ base: 1, index: 0, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 2, index: 1, @@ -2296,28 +2112,28 @@ base: 4, index: 2, ), - Constant(8), + Literal(F32(1.0)), GlobalVariable(2), AccessIndex( base: 7, index: 0, ), - Constant(25), + Literal(F32(0.0)), Splat( size: Tri, value: 9, ), - Constant(8), + Literal(F32(1.0)), Splat( size: Tri, value: 11, ), - Constant(9), + Literal(F32(2.0)), Splat( size: Tri, value: 13, ), - Constant(10), + Literal(F32(3.0)), Splat( size: Tri, value: 15, @@ -2336,12 +2152,12 @@ base: 18, index: 4, ), - Constant(1), + Literal(U32(0)), Splat( size: Bi, value: 20, ), - Constant(29), + Literal(U32(1)), Splat( size: Bi, value: 22, @@ -2358,7 +2174,7 @@ base: 25, index: 5, ), - Constant(7), + Literal(I32(1)), AccessIndex( base: 26, index: 1, @@ -2367,10 +2183,10 @@ base: 28, index: 0, ), - Constant(7), + Literal(I32(1)), GlobalVariable(4), ZeroValue(17), - Constant(25), + Literal(F32(0.0)), Splat( size: Quad, value: 33, @@ -2473,12 +2289,12 @@ ), ], expressions: [ - Constant(11), + Literal(F32(6.0)), Splat( size: Quad, value: 1, ), - Constant(21), + Literal(F32(7.0)), Splat( size: Quad, value: 3, diff --git a/tests/out/ir/collatz.ron b/tests/out/ir/collatz.ron index 1be31e6eff..a01f07d140 100644 --- a/tests/out/ir/collatz.ron +++ b/tests/out/ir/collatz.ron @@ -42,40 +42,7 @@ ray_desc: None, ray_intersection: None, ), - constants: [ - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(0), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(1), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(2), - ), - ), - ( - name: None, - specialization: None, - inner: Scalar( - width: 4, - value: Uint(3), - ), - ), - ], + constants: [], global_variables: [ ( name: Some("v_indices"), @@ -121,12 +88,12 @@ expressions: [ FunctionArgument(0), LocalVariable(1), - Constant(1), + Literal(U32(0)), LocalVariable(2), Load( pointer: 2, ), - Constant(2), + Literal(U32(1)), Binary( op: Greater, left: 5, @@ -135,13 +102,13 @@ Load( pointer: 2, ), - Constant(3), + Literal(U32(2)), Binary( op: Modulo, left: 8, right: 9, ), - Constant(1), + Literal(U32(0)), Binary( op: Equal, left: 10, @@ -150,13 +117,13 @@ Load( pointer: 2, ), - Constant(3), + Literal(U32(2)), Binary( op: Divide, left: 13, right: 14, ), - Constant(4), + Literal(U32(3)), Load( pointer: 2, ), @@ -165,7 +132,7 @@ left: 16, right: 17, ), - Constant(2), + Literal(U32(1)), Binary( op: Add, left: 18, @@ -174,7 +141,7 @@ Load( pointer: 4, ), - Constant(2), + Literal(U32(1)), Binary( op: Add, left: 21, diff --git a/tests/out/msl/boids.msl b/tests/out/msl/boids.msl index 2b832c0f2b..100a6dc1e2 100644 --- a/tests/out/msl/boids.msl +++ b/tests/out/msl/boids.msl @@ -135,7 +135,7 @@ kernel void main_( vVel = ((_e112 + (_e113 * _e116)) + (_e119 * _e122)) + (_e125 * _e128); metal::float2 _e131 = vVel; metal::float2 _e133 = vVel; - vVel = metal::normalize(_e131) * metal::clamp(metal::length(_e133), 0.0, 0.10000000149011612); + vVel = metal::normalize(_e131) * metal::clamp(metal::length(_e133), 0.0, 0.1); metal::float2 _e139 = vPos; metal::float2 _e140 = vVel; float _e143 = params.deltaT; diff --git a/tests/out/msl/image.msl b/tests/out/msl/image.msl index 685867175b..77c0a86793 100644 --- a/tests/out/msl/image.msl +++ b/tests/out/msl/image.msl @@ -129,10 +129,10 @@ fragment texture_sampleOutput texture_sample( metal::float4 _e19 = image_2d.sample(sampler_reg, tc, const_type_9_); metal::float4 _e20 = a; a = _e20 + _e19; - metal::float4 _e24 = image_2d.sample(sampler_reg, tc, metal::level(2.299999952316284)); + metal::float4 _e24 = image_2d.sample(sampler_reg, tc, metal::level(2.3)); metal::float4 _e25 = a; a = _e25 + _e24; - metal::float4 _e29 = image_2d.sample(sampler_reg, tc, metal::level(2.299999952316284), const_type_9_); + metal::float4 _e29 = image_2d.sample(sampler_reg, tc, metal::level(2.3), const_type_9_); metal::float4 _e30 = a; a = _e30 + _e29; metal::float4 _e35 = image_2d.sample(sampler_reg, tc, metal::bias(2.0), const_type_9_); @@ -144,10 +144,10 @@ fragment texture_sampleOutput texture_sample( metal::float4 _e47 = image_2d_array.sample(sampler_reg, tc, 0u, const_type_9_); metal::float4 _e48 = a; a = _e48 + _e47; - metal::float4 _e53 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.299999952316284)); + metal::float4 _e53 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3)); metal::float4 _e54 = a; a = _e54 + _e53; - metal::float4 _e59 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.299999952316284), const_type_9_); + metal::float4 _e59 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3), const_type_9_); metal::float4 _e60 = a; a = _e60 + _e59; metal::float4 _e66 = image_2d_array.sample(sampler_reg, tc, 0u, metal::bias(2.0), const_type_9_); @@ -159,10 +159,10 @@ fragment texture_sampleOutput texture_sample( metal::float4 _e78 = image_2d_array.sample(sampler_reg, tc, 0, const_type_9_); metal::float4 _e79 = a; a = _e79 + _e78; - metal::float4 _e84 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.299999952316284)); + metal::float4 _e84 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3)); metal::float4 _e85 = a; a = _e85 + _e84; - metal::float4 _e90 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.299999952316284), const_type_9_); + metal::float4 _e90 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3), const_type_9_); metal::float4 _e91 = a; a = _e91 + _e90; metal::float4 _e97 = image_2d_array.sample(sampler_reg, tc, 0, metal::bias(2.0), const_type_9_); @@ -171,7 +171,7 @@ fragment texture_sampleOutput texture_sample( metal::float4 _e103 = image_cube_array.sample(sampler_reg, tc3_, 0u); metal::float4 _e104 = a; a = _e104 + _e103; - metal::float4 _e109 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::level(2.299999952316284)); + metal::float4 _e109 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::level(2.3)); metal::float4 _e110 = a; a = _e110 + _e109; metal::float4 _e116 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::bias(2.0)); @@ -180,7 +180,7 @@ fragment texture_sampleOutput texture_sample( metal::float4 _e122 = image_cube_array.sample(sampler_reg, tc3_, 0); metal::float4 _e123 = a; a = _e123 + _e122; - metal::float4 _e128 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::level(2.299999952316284)); + metal::float4 _e128 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::level(2.3)); metal::float4 _e129 = a; a = _e129 + _e128; metal::float4 _e135 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::bias(2.0)); diff --git a/tests/out/msl/operators.msl b/tests/out/msl/operators.msl index e8ae513cba..81f56ff3a6 100644 --- a/tests/out/msl/operators.msl +++ b/tests/out/msl/operators.msl @@ -25,7 +25,7 @@ metal::float4 builtins( metal::float4 s2_ = true ? v_f32_one : v_f32_zero; metal::float4 s3_ = metal::select(v_f32_one, v_f32_zero, metal::bool4(false, false, false, false)); metal::float4 m1_ = metal::mix(v_f32_zero, v_f32_one, v_f32_half); - metal::float4 m2_ = metal::mix(v_f32_zero, v_f32_one, 0.10000000149011612); + metal::float4 m2_ = metal::mix(v_f32_zero, v_f32_one, 0.1); float b1_ = as_type(v_i32_one.x); metal::float4 b2_ = as_type(v_i32_one); metal::int4 v_i32_zero = static_cast(v_f32_zero); diff --git a/tests/out/msl/policy-mix.msl b/tests/out/msl/policy-mix.msl index 7f270e3045..f6a4fe5d6d 100644 --- a/tests/out/msl/policy-mix.msl +++ b/tests/out/msl/policy-mix.msl @@ -43,7 +43,7 @@ metal::float4 mock_function( thread type_6& in_private ) { type_9 in_function = {}; - in_function = type_9 {metal::float4(0.7070000171661377, 0.0, 0.0, 1.0), metal::float4(0.0, 0.7070000171661377, 0.0, 1.0)}; + in_function = type_9 {metal::float4(0.707, 0.0, 0.0, 1.0), metal::float4(0.0, 0.707, 0.0, 1.0)}; metal::float4 _e18 = in_storage.a.inner[i]; metal::float4 _e22 = in_uniform.a.inner[i]; metal::float4 _e25 = (uint(l) < image_2d_array.get_num_mip_levels() && uint(i) < image_2d_array.get_array_size() && metal::all(metal::uint2(c) < metal::uint2(image_2d_array.get_width(l), image_2d_array.get_height(l))) ? image_2d_array.read(metal::uint2(c), i, l): DefaultConstructible()); diff --git a/tests/out/msl/ray-query.msl b/tests/out/msl/ray-query.msl index dc24f80674..0d4560f313 100644 --- a/tests/out/msl/ray-query.msl +++ b/tests/out/msl/ray-query.msl @@ -46,7 +46,7 @@ metal::float3 get_torus_normal( RayIntersection intersection ) { metal::float3 local_point = intersection.world_to_object * metal::float4(world_point, 1.0); - metal::float2 point_on_guiding_line = metal::normalize(local_point.xy) * 2.4000000953674316; + metal::float2 point_on_guiding_line = metal::normalize(local_point.xy) * 2.4; metal::float3 world_point_on_guiding_line = intersection.object_to_world * metal::float4(point_on_guiding_line, 0.0, 1.0); return metal::normalize(world_point - world_point_on_guiding_line); } @@ -57,7 +57,7 @@ kernel void main_( ) { _RayQuery rq = {}; metal::float3 dir = metal::float3(0.0, 1.0, 0.0); - RayDesc _e12 = RayDesc {4u, 255u, 0.10000000149011612, 100.0, metal::float3(0.0), dir}; + RayDesc _e12 = RayDesc {4u, 255u, 0.1, 100.0, metal::float3(0.0), dir}; rq.intersector.assume_geometry_type(metal::raytracing::geometry_type::triangle); rq.intersector.set_opacity_cull_mode((_e12.flags & 64) != 0 ? metal::raytracing::opacity_cull_mode::opaque : (_e12.flags & 128) != 0 ? metal::raytracing::opacity_cull_mode::non_opaque : metal::raytracing::opacity_cull_mode::none); rq.intersector.force_opacity((_e12.flags & 1) != 0 ? metal::raytracing::forced_opacity::opaque : (_e12.flags & 2) != 0 ? metal::raytracing::forced_opacity::non_opaque : metal::raytracing::forced_opacity::none); diff --git a/tests/out/spv/access.spvasm b/tests/out/spv/access.spvasm index 18de89ac18..80e248040a 100644 --- a/tests/out/spv/access.spvasm +++ b/tests/out/spv/access.spvasm @@ -6,102 +6,102 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %243 "foo_vert" %238 %241 +OpEntryPoint Vertex %238 "foo_vert" %233 %236 OpEntryPoint Fragment %286 "foo_frag" %285 OpEntryPoint GLCompute %306 "assign_through_ptr" %309 OpExecutionMode %286 OriginUpperLeft OpExecutionMode %306 LocalSize 1 1 1 OpSource GLSL 450 -OpMemberName %36 0 "a" -OpMemberName %36 1 "b" -OpMemberName %36 2 "c" -OpName %36 "GlobalConst" -OpMemberName %37 0 "value" -OpName %37 "AlignedWrapper" -OpMemberName %47 0 "_matrix" -OpMemberName %47 1 "matrix_array" -OpMemberName %47 2 "atom" -OpMemberName %47 3 "atom_arr" -OpMemberName %47 4 "arr" -OpMemberName %47 5 "data" -OpName %47 "Bar" -OpMemberName %49 0 "m" -OpName %49 "Baz" -OpMemberName %53 0 "am" -OpName %53 "MatCx2InArray" -OpName %66 "global_const" -OpName %68 "bar" -OpName %70 "baz" -OpName %73 "qux" -OpName %76 "nested_mat_cx2" -OpName %79 "val" -OpName %80 "idx" -OpName %83 "t" -OpName %87 "test_matrix_within_struct_accesses" -OpName %144 "idx" -OpName %146 "t" -OpName %150 "test_matrix_within_array_within_struct_accesses" -OpName %207 "foo" -OpName %208 "read_from_private" -OpName %213 "a" -OpName %214 "test_arr_as_arg" -OpName %220 "p" -OpName %221 "assign_through_ptr_fn" -OpName %225 "foo" -OpName %226 "assign_array_through_ptr_fn" -OpName %232 "foo" -OpName %234 "c2" -OpName %238 "vi" -OpName %243 "foo_vert" +OpMemberName %12 0 "a" +OpMemberName %12 1 "b" +OpMemberName %12 2 "c" +OpName %12 "GlobalConst" +OpMemberName %13 0 "value" +OpName %13 "AlignedWrapper" +OpMemberName %24 0 "_matrix" +OpMemberName %24 1 "matrix_array" +OpMemberName %24 2 "atom" +OpMemberName %24 3 "atom_arr" +OpMemberName %24 4 "arr" +OpMemberName %24 5 "data" +OpName %24 "Bar" +OpMemberName %26 0 "m" +OpName %26 "Baz" +OpMemberName %30 0 "am" +OpName %30 "MatCx2InArray" +OpName %43 "global_const" +OpName %45 "bar" +OpName %47 "baz" +OpName %50 "qux" +OpName %53 "nested_mat_cx2" +OpName %56 "val" +OpName %57 "idx" +OpName %60 "t" +OpName %64 "test_matrix_within_struct_accesses" +OpName %134 "idx" +OpName %136 "t" +OpName %140 "test_matrix_within_array_within_struct_accesses" +OpName %199 "foo" +OpName %200 "read_from_private" +OpName %205 "a" +OpName %206 "test_arr_as_arg" +OpName %214 "p" +OpName %215 "assign_through_ptr_fn" +OpName %220 "foo" +OpName %221 "assign_array_through_ptr_fn" +OpName %227 "foo" +OpName %229 "c2" +OpName %233 "vi" +OpName %238 "foo_vert" OpName %286 "foo_frag" OpName %303 "arr" OpName %306 "assign_through_ptr" -OpMemberDecorate %36 0 Offset 0 -OpMemberDecorate %36 1 Offset 16 -OpMemberDecorate %36 2 Offset 28 -OpMemberDecorate %37 0 Offset 0 -OpDecorate %42 ArrayStride 16 -OpDecorate %43 ArrayStride 4 -OpDecorate %45 ArrayStride 8 -OpDecorate %46 ArrayStride 8 -OpMemberDecorate %47 0 Offset 0 -OpMemberDecorate %47 0 ColMajor -OpMemberDecorate %47 0 MatrixStride 16 -OpMemberDecorate %47 1 Offset 64 -OpMemberDecorate %47 1 ColMajor -OpMemberDecorate %47 1 MatrixStride 8 -OpMemberDecorate %47 2 Offset 96 -OpMemberDecorate %47 3 Offset 100 -OpMemberDecorate %47 4 Offset 144 -OpMemberDecorate %47 5 Offset 160 -OpMemberDecorate %49 0 Offset 0 -OpMemberDecorate %49 0 ColMajor -OpMemberDecorate %49 0 MatrixStride 8 -OpDecorate %52 ArrayStride 32 -OpMemberDecorate %53 0 Offset 0 -OpMemberDecorate %53 0 ColMajor -OpMemberDecorate %53 0 MatrixStride 8 -OpDecorate %55 ArrayStride 4 -OpDecorate %56 ArrayStride 40 -OpDecorate %59 ArrayStride 4 -OpDecorate %62 ArrayStride 16 -OpDecorate %68 DescriptorSet 0 -OpDecorate %68 Binding 0 -OpDecorate %47 Block -OpDecorate %70 DescriptorSet 0 -OpDecorate %70 Binding 1 -OpDecorate %71 Block -OpMemberDecorate %71 0 Offset 0 -OpDecorate %73 DescriptorSet 0 -OpDecorate %73 Binding 2 -OpDecorate %74 Block -OpMemberDecorate %74 0 Offset 0 -OpDecorate %76 DescriptorSet 0 -OpDecorate %76 Binding 3 -OpDecorate %77 Block -OpMemberDecorate %77 0 Offset 0 -OpDecorate %238 BuiltIn VertexIndex -OpDecorate %241 BuiltIn Position +OpMemberDecorate %12 0 Offset 0 +OpMemberDecorate %12 1 Offset 16 +OpMemberDecorate %12 2 Offset 28 +OpMemberDecorate %13 0 Offset 0 +OpDecorate %19 ArrayStride 16 +OpDecorate %20 ArrayStride 4 +OpDecorate %22 ArrayStride 8 +OpDecorate %23 ArrayStride 8 +OpMemberDecorate %24 0 Offset 0 +OpMemberDecorate %24 0 ColMajor +OpMemberDecorate %24 0 MatrixStride 16 +OpMemberDecorate %24 1 Offset 64 +OpMemberDecorate %24 1 ColMajor +OpMemberDecorate %24 1 MatrixStride 8 +OpMemberDecorate %24 2 Offset 96 +OpMemberDecorate %24 3 Offset 100 +OpMemberDecorate %24 4 Offset 144 +OpMemberDecorate %24 5 Offset 160 +OpMemberDecorate %26 0 Offset 0 +OpMemberDecorate %26 0 ColMajor +OpMemberDecorate %26 0 MatrixStride 8 +OpDecorate %29 ArrayStride 32 +OpMemberDecorate %30 0 Offset 0 +OpMemberDecorate %30 0 ColMajor +OpMemberDecorate %30 0 MatrixStride 8 +OpDecorate %32 ArrayStride 4 +OpDecorate %33 ArrayStride 40 +OpDecorate %36 ArrayStride 4 +OpDecorate %39 ArrayStride 16 +OpDecorate %45 DescriptorSet 0 +OpDecorate %45 Binding 0 +OpDecorate %24 Block +OpDecorate %47 DescriptorSet 0 +OpDecorate %47 Binding 1 +OpDecorate %48 Block +OpMemberDecorate %48 0 Offset 0 +OpDecorate %50 DescriptorSet 0 +OpDecorate %50 Binding 2 +OpDecorate %51 Block +OpMemberDecorate %51 0 Offset 0 +OpDecorate %53 DescriptorSet 0 +OpDecorate %53 Binding 3 +OpDecorate %54 Block +OpMemberDecorate %54 0 Offset 0 +OpDecorate %233 BuiltIn VertexIndex +OpDecorate %236 BuiltIn Position OpDecorate %285 Location 0 OpDecorate %309 BuiltIn LocalInvocationId %2 = OpTypeVoid @@ -112,389 +112,389 @@ OpDecorate %309 BuiltIn LocalInvocationId %7 = OpConstant %6 2 %8 = OpConstant %6 10 %9 = OpConstant %6 1 -%11 = OpTypeFloat 32 -%10 = OpConstant %11 1.0 -%12 = OpConstant %11 2.0 -%13 = OpConstant %11 3.0 -%14 = OpConstant %11 6.0 -%15 = OpConstant %11 5.0 -%16 = OpConstant %11 4.0 -%17 = OpConstant %11 9.0 -%18 = OpConstant %11 90.0 -%19 = OpConstant %11 10.0 -%20 = OpConstant %11 20.0 -%21 = OpConstant %11 30.0 -%22 = OpConstant %11 40.0 -%23 = OpConstant %11 8.0 -%24 = OpConstant %11 7.0 -%25 = OpConstant %6 5 -%26 = OpConstant %6 4 -%27 = OpConstant %6 9 -%28 = OpConstant %11 0.0 -%29 = OpConstant %4 3 -%30 = OpConstant %4 2 -%31 = OpConstant %6 3 -%32 = OpConstant %4 1 -%33 = OpConstant %6 42 -%34 = OpConstant %4 42 -%35 = OpTypeVector %4 3 -%36 = OpTypeStruct %4 %35 %6 -%37 = OpTypeStruct %6 -%39 = OpTypeVector %11 3 -%38 = OpTypeMatrix %39 4 -%41 = OpTypeVector %11 2 -%40 = OpTypeMatrix %41 2 -%42 = OpTypeArray %40 %7 -%43 = OpTypeArray %6 %8 -%44 = OpTypeVector %4 2 -%45 = OpTypeArray %44 %7 -%46 = OpTypeRuntimeArray %37 -%47 = OpTypeStruct %38 %42 %6 %43 %45 %46 -%48 = OpTypeMatrix %41 3 -%49 = OpTypeStruct %48 -%50 = OpTypeVector %6 2 -%51 = OpTypeMatrix %41 4 -%52 = OpTypeArray %51 %7 -%53 = OpTypeStruct %52 -%54 = OpTypePointer Function %11 -%55 = OpTypeArray %11 %8 -%56 = OpTypeArray %55 %25 -%57 = OpTypeVector %11 4 -%58 = OpTypePointer StorageBuffer %6 -%59 = OpTypeArray %6 %25 -%60 = OpTypeVector %6 4 -%61 = OpTypePointer Workgroup %4 -%62 = OpTypeArray %57 %7 -%63 = OpTypePointer Function %62 -%64 = OpConstantComposite %35 %3 %3 %3 -%65 = OpConstantComposite %36 %3 %64 %5 -%67 = OpTypePointer Private %36 -%66 = OpVariable %67 Private %65 -%69 = OpTypePointer StorageBuffer %47 -%68 = OpVariable %69 StorageBuffer -%71 = OpTypeStruct %49 -%72 = OpTypePointer Uniform %71 -%70 = OpVariable %72 Uniform -%74 = OpTypeStruct %50 -%75 = OpTypePointer StorageBuffer %74 -%73 = OpVariable %75 StorageBuffer -%77 = OpTypeStruct %53 -%78 = OpTypePointer Uniform %77 -%76 = OpVariable %78 Uniform -%79 = OpVariable %61 Workgroup -%81 = OpTypePointer Function %6 -%82 = OpConstantNull %6 -%84 = OpTypePointer Function %49 -%85 = OpConstantNull %49 -%88 = OpTypeFunction %2 -%89 = OpTypePointer Uniform %49 -%94 = OpTypePointer Uniform %48 -%97 = OpTypePointer Uniform %41 -%103 = OpTypePointer Uniform %11 -%123 = OpTypePointer Function %48 -%129 = OpTypePointer Function %41 -%135 = OpTypePointer Function %11 -%145 = OpConstantNull %6 -%147 = OpTypePointer Function %53 -%148 = OpConstantNull %53 -%151 = OpTypePointer Uniform %53 -%153 = OpConstantNull %52 -%154 = OpConstantNull %52 -%158 = OpTypePointer Uniform %52 -%161 = OpTypePointer Uniform %51 -%184 = OpTypePointer Function %52 -%186 = OpTypePointer Function %51 -%209 = OpTypeFunction %11 %54 -%215 = OpTypeFunction %11 %56 -%222 = OpTypeFunction %2 %61 -%227 = OpTypeFunction %2 %63 -%233 = OpConstantNull %11 -%235 = OpTypePointer Function %59 -%236 = OpConstantNull %59 -%239 = OpTypePointer Input %4 -%238 = OpVariable %239 Input -%242 = OpTypePointer Output %57 -%241 = OpVariable %242 Output -%245 = OpTypePointer StorageBuffer %50 -%248 = OpConstantNull %56 -%253 = OpTypePointer StorageBuffer %38 -%256 = OpTypePointer StorageBuffer %45 +%10 = OpConstant %6 5 +%11 = OpTypeVector %4 3 +%12 = OpTypeStruct %4 %11 %6 +%13 = OpTypeStruct %6 +%16 = OpTypeFloat 32 +%15 = OpTypeVector %16 3 +%14 = OpTypeMatrix %15 4 +%18 = OpTypeVector %16 2 +%17 = OpTypeMatrix %18 2 +%19 = OpTypeArray %17 %7 +%20 = OpTypeArray %6 %8 +%21 = OpTypeVector %4 2 +%22 = OpTypeArray %21 %7 +%23 = OpTypeRuntimeArray %13 +%24 = OpTypeStruct %14 %19 %6 %20 %22 %23 +%25 = OpTypeMatrix %18 3 +%26 = OpTypeStruct %25 +%27 = OpTypeVector %6 2 +%28 = OpTypeMatrix %18 4 +%29 = OpTypeArray %28 %7 +%30 = OpTypeStruct %29 +%31 = OpTypePointer Function %16 +%32 = OpTypeArray %16 %8 +%33 = OpTypeArray %32 %10 +%34 = OpTypeVector %16 4 +%35 = OpTypePointer StorageBuffer %6 +%36 = OpTypeArray %6 %10 +%37 = OpTypeVector %6 4 +%38 = OpTypePointer Workgroup %4 +%39 = OpTypeArray %34 %7 +%40 = OpTypePointer Function %39 +%41 = OpConstantComposite %11 %3 %3 %3 +%42 = OpConstantComposite %12 %3 %41 %5 +%44 = OpTypePointer Private %12 +%43 = OpVariable %44 Private %42 +%46 = OpTypePointer StorageBuffer %24 +%45 = OpVariable %46 StorageBuffer +%48 = OpTypeStruct %26 +%49 = OpTypePointer Uniform %48 +%47 = OpVariable %49 Uniform +%51 = OpTypeStruct %27 +%52 = OpTypePointer StorageBuffer %51 +%50 = OpVariable %52 StorageBuffer +%54 = OpTypeStruct %30 +%55 = OpTypePointer Uniform %54 +%53 = OpVariable %55 Uniform +%56 = OpVariable %38 Workgroup +%58 = OpTypePointer Function %6 +%59 = OpConstantNull %6 +%61 = OpTypePointer Function %26 +%62 = OpConstantNull %26 +%65 = OpTypeFunction %2 +%66 = OpTypePointer Uniform %26 +%68 = OpConstant %16 1.0 +%69 = OpConstant %16 2.0 +%70 = OpConstant %16 3.0 +%71 = OpConstant %16 6.0 +%72 = OpConstant %16 5.0 +%73 = OpConstant %16 4.0 +%74 = OpConstant %16 9.0 +%75 = OpConstant %16 90.0 +%76 = OpConstant %16 10.0 +%77 = OpConstant %16 20.0 +%78 = OpConstant %16 30.0 +%79 = OpConstant %16 40.0 +%83 = OpTypePointer Uniform %25 +%86 = OpTypePointer Uniform %18 +%92 = OpTypePointer Uniform %16 +%93 = OpConstant %4 1 +%113 = OpTypePointer Function %25 +%119 = OpTypePointer Function %18 +%125 = OpTypePointer Function %16 +%135 = OpConstantNull %6 +%137 = OpTypePointer Function %30 +%138 = OpConstantNull %30 +%141 = OpTypePointer Uniform %30 +%143 = OpConstantNull %29 +%144 = OpConstantNull %29 +%145 = OpConstant %16 8.0 +%146 = OpConstant %16 7.0 +%150 = OpTypePointer Uniform %29 +%153 = OpTypePointer Uniform %28 +%176 = OpTypePointer Function %29 +%178 = OpTypePointer Function %28 +%201 = OpTypeFunction %16 %31 +%207 = OpTypeFunction %16 %33 +%208 = OpConstant %6 4 +%209 = OpConstant %6 9 +%216 = OpTypeFunction %2 %38 +%217 = OpConstant %4 42 +%222 = OpTypeFunction %2 %40 +%228 = OpConstantNull %16 +%230 = OpTypePointer Function %36 +%231 = OpConstantNull %36 +%234 = OpTypePointer Input %4 +%233 = OpVariable %234 Input +%237 = OpTypePointer Output %34 +%236 = OpVariable %237 Output +%240 = OpTypePointer StorageBuffer %27 +%243 = OpConstant %16 0.0 +%244 = OpConstant %4 3 +%245 = OpConstant %4 2 +%246 = OpConstant %6 3 +%247 = OpConstant %6 42 +%248 = OpConstantNull %33 +%253 = OpTypePointer StorageBuffer %14 +%256 = OpTypePointer StorageBuffer %22 %257 = OpConstant %4 4 -%260 = OpTypePointer StorageBuffer %39 -%261 = OpTypePointer StorageBuffer %11 -%264 = OpTypePointer StorageBuffer %46 -%267 = OpTypePointer StorageBuffer %37 +%260 = OpTypePointer StorageBuffer %15 +%261 = OpTypePointer StorageBuffer %16 +%264 = OpTypePointer StorageBuffer %23 +%267 = OpTypePointer StorageBuffer %13 %268 = OpConstant %4 5 -%285 = OpVariable %242 Output -%288 = OpConstantNull %50 -%304 = OpConstantNull %62 +%285 = OpVariable %237 Output +%288 = OpConstantNull %27 +%304 = OpConstantNull %39 %308 = OpConstantNull %4 -%310 = OpTypePointer Input %35 +%310 = OpTypePointer Input %11 %309 = OpVariable %310 Input -%312 = OpConstantNull %35 +%312 = OpConstantNull %11 %314 = OpTypeBool %313 = OpTypeVector %314 3 %319 = OpConstant %4 264 -%87 = OpFunction %2 None %88 -%86 = OpLabel -%80 = OpVariable %81 Function %82 -%83 = OpVariable %84 Function %85 -%90 = OpAccessChain %89 %70 %3 -OpBranch %91 -%91 = OpLabel -OpStore %80 %9 -%92 = OpLoad %6 %80 -%93 = OpISub %6 %92 %9 -OpStore %80 %93 -%95 = OpAccessChain %94 %90 %3 -%96 = OpLoad %48 %95 -%98 = OpAccessChain %97 %90 %3 %3 -%99 = OpLoad %41 %98 -%100 = OpLoad %6 %80 -%101 = OpAccessChain %97 %90 %3 %100 -%102 = OpLoad %41 %101 -%104 = OpAccessChain %103 %90 %3 %3 %32 -%105 = OpLoad %11 %104 -%106 = OpLoad %6 %80 -%107 = OpAccessChain %103 %90 %3 %3 %106 -%108 = OpLoad %11 %107 -%109 = OpLoad %6 %80 -%110 = OpAccessChain %103 %90 %3 %109 %32 -%111 = OpLoad %11 %110 -%112 = OpLoad %6 %80 -%113 = OpLoad %6 %80 -%114 = OpAccessChain %103 %90 %3 %112 %113 -%115 = OpLoad %11 %114 -%116 = OpCompositeConstruct %41 %10 %10 -%117 = OpCompositeConstruct %41 %12 %12 -%118 = OpCompositeConstruct %41 %13 %13 -%119 = OpCompositeConstruct %48 %116 %117 %118 -%120 = OpCompositeConstruct %49 %119 -OpStore %83 %120 -%121 = OpLoad %6 %80 -%122 = OpIAdd %6 %121 %9 -OpStore %80 %122 -%124 = OpCompositeConstruct %41 %14 %14 -%125 = OpCompositeConstruct %41 %15 %15 -%126 = OpCompositeConstruct %41 %16 %16 -%127 = OpCompositeConstruct %48 %124 %125 %126 -%128 = OpAccessChain %123 %83 %3 -OpStore %128 %127 -%130 = OpCompositeConstruct %41 %17 %17 -%131 = OpAccessChain %129 %83 %3 %3 -OpStore %131 %130 -%132 = OpLoad %6 %80 -%133 = OpCompositeConstruct %41 %18 %18 -%134 = OpAccessChain %129 %83 %3 %132 -OpStore %134 %133 -%136 = OpAccessChain %135 %83 %3 %3 %32 -OpStore %136 %19 -%137 = OpLoad %6 %80 -%138 = OpAccessChain %135 %83 %3 %3 %137 -OpStore %138 %20 -%139 = OpLoad %6 %80 -%140 = OpAccessChain %135 %83 %3 %139 %32 -OpStore %140 %21 -%141 = OpLoad %6 %80 -%142 = OpLoad %6 %80 -%143 = OpAccessChain %135 %83 %3 %141 %142 -OpStore %143 %22 +%64 = OpFunction %2 None %65 +%63 = OpLabel +%57 = OpVariable %58 Function %59 +%60 = OpVariable %61 Function %62 +%67 = OpAccessChain %66 %47 %3 +OpBranch %80 +%80 = OpLabel +OpStore %57 %9 +%81 = OpLoad %6 %57 +%82 = OpISub %6 %81 %9 +OpStore %57 %82 +%84 = OpAccessChain %83 %67 %3 +%85 = OpLoad %25 %84 +%87 = OpAccessChain %86 %67 %3 %3 +%88 = OpLoad %18 %87 +%89 = OpLoad %6 %57 +%90 = OpAccessChain %86 %67 %3 %89 +%91 = OpLoad %18 %90 +%94 = OpAccessChain %92 %67 %3 %3 %93 +%95 = OpLoad %16 %94 +%96 = OpLoad %6 %57 +%97 = OpAccessChain %92 %67 %3 %3 %96 +%98 = OpLoad %16 %97 +%99 = OpLoad %6 %57 +%100 = OpAccessChain %92 %67 %3 %99 %93 +%101 = OpLoad %16 %100 +%102 = OpLoad %6 %57 +%103 = OpLoad %6 %57 +%104 = OpAccessChain %92 %67 %3 %102 %103 +%105 = OpLoad %16 %104 +%106 = OpCompositeConstruct %18 %68 %68 +%107 = OpCompositeConstruct %18 %69 %69 +%108 = OpCompositeConstruct %18 %70 %70 +%109 = OpCompositeConstruct %25 %106 %107 %108 +%110 = OpCompositeConstruct %26 %109 +OpStore %60 %110 +%111 = OpLoad %6 %57 +%112 = OpIAdd %6 %111 %9 +OpStore %57 %112 +%114 = OpCompositeConstruct %18 %71 %71 +%115 = OpCompositeConstruct %18 %72 %72 +%116 = OpCompositeConstruct %18 %73 %73 +%117 = OpCompositeConstruct %25 %114 %115 %116 +%118 = OpAccessChain %113 %60 %3 +OpStore %118 %117 +%120 = OpCompositeConstruct %18 %74 %74 +%121 = OpAccessChain %119 %60 %3 %3 +OpStore %121 %120 +%122 = OpLoad %6 %57 +%123 = OpCompositeConstruct %18 %75 %75 +%124 = OpAccessChain %119 %60 %3 %122 +OpStore %124 %123 +%126 = OpAccessChain %125 %60 %3 %3 %93 +OpStore %126 %76 +%127 = OpLoad %6 %57 +%128 = OpAccessChain %125 %60 %3 %3 %127 +OpStore %128 %77 +%129 = OpLoad %6 %57 +%130 = OpAccessChain %125 %60 %3 %129 %93 +OpStore %130 %78 +%131 = OpLoad %6 %57 +%132 = OpLoad %6 %57 +%133 = OpAccessChain %125 %60 %3 %131 %132 +OpStore %133 %79 OpReturn OpFunctionEnd -%150 = OpFunction %2 None %88 -%149 = OpLabel -%144 = OpVariable %81 Function %145 -%146 = OpVariable %147 Function %148 -%152 = OpAccessChain %151 %76 %3 -OpBranch %155 -%155 = OpLabel -OpStore %144 %9 -%156 = OpLoad %6 %144 -%157 = OpISub %6 %156 %9 -OpStore %144 %157 -%159 = OpAccessChain %158 %152 %3 -%160 = OpLoad %52 %159 -%162 = OpAccessChain %161 %152 %3 %3 -%163 = OpLoad %51 %162 -%164 = OpAccessChain %97 %152 %3 %3 %3 -%165 = OpLoad %41 %164 -%166 = OpLoad %6 %144 -%167 = OpAccessChain %97 %152 %3 %3 %166 -%168 = OpLoad %41 %167 -%169 = OpAccessChain %103 %152 %3 %3 %3 %32 -%170 = OpLoad %11 %169 -%171 = OpLoad %6 %144 -%172 = OpAccessChain %103 %152 %3 %3 %3 %171 -%173 = OpLoad %11 %172 -%174 = OpLoad %6 %144 -%175 = OpAccessChain %103 %152 %3 %3 %174 %32 -%176 = OpLoad %11 %175 -%177 = OpLoad %6 %144 -%178 = OpLoad %6 %144 -%179 = OpAccessChain %103 %152 %3 %3 %177 %178 -%180 = OpLoad %11 %179 -%181 = OpCompositeConstruct %53 %153 -OpStore %146 %181 -%182 = OpLoad %6 %144 -%183 = OpIAdd %6 %182 %9 -OpStore %144 %183 -%185 = OpAccessChain %184 %146 %3 -OpStore %185 %154 -%187 = OpCompositeConstruct %41 %23 %23 -%188 = OpCompositeConstruct %41 %24 %24 -%189 = OpCompositeConstruct %41 %14 %14 -%190 = OpCompositeConstruct %41 %15 %15 -%191 = OpCompositeConstruct %51 %187 %188 %189 %190 -%192 = OpAccessChain %186 %146 %3 %3 -OpStore %192 %191 -%193 = OpCompositeConstruct %41 %17 %17 -%194 = OpAccessChain %129 %146 %3 %3 %3 -OpStore %194 %193 -%195 = OpLoad %6 %144 -%196 = OpCompositeConstruct %41 %18 %18 -%197 = OpAccessChain %129 %146 %3 %3 %195 -OpStore %197 %196 -%198 = OpAccessChain %135 %146 %3 %3 %3 %32 -OpStore %198 %19 -%199 = OpLoad %6 %144 -%200 = OpAccessChain %135 %146 %3 %3 %3 %199 -OpStore %200 %20 -%201 = OpLoad %6 %144 -%202 = OpAccessChain %135 %146 %3 %3 %201 %32 -OpStore %202 %21 -%203 = OpLoad %6 %144 -%204 = OpLoad %6 %144 -%205 = OpAccessChain %135 %146 %3 %3 %203 %204 -OpStore %205 %22 +%140 = OpFunction %2 None %65 +%139 = OpLabel +%134 = OpVariable %58 Function %135 +%136 = OpVariable %137 Function %138 +%142 = OpAccessChain %141 %53 %3 +OpBranch %147 +%147 = OpLabel +OpStore %134 %9 +%148 = OpLoad %6 %134 +%149 = OpISub %6 %148 %9 +OpStore %134 %149 +%151 = OpAccessChain %150 %142 %3 +%152 = OpLoad %29 %151 +%154 = OpAccessChain %153 %142 %3 %3 +%155 = OpLoad %28 %154 +%156 = OpAccessChain %86 %142 %3 %3 %3 +%157 = OpLoad %18 %156 +%158 = OpLoad %6 %134 +%159 = OpAccessChain %86 %142 %3 %3 %158 +%160 = OpLoad %18 %159 +%161 = OpAccessChain %92 %142 %3 %3 %3 %93 +%162 = OpLoad %16 %161 +%163 = OpLoad %6 %134 +%164 = OpAccessChain %92 %142 %3 %3 %3 %163 +%165 = OpLoad %16 %164 +%166 = OpLoad %6 %134 +%167 = OpAccessChain %92 %142 %3 %3 %166 %93 +%168 = OpLoad %16 %167 +%169 = OpLoad %6 %134 +%170 = OpLoad %6 %134 +%171 = OpAccessChain %92 %142 %3 %3 %169 %170 +%172 = OpLoad %16 %171 +%173 = OpCompositeConstruct %30 %143 +OpStore %136 %173 +%174 = OpLoad %6 %134 +%175 = OpIAdd %6 %174 %9 +OpStore %134 %175 +%177 = OpAccessChain %176 %136 %3 +OpStore %177 %144 +%179 = OpCompositeConstruct %18 %145 %145 +%180 = OpCompositeConstruct %18 %146 %146 +%181 = OpCompositeConstruct %18 %71 %71 +%182 = OpCompositeConstruct %18 %72 %72 +%183 = OpCompositeConstruct %28 %179 %180 %181 %182 +%184 = OpAccessChain %178 %136 %3 %3 +OpStore %184 %183 +%185 = OpCompositeConstruct %18 %74 %74 +%186 = OpAccessChain %119 %136 %3 %3 %3 +OpStore %186 %185 +%187 = OpLoad %6 %134 +%188 = OpCompositeConstruct %18 %75 %75 +%189 = OpAccessChain %119 %136 %3 %3 %187 +OpStore %189 %188 +%190 = OpAccessChain %125 %136 %3 %3 %3 %93 +OpStore %190 %76 +%191 = OpLoad %6 %134 +%192 = OpAccessChain %125 %136 %3 %3 %3 %191 +OpStore %192 %77 +%193 = OpLoad %6 %134 +%194 = OpAccessChain %125 %136 %3 %3 %193 %93 +OpStore %194 %78 +%195 = OpLoad %6 %134 +%196 = OpLoad %6 %134 +%197 = OpAccessChain %125 %136 %3 %3 %195 %196 +OpStore %197 %79 OpReturn OpFunctionEnd -%208 = OpFunction %11 None %209 -%207 = OpFunctionParameter %54 -%206 = OpLabel +%200 = OpFunction %16 None %201 +%199 = OpFunctionParameter %31 +%198 = OpLabel +OpBranch %202 +%202 = OpLabel +%203 = OpLoad %16 %199 +OpReturnValue %203 +OpFunctionEnd +%206 = OpFunction %16 None %207 +%205 = OpFunctionParameter %33 +%204 = OpLabel OpBranch %210 %210 = OpLabel -%211 = OpLoad %11 %207 -OpReturnValue %211 +%211 = OpCompositeExtract %32 %205 4 +%212 = OpCompositeExtract %16 %211 9 +OpReturnValue %212 OpFunctionEnd -%214 = OpFunction %11 None %215 -%213 = OpFunctionParameter %56 -%212 = OpLabel -OpBranch %216 -%216 = OpLabel -%217 = OpCompositeExtract %55 %213 4 -%218 = OpCompositeExtract %11 %217 9 -OpReturnValue %218 +%215 = OpFunction %2 None %216 +%214 = OpFunctionParameter %38 +%213 = OpLabel +OpBranch %218 +%218 = OpLabel +OpStore %214 %217 +OpReturn OpFunctionEnd %221 = OpFunction %2 None %222 -%220 = OpFunctionParameter %61 +%220 = OpFunctionParameter %40 %219 = OpLabel OpBranch %223 %223 = OpLabel -OpStore %220 %34 +%224 = OpCompositeConstruct %34 %68 %68 %68 %68 +%225 = OpCompositeConstruct %34 %69 %69 %69 %69 +%226 = OpCompositeConstruct %39 %224 %225 +OpStore %220 %226 OpReturn OpFunctionEnd -%226 = OpFunction %2 None %227 -%225 = OpFunctionParameter %63 -%224 = OpLabel -OpBranch %228 -%228 = OpLabel -%229 = OpCompositeConstruct %57 %10 %10 %10 %10 -%230 = OpCompositeConstruct %57 %12 %12 %12 %12 -%231 = OpCompositeConstruct %62 %229 %230 -OpStore %225 %231 -OpReturn -OpFunctionEnd -%243 = OpFunction %2 None %88 -%237 = OpLabel -%232 = OpVariable %54 Function %233 -%234 = OpVariable %235 Function %236 -%240 = OpLoad %4 %238 -%244 = OpAccessChain %89 %70 %3 -%246 = OpAccessChain %245 %73 %3 -%247 = OpAccessChain %151 %76 %3 +%238 = OpFunction %2 None %65 +%232 = OpLabel +%227 = OpVariable %31 Function %228 +%229 = OpVariable %230 Function %231 +%235 = OpLoad %4 %233 +%239 = OpAccessChain %66 %47 %3 +%241 = OpAccessChain %240 %50 %3 +%242 = OpAccessChain %141 %53 %3 OpBranch %249 %249 = OpLabel -OpStore %232 %28 -%250 = OpLoad %11 %232 -OpStore %232 %10 -%251 = OpFunctionCall %2 %87 -%252 = OpFunctionCall %2 %150 -%254 = OpAccessChain %253 %68 %3 -%255 = OpLoad %38 %254 -%258 = OpAccessChain %256 %68 %257 -%259 = OpLoad %45 %258 -%262 = OpAccessChain %261 %68 %3 %29 %3 -%263 = OpLoad %11 %262 -%265 = OpArrayLength %4 %68 5 -%266 = OpISub %4 %265 %30 -%269 = OpAccessChain %58 %68 %268 %266 %3 +OpStore %227 %243 +%250 = OpLoad %16 %227 +OpStore %227 %68 +%251 = OpFunctionCall %2 %64 +%252 = OpFunctionCall %2 %140 +%254 = OpAccessChain %253 %45 %3 +%255 = OpLoad %14 %254 +%258 = OpAccessChain %256 %45 %257 +%259 = OpLoad %22 %258 +%262 = OpAccessChain %261 %45 %3 %244 %3 +%263 = OpLoad %16 %262 +%265 = OpArrayLength %4 %45 5 +%266 = OpISub %4 %265 %245 +%269 = OpAccessChain %35 %45 %268 %266 %3 %270 = OpLoad %6 %269 -%271 = OpLoad %50 %246 -%272 = OpFunctionCall %11 %208 %232 +%271 = OpLoad %27 %241 +%272 = OpFunctionCall %16 %200 %227 %273 = OpConvertFToS %6 %263 -%274 = OpCompositeConstruct %59 %270 %273 %31 %26 %25 -OpStore %234 %274 -%275 = OpIAdd %4 %240 %32 -%276 = OpAccessChain %81 %234 %275 -OpStore %276 %33 -%277 = OpAccessChain %81 %234 %240 +%274 = OpCompositeConstruct %36 %270 %273 %246 %208 %10 +OpStore %229 %274 +%275 = OpIAdd %4 %235 %93 +%276 = OpAccessChain %58 %229 %275 +OpStore %276 %247 +%277 = OpAccessChain %58 %229 %235 %278 = OpLoad %6 %277 -%279 = OpFunctionCall %11 %214 %248 -%280 = OpCompositeConstruct %60 %278 %278 %278 %278 -%281 = OpConvertSToF %57 %280 -%282 = OpMatrixTimesVector %39 %255 %281 -%283 = OpCompositeConstruct %57 %282 %12 -OpStore %241 %283 +%279 = OpFunctionCall %16 %206 %248 +%280 = OpCompositeConstruct %37 %278 %278 %278 %278 +%281 = OpConvertSToF %34 %280 +%282 = OpMatrixTimesVector %15 %255 %281 +%283 = OpCompositeConstruct %34 %282 %69 +OpStore %236 %283 OpReturn OpFunctionEnd -%286 = OpFunction %2 None %88 +%286 = OpFunction %2 None %65 %284 = OpLabel -%287 = OpAccessChain %245 %73 %3 +%287 = OpAccessChain %240 %50 %3 OpBranch %289 %289 = OpLabel -%290 = OpAccessChain %261 %68 %3 %32 %30 -OpStore %290 %10 -%291 = OpCompositeConstruct %39 %28 %28 %28 -%292 = OpCompositeConstruct %39 %10 %10 %10 -%293 = OpCompositeConstruct %39 %12 %12 %12 -%294 = OpCompositeConstruct %39 %13 %13 %13 -%295 = OpCompositeConstruct %38 %291 %292 %293 %294 -%296 = OpAccessChain %253 %68 %3 +%290 = OpAccessChain %261 %45 %3 %93 %245 +OpStore %290 %68 +%291 = OpCompositeConstruct %15 %243 %243 %243 +%292 = OpCompositeConstruct %15 %68 %68 %68 +%293 = OpCompositeConstruct %15 %69 %69 %69 +%294 = OpCompositeConstruct %15 %70 %70 %70 +%295 = OpCompositeConstruct %14 %291 %292 %293 %294 +%296 = OpAccessChain %253 %45 %3 OpStore %296 %295 -%297 = OpCompositeConstruct %44 %3 %3 -%298 = OpCompositeConstruct %44 %32 %32 -%299 = OpCompositeConstruct %45 %297 %298 -%300 = OpAccessChain %256 %68 %257 +%297 = OpCompositeConstruct %21 %3 %3 +%298 = OpCompositeConstruct %21 %93 %93 +%299 = OpCompositeConstruct %22 %297 %298 +%300 = OpAccessChain %256 %45 %257 OpStore %300 %299 -%301 = OpAccessChain %58 %68 %268 %32 %3 +%301 = OpAccessChain %35 %45 %268 %93 %3 OpStore %301 %9 OpStore %287 %288 -%302 = OpCompositeConstruct %57 %28 %28 %28 %28 +%302 = OpCompositeConstruct %34 %243 %243 %243 %243 OpStore %285 %302 OpReturn OpFunctionEnd -%306 = OpFunction %2 None %88 +%306 = OpFunction %2 None %65 %305 = OpLabel -%303 = OpVariable %63 Function %304 +%303 = OpVariable %40 Function %304 OpBranch %307 %307 = OpLabel -%311 = OpLoad %35 %309 +%311 = OpLoad %11 %309 %315 = OpIEqual %313 %311 %312 %316 = OpAll %314 %315 OpSelectionMerge %317 None OpBranchConditional %316 %318 %317 %318 = OpLabel -OpStore %79 %308 +OpStore %56 %308 OpBranch %317 %317 = OpLabel -OpControlBarrier %30 %30 %319 +OpControlBarrier %245 %245 %319 OpBranch %320 %320 = OpLabel -%321 = OpCompositeConstruct %57 %14 %14 %14 %14 -%322 = OpCompositeConstruct %57 %24 %24 %24 %24 -%323 = OpCompositeConstruct %62 %321 %322 +%321 = OpCompositeConstruct %34 %71 %71 %71 %71 +%322 = OpCompositeConstruct %34 %146 %146 %146 %146 +%323 = OpCompositeConstruct %39 %321 %322 OpStore %303 %323 -%324 = OpFunctionCall %2 %221 %79 -%325 = OpFunctionCall %2 %226 %303 +%324 = OpFunctionCall %2 %215 %56 +%325 = OpFunctionCall %2 %221 %303 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/atomicCompareExchange.spvasm b/tests/out/spv/atomicCompareExchange.spvasm index 5af859324e..1269436ed5 100644 --- a/tests/out/spv/atomicCompareExchange.spvasm +++ b/tests/out/spv/atomicCompareExchange.spvasm @@ -6,76 +6,76 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %32 "test_atomic_compare_exchange_i32" +OpEntryPoint GLCompute %29 "test_atomic_compare_exchange_i32" OpEntryPoint GLCompute %84 "test_atomic_compare_exchange_u32" -OpExecutionMode %32 LocalSize 1 1 1 +OpExecutionMode %29 LocalSize 1 1 1 OpExecutionMode %84 LocalSize 1 1 1 -OpDecorate %12 ArrayStride 4 -OpDecorate %13 ArrayStride 4 +OpDecorate %7 ArrayStride 4 +OpDecorate %8 ArrayStride 4 +OpMemberDecorate %11 0 Offset 0 +OpMemberDecorate %11 1 Offset 4 +OpMemberDecorate %12 0 Offset 0 +OpMemberDecorate %12 1 Offset 4 +OpDecorate %13 DescriptorSet 0 +OpDecorate %13 Binding 0 +OpDecorate %14 Block OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 4 -OpMemberDecorate %15 0 Offset 0 -OpMemberDecorate %15 1 Offset 4 OpDecorate %16 DescriptorSet 0 -OpDecorate %16 Binding 0 +OpDecorate %16 Binding 1 OpDecorate %17 Block OpMemberDecorate %17 0 Offset 0 -OpDecorate %19 DescriptorSet 0 -OpDecorate %19 Binding 1 -OpDecorate %20 Block -OpMemberDecorate %20 0 Offset 0 %2 = OpTypeVoid %4 = OpTypeInt 32 0 %3 = OpConstant %4 128 -%5 = OpConstant %4 0 -%7 = OpTypeBool -%6 = OpConstantFalse %7 -%9 = OpTypeFloat 32 -%8 = OpConstant %9 1.0 -%10 = OpConstant %4 1 -%11 = OpTypeInt 32 1 -%12 = OpTypeArray %11 %3 -%13 = OpTypeArray %4 %3 -%14 = OpTypeStruct %11 %7 -%15 = OpTypeStruct %4 %7 -%17 = OpTypeStruct %12 +%5 = OpConstant %4 1 +%6 = OpTypeInt 32 1 +%7 = OpTypeArray %6 %3 +%8 = OpTypeArray %4 %3 +%9 = OpTypeBool +%10 = OpTypeFloat 32 +%11 = OpTypeStruct %6 %9 +%12 = OpTypeStruct %4 %9 +%14 = OpTypeStruct %7 +%15 = OpTypePointer StorageBuffer %14 +%13 = OpVariable %15 StorageBuffer +%17 = OpTypeStruct %8 %18 = OpTypePointer StorageBuffer %17 %16 = OpVariable %18 StorageBuffer -%20 = OpTypeStruct %13 -%21 = OpTypePointer StorageBuffer %20 -%19 = OpVariable %21 StorageBuffer -%23 = OpTypePointer Function %4 -%24 = OpConstantNull %4 -%26 = OpTypePointer Function %11 -%27 = OpConstantNull %11 -%29 = OpTypePointer Function %7 -%30 = OpConstantNull %7 -%33 = OpTypeFunction %2 -%34 = OpTypePointer StorageBuffer %12 -%48 = OpTypePointer StorageBuffer %11 -%51 = OpConstant %11 1 +%20 = OpTypePointer Function %4 +%21 = OpConstantNull %4 +%23 = OpTypePointer Function %6 +%24 = OpConstantNull %6 +%26 = OpTypePointer Function %9 +%27 = OpConstantNull %9 +%30 = OpTypeFunction %2 +%31 = OpTypePointer StorageBuffer %7 +%32 = OpConstant %4 0 +%34 = OpConstantFalse %9 +%35 = OpConstant %10 1.0 +%48 = OpTypePointer StorageBuffer %6 +%51 = OpConstant %6 1 %52 = OpConstant %4 64 %78 = OpConstantNull %4 %80 = OpConstantNull %4 -%82 = OpConstantNull %7 -%85 = OpTypePointer StorageBuffer %13 +%82 = OpConstantNull %9 +%85 = OpTypePointer StorageBuffer %8 %99 = OpTypePointer StorageBuffer %4 -%32 = OpFunction %2 None %33 -%31 = OpLabel +%29 = OpFunction %2 None %30 +%28 = OpLabel +%19 = OpVariable %20 Function %21 %22 = OpVariable %23 Function %24 %25 = OpVariable %26 Function %27 -%28 = OpVariable %29 Function %30 -%35 = OpAccessChain %34 %16 %5 +%33 = OpAccessChain %31 %13 %32 OpBranch %36 %36 = OpLabel -OpStore %22 %5 +OpStore %19 %32 OpBranch %37 %37 = OpLabel OpLoopMerge %38 %40 None OpBranch %39 %39 = OpLabel -%41 = OpLoad %4 %22 -%42 = OpULessThan %7 %41 %3 +%41 = OpLoad %4 %19 +%42 = OpULessThan %9 %41 %3 OpSelectionMerge %43 None OpBranchConditional %42 %43 %44 %44 = OpLabel @@ -83,18 +83,18 @@ OpBranch %38 %43 = OpLabel OpBranch %45 %45 = OpLabel -%47 = OpLoad %4 %22 -%49 = OpAccessChain %48 %35 %47 -%50 = OpAtomicLoad %11 %49 %51 %52 -OpStore %25 %50 -OpStore %28 %6 +%47 = OpLoad %4 %19 +%49 = OpAccessChain %48 %33 %47 +%50 = OpAtomicLoad %6 %49 %51 %52 +OpStore %22 %50 +OpStore %25 %34 OpBranch %53 %53 = OpLabel OpLoopMerge %54 %56 None OpBranch %55 %55 = OpLabel -%57 = OpLoad %7 %28 -%58 = OpLogicalNot %7 %57 +%57 = OpLoad %9 %25 +%58 = OpLogicalNot %9 %57 OpSelectionMerge %59 None OpBranchConditional %58 %59 %60 %60 = OpLabel @@ -102,20 +102,20 @@ OpBranch %54 %59 = OpLabel OpBranch %61 %61 = OpLabel -%63 = OpLoad %11 %25 -%64 = OpBitcast %9 %63 -%65 = OpFAdd %9 %64 %8 -%66 = OpBitcast %11 %65 -%67 = OpLoad %4 %22 -%68 = OpLoad %11 %25 -%70 = OpAccessChain %48 %35 %67 -%71 = OpAtomicCompareExchange %11 %70 %51 %52 %52 %66 %68 -%72 = OpIEqual %7 %71 %68 -%69 = OpCompositeConstruct %14 %71 %72 -%73 = OpCompositeExtract %11 %69 0 -OpStore %25 %73 -%74 = OpCompositeExtract %7 %69 1 -OpStore %28 %74 +%63 = OpLoad %6 %22 +%64 = OpBitcast %10 %63 +%65 = OpFAdd %10 %64 %35 +%66 = OpBitcast %6 %65 +%67 = OpLoad %4 %19 +%68 = OpLoad %6 %22 +%70 = OpAccessChain %48 %33 %67 +%71 = OpAtomicCompareExchange %6 %70 %51 %52 %52 %66 %68 +%72 = OpIEqual %9 %71 %68 +%69 = OpCompositeConstruct %11 %71 %72 +%73 = OpCompositeExtract %6 %69 0 +OpStore %22 %73 +%74 = OpCompositeExtract %9 %69 1 +OpStore %25 %74 OpBranch %62 %62 = OpLabel OpBranch %56 @@ -126,29 +126,29 @@ OpBranch %46 %46 = OpLabel OpBranch %40 %40 = OpLabel -%75 = OpLoad %4 %22 -%76 = OpIAdd %4 %75 %10 -OpStore %22 %76 +%75 = OpLoad %4 %19 +%76 = OpIAdd %4 %75 %5 +OpStore %19 %76 OpBranch %37 %38 = OpLabel OpReturn OpFunctionEnd -%84 = OpFunction %2 None %33 +%84 = OpFunction %2 None %30 %83 = OpLabel -%77 = OpVariable %23 Function %78 -%79 = OpVariable %23 Function %80 -%81 = OpVariable %29 Function %82 -%86 = OpAccessChain %85 %19 %5 +%77 = OpVariable %20 Function %78 +%79 = OpVariable %20 Function %80 +%81 = OpVariable %26 Function %82 +%86 = OpAccessChain %85 %16 %32 OpBranch %87 %87 = OpLabel -OpStore %77 %5 +OpStore %77 %32 OpBranch %88 %88 = OpLabel OpLoopMerge %89 %91 None OpBranch %90 %90 = OpLabel %92 = OpLoad %4 %77 -%93 = OpULessThan %7 %92 %3 +%93 = OpULessThan %9 %92 %3 OpSelectionMerge %94 None OpBranchConditional %93 %94 %95 %95 = OpLabel @@ -160,14 +160,14 @@ OpBranch %96 %100 = OpAccessChain %99 %86 %98 %101 = OpAtomicLoad %4 %100 %51 %52 OpStore %79 %101 -OpStore %81 %6 +OpStore %81 %34 OpBranch %102 %102 = OpLabel OpLoopMerge %103 %105 None OpBranch %104 %104 = OpLabel -%106 = OpLoad %7 %81 -%107 = OpLogicalNot %7 %106 +%106 = OpLoad %9 %81 +%107 = OpLogicalNot %9 %106 OpSelectionMerge %108 None OpBranchConditional %107 %108 %109 %109 = OpLabel @@ -176,18 +176,18 @@ OpBranch %103 OpBranch %110 %110 = OpLabel %112 = OpLoad %4 %79 -%113 = OpBitcast %9 %112 -%114 = OpFAdd %9 %113 %8 +%113 = OpBitcast %10 %112 +%114 = OpFAdd %10 %113 %35 %115 = OpBitcast %4 %114 %116 = OpLoad %4 %77 %117 = OpLoad %4 %79 %119 = OpAccessChain %99 %86 %116 %120 = OpAtomicCompareExchange %4 %119 %51 %52 %52 %115 %117 -%121 = OpIEqual %7 %120 %117 -%118 = OpCompositeConstruct %15 %120 %121 +%121 = OpIEqual %9 %120 %117 +%118 = OpCompositeConstruct %12 %120 %121 %122 = OpCompositeExtract %4 %118 0 OpStore %79 %122 -%123 = OpCompositeExtract %7 %118 1 +%123 = OpCompositeExtract %9 %118 1 OpStore %81 %123 OpBranch %111 %111 = OpLabel @@ -200,7 +200,7 @@ OpBranch %97 OpBranch %91 %91 = OpLabel %124 = OpLoad %4 %77 -%125 = OpIAdd %4 %124 %10 +%125 = OpIAdd %4 %124 %5 OpStore %77 %125 OpBranch %88 %89 = OpLabel diff --git a/tests/out/spv/atomicOps.spvasm b/tests/out/spv/atomicOps.spvasm index 8e9bad660f..aa2d6aa687 100644 --- a/tests/out/spv/atomicOps.spvasm +++ b/tests/out/spv/atomicOps.spvasm @@ -6,235 +6,235 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %30 "cs_main" %27 -OpExecutionMode %30 LocalSize 2 1 1 -OpDecorate %8 ArrayStride 4 -OpMemberDecorate %9 0 Offset 0 -OpMemberDecorate %9 1 Offset 4 -OpDecorate %11 DescriptorSet 0 -OpDecorate %11 Binding 0 -OpDecorate %12 Block -OpMemberDecorate %12 0 Offset 0 -OpDecorate %14 DescriptorSet 0 -OpDecorate %14 Binding 1 -OpDecorate %15 Block -OpMemberDecorate %15 0 Offset 0 -OpDecorate %17 DescriptorSet 0 -OpDecorate %17 Binding 2 -OpDecorate %18 Block -OpMemberDecorate %18 0 Offset 0 -OpDecorate %27 BuiltIn LocalInvocationId +OpEntryPoint GLCompute %28 "cs_main" %25 +OpExecutionMode %28 LocalSize 2 1 1 +OpDecorate %6 ArrayStride 4 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 4 +OpDecorate %9 DescriptorSet 0 +OpDecorate %9 Binding 0 +OpDecorate %10 Block +OpMemberDecorate %10 0 Offset 0 +OpDecorate %12 DescriptorSet 0 +OpDecorate %12 Binding 1 +OpDecorate %13 Block +OpMemberDecorate %13 0 Offset 0 +OpDecorate %15 DescriptorSet 0 +OpDecorate %15 Binding 2 +OpDecorate %16 Block +OpMemberDecorate %16 0 Offset 0 +OpDecorate %25 BuiltIn LocalInvocationId %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 2 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 1 -%7 = OpConstant %4 1 -%8 = OpTypeArray %4 %3 -%9 = OpTypeStruct %6 %8 -%10 = OpTypeVector %6 3 -%12 = OpTypeStruct %6 -%13 = OpTypePointer StorageBuffer %12 -%11 = OpVariable %13 StorageBuffer -%15 = OpTypeStruct %8 -%16 = OpTypePointer StorageBuffer %15 -%14 = OpVariable %16 StorageBuffer -%18 = OpTypeStruct %9 -%19 = OpTypePointer StorageBuffer %18 -%17 = OpVariable %19 StorageBuffer +%5 = OpTypeInt 32 0 +%6 = OpTypeArray %4 %3 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeVector %5 3 +%10 = OpTypeStruct %5 +%11 = OpTypePointer StorageBuffer %10 +%9 = OpVariable %11 StorageBuffer +%13 = OpTypeStruct %6 +%14 = OpTypePointer StorageBuffer %13 +%12 = OpVariable %14 StorageBuffer +%16 = OpTypeStruct %7 +%17 = OpTypePointer StorageBuffer %16 +%15 = OpVariable %17 StorageBuffer +%19 = OpTypePointer Workgroup %5 +%18 = OpVariable %19 Workgroup %21 = OpTypePointer Workgroup %6 %20 = OpVariable %21 Workgroup -%23 = OpTypePointer Workgroup %8 +%23 = OpTypePointer Workgroup %7 %22 = OpVariable %23 Workgroup -%25 = OpTypePointer Workgroup %9 -%24 = OpVariable %25 Workgroup -%28 = OpTypePointer Input %10 -%27 = OpVariable %28 Input -%31 = OpTypeFunction %2 -%32 = OpTypePointer StorageBuffer %6 -%33 = OpConstant %6 0 -%35 = OpTypePointer StorageBuffer %8 -%37 = OpTypePointer StorageBuffer %9 -%40 = OpConstantNull %6 -%41 = OpConstantNull %8 -%42 = OpConstantNull %9 -%43 = OpConstantNull %10 +%26 = OpTypePointer Input %8 +%25 = OpVariable %26 Input +%29 = OpTypeFunction %2 +%30 = OpTypePointer StorageBuffer %5 +%31 = OpConstant %5 0 +%33 = OpTypePointer StorageBuffer %6 +%35 = OpTypePointer StorageBuffer %7 +%37 = OpConstant %5 1 +%38 = OpConstant %4 1 +%40 = OpConstantNull %5 +%41 = OpConstantNull %6 +%42 = OpConstantNull %7 +%43 = OpConstantNull %8 %45 = OpTypeBool %44 = OpTypeVector %45 3 -%50 = OpConstant %6 2 -%51 = OpConstant %6 264 -%53 = OpConstant %6 64 +%50 = OpConstant %5 2 +%51 = OpConstant %5 264 +%53 = OpConstant %5 64 %54 = OpTypePointer StorageBuffer %4 -%58 = OpConstant %6 256 +%58 = OpConstant %5 256 %59 = OpTypePointer Workgroup %4 -%30 = OpFunction %2 None %31 -%26 = OpLabel -%29 = OpLoad %10 %27 -%34 = OpAccessChain %32 %11 %33 -%36 = OpAccessChain %35 %14 %33 -%38 = OpAccessChain %37 %17 %33 +%28 = OpFunction %2 None %29 +%24 = OpLabel +%27 = OpLoad %8 %25 +%32 = OpAccessChain %30 %9 %31 +%34 = OpAccessChain %33 %12 %31 +%36 = OpAccessChain %35 %15 %31 OpBranch %39 %39 = OpLabel -%46 = OpIEqual %44 %29 %43 +%46 = OpIEqual %44 %27 %43 %47 = OpAll %45 %46 OpSelectionMerge %48 None OpBranchConditional %47 %49 %48 %49 = OpLabel -OpStore %20 %40 -OpStore %22 %41 -OpStore %24 %42 +OpStore %18 %40 +OpStore %20 %41 +OpStore %22 %42 OpBranch %48 %48 = OpLabel OpControlBarrier %50 %50 %51 OpBranch %52 %52 = OpLabel -OpAtomicStore %34 %7 %53 %5 -%55 = OpAccessChain %54 %36 %5 -OpAtomicStore %55 %7 %53 %7 -%56 = OpAccessChain %32 %38 %33 -OpAtomicStore %56 %7 %53 %5 -%57 = OpAccessChain %54 %38 %5 %5 -OpAtomicStore %57 %7 %53 %7 -OpAtomicStore %20 %3 %58 %5 -%60 = OpAccessChain %59 %22 %5 -OpAtomicStore %60 %3 %58 %7 -%61 = OpAccessChain %21 %24 %33 -OpAtomicStore %61 %3 %58 %5 -%62 = OpAccessChain %59 %24 %5 %5 -OpAtomicStore %62 %3 %58 %7 +OpAtomicStore %32 %38 %53 %37 +%55 = OpAccessChain %54 %34 %37 +OpAtomicStore %55 %38 %53 %38 +%56 = OpAccessChain %30 %36 %31 +OpAtomicStore %56 %38 %53 %37 +%57 = OpAccessChain %54 %36 %37 %37 +OpAtomicStore %57 %38 %53 %38 +OpAtomicStore %18 %3 %58 %37 +%60 = OpAccessChain %59 %20 %37 +OpAtomicStore %60 %3 %58 %38 +%61 = OpAccessChain %19 %22 %31 +OpAtomicStore %61 %3 %58 %37 +%62 = OpAccessChain %59 %22 %37 %37 +OpAtomicStore %62 %3 %58 %38 OpControlBarrier %50 %50 %51 -%63 = OpAtomicLoad %6 %34 %7 %53 -%64 = OpAccessChain %54 %36 %5 -%65 = OpAtomicLoad %4 %64 %7 %53 -%66 = OpAccessChain %32 %38 %33 -%67 = OpAtomicLoad %6 %66 %7 %53 -%68 = OpAccessChain %54 %38 %5 %5 -%69 = OpAtomicLoad %4 %68 %7 %53 -%70 = OpAtomicLoad %6 %20 %3 %58 -%71 = OpAccessChain %59 %22 %5 +%63 = OpAtomicLoad %5 %32 %38 %53 +%64 = OpAccessChain %54 %34 %37 +%65 = OpAtomicLoad %4 %64 %38 %53 +%66 = OpAccessChain %30 %36 %31 +%67 = OpAtomicLoad %5 %66 %38 %53 +%68 = OpAccessChain %54 %36 %37 %37 +%69 = OpAtomicLoad %4 %68 %38 %53 +%70 = OpAtomicLoad %5 %18 %3 %58 +%71 = OpAccessChain %59 %20 %37 %72 = OpAtomicLoad %4 %71 %3 %58 -%73 = OpAccessChain %21 %24 %33 -%74 = OpAtomicLoad %6 %73 %3 %58 -%75 = OpAccessChain %59 %24 %5 %5 +%73 = OpAccessChain %19 %22 %31 +%74 = OpAtomicLoad %5 %73 %3 %58 +%75 = OpAccessChain %59 %22 %37 %37 %76 = OpAtomicLoad %4 %75 %3 %58 OpControlBarrier %50 %50 %51 -%77 = OpAtomicIAdd %6 %34 %7 %53 %5 -%79 = OpAccessChain %54 %36 %5 -%78 = OpAtomicIAdd %4 %79 %7 %53 %7 -%81 = OpAccessChain %32 %38 %33 -%80 = OpAtomicIAdd %6 %81 %7 %53 %5 -%83 = OpAccessChain %54 %38 %5 %5 -%82 = OpAtomicIAdd %4 %83 %7 %53 %7 -%84 = OpAtomicIAdd %6 %20 %3 %58 %5 -%86 = OpAccessChain %59 %22 %5 -%85 = OpAtomicIAdd %4 %86 %3 %58 %7 -%88 = OpAccessChain %21 %24 %33 -%87 = OpAtomicIAdd %6 %88 %3 %58 %5 -%90 = OpAccessChain %59 %24 %5 %5 -%89 = OpAtomicIAdd %4 %90 %3 %58 %7 +%77 = OpAtomicIAdd %5 %32 %38 %53 %37 +%79 = OpAccessChain %54 %34 %37 +%78 = OpAtomicIAdd %4 %79 %38 %53 %38 +%81 = OpAccessChain %30 %36 %31 +%80 = OpAtomicIAdd %5 %81 %38 %53 %37 +%83 = OpAccessChain %54 %36 %37 %37 +%82 = OpAtomicIAdd %4 %83 %38 %53 %38 +%84 = OpAtomicIAdd %5 %18 %3 %58 %37 +%86 = OpAccessChain %59 %20 %37 +%85 = OpAtomicIAdd %4 %86 %3 %58 %38 +%88 = OpAccessChain %19 %22 %31 +%87 = OpAtomicIAdd %5 %88 %3 %58 %37 +%90 = OpAccessChain %59 %22 %37 %37 +%89 = OpAtomicIAdd %4 %90 %3 %58 %38 OpControlBarrier %50 %50 %51 -%91 = OpAtomicISub %6 %34 %7 %53 %5 -%93 = OpAccessChain %54 %36 %5 -%92 = OpAtomicISub %4 %93 %7 %53 %7 -%95 = OpAccessChain %32 %38 %33 -%94 = OpAtomicISub %6 %95 %7 %53 %5 -%97 = OpAccessChain %54 %38 %5 %5 -%96 = OpAtomicISub %4 %97 %7 %53 %7 -%98 = OpAtomicISub %6 %20 %3 %58 %5 -%100 = OpAccessChain %59 %22 %5 -%99 = OpAtomicISub %4 %100 %3 %58 %7 -%102 = OpAccessChain %21 %24 %33 -%101 = OpAtomicISub %6 %102 %3 %58 %5 -%104 = OpAccessChain %59 %24 %5 %5 -%103 = OpAtomicISub %4 %104 %3 %58 %7 +%91 = OpAtomicISub %5 %32 %38 %53 %37 +%93 = OpAccessChain %54 %34 %37 +%92 = OpAtomicISub %4 %93 %38 %53 %38 +%95 = OpAccessChain %30 %36 %31 +%94 = OpAtomicISub %5 %95 %38 %53 %37 +%97 = OpAccessChain %54 %36 %37 %37 +%96 = OpAtomicISub %4 %97 %38 %53 %38 +%98 = OpAtomicISub %5 %18 %3 %58 %37 +%100 = OpAccessChain %59 %20 %37 +%99 = OpAtomicISub %4 %100 %3 %58 %38 +%102 = OpAccessChain %19 %22 %31 +%101 = OpAtomicISub %5 %102 %3 %58 %37 +%104 = OpAccessChain %59 %22 %37 %37 +%103 = OpAtomicISub %4 %104 %3 %58 %38 OpControlBarrier %50 %50 %51 -%105 = OpAtomicUMax %6 %34 %7 %53 %5 -%107 = OpAccessChain %54 %36 %5 -%106 = OpAtomicSMax %4 %107 %7 %53 %7 -%109 = OpAccessChain %32 %38 %33 -%108 = OpAtomicUMax %6 %109 %7 %53 %5 -%111 = OpAccessChain %54 %38 %5 %5 -%110 = OpAtomicSMax %4 %111 %7 %53 %7 -%112 = OpAtomicUMax %6 %20 %3 %58 %5 -%114 = OpAccessChain %59 %22 %5 -%113 = OpAtomicSMax %4 %114 %3 %58 %7 -%116 = OpAccessChain %21 %24 %33 -%115 = OpAtomicUMax %6 %116 %3 %58 %5 -%118 = OpAccessChain %59 %24 %5 %5 -%117 = OpAtomicSMax %4 %118 %3 %58 %7 +%105 = OpAtomicUMax %5 %32 %38 %53 %37 +%107 = OpAccessChain %54 %34 %37 +%106 = OpAtomicSMax %4 %107 %38 %53 %38 +%109 = OpAccessChain %30 %36 %31 +%108 = OpAtomicUMax %5 %109 %38 %53 %37 +%111 = OpAccessChain %54 %36 %37 %37 +%110 = OpAtomicSMax %4 %111 %38 %53 %38 +%112 = OpAtomicUMax %5 %18 %3 %58 %37 +%114 = OpAccessChain %59 %20 %37 +%113 = OpAtomicSMax %4 %114 %3 %58 %38 +%116 = OpAccessChain %19 %22 %31 +%115 = OpAtomicUMax %5 %116 %3 %58 %37 +%118 = OpAccessChain %59 %22 %37 %37 +%117 = OpAtomicSMax %4 %118 %3 %58 %38 OpControlBarrier %50 %50 %51 -%119 = OpAtomicUMin %6 %34 %7 %53 %5 -%121 = OpAccessChain %54 %36 %5 -%120 = OpAtomicSMin %4 %121 %7 %53 %7 -%123 = OpAccessChain %32 %38 %33 -%122 = OpAtomicUMin %6 %123 %7 %53 %5 -%125 = OpAccessChain %54 %38 %5 %5 -%124 = OpAtomicSMin %4 %125 %7 %53 %7 -%126 = OpAtomicUMin %6 %20 %3 %58 %5 -%128 = OpAccessChain %59 %22 %5 -%127 = OpAtomicSMin %4 %128 %3 %58 %7 -%130 = OpAccessChain %21 %24 %33 -%129 = OpAtomicUMin %6 %130 %3 %58 %5 -%132 = OpAccessChain %59 %24 %5 %5 -%131 = OpAtomicSMin %4 %132 %3 %58 %7 +%119 = OpAtomicUMin %5 %32 %38 %53 %37 +%121 = OpAccessChain %54 %34 %37 +%120 = OpAtomicSMin %4 %121 %38 %53 %38 +%123 = OpAccessChain %30 %36 %31 +%122 = OpAtomicUMin %5 %123 %38 %53 %37 +%125 = OpAccessChain %54 %36 %37 %37 +%124 = OpAtomicSMin %4 %125 %38 %53 %38 +%126 = OpAtomicUMin %5 %18 %3 %58 %37 +%128 = OpAccessChain %59 %20 %37 +%127 = OpAtomicSMin %4 %128 %3 %58 %38 +%130 = OpAccessChain %19 %22 %31 +%129 = OpAtomicUMin %5 %130 %3 %58 %37 +%132 = OpAccessChain %59 %22 %37 %37 +%131 = OpAtomicSMin %4 %132 %3 %58 %38 OpControlBarrier %50 %50 %51 -%133 = OpAtomicAnd %6 %34 %7 %53 %5 -%135 = OpAccessChain %54 %36 %5 -%134 = OpAtomicAnd %4 %135 %7 %53 %7 -%137 = OpAccessChain %32 %38 %33 -%136 = OpAtomicAnd %6 %137 %7 %53 %5 -%139 = OpAccessChain %54 %38 %5 %5 -%138 = OpAtomicAnd %4 %139 %7 %53 %7 -%140 = OpAtomicAnd %6 %20 %3 %58 %5 -%142 = OpAccessChain %59 %22 %5 -%141 = OpAtomicAnd %4 %142 %3 %58 %7 -%144 = OpAccessChain %21 %24 %33 -%143 = OpAtomicAnd %6 %144 %3 %58 %5 -%146 = OpAccessChain %59 %24 %5 %5 -%145 = OpAtomicAnd %4 %146 %3 %58 %7 +%133 = OpAtomicAnd %5 %32 %38 %53 %37 +%135 = OpAccessChain %54 %34 %37 +%134 = OpAtomicAnd %4 %135 %38 %53 %38 +%137 = OpAccessChain %30 %36 %31 +%136 = OpAtomicAnd %5 %137 %38 %53 %37 +%139 = OpAccessChain %54 %36 %37 %37 +%138 = OpAtomicAnd %4 %139 %38 %53 %38 +%140 = OpAtomicAnd %5 %18 %3 %58 %37 +%142 = OpAccessChain %59 %20 %37 +%141 = OpAtomicAnd %4 %142 %3 %58 %38 +%144 = OpAccessChain %19 %22 %31 +%143 = OpAtomicAnd %5 %144 %3 %58 %37 +%146 = OpAccessChain %59 %22 %37 %37 +%145 = OpAtomicAnd %4 %146 %3 %58 %38 OpControlBarrier %50 %50 %51 -%147 = OpAtomicOr %6 %34 %7 %53 %5 -%149 = OpAccessChain %54 %36 %5 -%148 = OpAtomicOr %4 %149 %7 %53 %7 -%151 = OpAccessChain %32 %38 %33 -%150 = OpAtomicOr %6 %151 %7 %53 %5 -%153 = OpAccessChain %54 %38 %5 %5 -%152 = OpAtomicOr %4 %153 %7 %53 %7 -%154 = OpAtomicOr %6 %20 %3 %58 %5 -%156 = OpAccessChain %59 %22 %5 -%155 = OpAtomicOr %4 %156 %3 %58 %7 -%158 = OpAccessChain %21 %24 %33 -%157 = OpAtomicOr %6 %158 %3 %58 %5 -%160 = OpAccessChain %59 %24 %5 %5 -%159 = OpAtomicOr %4 %160 %3 %58 %7 +%147 = OpAtomicOr %5 %32 %38 %53 %37 +%149 = OpAccessChain %54 %34 %37 +%148 = OpAtomicOr %4 %149 %38 %53 %38 +%151 = OpAccessChain %30 %36 %31 +%150 = OpAtomicOr %5 %151 %38 %53 %37 +%153 = OpAccessChain %54 %36 %37 %37 +%152 = OpAtomicOr %4 %153 %38 %53 %38 +%154 = OpAtomicOr %5 %18 %3 %58 %37 +%156 = OpAccessChain %59 %20 %37 +%155 = OpAtomicOr %4 %156 %3 %58 %38 +%158 = OpAccessChain %19 %22 %31 +%157 = OpAtomicOr %5 %158 %3 %58 %37 +%160 = OpAccessChain %59 %22 %37 %37 +%159 = OpAtomicOr %4 %160 %3 %58 %38 OpControlBarrier %50 %50 %51 -%161 = OpAtomicXor %6 %34 %7 %53 %5 -%163 = OpAccessChain %54 %36 %5 -%162 = OpAtomicXor %4 %163 %7 %53 %7 -%165 = OpAccessChain %32 %38 %33 -%164 = OpAtomicXor %6 %165 %7 %53 %5 -%167 = OpAccessChain %54 %38 %5 %5 -%166 = OpAtomicXor %4 %167 %7 %53 %7 -%168 = OpAtomicXor %6 %20 %3 %58 %5 -%170 = OpAccessChain %59 %22 %5 -%169 = OpAtomicXor %4 %170 %3 %58 %7 -%172 = OpAccessChain %21 %24 %33 -%171 = OpAtomicXor %6 %172 %3 %58 %5 -%174 = OpAccessChain %59 %24 %5 %5 -%173 = OpAtomicXor %4 %174 %3 %58 %7 -%175 = OpAtomicExchange %6 %34 %7 %53 %5 -%177 = OpAccessChain %54 %36 %5 -%176 = OpAtomicExchange %4 %177 %7 %53 %7 -%179 = OpAccessChain %32 %38 %33 -%178 = OpAtomicExchange %6 %179 %7 %53 %5 -%181 = OpAccessChain %54 %38 %5 %5 -%180 = OpAtomicExchange %4 %181 %7 %53 %7 -%182 = OpAtomicExchange %6 %20 %3 %58 %5 -%184 = OpAccessChain %59 %22 %5 -%183 = OpAtomicExchange %4 %184 %3 %58 %7 -%186 = OpAccessChain %21 %24 %33 -%185 = OpAtomicExchange %6 %186 %3 %58 %5 -%188 = OpAccessChain %59 %24 %5 %5 -%187 = OpAtomicExchange %4 %188 %3 %58 %7 +%161 = OpAtomicXor %5 %32 %38 %53 %37 +%163 = OpAccessChain %54 %34 %37 +%162 = OpAtomicXor %4 %163 %38 %53 %38 +%165 = OpAccessChain %30 %36 %31 +%164 = OpAtomicXor %5 %165 %38 %53 %37 +%167 = OpAccessChain %54 %36 %37 %37 +%166 = OpAtomicXor %4 %167 %38 %53 %38 +%168 = OpAtomicXor %5 %18 %3 %58 %37 +%170 = OpAccessChain %59 %20 %37 +%169 = OpAtomicXor %4 %170 %3 %58 %38 +%172 = OpAccessChain %19 %22 %31 +%171 = OpAtomicXor %5 %172 %3 %58 %37 +%174 = OpAccessChain %59 %22 %37 %37 +%173 = OpAtomicXor %4 %174 %3 %58 %38 +%175 = OpAtomicExchange %5 %32 %38 %53 %37 +%177 = OpAccessChain %54 %34 %37 +%176 = OpAtomicExchange %4 %177 %38 %53 %38 +%179 = OpAccessChain %30 %36 %31 +%178 = OpAtomicExchange %5 %179 %38 %53 %37 +%181 = OpAccessChain %54 %36 %37 %37 +%180 = OpAtomicExchange %4 %181 %38 %53 %38 +%182 = OpAtomicExchange %5 %18 %3 %58 %37 +%184 = OpAccessChain %59 %20 %37 +%183 = OpAtomicExchange %4 %184 %3 %58 %38 +%186 = OpAccessChain %19 %22 %31 +%185 = OpAtomicExchange %5 %186 %3 %58 %37 +%188 = OpAccessChain %59 %22 %37 %37 +%187 = OpAtomicExchange %4 %188 %3 %58 %38 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/binding-arrays.spvasm b/tests/out/spv/binding-arrays.spvasm index 31929d155b..5173208dc5 100644 --- a/tests/out/spv/binding-arrays.spvasm +++ b/tests/out/spv/binding-arrays.spvasm @@ -8,33 +8,33 @@ OpCapability ShaderNonUniform OpExtension "SPV_EXT_descriptor_indexing" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %70 "main" %65 %68 -OpExecutionMode %70 OriginUpperLeft -OpMemberDecorate %10 0 Offset 0 -OpMemberDecorate %25 0 Offset 0 -OpDecorate %30 DescriptorSet 0 -OpDecorate %30 Binding 0 -OpDecorate %34 DescriptorSet 0 -OpDecorate %34 Binding 1 -OpDecorate %36 DescriptorSet 0 -OpDecorate %36 Binding 2 -OpDecorate %38 DescriptorSet 0 -OpDecorate %38 Binding 3 -OpDecorate %40 DescriptorSet 0 -OpDecorate %40 Binding 4 -OpDecorate %42 DescriptorSet 0 -OpDecorate %42 Binding 5 -OpDecorate %44 DescriptorSet 0 -OpDecorate %44 Binding 6 -OpDecorate %46 DescriptorSet 0 -OpDecorate %46 Binding 7 -OpDecorate %48 DescriptorSet 0 -OpDecorate %48 Binding 8 -OpDecorate %49 Block -OpMemberDecorate %49 0 Offset 0 +OpEntryPoint Fragment %67 "main" %62 %65 +OpExecutionMode %67 OriginUpperLeft +OpMemberDecorate %6 0 Offset 0 +OpMemberDecorate %22 0 Offset 0 +OpDecorate %27 DescriptorSet 0 +OpDecorate %27 Binding 0 +OpDecorate %31 DescriptorSet 0 +OpDecorate %31 Binding 1 +OpDecorate %33 DescriptorSet 0 +OpDecorate %33 Binding 2 +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 3 +OpDecorate %37 DescriptorSet 0 +OpDecorate %37 Binding 4 +OpDecorate %39 DescriptorSet 0 +OpDecorate %39 Binding 5 +OpDecorate %41 DescriptorSet 0 +OpDecorate %41 Binding 6 +OpDecorate %43 DescriptorSet 0 +OpDecorate %43 Binding 7 +OpDecorate %45 DescriptorSet 0 +OpDecorate %45 Binding 8 +OpDecorate %46 Block +OpMemberDecorate %46 0 Offset 0 +OpDecorate %62 Location 0 +OpDecorate %62 Flat OpDecorate %65 Location 0 -OpDecorate %65 Flat -OpDecorate %68 Location 0 OpDecorate %96 NonUniform OpDecorate %120 NonUniform OpDecorate %122 NonUniform @@ -60,468 +60,468 @@ OpDecorate %423 NonUniform %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 5 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 +%5 = OpTypeInt 32 0 +%6 = OpTypeStruct %5 %8 = OpTypeFloat 32 -%7 = OpConstant %8 0.0 -%9 = OpConstant %4 0 -%10 = OpTypeStruct %6 -%11 = OpTypeImage %8 2D 0 0 0 1 Unknown -%12 = OpTypeRuntimeArray %11 -%13 = OpTypeArray %11 %3 -%14 = OpTypeImage %8 2D 0 1 0 1 Unknown -%15 = OpTypeArray %14 %3 -%16 = OpTypeImage %8 2D 0 0 1 1 Unknown -%17 = OpTypeArray %16 %3 -%18 = OpTypeImage %8 2D 1 0 0 1 Unknown -%19 = OpTypeArray %18 %3 -%20 = OpTypeImage %8 2D 0 0 0 2 Rgba32f -%21 = OpTypeArray %20 %3 -%22 = OpTypeSampler -%23 = OpTypeArray %22 %3 -%24 = OpTypeArray %22 %3 -%25 = OpTypeStruct %6 -%26 = OpTypeVector %8 4 -%27 = OpTypeVector %6 2 -%28 = OpTypeVector %8 2 -%29 = OpTypeVector %4 2 -%33 = OpConstant %6 10 -%32 = OpTypeArray %11 %33 -%31 = OpTypePointer UniformConstant %32 -%30 = OpVariable %31 UniformConstant -%35 = OpTypePointer UniformConstant %13 -%34 = OpVariable %35 UniformConstant -%37 = OpTypePointer UniformConstant %15 -%36 = OpVariable %37 UniformConstant -%39 = OpTypePointer UniformConstant %17 -%38 = OpVariable %39 UniformConstant -%41 = OpTypePointer UniformConstant %19 -%40 = OpVariable %41 UniformConstant -%43 = OpTypePointer UniformConstant %21 -%42 = OpVariable %43 UniformConstant -%45 = OpTypePointer UniformConstant %23 -%44 = OpVariable %45 UniformConstant -%47 = OpTypePointer UniformConstant %24 -%46 = OpVariable %47 UniformConstant -%49 = OpTypeStruct %10 -%50 = OpTypePointer Uniform %49 -%48 = OpVariable %50 Uniform -%52 = OpTypePointer Function %6 -%53 = OpConstantNull %6 -%55 = OpTypePointer Function %27 -%56 = OpConstantNull %27 -%58 = OpTypePointer Function %8 -%59 = OpConstantNull %8 -%61 = OpTypePointer Function %26 -%62 = OpConstantNull %26 -%66 = OpTypePointer Input %6 -%65 = OpVariable %66 Input -%69 = OpTypePointer Output %26 -%68 = OpVariable %69 Output -%71 = OpTypeFunction %2 -%72 = OpTypePointer Uniform %10 -%75 = OpTypePointer Uniform %6 -%83 = OpTypePointer UniformConstant %11 -%104 = OpTypePointer UniformConstant %22 -%107 = OpTypeSampledImage %11 -%128 = OpTypePointer UniformConstant %18 -%131 = OpTypePointer UniformConstant %22 -%134 = OpTypeSampledImage %18 +%7 = OpTypeImage %8 2D 0 0 0 1 Unknown +%9 = OpTypeRuntimeArray %7 +%10 = OpTypeArray %7 %3 +%11 = OpTypeImage %8 2D 0 1 0 1 Unknown +%12 = OpTypeArray %11 %3 +%13 = OpTypeImage %8 2D 0 0 1 1 Unknown +%14 = OpTypeArray %13 %3 +%15 = OpTypeImage %8 2D 1 0 0 1 Unknown +%16 = OpTypeArray %15 %3 +%17 = OpTypeImage %8 2D 0 0 0 2 Rgba32f +%18 = OpTypeArray %17 %3 +%19 = OpTypeSampler +%20 = OpTypeArray %19 %3 +%21 = OpTypeArray %19 %3 +%22 = OpTypeStruct %5 +%23 = OpTypeVector %8 4 +%24 = OpTypeVector %5 2 +%25 = OpTypeVector %8 2 +%26 = OpTypeVector %4 2 +%30 = OpConstant %5 10 +%29 = OpTypeArray %7 %30 +%28 = OpTypePointer UniformConstant %29 +%27 = OpVariable %28 UniformConstant +%32 = OpTypePointer UniformConstant %10 +%31 = OpVariable %32 UniformConstant +%34 = OpTypePointer UniformConstant %12 +%33 = OpVariable %34 UniformConstant +%36 = OpTypePointer UniformConstant %14 +%35 = OpVariable %36 UniformConstant +%38 = OpTypePointer UniformConstant %16 +%37 = OpVariable %38 UniformConstant +%40 = OpTypePointer UniformConstant %18 +%39 = OpVariable %40 UniformConstant +%42 = OpTypePointer UniformConstant %20 +%41 = OpVariable %42 UniformConstant +%44 = OpTypePointer UniformConstant %21 +%43 = OpVariable %44 UniformConstant +%46 = OpTypeStruct %6 +%47 = OpTypePointer Uniform %46 +%45 = OpVariable %47 Uniform +%49 = OpTypePointer Function %5 +%50 = OpConstantNull %5 +%52 = OpTypePointer Function %24 +%53 = OpConstantNull %24 +%55 = OpTypePointer Function %8 +%56 = OpConstantNull %8 +%58 = OpTypePointer Function %23 +%59 = OpConstantNull %23 +%63 = OpTypePointer Input %5 +%62 = OpVariable %63 Input +%66 = OpTypePointer Output %23 +%65 = OpVariable %66 Output +%68 = OpTypeFunction %2 +%69 = OpTypePointer Uniform %6 +%70 = OpConstant %5 0 +%72 = OpConstant %8 0.0 +%73 = OpConstant %4 0 +%75 = OpTypePointer Uniform %5 +%83 = OpTypePointer UniformConstant %7 +%104 = OpTypePointer UniformConstant %19 +%107 = OpTypeSampledImage %7 +%128 = OpTypePointer UniformConstant %15 +%131 = OpTypePointer UniformConstant %19 +%134 = OpTypeSampledImage %15 %157 = OpTypeBool -%158 = OpConstantNull %26 +%158 = OpConstantNull %23 %164 = OpTypeVector %157 2 -%174 = OpConstantNull %26 -%189 = OpConstantNull %26 -%202 = OpTypePointer UniformConstant %14 +%174 = OpConstantNull %23 +%189 = OpConstantNull %23 +%202 = OpTypePointer UniformConstant %11 %205 = OpTypeVector %4 3 -%243 = OpTypePointer UniformConstant %16 -%406 = OpTypePointer UniformConstant %20 -%70 = OpFunction %2 None %71 -%63 = OpLabel -%54 = OpVariable %55 Function %56 -%60 = OpVariable %61 Function %62 +%243 = OpTypePointer UniformConstant %13 +%406 = OpTypePointer UniformConstant %17 +%67 = OpFunction %2 None %68 +%60 = OpLabel %51 = OpVariable %52 Function %53 %57 = OpVariable %58 Function %59 -%67 = OpLoad %6 %65 -%64 = OpCompositeConstruct %25 %67 -%73 = OpAccessChain %72 %48 %5 +%48 = OpVariable %49 Function %50 +%54 = OpVariable %55 Function %56 +%64 = OpLoad %5 %62 +%61 = OpCompositeConstruct %22 %64 +%71 = OpAccessChain %69 %45 %70 OpBranch %74 %74 = OpLabel -%76 = OpAccessChain %75 %73 %5 -%77 = OpLoad %6 %76 -%78 = OpCompositeExtract %6 %64 0 -OpStore %51 %5 -%79 = OpCompositeConstruct %27 %5 %5 -OpStore %54 %79 -OpStore %57 %7 -%80 = OpCompositeConstruct %26 %7 %7 %7 %7 -OpStore %60 %80 -%81 = OpCompositeConstruct %28 %7 %7 -%82 = OpCompositeConstruct %29 %9 %9 -%84 = OpAccessChain %83 %30 %5 -%85 = OpLoad %11 %84 -%86 = OpImageQuerySizeLod %29 %85 %5 -%87 = OpBitcast %27 %86 -%88 = OpLoad %27 %54 -%89 = OpIAdd %27 %88 %87 -OpStore %54 %89 -%90 = OpAccessChain %83 %30 %77 -%91 = OpLoad %11 %90 -%92 = OpImageQuerySizeLod %29 %91 %5 -%93 = OpBitcast %27 %92 -%94 = OpLoad %27 %54 -%95 = OpIAdd %27 %94 %93 -OpStore %54 %95 -%96 = OpAccessChain %83 %30 %78 -%97 = OpLoad %11 %96 -%98 = OpImageQuerySizeLod %29 %97 %5 -%99 = OpBitcast %27 %98 -%100 = OpLoad %27 %54 -%101 = OpIAdd %27 %100 %99 -OpStore %54 %101 -%102 = OpAccessChain %83 %34 %5 -%103 = OpLoad %11 %102 -%105 = OpAccessChain %104 %44 %5 -%106 = OpLoad %22 %105 +%76 = OpAccessChain %75 %71 %70 +%77 = OpLoad %5 %76 +%78 = OpCompositeExtract %5 %61 0 +OpStore %48 %70 +%79 = OpCompositeConstruct %24 %70 %70 +OpStore %51 %79 +OpStore %54 %72 +%80 = OpCompositeConstruct %23 %72 %72 %72 %72 +OpStore %57 %80 +%81 = OpCompositeConstruct %25 %72 %72 +%82 = OpCompositeConstruct %26 %73 %73 +%84 = OpAccessChain %83 %27 %70 +%85 = OpLoad %7 %84 +%86 = OpImageQuerySizeLod %26 %85 %70 +%87 = OpBitcast %24 %86 +%88 = OpLoad %24 %51 +%89 = OpIAdd %24 %88 %87 +OpStore %51 %89 +%90 = OpAccessChain %83 %27 %77 +%91 = OpLoad %7 %90 +%92 = OpImageQuerySizeLod %26 %91 %70 +%93 = OpBitcast %24 %92 +%94 = OpLoad %24 %51 +%95 = OpIAdd %24 %94 %93 +OpStore %51 %95 +%96 = OpAccessChain %83 %27 %78 +%97 = OpLoad %7 %96 +%98 = OpImageQuerySizeLod %26 %97 %70 +%99 = OpBitcast %24 %98 +%100 = OpLoad %24 %51 +%101 = OpIAdd %24 %100 %99 +OpStore %51 %101 +%102 = OpAccessChain %83 %31 %70 +%103 = OpLoad %7 %102 +%105 = OpAccessChain %104 %41 %70 +%106 = OpLoad %19 %105 %108 = OpSampledImage %107 %103 %106 -%109 = OpImageGather %26 %108 %81 %5 -%110 = OpLoad %26 %60 -%111 = OpFAdd %26 %110 %109 -OpStore %60 %111 -%112 = OpAccessChain %83 %34 %77 -%113 = OpLoad %11 %112 -%114 = OpAccessChain %104 %44 %77 -%115 = OpLoad %22 %114 +%109 = OpImageGather %23 %108 %81 %70 +%110 = OpLoad %23 %57 +%111 = OpFAdd %23 %110 %109 +OpStore %57 %111 +%112 = OpAccessChain %83 %31 %77 +%113 = OpLoad %7 %112 +%114 = OpAccessChain %104 %41 %77 +%115 = OpLoad %19 %114 %116 = OpSampledImage %107 %113 %115 -%117 = OpImageGather %26 %116 %81 %5 -%118 = OpLoad %26 %60 -%119 = OpFAdd %26 %118 %117 -OpStore %60 %119 -%120 = OpAccessChain %83 %34 %78 -%121 = OpLoad %11 %120 -%122 = OpAccessChain %104 %44 %78 -%123 = OpLoad %22 %122 +%117 = OpImageGather %23 %116 %81 %70 +%118 = OpLoad %23 %57 +%119 = OpFAdd %23 %118 %117 +OpStore %57 %119 +%120 = OpAccessChain %83 %31 %78 +%121 = OpLoad %7 %120 +%122 = OpAccessChain %104 %41 %78 +%123 = OpLoad %19 %122 %124 = OpSampledImage %107 %121 %123 -%125 = OpImageGather %26 %124 %81 %5 -%126 = OpLoad %26 %60 -%127 = OpFAdd %26 %126 %125 -OpStore %60 %127 -%129 = OpAccessChain %128 %40 %5 -%130 = OpLoad %18 %129 -%132 = OpAccessChain %131 %46 %5 -%133 = OpLoad %22 %132 +%125 = OpImageGather %23 %124 %81 %70 +%126 = OpLoad %23 %57 +%127 = OpFAdd %23 %126 %125 +OpStore %57 %127 +%129 = OpAccessChain %128 %37 %70 +%130 = OpLoad %15 %129 +%132 = OpAccessChain %131 %43 %70 +%133 = OpLoad %19 %132 %135 = OpSampledImage %134 %130 %133 -%136 = OpImageDrefGather %26 %135 %81 %7 -%137 = OpLoad %26 %60 -%138 = OpFAdd %26 %137 %136 -OpStore %60 %138 -%139 = OpAccessChain %128 %40 %77 -%140 = OpLoad %18 %139 -%141 = OpAccessChain %131 %46 %77 -%142 = OpLoad %22 %141 +%136 = OpImageDrefGather %23 %135 %81 %72 +%137 = OpLoad %23 %57 +%138 = OpFAdd %23 %137 %136 +OpStore %57 %138 +%139 = OpAccessChain %128 %37 %77 +%140 = OpLoad %15 %139 +%141 = OpAccessChain %131 %43 %77 +%142 = OpLoad %19 %141 %143 = OpSampledImage %134 %140 %142 -%144 = OpImageDrefGather %26 %143 %81 %7 -%145 = OpLoad %26 %60 -%146 = OpFAdd %26 %145 %144 -OpStore %60 %146 -%147 = OpAccessChain %128 %40 %78 -%148 = OpLoad %18 %147 -%149 = OpAccessChain %131 %46 %78 -%150 = OpLoad %22 %149 +%144 = OpImageDrefGather %23 %143 %81 %72 +%145 = OpLoad %23 %57 +%146 = OpFAdd %23 %145 %144 +OpStore %57 %146 +%147 = OpAccessChain %128 %37 %78 +%148 = OpLoad %15 %147 +%149 = OpAccessChain %131 %43 %78 +%150 = OpLoad %19 %149 %151 = OpSampledImage %134 %148 %150 -%152 = OpImageDrefGather %26 %151 %81 %7 -%153 = OpLoad %26 %60 -%154 = OpFAdd %26 %153 %152 -OpStore %60 %154 -%155 = OpAccessChain %83 %30 %5 -%156 = OpLoad %11 %155 +%152 = OpImageDrefGather %23 %151 %81 %72 +%153 = OpLoad %23 %57 +%154 = OpFAdd %23 %153 %152 +OpStore %57 %154 +%155 = OpAccessChain %83 %27 %70 +%156 = OpLoad %7 %155 %159 = OpImageQueryLevels %4 %156 -%160 = OpULessThan %157 %9 %159 +%160 = OpULessThan %157 %73 %159 OpSelectionMerge %161 None OpBranchConditional %160 %162 %161 %162 = OpLabel -%163 = OpImageQuerySizeLod %29 %156 %9 +%163 = OpImageQuerySizeLod %26 %156 %73 %165 = OpULessThan %164 %82 %163 %166 = OpAll %157 %165 OpBranchConditional %166 %167 %161 %167 = OpLabel -%168 = OpImageFetch %26 %156 %82 Lod %9 +%168 = OpImageFetch %23 %156 %82 Lod %73 OpBranch %161 %161 = OpLabel -%169 = OpPhi %26 %158 %74 %158 %162 %168 %167 -%170 = OpLoad %26 %60 -%171 = OpFAdd %26 %170 %169 -OpStore %60 %171 -%172 = OpAccessChain %83 %30 %77 -%173 = OpLoad %11 %172 +%169 = OpPhi %23 %158 %74 %158 %162 %168 %167 +%170 = OpLoad %23 %57 +%171 = OpFAdd %23 %170 %169 +OpStore %57 %171 +%172 = OpAccessChain %83 %27 %77 +%173 = OpLoad %7 %172 %175 = OpImageQueryLevels %4 %173 -%176 = OpULessThan %157 %9 %175 +%176 = OpULessThan %157 %73 %175 OpSelectionMerge %177 None OpBranchConditional %176 %178 %177 %178 = OpLabel -%179 = OpImageQuerySizeLod %29 %173 %9 +%179 = OpImageQuerySizeLod %26 %173 %73 %180 = OpULessThan %164 %82 %179 %181 = OpAll %157 %180 OpBranchConditional %181 %182 %177 %182 = OpLabel -%183 = OpImageFetch %26 %173 %82 Lod %9 +%183 = OpImageFetch %23 %173 %82 Lod %73 OpBranch %177 %177 = OpLabel -%184 = OpPhi %26 %174 %161 %174 %178 %183 %182 -%185 = OpLoad %26 %60 -%186 = OpFAdd %26 %185 %184 -OpStore %60 %186 -%187 = OpAccessChain %83 %30 %78 -%188 = OpLoad %11 %187 +%184 = OpPhi %23 %174 %161 %174 %178 %183 %182 +%185 = OpLoad %23 %57 +%186 = OpFAdd %23 %185 %184 +OpStore %57 %186 +%187 = OpAccessChain %83 %27 %78 +%188 = OpLoad %7 %187 %190 = OpImageQueryLevels %4 %188 -%191 = OpULessThan %157 %9 %190 +%191 = OpULessThan %157 %73 %190 OpSelectionMerge %192 None OpBranchConditional %191 %193 %192 %193 = OpLabel -%194 = OpImageQuerySizeLod %29 %188 %9 +%194 = OpImageQuerySizeLod %26 %188 %73 %195 = OpULessThan %164 %82 %194 %196 = OpAll %157 %195 OpBranchConditional %196 %197 %192 %197 = OpLabel -%198 = OpImageFetch %26 %188 %82 Lod %9 +%198 = OpImageFetch %23 %188 %82 Lod %73 OpBranch %192 %192 = OpLabel -%199 = OpPhi %26 %189 %177 %189 %193 %198 %197 -%200 = OpLoad %26 %60 -%201 = OpFAdd %26 %200 %199 -OpStore %60 %201 -%203 = OpAccessChain %202 %36 %5 -%204 = OpLoad %14 %203 -%206 = OpImageQuerySizeLod %205 %204 %5 +%199 = OpPhi %23 %189 %177 %189 %193 %198 %197 +%200 = OpLoad %23 %57 +%201 = OpFAdd %23 %200 %199 +OpStore %57 %201 +%203 = OpAccessChain %202 %33 %70 +%204 = OpLoad %11 %203 +%206 = OpImageQuerySizeLod %205 %204 %70 %207 = OpCompositeExtract %4 %206 2 -%208 = OpBitcast %6 %207 -%209 = OpLoad %6 %51 -%210 = OpIAdd %6 %209 %208 -OpStore %51 %210 -%211 = OpAccessChain %202 %36 %77 -%212 = OpLoad %14 %211 -%213 = OpImageQuerySizeLod %205 %212 %5 +%208 = OpBitcast %5 %207 +%209 = OpLoad %5 %48 +%210 = OpIAdd %5 %209 %208 +OpStore %48 %210 +%211 = OpAccessChain %202 %33 %77 +%212 = OpLoad %11 %211 +%213 = OpImageQuerySizeLod %205 %212 %70 %214 = OpCompositeExtract %4 %213 2 -%215 = OpBitcast %6 %214 -%216 = OpLoad %6 %51 -%217 = OpIAdd %6 %216 %215 -OpStore %51 %217 -%218 = OpAccessChain %202 %36 %78 -%219 = OpLoad %14 %218 -%220 = OpImageQuerySizeLod %205 %219 %5 +%215 = OpBitcast %5 %214 +%216 = OpLoad %5 %48 +%217 = OpIAdd %5 %216 %215 +OpStore %48 %217 +%218 = OpAccessChain %202 %33 %78 +%219 = OpLoad %11 %218 +%220 = OpImageQuerySizeLod %205 %219 %70 %221 = OpCompositeExtract %4 %220 2 -%222 = OpBitcast %6 %221 -%223 = OpLoad %6 %51 -%224 = OpIAdd %6 %223 %222 -OpStore %51 %224 -%225 = OpAccessChain %83 %34 %5 -%226 = OpLoad %11 %225 +%222 = OpBitcast %5 %221 +%223 = OpLoad %5 %48 +%224 = OpIAdd %5 %223 %222 +OpStore %48 %224 +%225 = OpAccessChain %83 %31 %70 +%226 = OpLoad %7 %225 %227 = OpImageQueryLevels %4 %226 -%228 = OpBitcast %6 %227 -%229 = OpLoad %6 %51 -%230 = OpIAdd %6 %229 %228 -OpStore %51 %230 -%231 = OpAccessChain %83 %34 %77 -%232 = OpLoad %11 %231 +%228 = OpBitcast %5 %227 +%229 = OpLoad %5 %48 +%230 = OpIAdd %5 %229 %228 +OpStore %48 %230 +%231 = OpAccessChain %83 %31 %77 +%232 = OpLoad %7 %231 %233 = OpImageQueryLevels %4 %232 -%234 = OpBitcast %6 %233 -%235 = OpLoad %6 %51 -%236 = OpIAdd %6 %235 %234 -OpStore %51 %236 -%237 = OpAccessChain %83 %34 %78 -%238 = OpLoad %11 %237 +%234 = OpBitcast %5 %233 +%235 = OpLoad %5 %48 +%236 = OpIAdd %5 %235 %234 +OpStore %48 %236 +%237 = OpAccessChain %83 %31 %78 +%238 = OpLoad %7 %237 %239 = OpImageQueryLevels %4 %238 -%240 = OpBitcast %6 %239 -%241 = OpLoad %6 %51 -%242 = OpIAdd %6 %241 %240 -OpStore %51 %242 -%244 = OpAccessChain %243 %38 %5 -%245 = OpLoad %16 %244 +%240 = OpBitcast %5 %239 +%241 = OpLoad %5 %48 +%242 = OpIAdd %5 %241 %240 +OpStore %48 %242 +%244 = OpAccessChain %243 %35 %70 +%245 = OpLoad %13 %244 %246 = OpImageQuerySamples %4 %245 -%247 = OpBitcast %6 %246 -%248 = OpLoad %6 %51 -%249 = OpIAdd %6 %248 %247 -OpStore %51 %249 -%250 = OpAccessChain %243 %38 %77 -%251 = OpLoad %16 %250 +%247 = OpBitcast %5 %246 +%248 = OpLoad %5 %48 +%249 = OpIAdd %5 %248 %247 +OpStore %48 %249 +%250 = OpAccessChain %243 %35 %77 +%251 = OpLoad %13 %250 %252 = OpImageQuerySamples %4 %251 -%253 = OpBitcast %6 %252 -%254 = OpLoad %6 %51 -%255 = OpIAdd %6 %254 %253 -OpStore %51 %255 -%256 = OpAccessChain %243 %38 %78 -%257 = OpLoad %16 %256 +%253 = OpBitcast %5 %252 +%254 = OpLoad %5 %48 +%255 = OpIAdd %5 %254 %253 +OpStore %48 %255 +%256 = OpAccessChain %243 %35 %78 +%257 = OpLoad %13 %256 %258 = OpImageQuerySamples %4 %257 -%259 = OpBitcast %6 %258 -%260 = OpLoad %6 %51 -%261 = OpIAdd %6 %260 %259 -OpStore %51 %261 -%262 = OpAccessChain %83 %34 %5 -%263 = OpLoad %11 %262 -%264 = OpAccessChain %104 %44 %5 -%265 = OpLoad %22 %264 +%259 = OpBitcast %5 %258 +%260 = OpLoad %5 %48 +%261 = OpIAdd %5 %260 %259 +OpStore %48 %261 +%262 = OpAccessChain %83 %31 %70 +%263 = OpLoad %7 %262 +%264 = OpAccessChain %104 %41 %70 +%265 = OpLoad %19 %264 %266 = OpSampledImage %107 %263 %265 -%267 = OpImageSampleImplicitLod %26 %266 %81 -%268 = OpLoad %26 %60 -%269 = OpFAdd %26 %268 %267 -OpStore %60 %269 -%270 = OpAccessChain %83 %34 %77 -%271 = OpLoad %11 %270 -%272 = OpAccessChain %104 %44 %77 -%273 = OpLoad %22 %272 +%267 = OpImageSampleImplicitLod %23 %266 %81 +%268 = OpLoad %23 %57 +%269 = OpFAdd %23 %268 %267 +OpStore %57 %269 +%270 = OpAccessChain %83 %31 %77 +%271 = OpLoad %7 %270 +%272 = OpAccessChain %104 %41 %77 +%273 = OpLoad %19 %272 %274 = OpSampledImage %107 %271 %273 -%275 = OpImageSampleImplicitLod %26 %274 %81 -%276 = OpLoad %26 %60 -%277 = OpFAdd %26 %276 %275 -OpStore %60 %277 -%278 = OpAccessChain %83 %34 %78 -%279 = OpLoad %11 %278 -%280 = OpAccessChain %104 %44 %78 -%281 = OpLoad %22 %280 +%275 = OpImageSampleImplicitLod %23 %274 %81 +%276 = OpLoad %23 %57 +%277 = OpFAdd %23 %276 %275 +OpStore %57 %277 +%278 = OpAccessChain %83 %31 %78 +%279 = OpLoad %7 %278 +%280 = OpAccessChain %104 %41 %78 +%281 = OpLoad %19 %280 %282 = OpSampledImage %107 %279 %281 -%283 = OpImageSampleImplicitLod %26 %282 %81 -%284 = OpLoad %26 %60 -%285 = OpFAdd %26 %284 %283 -OpStore %60 %285 -%286 = OpAccessChain %83 %34 %5 -%287 = OpLoad %11 %286 -%288 = OpAccessChain %104 %44 %5 -%289 = OpLoad %22 %288 +%283 = OpImageSampleImplicitLod %23 %282 %81 +%284 = OpLoad %23 %57 +%285 = OpFAdd %23 %284 %283 +OpStore %57 %285 +%286 = OpAccessChain %83 %31 %70 +%287 = OpLoad %7 %286 +%288 = OpAccessChain %104 %41 %70 +%289 = OpLoad %19 %288 %290 = OpSampledImage %107 %287 %289 -%291 = OpImageSampleImplicitLod %26 %290 %81 Bias %7 -%292 = OpLoad %26 %60 -%293 = OpFAdd %26 %292 %291 -OpStore %60 %293 -%294 = OpAccessChain %83 %34 %77 -%295 = OpLoad %11 %294 -%296 = OpAccessChain %104 %44 %77 -%297 = OpLoad %22 %296 +%291 = OpImageSampleImplicitLod %23 %290 %81 Bias %72 +%292 = OpLoad %23 %57 +%293 = OpFAdd %23 %292 %291 +OpStore %57 %293 +%294 = OpAccessChain %83 %31 %77 +%295 = OpLoad %7 %294 +%296 = OpAccessChain %104 %41 %77 +%297 = OpLoad %19 %296 %298 = OpSampledImage %107 %295 %297 -%299 = OpImageSampleImplicitLod %26 %298 %81 Bias %7 -%300 = OpLoad %26 %60 -%301 = OpFAdd %26 %300 %299 -OpStore %60 %301 -%302 = OpAccessChain %83 %34 %78 -%303 = OpLoad %11 %302 -%304 = OpAccessChain %104 %44 %78 -%305 = OpLoad %22 %304 +%299 = OpImageSampleImplicitLod %23 %298 %81 Bias %72 +%300 = OpLoad %23 %57 +%301 = OpFAdd %23 %300 %299 +OpStore %57 %301 +%302 = OpAccessChain %83 %31 %78 +%303 = OpLoad %7 %302 +%304 = OpAccessChain %104 %41 %78 +%305 = OpLoad %19 %304 %306 = OpSampledImage %107 %303 %305 -%307 = OpImageSampleImplicitLod %26 %306 %81 Bias %7 -%308 = OpLoad %26 %60 -%309 = OpFAdd %26 %308 %307 -OpStore %60 %309 -%310 = OpAccessChain %128 %40 %5 -%311 = OpLoad %18 %310 -%312 = OpAccessChain %131 %46 %5 -%313 = OpLoad %22 %312 +%307 = OpImageSampleImplicitLod %23 %306 %81 Bias %72 +%308 = OpLoad %23 %57 +%309 = OpFAdd %23 %308 %307 +OpStore %57 %309 +%310 = OpAccessChain %128 %37 %70 +%311 = OpLoad %15 %310 +%312 = OpAccessChain %131 %43 %70 +%313 = OpLoad %19 %312 %314 = OpSampledImage %134 %311 %313 -%315 = OpImageSampleDrefImplicitLod %8 %314 %81 %7 -%316 = OpLoad %8 %57 +%315 = OpImageSampleDrefImplicitLod %8 %314 %81 %72 +%316 = OpLoad %8 %54 %317 = OpFAdd %8 %316 %315 -OpStore %57 %317 -%318 = OpAccessChain %128 %40 %77 -%319 = OpLoad %18 %318 -%320 = OpAccessChain %131 %46 %77 -%321 = OpLoad %22 %320 +OpStore %54 %317 +%318 = OpAccessChain %128 %37 %77 +%319 = OpLoad %15 %318 +%320 = OpAccessChain %131 %43 %77 +%321 = OpLoad %19 %320 %322 = OpSampledImage %134 %319 %321 -%323 = OpImageSampleDrefImplicitLod %8 %322 %81 %7 -%324 = OpLoad %8 %57 +%323 = OpImageSampleDrefImplicitLod %8 %322 %81 %72 +%324 = OpLoad %8 %54 %325 = OpFAdd %8 %324 %323 -OpStore %57 %325 -%326 = OpAccessChain %128 %40 %78 -%327 = OpLoad %18 %326 -%328 = OpAccessChain %131 %46 %78 -%329 = OpLoad %22 %328 +OpStore %54 %325 +%326 = OpAccessChain %128 %37 %78 +%327 = OpLoad %15 %326 +%328 = OpAccessChain %131 %43 %78 +%329 = OpLoad %19 %328 %330 = OpSampledImage %134 %327 %329 -%331 = OpImageSampleDrefImplicitLod %8 %330 %81 %7 -%332 = OpLoad %8 %57 +%331 = OpImageSampleDrefImplicitLod %8 %330 %81 %72 +%332 = OpLoad %8 %54 %333 = OpFAdd %8 %332 %331 -OpStore %57 %333 -%334 = OpAccessChain %128 %40 %5 -%335 = OpLoad %18 %334 -%336 = OpAccessChain %131 %46 %5 -%337 = OpLoad %22 %336 +OpStore %54 %333 +%334 = OpAccessChain %128 %37 %70 +%335 = OpLoad %15 %334 +%336 = OpAccessChain %131 %43 %70 +%337 = OpLoad %19 %336 %338 = OpSampledImage %134 %335 %337 -%339 = OpImageSampleDrefExplicitLod %8 %338 %81 %7 Lod %7 -%340 = OpLoad %8 %57 +%339 = OpImageSampleDrefExplicitLod %8 %338 %81 %72 Lod %72 +%340 = OpLoad %8 %54 %341 = OpFAdd %8 %340 %339 -OpStore %57 %341 -%342 = OpAccessChain %128 %40 %77 -%343 = OpLoad %18 %342 -%344 = OpAccessChain %131 %46 %77 -%345 = OpLoad %22 %344 +OpStore %54 %341 +%342 = OpAccessChain %128 %37 %77 +%343 = OpLoad %15 %342 +%344 = OpAccessChain %131 %43 %77 +%345 = OpLoad %19 %344 %346 = OpSampledImage %134 %343 %345 -%347 = OpImageSampleDrefExplicitLod %8 %346 %81 %7 Lod %7 -%348 = OpLoad %8 %57 +%347 = OpImageSampleDrefExplicitLod %8 %346 %81 %72 Lod %72 +%348 = OpLoad %8 %54 %349 = OpFAdd %8 %348 %347 -OpStore %57 %349 -%350 = OpAccessChain %128 %40 %78 -%351 = OpLoad %18 %350 -%352 = OpAccessChain %131 %46 %78 -%353 = OpLoad %22 %352 +OpStore %54 %349 +%350 = OpAccessChain %128 %37 %78 +%351 = OpLoad %15 %350 +%352 = OpAccessChain %131 %43 %78 +%353 = OpLoad %19 %352 %354 = OpSampledImage %134 %351 %353 -%355 = OpImageSampleDrefExplicitLod %8 %354 %81 %7 Lod %7 -%356 = OpLoad %8 %57 +%355 = OpImageSampleDrefExplicitLod %8 %354 %81 %72 Lod %72 +%356 = OpLoad %8 %54 %357 = OpFAdd %8 %356 %355 -OpStore %57 %357 -%358 = OpAccessChain %83 %34 %5 -%359 = OpLoad %11 %358 -%360 = OpAccessChain %104 %44 %5 -%361 = OpLoad %22 %360 +OpStore %54 %357 +%358 = OpAccessChain %83 %31 %70 +%359 = OpLoad %7 %358 +%360 = OpAccessChain %104 %41 %70 +%361 = OpLoad %19 %360 %362 = OpSampledImage %107 %359 %361 -%363 = OpImageSampleExplicitLod %26 %362 %81 Grad %81 %81 -%364 = OpLoad %26 %60 -%365 = OpFAdd %26 %364 %363 -OpStore %60 %365 -%366 = OpAccessChain %83 %34 %77 -%367 = OpLoad %11 %366 -%368 = OpAccessChain %104 %44 %77 -%369 = OpLoad %22 %368 +%363 = OpImageSampleExplicitLod %23 %362 %81 Grad %81 %81 +%364 = OpLoad %23 %57 +%365 = OpFAdd %23 %364 %363 +OpStore %57 %365 +%366 = OpAccessChain %83 %31 %77 +%367 = OpLoad %7 %366 +%368 = OpAccessChain %104 %41 %77 +%369 = OpLoad %19 %368 %370 = OpSampledImage %107 %367 %369 -%371 = OpImageSampleExplicitLod %26 %370 %81 Grad %81 %81 -%372 = OpLoad %26 %60 -%373 = OpFAdd %26 %372 %371 -OpStore %60 %373 -%374 = OpAccessChain %83 %34 %78 -%375 = OpLoad %11 %374 -%376 = OpAccessChain %104 %44 %78 -%377 = OpLoad %22 %376 +%371 = OpImageSampleExplicitLod %23 %370 %81 Grad %81 %81 +%372 = OpLoad %23 %57 +%373 = OpFAdd %23 %372 %371 +OpStore %57 %373 +%374 = OpAccessChain %83 %31 %78 +%375 = OpLoad %7 %374 +%376 = OpAccessChain %104 %41 %78 +%377 = OpLoad %19 %376 %378 = OpSampledImage %107 %375 %377 -%379 = OpImageSampleExplicitLod %26 %378 %81 Grad %81 %81 -%380 = OpLoad %26 %60 -%381 = OpFAdd %26 %380 %379 -OpStore %60 %381 -%382 = OpAccessChain %83 %34 %5 -%383 = OpLoad %11 %382 -%384 = OpAccessChain %104 %44 %5 -%385 = OpLoad %22 %384 +%379 = OpImageSampleExplicitLod %23 %378 %81 Grad %81 %81 +%380 = OpLoad %23 %57 +%381 = OpFAdd %23 %380 %379 +OpStore %57 %381 +%382 = OpAccessChain %83 %31 %70 +%383 = OpLoad %7 %382 +%384 = OpAccessChain %104 %41 %70 +%385 = OpLoad %19 %384 %386 = OpSampledImage %107 %383 %385 -%387 = OpImageSampleExplicitLod %26 %386 %81 Lod %7 -%388 = OpLoad %26 %60 -%389 = OpFAdd %26 %388 %387 -OpStore %60 %389 -%390 = OpAccessChain %83 %34 %77 -%391 = OpLoad %11 %390 -%392 = OpAccessChain %104 %44 %77 -%393 = OpLoad %22 %392 +%387 = OpImageSampleExplicitLod %23 %386 %81 Lod %72 +%388 = OpLoad %23 %57 +%389 = OpFAdd %23 %388 %387 +OpStore %57 %389 +%390 = OpAccessChain %83 %31 %77 +%391 = OpLoad %7 %390 +%392 = OpAccessChain %104 %41 %77 +%393 = OpLoad %19 %392 %394 = OpSampledImage %107 %391 %393 -%395 = OpImageSampleExplicitLod %26 %394 %81 Lod %7 -%396 = OpLoad %26 %60 -%397 = OpFAdd %26 %396 %395 -OpStore %60 %397 -%398 = OpAccessChain %83 %34 %78 -%399 = OpLoad %11 %398 -%400 = OpAccessChain %104 %44 %78 -%401 = OpLoad %22 %400 +%395 = OpImageSampleExplicitLod %23 %394 %81 Lod %72 +%396 = OpLoad %23 %57 +%397 = OpFAdd %23 %396 %395 +OpStore %57 %397 +%398 = OpAccessChain %83 %31 %78 +%399 = OpLoad %7 %398 +%400 = OpAccessChain %104 %41 %78 +%401 = OpLoad %19 %400 %402 = OpSampledImage %107 %399 %401 -%403 = OpImageSampleExplicitLod %26 %402 %81 Lod %7 -%404 = OpLoad %26 %60 -%405 = OpFAdd %26 %404 %403 -OpStore %60 %405 -%407 = OpAccessChain %406 %42 %5 -%408 = OpLoad %20 %407 -%409 = OpLoad %26 %60 -%410 = OpImageQuerySize %29 %408 +%403 = OpImageSampleExplicitLod %23 %402 %81 Lod %72 +%404 = OpLoad %23 %57 +%405 = OpFAdd %23 %404 %403 +OpStore %57 %405 +%407 = OpAccessChain %406 %39 %70 +%408 = OpLoad %17 %407 +%409 = OpLoad %23 %57 +%410 = OpImageQuerySize %26 %408 %411 = OpULessThan %164 %82 %410 %412 = OpAll %157 %411 OpSelectionMerge %413 None @@ -530,10 +530,10 @@ OpBranchConditional %412 %414 %413 OpImageWrite %408 %82 %409 OpBranch %413 %413 = OpLabel -%415 = OpAccessChain %406 %42 %77 -%416 = OpLoad %20 %415 -%417 = OpLoad %26 %60 -%418 = OpImageQuerySize %29 %416 +%415 = OpAccessChain %406 %39 %77 +%416 = OpLoad %17 %415 +%417 = OpLoad %23 %57 +%418 = OpImageQuerySize %26 %416 %419 = OpULessThan %164 %82 %418 %420 = OpAll %157 %419 OpSelectionMerge %421 None @@ -542,10 +542,10 @@ OpBranchConditional %420 %422 %421 OpImageWrite %416 %82 %417 OpBranch %421 %421 = OpLabel -%423 = OpAccessChain %406 %42 %78 -%424 = OpLoad %20 %423 -%425 = OpLoad %26 %60 -%426 = OpImageQuerySize %29 %424 +%423 = OpAccessChain %406 %39 %78 +%424 = OpLoad %17 %423 +%425 = OpLoad %23 %57 +%426 = OpImageQuerySize %26 %424 %427 = OpULessThan %164 %82 %426 %428 = OpAll %157 %427 OpSelectionMerge %429 None @@ -554,21 +554,21 @@ OpBranchConditional %428 %430 %429 OpImageWrite %424 %82 %425 OpBranch %429 %429 = OpLabel -%431 = OpLoad %27 %54 -%432 = OpLoad %6 %51 -%433 = OpCompositeConstruct %27 %432 %432 -%434 = OpIAdd %27 %431 %433 -%435 = OpConvertUToF %28 %434 -%436 = OpLoad %26 %60 +%431 = OpLoad %24 %51 +%432 = OpLoad %5 %48 +%433 = OpCompositeConstruct %24 %432 %432 +%434 = OpIAdd %24 %431 %433 +%435 = OpConvertUToF %25 %434 +%436 = OpLoad %23 %57 %437 = OpCompositeExtract %8 %435 0 %438 = OpCompositeExtract %8 %435 1 %439 = OpCompositeExtract %8 %435 0 %440 = OpCompositeExtract %8 %435 1 -%441 = OpCompositeConstruct %26 %437 %438 %439 %440 -%442 = OpFAdd %26 %436 %441 -%443 = OpLoad %8 %57 -%444 = OpCompositeConstruct %26 %443 %443 %443 %443 -%445 = OpFAdd %26 %442 %444 -OpStore %68 %445 +%441 = OpCompositeConstruct %23 %437 %438 %439 %440 +%442 = OpFAdd %23 %436 %441 +%443 = OpLoad %8 %54 +%444 = OpCompositeConstruct %23 %443 %443 %443 %443 +%445 = OpFAdd %23 %442 %444 +OpStore %65 %445 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/binding-buffer-arrays.spvasm b/tests/out/spv/binding-buffer-arrays.spvasm index cd73bd756c..28f32415fe 100644 --- a/tests/out/spv/binding-buffer-arrays.spvasm +++ b/tests/out/spv/binding-buffer-arrays.spvasm @@ -8,98 +8,98 @@ OpExtension "SPV_KHR_storage_buffer_storage_class" OpExtension "SPV_EXT_descriptor_indexing" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %29 "main" %24 %27 -OpExecutionMode %29 OriginUpperLeft -OpMemberDecorate %8 0 Offset 0 +OpEntryPoint Fragment %27 "main" %22 %25 +OpExecutionMode %27 OriginUpperLeft +OpMemberDecorate %6 0 Offset 0 +OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %9 0 Offset 0 -OpMemberDecorate %11 0 Offset 0 -OpDecorate %12 NonWritable -OpDecorate %12 DescriptorSet 0 -OpDecorate %12 Binding 0 -OpDecorate %9 Block -OpDecorate %16 DescriptorSet 0 -OpDecorate %16 Binding 10 -OpDecorate %17 Block -OpMemberDecorate %17 0 Offset 0 -OpDecorate %24 Location 0 -OpDecorate %24 Flat -OpDecorate %27 Location 0 +OpDecorate %10 NonWritable +OpDecorate %10 DescriptorSet 0 +OpDecorate %10 Binding 0 +OpDecorate %7 Block +OpDecorate %14 DescriptorSet 0 +OpDecorate %14 Binding 10 +OpDecorate %15 Block +OpMemberDecorate %15 0 Offset 0 +OpDecorate %22 Location 0 +OpDecorate %22 Flat +OpDecorate %25 Location 0 OpDecorate %57 NonUniform %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 1 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 -%7 = OpConstant %4 0 -%8 = OpTypeStruct %6 -%9 = OpTypeStruct %6 -%10 = OpTypeArray %9 %3 -%11 = OpTypeStruct %6 -%15 = OpConstant %6 10 -%14 = OpTypeArray %9 %15 -%13 = OpTypePointer StorageBuffer %14 -%12 = OpVariable %13 StorageBuffer -%17 = OpTypeStruct %8 -%18 = OpTypePointer Uniform %17 -%16 = OpVariable %18 Uniform -%20 = OpTypePointer Function %6 -%21 = OpConstantNull %6 -%25 = OpTypePointer Input %6 -%24 = OpVariable %25 Input -%28 = OpTypePointer Output %6 -%27 = OpVariable %28 Output -%30 = OpTypeFunction %2 -%31 = OpTypePointer Uniform %8 -%33 = OpTypePointer StorageBuffer %10 -%35 = OpTypePointer Uniform %6 -%39 = OpTypePointer StorageBuffer %9 -%40 = OpTypePointer StorageBuffer %6 -%45 = OpConstant %6 1 +%5 = OpTypeInt 32 0 +%6 = OpTypeStruct %5 +%7 = OpTypeStruct %5 +%8 = OpTypeArray %7 %3 +%9 = OpTypeStruct %5 +%13 = OpConstant %5 10 +%12 = OpTypeArray %7 %13 +%11 = OpTypePointer StorageBuffer %12 +%10 = OpVariable %11 StorageBuffer +%15 = OpTypeStruct %6 +%16 = OpTypePointer Uniform %15 +%14 = OpVariable %16 Uniform +%18 = OpTypePointer Function %5 +%19 = OpConstantNull %5 +%23 = OpTypePointer Input %5 +%22 = OpVariable %23 Input +%26 = OpTypePointer Output %5 +%25 = OpVariable %26 Output +%28 = OpTypeFunction %2 +%29 = OpTypePointer Uniform %6 +%30 = OpConstant %5 0 +%32 = OpTypePointer StorageBuffer %8 +%33 = OpConstant %4 0 +%35 = OpTypePointer Uniform %5 +%39 = OpTypePointer StorageBuffer %7 +%40 = OpTypePointer StorageBuffer %5 +%45 = OpConstant %5 1 %47 = OpTypeBool -%49 = OpConstantNull %6 -%58 = OpConstantNull %6 -%29 = OpFunction %2 None %30 -%22 = OpLabel -%19 = OpVariable %20 Function %21 -%26 = OpLoad %6 %24 -%23 = OpCompositeConstruct %11 %26 -%32 = OpAccessChain %31 %16 %5 +%49 = OpConstantNull %5 +%58 = OpConstantNull %5 +%27 = OpFunction %2 None %28 +%20 = OpLabel +%17 = OpVariable %18 Function %19 +%24 = OpLoad %5 %22 +%21 = OpCompositeConstruct %9 %24 +%31 = OpAccessChain %29 %14 %30 OpBranch %34 %34 = OpLabel -%36 = OpAccessChain %35 %32 %5 -%37 = OpLoad %6 %36 -%38 = OpCompositeExtract %6 %23 0 -OpStore %19 %5 -%41 = OpAccessChain %40 %12 %5 %5 -%42 = OpLoad %6 %41 -%43 = OpLoad %6 %19 -%44 = OpIAdd %6 %43 %42 -OpStore %19 %44 +%36 = OpAccessChain %35 %31 %30 +%37 = OpLoad %5 %36 +%38 = OpCompositeExtract %5 %21 0 +OpStore %17 %30 +%41 = OpAccessChain %40 %10 %30 %30 +%42 = OpLoad %5 %41 +%43 = OpLoad %5 %17 +%44 = OpIAdd %5 %43 %42 +OpStore %17 %44 %46 = OpULessThan %47 %37 %45 OpSelectionMerge %50 None OpBranchConditional %46 %51 %50 %51 = OpLabel -%48 = OpAccessChain %40 %12 %37 %5 -%52 = OpLoad %6 %48 +%48 = OpAccessChain %40 %10 %37 %30 +%52 = OpLoad %5 %48 OpBranch %50 %50 = OpLabel -%53 = OpPhi %6 %49 %34 %52 %51 -%54 = OpLoad %6 %19 -%55 = OpIAdd %6 %54 %53 -OpStore %19 %55 +%53 = OpPhi %5 %49 %34 %52 %51 +%54 = OpLoad %5 %17 +%55 = OpIAdd %5 %54 %53 +OpStore %17 %55 %56 = OpULessThan %47 %38 %45 OpSelectionMerge %59 None OpBranchConditional %56 %60 %59 %60 = OpLabel -%57 = OpAccessChain %40 %12 %38 %5 -%61 = OpLoad %6 %57 +%57 = OpAccessChain %40 %10 %38 %30 +%61 = OpLoad %5 %57 OpBranch %59 %59 = OpLabel -%62 = OpPhi %6 %58 %50 %61 %60 -%63 = OpLoad %6 %19 -%64 = OpIAdd %6 %63 %62 -OpStore %19 %64 -%65 = OpLoad %6 %19 -OpStore %27 %65 +%62 = OpPhi %5 %58 %50 %61 %60 +%63 = OpLoad %5 %17 +%64 = OpIAdd %5 %63 %62 +OpStore %17 %64 +%65 = OpLoad %5 %17 +OpStore %25 %65 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bitcast.spvasm b/tests/out/spv/bitcast.spvasm index 6fffef8dc4..f8b0c93279 100644 --- a/tests/out/spv/bitcast.spvasm +++ b/tests/out/spv/bitcast.spvasm @@ -5,100 +5,100 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %46 "main" -OpExecutionMode %46 LocalSize 1 1 1 +OpEntryPoint GLCompute %43 "main" +OpExecutionMode %43 LocalSize 1 1 1 %2 = OpTypeVoid %4 = OpTypeInt 32 1 -%3 = OpConstant %4 0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 -%8 = OpTypeFloat 32 -%7 = OpConstant %8 0.0 -%9 = OpTypeVector %4 2 -%10 = OpTypeVector %4 3 -%11 = OpTypeVector %4 4 -%12 = OpTypeVector %6 2 -%13 = OpTypeVector %6 3 -%14 = OpTypeVector %6 4 -%15 = OpTypeVector %8 2 -%16 = OpTypeVector %8 3 -%17 = OpTypeVector %8 4 -%19 = OpTypePointer Function %9 -%20 = OpConstantNull %9 -%22 = OpTypePointer Function %10 -%23 = OpConstantNull %10 -%25 = OpTypePointer Function %11 -%26 = OpConstantNull %11 -%28 = OpTypePointer Function %12 -%29 = OpConstantNull %12 -%31 = OpTypePointer Function %13 -%32 = OpConstantNull %13 -%34 = OpTypePointer Function %14 -%35 = OpConstantNull %14 -%37 = OpTypePointer Function %15 -%38 = OpConstantNull %15 -%40 = OpTypePointer Function %16 -%41 = OpConstantNull %16 -%43 = OpTypePointer Function %17 -%44 = OpConstantNull %17 -%47 = OpTypeFunction %2 -%46 = OpFunction %2 None %47 -%45 = OpLabel +%3 = OpTypeVector %4 2 +%5 = OpTypeVector %4 3 +%6 = OpTypeVector %4 4 +%8 = OpTypeInt 32 0 +%7 = OpTypeVector %8 2 +%9 = OpTypeVector %8 3 +%10 = OpTypeVector %8 4 +%12 = OpTypeFloat 32 +%11 = OpTypeVector %12 2 +%13 = OpTypeVector %12 3 +%14 = OpTypeVector %12 4 +%16 = OpTypePointer Function %3 +%17 = OpConstantNull %3 +%19 = OpTypePointer Function %5 +%20 = OpConstantNull %5 +%22 = OpTypePointer Function %6 +%23 = OpConstantNull %6 +%25 = OpTypePointer Function %7 +%26 = OpConstantNull %7 +%28 = OpTypePointer Function %9 +%29 = OpConstantNull %9 +%31 = OpTypePointer Function %10 +%32 = OpConstantNull %10 +%34 = OpTypePointer Function %11 +%35 = OpConstantNull %11 +%37 = OpTypePointer Function %13 +%38 = OpConstantNull %13 +%40 = OpTypePointer Function %14 +%41 = OpConstantNull %14 +%44 = OpTypeFunction %2 +%45 = OpConstant %4 0 +%46 = OpConstant %8 0 +%47 = OpConstant %12 0.0 +%43 = OpFunction %2 None %44 +%42 = OpLabel +%33 = OpVariable %34 Function %35 +%24 = OpVariable %25 Function %26 +%15 = OpVariable %16 Function %17 %36 = OpVariable %37 Function %38 %27 = OpVariable %28 Function %29 %18 = OpVariable %19 Function %20 %39 = OpVariable %40 Function %41 %30 = OpVariable %31 Function %32 %21 = OpVariable %22 Function %23 -%42 = OpVariable %43 Function %44 -%33 = OpVariable %34 Function %35 -%24 = OpVariable %25 Function %26 OpBranch %48 %48 = OpLabel -%49 = OpCompositeConstruct %9 %3 %3 -OpStore %18 %49 -%50 = OpCompositeConstruct %10 %3 %3 %3 -OpStore %21 %50 -%51 = OpCompositeConstruct %11 %3 %3 %3 %3 -OpStore %24 %51 -%52 = OpCompositeConstruct %12 %5 %5 -OpStore %27 %52 -%53 = OpCompositeConstruct %13 %5 %5 %5 -OpStore %30 %53 -%54 = OpCompositeConstruct %14 %5 %5 %5 %5 -OpStore %33 %54 -%55 = OpCompositeConstruct %15 %7 %7 -OpStore %36 %55 -%56 = OpCompositeConstruct %16 %7 %7 %7 -OpStore %39 %56 -%57 = OpCompositeConstruct %17 %7 %7 %7 %7 -OpStore %42 %57 -%58 = OpLoad %9 %18 -%59 = OpBitcast %12 %58 -OpStore %27 %59 -%60 = OpLoad %10 %21 -%61 = OpBitcast %13 %60 -OpStore %30 %61 -%62 = OpLoad %11 %24 -%63 = OpBitcast %14 %62 -OpStore %33 %63 -%64 = OpLoad %12 %27 -%65 = OpBitcast %9 %64 -OpStore %18 %65 -%66 = OpLoad %13 %30 -%67 = OpBitcast %10 %66 -OpStore %21 %67 -%68 = OpLoad %14 %33 -%69 = OpBitcast %11 %68 -OpStore %24 %69 -%70 = OpLoad %9 %18 -%71 = OpBitcast %15 %70 -OpStore %36 %71 -%72 = OpLoad %10 %21 -%73 = OpBitcast %16 %72 -OpStore %39 %73 -%74 = OpLoad %11 %24 -%75 = OpBitcast %17 %74 -OpStore %42 %75 +%49 = OpCompositeConstruct %3 %45 %45 +OpStore %15 %49 +%50 = OpCompositeConstruct %5 %45 %45 %45 +OpStore %18 %50 +%51 = OpCompositeConstruct %6 %45 %45 %45 %45 +OpStore %21 %51 +%52 = OpCompositeConstruct %7 %46 %46 +OpStore %24 %52 +%53 = OpCompositeConstruct %9 %46 %46 %46 +OpStore %27 %53 +%54 = OpCompositeConstruct %10 %46 %46 %46 %46 +OpStore %30 %54 +%55 = OpCompositeConstruct %11 %47 %47 +OpStore %33 %55 +%56 = OpCompositeConstruct %13 %47 %47 %47 +OpStore %36 %56 +%57 = OpCompositeConstruct %14 %47 %47 %47 %47 +OpStore %39 %57 +%58 = OpLoad %3 %15 +%59 = OpBitcast %7 %58 +OpStore %24 %59 +%60 = OpLoad %5 %18 +%61 = OpBitcast %9 %60 +OpStore %27 %61 +%62 = OpLoad %6 %21 +%63 = OpBitcast %10 %62 +OpStore %30 %63 +%64 = OpLoad %7 %24 +%65 = OpBitcast %3 %64 +OpStore %15 %65 +%66 = OpLoad %9 %27 +%67 = OpBitcast %5 %66 +OpStore %18 %67 +%68 = OpLoad %10 %30 +%69 = OpBitcast %6 %68 +OpStore %21 %69 +%70 = OpLoad %3 %15 +%71 = OpBitcast %11 %70 +OpStore %33 %71 +%72 = OpLoad %5 %18 +%73 = OpBitcast %13 %72 +OpStore %36 %73 +%74 = OpLoad %6 %21 +%75 = OpBitcast %14 %74 +OpStore %39 %75 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bits.spvasm b/tests/out/spv/bits.spvasm index 750a2545b7..674167359f 100644 --- a/tests/out/spv/bits.spvasm +++ b/tests/out/spv/bits.spvasm @@ -5,229 +5,229 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %50 "main" -OpExecutionMode %50 LocalSize 1 1 1 +OpEntryPoint GLCompute %45 "main" +OpExecutionMode %45 LocalSize 1 1 1 %2 = OpTypeVoid -%4 = OpTypeInt 32 1 -%3 = OpConstant %4 0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 -%8 = OpTypeFloat 32 -%7 = OpConstant %8 0.0 -%9 = OpConstant %6 5 -%10 = OpConstant %6 10 -%11 = OpTypeVector %4 2 -%12 = OpTypeVector %4 3 -%13 = OpTypeVector %4 4 -%14 = OpTypeVector %6 2 -%15 = OpTypeVector %6 3 -%16 = OpTypeVector %6 4 -%17 = OpTypeVector %8 2 -%18 = OpTypeVector %8 4 -%20 = OpTypePointer Function %4 -%21 = OpConstantNull %4 -%23 = OpTypePointer Function %11 -%24 = OpConstantNull %11 -%26 = OpTypePointer Function %12 -%27 = OpConstantNull %12 -%29 = OpTypePointer Function %13 -%30 = OpConstantNull %13 -%32 = OpTypePointer Function %6 -%33 = OpConstantNull %6 -%35 = OpTypePointer Function %14 -%36 = OpConstantNull %14 -%38 = OpTypePointer Function %15 -%39 = OpConstantNull %15 -%41 = OpTypePointer Function %16 -%42 = OpConstantNull %16 -%44 = OpTypePointer Function %17 -%45 = OpConstantNull %17 -%47 = OpTypePointer Function %18 -%48 = OpConstantNull %18 -%51 = OpTypeFunction %2 -%50 = OpFunction %2 None %51 -%49 = OpLabel -%46 = OpVariable %47 Function %48 -%37 = OpVariable %38 Function %39 -%28 = OpVariable %29 Function %30 -%19 = OpVariable %20 Function %21 -%40 = OpVariable %41 Function %42 -%31 = OpVariable %32 Function %33 -%22 = OpVariable %23 Function %24 -%43 = OpVariable %44 Function %45 -%34 = OpVariable %35 Function %36 -%25 = OpVariable %26 Function %27 +%3 = OpTypeInt 32 1 +%4 = OpTypeVector %3 2 +%5 = OpTypeVector %3 3 +%6 = OpTypeVector %3 4 +%7 = OpTypeInt 32 0 +%8 = OpTypeVector %7 2 +%9 = OpTypeVector %7 3 +%10 = OpTypeVector %7 4 +%12 = OpTypeFloat 32 +%11 = OpTypeVector %12 2 +%13 = OpTypeVector %12 4 +%15 = OpTypePointer Function %3 +%16 = OpConstantNull %3 +%18 = OpTypePointer Function %4 +%19 = OpConstantNull %4 +%21 = OpTypePointer Function %5 +%22 = OpConstantNull %5 +%24 = OpTypePointer Function %6 +%25 = OpConstantNull %6 +%27 = OpTypePointer Function %7 +%28 = OpConstantNull %7 +%30 = OpTypePointer Function %8 +%31 = OpConstantNull %8 +%33 = OpTypePointer Function %9 +%34 = OpConstantNull %9 +%36 = OpTypePointer Function %10 +%37 = OpConstantNull %10 +%39 = OpTypePointer Function %11 +%40 = OpConstantNull %11 +%42 = OpTypePointer Function %13 +%43 = OpConstantNull %13 +%46 = OpTypeFunction %2 +%47 = OpConstant %3 0 +%48 = OpConstant %7 0 +%49 = OpConstant %12 0.0 +%50 = OpConstant %7 5 +%51 = OpConstant %7 10 +%45 = OpFunction %2 None %46 +%44 = OpLabel +%41 = OpVariable %42 Function %43 +%32 = OpVariable %33 Function %34 +%23 = OpVariable %24 Function %25 +%14 = OpVariable %15 Function %16 +%35 = OpVariable %36 Function %37 +%26 = OpVariable %27 Function %28 +%17 = OpVariable %18 Function %19 +%38 = OpVariable %39 Function %40 +%29 = OpVariable %30 Function %31 +%20 = OpVariable %21 Function %22 OpBranch %52 %52 = OpLabel -OpStore %19 %3 -%53 = OpCompositeConstruct %11 %3 %3 -OpStore %22 %53 -%54 = OpCompositeConstruct %12 %3 %3 %3 -OpStore %25 %54 -%55 = OpCompositeConstruct %13 %3 %3 %3 %3 -OpStore %28 %55 -OpStore %31 %5 -%56 = OpCompositeConstruct %14 %5 %5 -OpStore %34 %56 -%57 = OpCompositeConstruct %15 %5 %5 %5 -OpStore %37 %57 -%58 = OpCompositeConstruct %16 %5 %5 %5 %5 -OpStore %40 %58 -%59 = OpCompositeConstruct %17 %7 %7 -OpStore %43 %59 -%60 = OpCompositeConstruct %18 %7 %7 %7 %7 -OpStore %46 %60 -%61 = OpLoad %18 %46 -%62 = OpExtInst %6 %1 PackSnorm4x8 %61 -OpStore %31 %62 -%63 = OpLoad %18 %46 -%64 = OpExtInst %6 %1 PackUnorm4x8 %63 -OpStore %31 %64 -%65 = OpLoad %17 %43 -%66 = OpExtInst %6 %1 PackSnorm2x16 %65 -OpStore %31 %66 -%67 = OpLoad %17 %43 -%68 = OpExtInst %6 %1 PackUnorm2x16 %67 -OpStore %31 %68 -%69 = OpLoad %17 %43 -%70 = OpExtInst %6 %1 PackHalf2x16 %69 -OpStore %31 %70 -%71 = OpLoad %6 %31 -%72 = OpExtInst %18 %1 UnpackSnorm4x8 %71 -OpStore %46 %72 -%73 = OpLoad %6 %31 -%74 = OpExtInst %18 %1 UnpackUnorm4x8 %73 -OpStore %46 %74 -%75 = OpLoad %6 %31 -%76 = OpExtInst %17 %1 UnpackSnorm2x16 %75 -OpStore %43 %76 -%77 = OpLoad %6 %31 -%78 = OpExtInst %17 %1 UnpackUnorm2x16 %77 -OpStore %43 %78 -%79 = OpLoad %6 %31 -%80 = OpExtInst %17 %1 UnpackHalf2x16 %79 -OpStore %43 %80 -%81 = OpLoad %4 %19 -%82 = OpLoad %4 %19 -%83 = OpBitFieldInsert %4 %81 %82 %9 %10 -OpStore %19 %83 -%84 = OpLoad %11 %22 -%85 = OpLoad %11 %22 -%86 = OpBitFieldInsert %11 %84 %85 %9 %10 -OpStore %22 %86 -%87 = OpLoad %12 %25 -%88 = OpLoad %12 %25 -%89 = OpBitFieldInsert %12 %87 %88 %9 %10 -OpStore %25 %89 -%90 = OpLoad %13 %28 -%91 = OpLoad %13 %28 -%92 = OpBitFieldInsert %13 %90 %91 %9 %10 -OpStore %28 %92 -%93 = OpLoad %6 %31 -%94 = OpLoad %6 %31 -%95 = OpBitFieldInsert %6 %93 %94 %9 %10 -OpStore %31 %95 -%96 = OpLoad %14 %34 -%97 = OpLoad %14 %34 -%98 = OpBitFieldInsert %14 %96 %97 %9 %10 -OpStore %34 %98 -%99 = OpLoad %15 %37 -%100 = OpLoad %15 %37 -%101 = OpBitFieldInsert %15 %99 %100 %9 %10 -OpStore %37 %101 -%102 = OpLoad %16 %40 -%103 = OpLoad %16 %40 -%104 = OpBitFieldInsert %16 %102 %103 %9 %10 -OpStore %40 %104 -%105 = OpLoad %4 %19 -%106 = OpBitFieldSExtract %4 %105 %9 %10 -OpStore %19 %106 -%107 = OpLoad %11 %22 -%108 = OpBitFieldSExtract %11 %107 %9 %10 -OpStore %22 %108 -%109 = OpLoad %12 %25 -%110 = OpBitFieldSExtract %12 %109 %9 %10 -OpStore %25 %110 -%111 = OpLoad %13 %28 -%112 = OpBitFieldSExtract %13 %111 %9 %10 -OpStore %28 %112 -%113 = OpLoad %6 %31 -%114 = OpBitFieldUExtract %6 %113 %9 %10 -OpStore %31 %114 -%115 = OpLoad %14 %34 -%116 = OpBitFieldUExtract %14 %115 %9 %10 -OpStore %34 %116 -%117 = OpLoad %15 %37 -%118 = OpBitFieldUExtract %15 %117 %9 %10 -OpStore %37 %118 -%119 = OpLoad %16 %40 -%120 = OpBitFieldUExtract %16 %119 %9 %10 -OpStore %40 %120 -%121 = OpLoad %4 %19 -%122 = OpExtInst %4 %1 FindILsb %121 -OpStore %19 %122 -%123 = OpLoad %14 %34 -%124 = OpExtInst %14 %1 FindILsb %123 -OpStore %34 %124 -%125 = OpLoad %12 %25 -%126 = OpExtInst %12 %1 FindSMsb %125 -OpStore %25 %126 -%127 = OpLoad %15 %37 -%128 = OpExtInst %15 %1 FindUMsb %127 -OpStore %37 %128 -%129 = OpLoad %4 %19 -%130 = OpExtInst %4 %1 FindSMsb %129 -OpStore %19 %130 -%131 = OpLoad %6 %31 -%132 = OpExtInst %6 %1 FindUMsb %131 -OpStore %31 %132 -%133 = OpLoad %4 %19 -%134 = OpBitCount %4 %133 -OpStore %19 %134 -%135 = OpLoad %11 %22 -%136 = OpBitCount %11 %135 -OpStore %22 %136 -%137 = OpLoad %12 %25 -%138 = OpBitCount %12 %137 -OpStore %25 %138 -%139 = OpLoad %13 %28 -%140 = OpBitCount %13 %139 -OpStore %28 %140 -%141 = OpLoad %6 %31 -%142 = OpBitCount %6 %141 -OpStore %31 %142 -%143 = OpLoad %14 %34 -%144 = OpBitCount %14 %143 -OpStore %34 %144 -%145 = OpLoad %15 %37 -%146 = OpBitCount %15 %145 -OpStore %37 %146 -%147 = OpLoad %16 %40 -%148 = OpBitCount %16 %147 -OpStore %40 %148 -%149 = OpLoad %4 %19 -%150 = OpBitReverse %4 %149 -OpStore %19 %150 -%151 = OpLoad %11 %22 -%152 = OpBitReverse %11 %151 -OpStore %22 %152 -%153 = OpLoad %12 %25 -%154 = OpBitReverse %12 %153 -OpStore %25 %154 -%155 = OpLoad %13 %28 -%156 = OpBitReverse %13 %155 -OpStore %28 %156 -%157 = OpLoad %6 %31 -%158 = OpBitReverse %6 %157 -OpStore %31 %158 -%159 = OpLoad %14 %34 -%160 = OpBitReverse %14 %159 -OpStore %34 %160 -%161 = OpLoad %15 %37 -%162 = OpBitReverse %15 %161 -OpStore %37 %162 -%163 = OpLoad %16 %40 -%164 = OpBitReverse %16 %163 -OpStore %40 %164 +OpStore %14 %47 +%53 = OpCompositeConstruct %4 %47 %47 +OpStore %17 %53 +%54 = OpCompositeConstruct %5 %47 %47 %47 +OpStore %20 %54 +%55 = OpCompositeConstruct %6 %47 %47 %47 %47 +OpStore %23 %55 +OpStore %26 %48 +%56 = OpCompositeConstruct %8 %48 %48 +OpStore %29 %56 +%57 = OpCompositeConstruct %9 %48 %48 %48 +OpStore %32 %57 +%58 = OpCompositeConstruct %10 %48 %48 %48 %48 +OpStore %35 %58 +%59 = OpCompositeConstruct %11 %49 %49 +OpStore %38 %59 +%60 = OpCompositeConstruct %13 %49 %49 %49 %49 +OpStore %41 %60 +%61 = OpLoad %13 %41 +%62 = OpExtInst %7 %1 PackSnorm4x8 %61 +OpStore %26 %62 +%63 = OpLoad %13 %41 +%64 = OpExtInst %7 %1 PackUnorm4x8 %63 +OpStore %26 %64 +%65 = OpLoad %11 %38 +%66 = OpExtInst %7 %1 PackSnorm2x16 %65 +OpStore %26 %66 +%67 = OpLoad %11 %38 +%68 = OpExtInst %7 %1 PackUnorm2x16 %67 +OpStore %26 %68 +%69 = OpLoad %11 %38 +%70 = OpExtInst %7 %1 PackHalf2x16 %69 +OpStore %26 %70 +%71 = OpLoad %7 %26 +%72 = OpExtInst %13 %1 UnpackSnorm4x8 %71 +OpStore %41 %72 +%73 = OpLoad %7 %26 +%74 = OpExtInst %13 %1 UnpackUnorm4x8 %73 +OpStore %41 %74 +%75 = OpLoad %7 %26 +%76 = OpExtInst %11 %1 UnpackSnorm2x16 %75 +OpStore %38 %76 +%77 = OpLoad %7 %26 +%78 = OpExtInst %11 %1 UnpackUnorm2x16 %77 +OpStore %38 %78 +%79 = OpLoad %7 %26 +%80 = OpExtInst %11 %1 UnpackHalf2x16 %79 +OpStore %38 %80 +%81 = OpLoad %3 %14 +%82 = OpLoad %3 %14 +%83 = OpBitFieldInsert %3 %81 %82 %50 %51 +OpStore %14 %83 +%84 = OpLoad %4 %17 +%85 = OpLoad %4 %17 +%86 = OpBitFieldInsert %4 %84 %85 %50 %51 +OpStore %17 %86 +%87 = OpLoad %5 %20 +%88 = OpLoad %5 %20 +%89 = OpBitFieldInsert %5 %87 %88 %50 %51 +OpStore %20 %89 +%90 = OpLoad %6 %23 +%91 = OpLoad %6 %23 +%92 = OpBitFieldInsert %6 %90 %91 %50 %51 +OpStore %23 %92 +%93 = OpLoad %7 %26 +%94 = OpLoad %7 %26 +%95 = OpBitFieldInsert %7 %93 %94 %50 %51 +OpStore %26 %95 +%96 = OpLoad %8 %29 +%97 = OpLoad %8 %29 +%98 = OpBitFieldInsert %8 %96 %97 %50 %51 +OpStore %29 %98 +%99 = OpLoad %9 %32 +%100 = OpLoad %9 %32 +%101 = OpBitFieldInsert %9 %99 %100 %50 %51 +OpStore %32 %101 +%102 = OpLoad %10 %35 +%103 = OpLoad %10 %35 +%104 = OpBitFieldInsert %10 %102 %103 %50 %51 +OpStore %35 %104 +%105 = OpLoad %3 %14 +%106 = OpBitFieldSExtract %3 %105 %50 %51 +OpStore %14 %106 +%107 = OpLoad %4 %17 +%108 = OpBitFieldSExtract %4 %107 %50 %51 +OpStore %17 %108 +%109 = OpLoad %5 %20 +%110 = OpBitFieldSExtract %5 %109 %50 %51 +OpStore %20 %110 +%111 = OpLoad %6 %23 +%112 = OpBitFieldSExtract %6 %111 %50 %51 +OpStore %23 %112 +%113 = OpLoad %7 %26 +%114 = OpBitFieldUExtract %7 %113 %50 %51 +OpStore %26 %114 +%115 = OpLoad %8 %29 +%116 = OpBitFieldUExtract %8 %115 %50 %51 +OpStore %29 %116 +%117 = OpLoad %9 %32 +%118 = OpBitFieldUExtract %9 %117 %50 %51 +OpStore %32 %118 +%119 = OpLoad %10 %35 +%120 = OpBitFieldUExtract %10 %119 %50 %51 +OpStore %35 %120 +%121 = OpLoad %3 %14 +%122 = OpExtInst %3 %1 FindILsb %121 +OpStore %14 %122 +%123 = OpLoad %8 %29 +%124 = OpExtInst %8 %1 FindILsb %123 +OpStore %29 %124 +%125 = OpLoad %5 %20 +%126 = OpExtInst %5 %1 FindSMsb %125 +OpStore %20 %126 +%127 = OpLoad %9 %32 +%128 = OpExtInst %9 %1 FindUMsb %127 +OpStore %32 %128 +%129 = OpLoad %3 %14 +%130 = OpExtInst %3 %1 FindSMsb %129 +OpStore %14 %130 +%131 = OpLoad %7 %26 +%132 = OpExtInst %7 %1 FindUMsb %131 +OpStore %26 %132 +%133 = OpLoad %3 %14 +%134 = OpBitCount %3 %133 +OpStore %14 %134 +%135 = OpLoad %4 %17 +%136 = OpBitCount %4 %135 +OpStore %17 %136 +%137 = OpLoad %5 %20 +%138 = OpBitCount %5 %137 +OpStore %20 %138 +%139 = OpLoad %6 %23 +%140 = OpBitCount %6 %139 +OpStore %23 %140 +%141 = OpLoad %7 %26 +%142 = OpBitCount %7 %141 +OpStore %26 %142 +%143 = OpLoad %8 %29 +%144 = OpBitCount %8 %143 +OpStore %29 %144 +%145 = OpLoad %9 %32 +%146 = OpBitCount %9 %145 +OpStore %32 %146 +%147 = OpLoad %10 %35 +%148 = OpBitCount %10 %147 +OpStore %35 %148 +%149 = OpLoad %3 %14 +%150 = OpBitReverse %3 %149 +OpStore %14 %150 +%151 = OpLoad %4 %17 +%152 = OpBitReverse %4 %151 +OpStore %17 %152 +%153 = OpLoad %5 %20 +%154 = OpBitReverse %5 %153 +OpStore %20 %154 +%155 = OpLoad %6 %23 +%156 = OpBitReverse %6 %155 +OpStore %23 %156 +%157 = OpLoad %7 %26 +%158 = OpBitReverse %7 %157 +OpStore %26 %158 +%159 = OpLoad %8 %29 +%160 = OpBitReverse %8 %159 +OpStore %29 %160 +%161 = OpLoad %9 %32 +%162 = OpBitReverse %9 %161 +OpStore %32 %162 +%163 = OpLoad %10 %35 +%164 = OpBitReverse %10 %163 +OpStore %35 %164 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/boids.spvasm b/tests/out/spv/boids.spvasm index 0705044369..002959167f 100644 --- a/tests/out/spv/boids.spvasm +++ b/tests/out/spv/boids.spvasm @@ -6,107 +6,107 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %54 "main" %51 -OpExecutionMode %54 LocalSize 64 1 1 +OpEntryPoint GLCompute %46 "main" %43 +OpExecutionMode %46 LocalSize 64 1 1 OpSource GLSL 450 OpName %3 "NUM_PARTICLES" -OpMemberName %16 0 "pos" -OpMemberName %16 1 "vel" -OpName %16 "Particle" -OpMemberName %17 0 "deltaT" -OpMemberName %17 1 "rule1Distance" -OpMemberName %17 2 "rule2Distance" -OpMemberName %17 3 "rule3Distance" -OpMemberName %17 4 "rule1Scale" -OpMemberName %17 5 "rule2Scale" -OpMemberName %17 6 "rule3Scale" -OpName %17 "SimParams" -OpMemberName %19 0 "particles" -OpName %19 "Particles" -OpName %21 "params" -OpName %24 "particlesSrc" -OpName %26 "particlesDst" -OpName %27 "vPos" -OpName %30 "vVel" -OpName %32 "cMass" -OpName %34 "cVel" -OpName %36 "colVel" -OpName %38 "cMassCount" -OpName %41 "cVelCount" -OpName %43 "pos" -OpName %45 "vel" -OpName %47 "i" -OpName %51 "global_invocation_id" -OpName %54 "main" -OpMemberDecorate %16 0 Offset 0 -OpMemberDecorate %16 1 Offset 8 -OpMemberDecorate %17 0 Offset 0 -OpMemberDecorate %17 1 Offset 4 -OpMemberDecorate %17 2 Offset 8 -OpMemberDecorate %17 3 Offset 12 -OpMemberDecorate %17 4 Offset 16 -OpMemberDecorate %17 5 Offset 20 -OpMemberDecorate %17 6 Offset 24 -OpDecorate %18 ArrayStride 16 -OpMemberDecorate %19 0 Offset 0 -OpDecorate %21 DescriptorSet 0 -OpDecorate %21 Binding 0 -OpDecorate %22 Block -OpMemberDecorate %22 0 Offset 0 -OpDecorate %24 NonWritable -OpDecorate %24 DescriptorSet 0 -OpDecorate %24 Binding 1 -OpDecorate %19 Block -OpDecorate %26 DescriptorSet 0 -OpDecorate %26 Binding 2 -OpDecorate %19 Block -OpDecorate %51 BuiltIn GlobalInvocationId +OpMemberName %7 0 "pos" +OpMemberName %7 1 "vel" +OpName %7 "Particle" +OpMemberName %8 0 "deltaT" +OpMemberName %8 1 "rule1Distance" +OpMemberName %8 2 "rule2Distance" +OpMemberName %8 3 "rule3Distance" +OpMemberName %8 4 "rule1Scale" +OpMemberName %8 5 "rule2Scale" +OpMemberName %8 6 "rule3Scale" +OpName %8 "SimParams" +OpMemberName %10 0 "particles" +OpName %10 "Particles" +OpName %13 "params" +OpName %16 "particlesSrc" +OpName %18 "particlesDst" +OpName %19 "vPos" +OpName %22 "vVel" +OpName %24 "cMass" +OpName %26 "cVel" +OpName %28 "colVel" +OpName %30 "cMassCount" +OpName %33 "cVelCount" +OpName %35 "pos" +OpName %37 "vel" +OpName %39 "i" +OpName %43 "global_invocation_id" +OpName %46 "main" +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 8 +OpMemberDecorate %8 0 Offset 0 +OpMemberDecorate %8 1 Offset 4 +OpMemberDecorate %8 2 Offset 8 +OpMemberDecorate %8 3 Offset 12 +OpMemberDecorate %8 4 Offset 16 +OpMemberDecorate %8 5 Offset 20 +OpMemberDecorate %8 6 Offset 24 +OpDecorate %9 ArrayStride 16 +OpMemberDecorate %10 0 Offset 0 +OpDecorate %13 DescriptorSet 0 +OpDecorate %13 Binding 0 +OpDecorate %14 Block +OpMemberDecorate %14 0 Offset 0 +OpDecorate %16 NonWritable +OpDecorate %16 DescriptorSet 0 +OpDecorate %16 Binding 1 +OpDecorate %10 Block +OpDecorate %18 DescriptorSet 0 +OpDecorate %18 Binding 2 +OpDecorate %10 Block +OpDecorate %43 BuiltIn GlobalInvocationId %2 = OpTypeVoid %4 = OpTypeInt 32 0 %3 = OpConstant %4 1500 %6 = OpTypeFloat 32 -%5 = OpConstant %6 0.0 -%8 = OpTypeInt 32 1 -%7 = OpConstant %8 0 -%9 = OpConstant %4 0 -%10 = OpConstant %8 1 -%11 = OpConstant %4 1 -%12 = OpConstant %6 0.1 -%13 = OpConstant %6 -1.0 -%14 = OpConstant %6 1.0 -%15 = OpTypeVector %6 2 -%16 = OpTypeStruct %15 %15 -%17 = OpTypeStruct %6 %6 %6 %6 %6 %6 %6 -%18 = OpTypeRuntimeArray %16 -%19 = OpTypeStruct %18 -%20 = OpTypeVector %4 3 -%22 = OpTypeStruct %17 -%23 = OpTypePointer Uniform %22 -%21 = OpVariable %23 Uniform -%25 = OpTypePointer StorageBuffer %19 -%24 = OpVariable %25 StorageBuffer -%26 = OpVariable %25 StorageBuffer -%28 = OpTypePointer Function %15 -%29 = OpConstantNull %15 -%31 = OpConstantNull %15 -%33 = OpConstantNull %15 -%35 = OpConstantNull %15 -%37 = OpConstantNull %15 -%39 = OpTypePointer Function %8 -%40 = OpConstantNull %8 -%42 = OpConstantNull %8 -%44 = OpConstantNull %15 -%46 = OpConstantNull %15 -%48 = OpTypePointer Function %4 -%49 = OpConstantNull %4 -%52 = OpTypePointer Input %20 -%51 = OpVariable %52 Input -%55 = OpTypeFunction %2 -%56 = OpTypePointer Uniform %17 +%5 = OpTypeVector %6 2 +%7 = OpTypeStruct %5 %5 +%8 = OpTypeStruct %6 %6 %6 %6 %6 %6 %6 +%9 = OpTypeRuntimeArray %7 +%10 = OpTypeStruct %9 +%11 = OpTypeVector %4 3 +%12 = OpTypeInt 32 1 +%14 = OpTypeStruct %8 +%15 = OpTypePointer Uniform %14 +%13 = OpVariable %15 Uniform +%17 = OpTypePointer StorageBuffer %10 +%16 = OpVariable %17 StorageBuffer +%18 = OpVariable %17 StorageBuffer +%20 = OpTypePointer Function %5 +%21 = OpConstantNull %5 +%23 = OpConstantNull %5 +%25 = OpConstantNull %5 +%27 = OpConstantNull %5 +%29 = OpConstantNull %5 +%31 = OpTypePointer Function %12 +%32 = OpConstantNull %12 +%34 = OpConstantNull %12 +%36 = OpConstantNull %5 +%38 = OpConstantNull %5 +%40 = OpTypePointer Function %4 +%41 = OpConstantNull %4 +%44 = OpTypePointer Input %11 +%43 = OpVariable %44 Input +%47 = OpTypeFunction %2 +%48 = OpTypePointer Uniform %8 +%49 = OpConstant %4 0 +%51 = OpConstant %6 0.0 +%52 = OpConstant %12 0 +%53 = OpConstant %12 1 +%54 = OpConstant %4 1 +%55 = OpConstant %6 0.1 +%56 = OpConstant %6 -1.0 +%57 = OpConstant %6 1.0 %60 = OpTypeBool -%64 = OpTypePointer StorageBuffer %18 -%65 = OpTypePointer StorageBuffer %16 -%66 = OpTypePointer StorageBuffer %15 +%64 = OpTypePointer StorageBuffer %9 +%65 = OpTypePointer StorageBuffer %7 +%66 = OpTypePointer StorageBuffer %5 %95 = OpTypePointer Uniform %6 %109 = OpConstant %4 2 %123 = OpConstant %4 3 @@ -114,235 +114,235 @@ OpDecorate %51 BuiltIn GlobalInvocationId %164 = OpConstant %4 5 %170 = OpConstant %4 6 %187 = OpTypePointer Function %6 -%54 = OpFunction %2 None %55 -%50 = OpLabel -%47 = OpVariable %48 Function %49 -%41 = OpVariable %39 Function %42 -%34 = OpVariable %28 Function %35 -%27 = OpVariable %28 Function %29 -%43 = OpVariable %28 Function %44 -%36 = OpVariable %28 Function %37 -%30 = OpVariable %28 Function %31 -%45 = OpVariable %28 Function %46 -%38 = OpVariable %39 Function %40 -%32 = OpVariable %28 Function %33 -%53 = OpLoad %20 %51 -%57 = OpAccessChain %56 %21 %9 +%46 = OpFunction %2 None %47 +%42 = OpLabel +%39 = OpVariable %40 Function %41 +%33 = OpVariable %31 Function %34 +%26 = OpVariable %20 Function %27 +%19 = OpVariable %20 Function %21 +%35 = OpVariable %20 Function %36 +%28 = OpVariable %20 Function %29 +%22 = OpVariable %20 Function %23 +%37 = OpVariable %20 Function %38 +%30 = OpVariable %31 Function %32 +%24 = OpVariable %20 Function %25 +%45 = OpLoad %11 %43 +%50 = OpAccessChain %48 %13 %49 OpBranch %58 %58 = OpLabel -%59 = OpCompositeExtract %4 %53 0 +%59 = OpCompositeExtract %4 %45 0 %61 = OpUGreaterThanEqual %60 %59 %3 OpSelectionMerge %62 None OpBranchConditional %61 %63 %62 %63 = OpLabel OpReturn %62 = OpLabel -%67 = OpAccessChain %66 %24 %9 %59 %9 -%68 = OpLoad %15 %67 -OpStore %27 %68 -%69 = OpAccessChain %66 %24 %9 %59 %11 -%70 = OpLoad %15 %69 -OpStore %30 %70 -%71 = OpCompositeConstruct %15 %5 %5 -OpStore %32 %71 -%72 = OpCompositeConstruct %15 %5 %5 -OpStore %34 %72 -%73 = OpCompositeConstruct %15 %5 %5 -OpStore %36 %73 -OpStore %38 %7 -OpStore %41 %7 -OpStore %47 %9 +%67 = OpAccessChain %66 %16 %49 %59 %49 +%68 = OpLoad %5 %67 +OpStore %19 %68 +%69 = OpAccessChain %66 %16 %49 %59 %54 +%70 = OpLoad %5 %69 +OpStore %22 %70 +%71 = OpCompositeConstruct %5 %51 %51 +OpStore %24 %71 +%72 = OpCompositeConstruct %5 %51 %51 +OpStore %26 %72 +%73 = OpCompositeConstruct %5 %51 %51 +OpStore %28 %73 +OpStore %30 %52 +OpStore %33 %52 +OpStore %39 %49 OpBranch %74 %74 = OpLabel OpLoopMerge %75 %77 None OpBranch %76 %76 = OpLabel -%78 = OpLoad %4 %47 +%78 = OpLoad %4 %39 %79 = OpUGreaterThanEqual %60 %78 %3 OpSelectionMerge %80 None OpBranchConditional %79 %81 %80 %81 = OpLabel OpBranch %75 %80 = OpLabel -%82 = OpLoad %4 %47 +%82 = OpLoad %4 %39 %83 = OpIEqual %60 %82 %59 OpSelectionMerge %84 None OpBranchConditional %83 %85 %84 %85 = OpLabel OpBranch %77 %84 = OpLabel -%86 = OpLoad %4 %47 -%87 = OpAccessChain %66 %24 %9 %86 %9 -%88 = OpLoad %15 %87 -OpStore %43 %88 -%89 = OpLoad %4 %47 -%90 = OpAccessChain %66 %24 %9 %89 %11 -%91 = OpLoad %15 %90 -OpStore %45 %91 -%92 = OpLoad %15 %43 -%93 = OpLoad %15 %27 +%86 = OpLoad %4 %39 +%87 = OpAccessChain %66 %16 %49 %86 %49 +%88 = OpLoad %5 %87 +OpStore %35 %88 +%89 = OpLoad %4 %39 +%90 = OpAccessChain %66 %16 %49 %89 %54 +%91 = OpLoad %5 %90 +OpStore %37 %91 +%92 = OpLoad %5 %35 +%93 = OpLoad %5 %19 %94 = OpExtInst %6 %1 Distance %92 %93 -%96 = OpAccessChain %95 %57 %11 +%96 = OpAccessChain %95 %50 %54 %97 = OpLoad %6 %96 %98 = OpFOrdLessThan %60 %94 %97 OpSelectionMerge %99 None OpBranchConditional %98 %100 %99 %100 = OpLabel -%101 = OpLoad %15 %32 -%102 = OpLoad %15 %43 -%103 = OpFAdd %15 %101 %102 -OpStore %32 %103 -%104 = OpLoad %8 %38 -%105 = OpIAdd %8 %104 %10 -OpStore %38 %105 +%101 = OpLoad %5 %24 +%102 = OpLoad %5 %35 +%103 = OpFAdd %5 %101 %102 +OpStore %24 %103 +%104 = OpLoad %12 %30 +%105 = OpIAdd %12 %104 %53 +OpStore %30 %105 OpBranch %99 %99 = OpLabel -%106 = OpLoad %15 %43 -%107 = OpLoad %15 %27 +%106 = OpLoad %5 %35 +%107 = OpLoad %5 %19 %108 = OpExtInst %6 %1 Distance %106 %107 -%110 = OpAccessChain %95 %57 %109 +%110 = OpAccessChain %95 %50 %109 %111 = OpLoad %6 %110 %112 = OpFOrdLessThan %60 %108 %111 OpSelectionMerge %113 None OpBranchConditional %112 %114 %113 %114 = OpLabel -%115 = OpLoad %15 %36 -%116 = OpLoad %15 %43 -%117 = OpLoad %15 %27 -%118 = OpFSub %15 %116 %117 -%119 = OpFSub %15 %115 %118 -OpStore %36 %119 +%115 = OpLoad %5 %28 +%116 = OpLoad %5 %35 +%117 = OpLoad %5 %19 +%118 = OpFSub %5 %116 %117 +%119 = OpFSub %5 %115 %118 +OpStore %28 %119 OpBranch %113 %113 = OpLabel -%120 = OpLoad %15 %43 -%121 = OpLoad %15 %27 +%120 = OpLoad %5 %35 +%121 = OpLoad %5 %19 %122 = OpExtInst %6 %1 Distance %120 %121 -%124 = OpAccessChain %95 %57 %123 +%124 = OpAccessChain %95 %50 %123 %125 = OpLoad %6 %124 %126 = OpFOrdLessThan %60 %122 %125 OpSelectionMerge %127 None OpBranchConditional %126 %128 %127 %128 = OpLabel -%129 = OpLoad %15 %34 -%130 = OpLoad %15 %45 -%131 = OpFAdd %15 %129 %130 -OpStore %34 %131 -%132 = OpLoad %8 %41 -%133 = OpIAdd %8 %132 %10 -OpStore %41 %133 +%129 = OpLoad %5 %26 +%130 = OpLoad %5 %37 +%131 = OpFAdd %5 %129 %130 +OpStore %26 %131 +%132 = OpLoad %12 %33 +%133 = OpIAdd %12 %132 %53 +OpStore %33 %133 OpBranch %127 %127 = OpLabel OpBranch %77 %77 = OpLabel -%134 = OpLoad %4 %47 -%135 = OpIAdd %4 %134 %11 -OpStore %47 %135 +%134 = OpLoad %4 %39 +%135 = OpIAdd %4 %134 %54 +OpStore %39 %135 OpBranch %74 %75 = OpLabel -%136 = OpLoad %8 %38 -%137 = OpSGreaterThan %60 %136 %7 +%136 = OpLoad %12 %30 +%137 = OpSGreaterThan %60 %136 %52 OpSelectionMerge %138 None OpBranchConditional %137 %139 %138 %139 = OpLabel -%140 = OpLoad %15 %32 -%141 = OpLoad %8 %38 +%140 = OpLoad %5 %24 +%141 = OpLoad %12 %30 %142 = OpConvertSToF %6 %141 -%143 = OpCompositeConstruct %15 %142 %142 -%144 = OpFDiv %15 %140 %143 -%145 = OpLoad %15 %27 -%146 = OpFSub %15 %144 %145 -OpStore %32 %146 +%143 = OpCompositeConstruct %5 %142 %142 +%144 = OpFDiv %5 %140 %143 +%145 = OpLoad %5 %19 +%146 = OpFSub %5 %144 %145 +OpStore %24 %146 OpBranch %138 %138 = OpLabel -%147 = OpLoad %8 %41 -%148 = OpSGreaterThan %60 %147 %7 +%147 = OpLoad %12 %33 +%148 = OpSGreaterThan %60 %147 %52 OpSelectionMerge %149 None OpBranchConditional %148 %150 %149 %150 = OpLabel -%151 = OpLoad %15 %34 -%152 = OpLoad %8 %41 +%151 = OpLoad %5 %26 +%152 = OpLoad %12 %33 %153 = OpConvertSToF %6 %152 -%154 = OpCompositeConstruct %15 %153 %153 -%155 = OpFDiv %15 %151 %154 -OpStore %34 %155 +%154 = OpCompositeConstruct %5 %153 %153 +%155 = OpFDiv %5 %151 %154 +OpStore %26 %155 OpBranch %149 %149 = OpLabel -%156 = OpLoad %15 %30 -%157 = OpLoad %15 %32 -%159 = OpAccessChain %95 %57 %158 +%156 = OpLoad %5 %22 +%157 = OpLoad %5 %24 +%159 = OpAccessChain %95 %50 %158 %160 = OpLoad %6 %159 -%161 = OpVectorTimesScalar %15 %157 %160 -%162 = OpFAdd %15 %156 %161 -%163 = OpLoad %15 %36 -%165 = OpAccessChain %95 %57 %164 +%161 = OpVectorTimesScalar %5 %157 %160 +%162 = OpFAdd %5 %156 %161 +%163 = OpLoad %5 %28 +%165 = OpAccessChain %95 %50 %164 %166 = OpLoad %6 %165 -%167 = OpVectorTimesScalar %15 %163 %166 -%168 = OpFAdd %15 %162 %167 -%169 = OpLoad %15 %34 -%171 = OpAccessChain %95 %57 %170 +%167 = OpVectorTimesScalar %5 %163 %166 +%168 = OpFAdd %5 %162 %167 +%169 = OpLoad %5 %26 +%171 = OpAccessChain %95 %50 %170 %172 = OpLoad %6 %171 -%173 = OpVectorTimesScalar %15 %169 %172 -%174 = OpFAdd %15 %168 %173 -OpStore %30 %174 -%175 = OpLoad %15 %30 -%176 = OpExtInst %15 %1 Normalize %175 -%177 = OpLoad %15 %30 +%173 = OpVectorTimesScalar %5 %169 %172 +%174 = OpFAdd %5 %168 %173 +OpStore %22 %174 +%175 = OpLoad %5 %22 +%176 = OpExtInst %5 %1 Normalize %175 +%177 = OpLoad %5 %22 %178 = OpExtInst %6 %1 Length %177 -%179 = OpExtInst %6 %1 FClamp %178 %5 %12 -%180 = OpVectorTimesScalar %15 %176 %179 -OpStore %30 %180 -%181 = OpLoad %15 %27 -%182 = OpLoad %15 %30 -%183 = OpAccessChain %95 %57 %9 +%179 = OpExtInst %6 %1 FClamp %178 %51 %55 +%180 = OpVectorTimesScalar %5 %176 %179 +OpStore %22 %180 +%181 = OpLoad %5 %19 +%182 = OpLoad %5 %22 +%183 = OpAccessChain %95 %50 %49 %184 = OpLoad %6 %183 -%185 = OpVectorTimesScalar %15 %182 %184 -%186 = OpFAdd %15 %181 %185 -OpStore %27 %186 -%188 = OpAccessChain %187 %27 %9 +%185 = OpVectorTimesScalar %5 %182 %184 +%186 = OpFAdd %5 %181 %185 +OpStore %19 %186 +%188 = OpAccessChain %187 %19 %49 %189 = OpLoad %6 %188 -%190 = OpFOrdLessThan %60 %189 %13 +%190 = OpFOrdLessThan %60 %189 %56 OpSelectionMerge %191 None OpBranchConditional %190 %192 %191 %192 = OpLabel -%193 = OpAccessChain %187 %27 %9 -OpStore %193 %14 +%193 = OpAccessChain %187 %19 %49 +OpStore %193 %57 OpBranch %191 %191 = OpLabel -%194 = OpAccessChain %187 %27 %9 +%194 = OpAccessChain %187 %19 %49 %195 = OpLoad %6 %194 -%196 = OpFOrdGreaterThan %60 %195 %14 +%196 = OpFOrdGreaterThan %60 %195 %57 OpSelectionMerge %197 None OpBranchConditional %196 %198 %197 %198 = OpLabel -%199 = OpAccessChain %187 %27 %9 -OpStore %199 %13 +%199 = OpAccessChain %187 %19 %49 +OpStore %199 %56 OpBranch %197 %197 = OpLabel -%200 = OpAccessChain %187 %27 %11 +%200 = OpAccessChain %187 %19 %54 %201 = OpLoad %6 %200 -%202 = OpFOrdLessThan %60 %201 %13 +%202 = OpFOrdLessThan %60 %201 %56 OpSelectionMerge %203 None OpBranchConditional %202 %204 %203 %204 = OpLabel -%205 = OpAccessChain %187 %27 %11 -OpStore %205 %14 +%205 = OpAccessChain %187 %19 %54 +OpStore %205 %57 OpBranch %203 %203 = OpLabel -%206 = OpAccessChain %187 %27 %11 +%206 = OpAccessChain %187 %19 %54 %207 = OpLoad %6 %206 -%208 = OpFOrdGreaterThan %60 %207 %14 +%208 = OpFOrdGreaterThan %60 %207 %57 OpSelectionMerge %209 None OpBranchConditional %208 %210 %209 %210 = OpLabel -%211 = OpAccessChain %187 %27 %11 -OpStore %211 %13 +%211 = OpAccessChain %187 %19 %54 +OpStore %211 %56 OpBranch %209 %209 = OpLabel -%212 = OpLoad %15 %27 -%213 = OpAccessChain %66 %26 %9 %59 %9 +%212 = OpLoad %5 %19 +%213 = OpAccessChain %66 %18 %49 %59 %49 OpStore %213 %212 -%214 = OpLoad %15 %30 -%215 = OpAccessChain %66 %26 %9 %59 %11 +%214 = OpLoad %5 %22 +%215 = OpAccessChain %66 %18 %49 %59 %54 OpStore %215 %214 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bounds-check-image-restrict.spvasm b/tests/out/spv/bounds-check-image-restrict.spvasm index 33f900023f..bfddef3938 100644 --- a/tests/out/spv/bounds-check-image-restrict.spvasm +++ b/tests/out/spv/bounds-check-image-restrict.spvasm @@ -8,461 +8,461 @@ OpCapability Shader OpCapability Sampled1D %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %272 "fragment_shader" %270 -OpExecutionMode %272 OriginUpperLeft +OpEntryPoint Fragment %269 "fragment_shader" %267 +OpExecutionMode %269 OriginUpperLeft OpSource GLSL 450 -OpName %24 "image_1d" -OpName %26 "image_2d" -OpName %28 "image_2d_array" -OpName %30 "image_3d" -OpName %32 "image_multisampled_2d" -OpName %34 "image_depth_2d" -OpName %36 "image_depth_2d_array" -OpName %38 "image_depth_multisampled_2d" -OpName %40 "image_storage_1d" -OpName %42 "image_storage_2d" -OpName %44 "image_storage_2d_array" -OpName %46 "image_storage_3d" -OpName %49 "coords" -OpName %50 "level" -OpName %51 "test_textureLoad_1d" -OpName %64 "coords" -OpName %65 "level" -OpName %66 "test_textureLoad_2d" -OpName %79 "coords" -OpName %80 "index" -OpName %81 "level" -OpName %82 "test_textureLoad_2d_array_u" -OpName %97 "coords" -OpName %98 "index" -OpName %99 "level" -OpName %100 "test_textureLoad_2d_array_s" -OpName %114 "coords" -OpName %115 "level" -OpName %116 "test_textureLoad_3d" -OpName %129 "coords" -OpName %130 "_sample" -OpName %131 "test_textureLoad_multisampled_2d" -OpName %143 "coords" -OpName %144 "level" -OpName %145 "test_textureLoad_depth_2d" -OpName %159 "coords" -OpName %160 "index" -OpName %161 "level" -OpName %162 "test_textureLoad_depth_2d_array_u" -OpName %178 "coords" -OpName %179 "index" -OpName %180 "level" -OpName %181 "test_textureLoad_depth_2d_array_s" -OpName %196 "coords" -OpName %197 "_sample" -OpName %198 "test_textureLoad_depth_multisampled_2d" -OpName %211 "coords" -OpName %212 "value" -OpName %213 "test_textureStore_1d" -OpName %221 "coords" -OpName %222 "value" -OpName %223 "test_textureStore_2d" -OpName %232 "coords" -OpName %233 "array_index" -OpName %234 "value" -OpName %235 "test_textureStore_2d_array_u" -OpName %246 "coords" -OpName %247 "array_index" -OpName %248 "value" -OpName %249 "test_textureStore_2d_array_s" -OpName %259 "coords" -OpName %260 "value" -OpName %261 "test_textureStore_3d" -OpName %272 "fragment_shader" -OpDecorate %24 DescriptorSet 0 -OpDecorate %24 Binding 0 -OpDecorate %26 DescriptorSet 0 -OpDecorate %26 Binding 1 -OpDecorate %28 DescriptorSet 0 -OpDecorate %28 Binding 2 -OpDecorate %30 DescriptorSet 0 -OpDecorate %30 Binding 3 -OpDecorate %32 DescriptorSet 0 -OpDecorate %32 Binding 4 -OpDecorate %34 DescriptorSet 0 -OpDecorate %34 Binding 5 -OpDecorate %36 DescriptorSet 0 -OpDecorate %36 Binding 6 -OpDecorate %38 DescriptorSet 0 -OpDecorate %38 Binding 7 -OpDecorate %40 NonReadable -OpDecorate %40 DescriptorSet 0 -OpDecorate %40 Binding 8 -OpDecorate %42 NonReadable -OpDecorate %42 DescriptorSet 0 -OpDecorate %42 Binding 9 -OpDecorate %44 NonReadable -OpDecorate %44 DescriptorSet 0 -OpDecorate %44 Binding 10 -OpDecorate %46 NonReadable -OpDecorate %46 DescriptorSet 0 -OpDecorate %46 Binding 11 -OpDecorate %270 Location 0 +OpName %21 "image_1d" +OpName %23 "image_2d" +OpName %25 "image_2d_array" +OpName %27 "image_3d" +OpName %29 "image_multisampled_2d" +OpName %31 "image_depth_2d" +OpName %33 "image_depth_2d_array" +OpName %35 "image_depth_multisampled_2d" +OpName %37 "image_storage_1d" +OpName %39 "image_storage_2d" +OpName %41 "image_storage_2d_array" +OpName %43 "image_storage_3d" +OpName %46 "coords" +OpName %47 "level" +OpName %48 "test_textureLoad_1d" +OpName %61 "coords" +OpName %62 "level" +OpName %63 "test_textureLoad_2d" +OpName %76 "coords" +OpName %77 "index" +OpName %78 "level" +OpName %79 "test_textureLoad_2d_array_u" +OpName %94 "coords" +OpName %95 "index" +OpName %96 "level" +OpName %97 "test_textureLoad_2d_array_s" +OpName %111 "coords" +OpName %112 "level" +OpName %113 "test_textureLoad_3d" +OpName %126 "coords" +OpName %127 "_sample" +OpName %128 "test_textureLoad_multisampled_2d" +OpName %140 "coords" +OpName %141 "level" +OpName %142 "test_textureLoad_depth_2d" +OpName %156 "coords" +OpName %157 "index" +OpName %158 "level" +OpName %159 "test_textureLoad_depth_2d_array_u" +OpName %175 "coords" +OpName %176 "index" +OpName %177 "level" +OpName %178 "test_textureLoad_depth_2d_array_s" +OpName %193 "coords" +OpName %194 "_sample" +OpName %195 "test_textureLoad_depth_multisampled_2d" +OpName %208 "coords" +OpName %209 "value" +OpName %210 "test_textureStore_1d" +OpName %218 "coords" +OpName %219 "value" +OpName %220 "test_textureStore_2d" +OpName %229 "coords" +OpName %230 "array_index" +OpName %231 "value" +OpName %232 "test_textureStore_2d_array_u" +OpName %243 "coords" +OpName %244 "array_index" +OpName %245 "value" +OpName %246 "test_textureStore_2d_array_s" +OpName %256 "coords" +OpName %257 "value" +OpName %258 "test_textureStore_3d" +OpName %269 "fragment_shader" +OpDecorate %21 DescriptorSet 0 +OpDecorate %21 Binding 0 +OpDecorate %23 DescriptorSet 0 +OpDecorate %23 Binding 1 +OpDecorate %25 DescriptorSet 0 +OpDecorate %25 Binding 2 +OpDecorate %27 DescriptorSet 0 +OpDecorate %27 Binding 3 +OpDecorate %29 DescriptorSet 0 +OpDecorate %29 Binding 4 +OpDecorate %31 DescriptorSet 0 +OpDecorate %31 Binding 5 +OpDecorate %33 DescriptorSet 0 +OpDecorate %33 Binding 6 +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 7 +OpDecorate %37 NonReadable +OpDecorate %37 DescriptorSet 0 +OpDecorate %37 Binding 8 +OpDecorate %39 NonReadable +OpDecorate %39 DescriptorSet 0 +OpDecorate %39 Binding 9 +OpDecorate %41 NonReadable +OpDecorate %41 DescriptorSet 0 +OpDecorate %41 Binding 10 +OpDecorate %43 NonReadable +OpDecorate %43 DescriptorSet 0 +OpDecorate %43 Binding 11 +OpDecorate %267 Location 0 %2 = OpTypeVoid -%4 = OpTypeInt 32 1 -%3 = OpConstant %4 0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 -%8 = OpTypeFloat 32 -%7 = OpConstant %8 0.0 -%9 = OpTypeImage %8 1D 0 0 0 1 Unknown -%10 = OpTypeVector %8 4 -%11 = OpTypeImage %8 2D 0 0 0 1 Unknown -%12 = OpTypeVector %4 2 -%13 = OpTypeImage %8 2D 0 1 0 1 Unknown -%14 = OpTypeImage %8 3D 0 0 0 1 Unknown -%15 = OpTypeVector %4 3 -%16 = OpTypeImage %8 2D 0 0 1 1 Unknown -%17 = OpTypeImage %8 2D 1 0 0 1 Unknown -%18 = OpTypeImage %8 2D 1 1 0 1 Unknown -%19 = OpTypeImage %8 2D 1 0 1 1 Unknown -%20 = OpTypeImage %8 1D 0 0 0 2 Rgba8 -%21 = OpTypeImage %8 2D 0 0 0 2 Rgba8 -%22 = OpTypeImage %8 2D 0 1 0 2 Rgba8 -%23 = OpTypeImage %8 3D 0 0 0 2 Rgba8 -%25 = OpTypePointer UniformConstant %9 -%24 = OpVariable %25 UniformConstant -%27 = OpTypePointer UniformConstant %11 -%26 = OpVariable %27 UniformConstant -%29 = OpTypePointer UniformConstant %13 -%28 = OpVariable %29 UniformConstant -%31 = OpTypePointer UniformConstant %14 -%30 = OpVariable %31 UniformConstant -%33 = OpTypePointer UniformConstant %16 -%32 = OpVariable %33 UniformConstant -%35 = OpTypePointer UniformConstant %17 -%34 = OpVariable %35 UniformConstant -%37 = OpTypePointer UniformConstant %18 -%36 = OpVariable %37 UniformConstant -%39 = OpTypePointer UniformConstant %19 -%38 = OpVariable %39 UniformConstant -%41 = OpTypePointer UniformConstant %20 -%40 = OpVariable %41 UniformConstant -%43 = OpTypePointer UniformConstant %21 -%42 = OpVariable %43 UniformConstant -%45 = OpTypePointer UniformConstant %22 -%44 = OpVariable %45 UniformConstant -%47 = OpTypePointer UniformConstant %23 -%46 = OpVariable %47 UniformConstant -%52 = OpTypeFunction %10 %4 %4 -%56 = OpConstant %4 1 -%67 = OpTypeFunction %10 %12 %4 -%74 = OpConstantComposite %12 %56 %56 -%83 = OpTypeFunction %10 %12 %6 %4 -%92 = OpConstantComposite %15 %56 %56 %56 -%101 = OpTypeFunction %10 %12 %4 %4 -%109 = OpConstantComposite %15 %56 %56 %56 -%117 = OpTypeFunction %10 %15 %4 -%124 = OpConstantComposite %15 %56 %56 %56 -%138 = OpConstantComposite %12 %56 %56 -%146 = OpTypeFunction %8 %12 %4 -%153 = OpConstantComposite %12 %56 %56 -%163 = OpTypeFunction %8 %12 %6 %4 -%172 = OpConstantComposite %15 %56 %56 %56 -%182 = OpTypeFunction %8 %12 %4 %4 -%190 = OpConstantComposite %15 %56 %56 %56 -%205 = OpConstantComposite %12 %56 %56 -%214 = OpTypeFunction %2 %4 %10 -%224 = OpTypeFunction %2 %12 %10 -%228 = OpConstantComposite %12 %56 %56 -%236 = OpTypeFunction %2 %12 %6 %10 -%242 = OpConstantComposite %15 %56 %56 %56 -%250 = OpTypeFunction %2 %12 %4 %10 -%255 = OpConstantComposite %15 %56 %56 %56 -%262 = OpTypeFunction %2 %15 %10 -%266 = OpConstantComposite %15 %56 %56 %56 -%271 = OpTypePointer Output %10 -%270 = OpVariable %271 Output -%273 = OpTypeFunction %2 -%283 = OpConstantNull %12 -%284 = OpConstantNull %12 +%4 = OpTypeFloat 32 +%3 = OpTypeImage %4 1D 0 0 0 1 Unknown +%5 = OpTypeInt 32 1 +%6 = OpTypeVector %4 4 +%7 = OpTypeImage %4 2D 0 0 0 1 Unknown +%8 = OpTypeVector %5 2 +%9 = OpTypeImage %4 2D 0 1 0 1 Unknown +%10 = OpTypeInt 32 0 +%11 = OpTypeImage %4 3D 0 0 0 1 Unknown +%12 = OpTypeVector %5 3 +%13 = OpTypeImage %4 2D 0 0 1 1 Unknown +%14 = OpTypeImage %4 2D 1 0 0 1 Unknown +%15 = OpTypeImage %4 2D 1 1 0 1 Unknown +%16 = OpTypeImage %4 2D 1 0 1 1 Unknown +%17 = OpTypeImage %4 1D 0 0 0 2 Rgba8 +%18 = OpTypeImage %4 2D 0 0 0 2 Rgba8 +%19 = OpTypeImage %4 2D 0 1 0 2 Rgba8 +%20 = OpTypeImage %4 3D 0 0 0 2 Rgba8 +%22 = OpTypePointer UniformConstant %3 +%21 = OpVariable %22 UniformConstant +%24 = OpTypePointer UniformConstant %7 +%23 = OpVariable %24 UniformConstant +%26 = OpTypePointer UniformConstant %9 +%25 = OpVariable %26 UniformConstant +%28 = OpTypePointer UniformConstant %11 +%27 = OpVariable %28 UniformConstant +%30 = OpTypePointer UniformConstant %13 +%29 = OpVariable %30 UniformConstant +%32 = OpTypePointer UniformConstant %14 +%31 = OpVariable %32 UniformConstant +%34 = OpTypePointer UniformConstant %15 +%33 = OpVariable %34 UniformConstant +%36 = OpTypePointer UniformConstant %16 +%35 = OpVariable %36 UniformConstant +%38 = OpTypePointer UniformConstant %17 +%37 = OpVariable %38 UniformConstant +%40 = OpTypePointer UniformConstant %18 +%39 = OpVariable %40 UniformConstant +%42 = OpTypePointer UniformConstant %19 +%41 = OpVariable %42 UniformConstant +%44 = OpTypePointer UniformConstant %20 +%43 = OpVariable %44 UniformConstant +%49 = OpTypeFunction %6 %5 %5 +%53 = OpConstant %5 1 +%64 = OpTypeFunction %6 %8 %5 +%71 = OpConstantComposite %8 %53 %53 +%80 = OpTypeFunction %6 %8 %10 %5 +%89 = OpConstantComposite %12 %53 %53 %53 +%98 = OpTypeFunction %6 %8 %5 %5 +%106 = OpConstantComposite %12 %53 %53 %53 +%114 = OpTypeFunction %6 %12 %5 +%121 = OpConstantComposite %12 %53 %53 %53 +%135 = OpConstantComposite %8 %53 %53 +%143 = OpTypeFunction %4 %8 %5 +%150 = OpConstantComposite %8 %53 %53 +%160 = OpTypeFunction %4 %8 %10 %5 +%169 = OpConstantComposite %12 %53 %53 %53 +%179 = OpTypeFunction %4 %8 %5 %5 +%187 = OpConstantComposite %12 %53 %53 %53 +%202 = OpConstantComposite %8 %53 %53 +%211 = OpTypeFunction %2 %5 %6 +%221 = OpTypeFunction %2 %8 %6 +%225 = OpConstantComposite %8 %53 %53 +%233 = OpTypeFunction %2 %8 %10 %6 +%239 = OpConstantComposite %12 %53 %53 %53 +%247 = OpTypeFunction %2 %8 %5 %6 +%252 = OpConstantComposite %12 %53 %53 %53 +%259 = OpTypeFunction %2 %12 %6 +%263 = OpConstantComposite %12 %53 %53 %53 +%268 = OpTypePointer Output %6 +%267 = OpVariable %268 Output +%270 = OpTypeFunction %2 +%280 = OpConstant %5 0 +%281 = OpConstantNull %8 +%282 = OpConstantNull %8 +%283 = OpConstant %10 0 +%284 = OpConstantNull %8 %285 = OpConstantNull %12 -%286 = OpConstantNull %15 -%287 = OpConstantNull %12 -%288 = OpConstantNull %10 -%289 = OpConstantNull %12 -%290 = OpConstantNull %10 -%291 = OpConstantNull %12 -%292 = OpConstantNull %10 -%293 = OpConstantNull %12 -%294 = OpConstantNull %10 -%295 = OpConstantNull %15 -%296 = OpConstantNull %10 -%51 = OpFunction %10 None %52 -%49 = OpFunctionParameter %4 -%50 = OpFunctionParameter %4 -%48 = OpLabel -%53 = OpLoad %9 %24 -OpBranch %54 -%54 = OpLabel -%55 = OpImageQueryLevels %4 %53 -%57 = OpISub %4 %55 %56 -%58 = OpExtInst %4 %1 UMin %50 %57 -%59 = OpImageQuerySizeLod %4 %53 %58 -%60 = OpISub %4 %59 %56 -%61 = OpExtInst %4 %1 UMin %49 %60 -%62 = OpImageFetch %10 %53 %61 Lod %58 -OpReturnValue %62 +%286 = OpConstantNull %8 +%287 = OpConstantNull %6 +%288 = OpConstantNull %8 +%289 = OpConstantNull %6 +%290 = OpConstantNull %8 +%291 = OpConstantNull %6 +%292 = OpConstantNull %8 +%293 = OpConstantNull %6 +%294 = OpConstantNull %12 +%295 = OpConstantNull %6 +%296 = OpConstant %4 0.0 +%48 = OpFunction %6 None %49 +%46 = OpFunctionParameter %5 +%47 = OpFunctionParameter %5 +%45 = OpLabel +%50 = OpLoad %3 %21 +OpBranch %51 +%51 = OpLabel +%52 = OpImageQueryLevels %5 %50 +%54 = OpISub %5 %52 %53 +%55 = OpExtInst %5 %1 UMin %47 %54 +%56 = OpImageQuerySizeLod %5 %50 %55 +%57 = OpISub %5 %56 %53 +%58 = OpExtInst %5 %1 UMin %46 %57 +%59 = OpImageFetch %6 %50 %58 Lod %55 +OpReturnValue %59 OpFunctionEnd -%66 = OpFunction %10 None %67 -%64 = OpFunctionParameter %12 -%65 = OpFunctionParameter %4 -%63 = OpLabel -%68 = OpLoad %11 %26 -OpBranch %69 -%69 = OpLabel -%70 = OpImageQueryLevels %4 %68 -%71 = OpISub %4 %70 %56 -%72 = OpExtInst %4 %1 UMin %65 %71 -%73 = OpImageQuerySizeLod %12 %68 %72 -%75 = OpISub %12 %73 %74 -%76 = OpExtInst %12 %1 UMin %64 %75 -%77 = OpImageFetch %10 %68 %76 Lod %72 -OpReturnValue %77 +%63 = OpFunction %6 None %64 +%61 = OpFunctionParameter %8 +%62 = OpFunctionParameter %5 +%60 = OpLabel +%65 = OpLoad %7 %23 +OpBranch %66 +%66 = OpLabel +%67 = OpImageQueryLevels %5 %65 +%68 = OpISub %5 %67 %53 +%69 = OpExtInst %5 %1 UMin %62 %68 +%70 = OpImageQuerySizeLod %8 %65 %69 +%72 = OpISub %8 %70 %71 +%73 = OpExtInst %8 %1 UMin %61 %72 +%74 = OpImageFetch %6 %65 %73 Lod %69 +OpReturnValue %74 OpFunctionEnd -%82 = OpFunction %10 None %83 -%79 = OpFunctionParameter %12 -%80 = OpFunctionParameter %6 -%81 = OpFunctionParameter %4 -%78 = OpLabel -%84 = OpLoad %13 %28 -OpBranch %85 -%85 = OpLabel -%86 = OpBitcast %4 %80 -%87 = OpCompositeConstruct %15 %79 %86 -%88 = OpImageQueryLevels %4 %84 -%89 = OpISub %4 %88 %56 -%90 = OpExtInst %4 %1 UMin %81 %89 -%91 = OpImageQuerySizeLod %15 %84 %90 -%93 = OpISub %15 %91 %92 -%94 = OpExtInst %15 %1 UMin %87 %93 -%95 = OpImageFetch %10 %84 %94 Lod %90 -OpReturnValue %95 +%79 = OpFunction %6 None %80 +%76 = OpFunctionParameter %8 +%77 = OpFunctionParameter %10 +%78 = OpFunctionParameter %5 +%75 = OpLabel +%81 = OpLoad %9 %25 +OpBranch %82 +%82 = OpLabel +%83 = OpBitcast %5 %77 +%84 = OpCompositeConstruct %12 %76 %83 +%85 = OpImageQueryLevels %5 %81 +%86 = OpISub %5 %85 %53 +%87 = OpExtInst %5 %1 UMin %78 %86 +%88 = OpImageQuerySizeLod %12 %81 %87 +%90 = OpISub %12 %88 %89 +%91 = OpExtInst %12 %1 UMin %84 %90 +%92 = OpImageFetch %6 %81 %91 Lod %87 +OpReturnValue %92 OpFunctionEnd -%100 = OpFunction %10 None %101 -%97 = OpFunctionParameter %12 -%98 = OpFunctionParameter %4 -%99 = OpFunctionParameter %4 -%96 = OpLabel -%102 = OpLoad %13 %28 -OpBranch %103 -%103 = OpLabel -%104 = OpCompositeConstruct %15 %97 %98 -%105 = OpImageQueryLevels %4 %102 -%106 = OpISub %4 %105 %56 -%107 = OpExtInst %4 %1 UMin %99 %106 -%108 = OpImageQuerySizeLod %15 %102 %107 -%110 = OpISub %15 %108 %109 -%111 = OpExtInst %15 %1 UMin %104 %110 -%112 = OpImageFetch %10 %102 %111 Lod %107 -OpReturnValue %112 +%97 = OpFunction %6 None %98 +%94 = OpFunctionParameter %8 +%95 = OpFunctionParameter %5 +%96 = OpFunctionParameter %5 +%93 = OpLabel +%99 = OpLoad %9 %25 +OpBranch %100 +%100 = OpLabel +%101 = OpCompositeConstruct %12 %94 %95 +%102 = OpImageQueryLevels %5 %99 +%103 = OpISub %5 %102 %53 +%104 = OpExtInst %5 %1 UMin %96 %103 +%105 = OpImageQuerySizeLod %12 %99 %104 +%107 = OpISub %12 %105 %106 +%108 = OpExtInst %12 %1 UMin %101 %107 +%109 = OpImageFetch %6 %99 %108 Lod %104 +OpReturnValue %109 OpFunctionEnd -%116 = OpFunction %10 None %117 -%114 = OpFunctionParameter %15 -%115 = OpFunctionParameter %4 -%113 = OpLabel -%118 = OpLoad %14 %30 -OpBranch %119 -%119 = OpLabel -%120 = OpImageQueryLevels %4 %118 -%121 = OpISub %4 %120 %56 -%122 = OpExtInst %4 %1 UMin %115 %121 -%123 = OpImageQuerySizeLod %15 %118 %122 -%125 = OpISub %15 %123 %124 -%126 = OpExtInst %15 %1 UMin %114 %125 -%127 = OpImageFetch %10 %118 %126 Lod %122 -OpReturnValue %127 +%113 = OpFunction %6 None %114 +%111 = OpFunctionParameter %12 +%112 = OpFunctionParameter %5 +%110 = OpLabel +%115 = OpLoad %11 %27 +OpBranch %116 +%116 = OpLabel +%117 = OpImageQueryLevels %5 %115 +%118 = OpISub %5 %117 %53 +%119 = OpExtInst %5 %1 UMin %112 %118 +%120 = OpImageQuerySizeLod %12 %115 %119 +%122 = OpISub %12 %120 %121 +%123 = OpExtInst %12 %1 UMin %111 %122 +%124 = OpImageFetch %6 %115 %123 Lod %119 +OpReturnValue %124 OpFunctionEnd -%131 = OpFunction %10 None %67 -%129 = OpFunctionParameter %12 -%130 = OpFunctionParameter %4 -%128 = OpLabel -%132 = OpLoad %16 %32 -OpBranch %133 -%133 = OpLabel -%134 = OpImageQuerySamples %4 %132 -%135 = OpISub %4 %134 %56 -%136 = OpExtInst %4 %1 UMin %130 %135 -%137 = OpImageQuerySize %12 %132 -%139 = OpISub %12 %137 %138 -%140 = OpExtInst %12 %1 UMin %129 %139 -%141 = OpImageFetch %10 %132 %140 Sample %136 -OpReturnValue %141 +%128 = OpFunction %6 None %64 +%126 = OpFunctionParameter %8 +%127 = OpFunctionParameter %5 +%125 = OpLabel +%129 = OpLoad %13 %29 +OpBranch %130 +%130 = OpLabel +%131 = OpImageQuerySamples %5 %129 +%132 = OpISub %5 %131 %53 +%133 = OpExtInst %5 %1 UMin %127 %132 +%134 = OpImageQuerySize %8 %129 +%136 = OpISub %8 %134 %135 +%137 = OpExtInst %8 %1 UMin %126 %136 +%138 = OpImageFetch %6 %129 %137 Sample %133 +OpReturnValue %138 OpFunctionEnd -%145 = OpFunction %8 None %146 -%143 = OpFunctionParameter %12 -%144 = OpFunctionParameter %4 -%142 = OpLabel -%147 = OpLoad %17 %34 -OpBranch %148 -%148 = OpLabel -%149 = OpImageQueryLevels %4 %147 -%150 = OpISub %4 %149 %56 -%151 = OpExtInst %4 %1 UMin %144 %150 -%152 = OpImageQuerySizeLod %12 %147 %151 -%154 = OpISub %12 %152 %153 -%155 = OpExtInst %12 %1 UMin %143 %154 -%156 = OpImageFetch %10 %147 %155 Lod %151 -%157 = OpCompositeExtract %8 %156 0 -OpReturnValue %157 +%142 = OpFunction %4 None %143 +%140 = OpFunctionParameter %8 +%141 = OpFunctionParameter %5 +%139 = OpLabel +%144 = OpLoad %14 %31 +OpBranch %145 +%145 = OpLabel +%146 = OpImageQueryLevels %5 %144 +%147 = OpISub %5 %146 %53 +%148 = OpExtInst %5 %1 UMin %141 %147 +%149 = OpImageQuerySizeLod %8 %144 %148 +%151 = OpISub %8 %149 %150 +%152 = OpExtInst %8 %1 UMin %140 %151 +%153 = OpImageFetch %6 %144 %152 Lod %148 +%154 = OpCompositeExtract %4 %153 0 +OpReturnValue %154 OpFunctionEnd -%162 = OpFunction %8 None %163 -%159 = OpFunctionParameter %12 -%160 = OpFunctionParameter %6 -%161 = OpFunctionParameter %4 -%158 = OpLabel -%164 = OpLoad %18 %36 -OpBranch %165 -%165 = OpLabel -%166 = OpBitcast %4 %160 -%167 = OpCompositeConstruct %15 %159 %166 -%168 = OpImageQueryLevels %4 %164 -%169 = OpISub %4 %168 %56 -%170 = OpExtInst %4 %1 UMin %161 %169 -%171 = OpImageQuerySizeLod %15 %164 %170 -%173 = OpISub %15 %171 %172 -%174 = OpExtInst %15 %1 UMin %167 %173 -%175 = OpImageFetch %10 %164 %174 Lod %170 -%176 = OpCompositeExtract %8 %175 0 -OpReturnValue %176 +%159 = OpFunction %4 None %160 +%156 = OpFunctionParameter %8 +%157 = OpFunctionParameter %10 +%158 = OpFunctionParameter %5 +%155 = OpLabel +%161 = OpLoad %15 %33 +OpBranch %162 +%162 = OpLabel +%163 = OpBitcast %5 %157 +%164 = OpCompositeConstruct %12 %156 %163 +%165 = OpImageQueryLevels %5 %161 +%166 = OpISub %5 %165 %53 +%167 = OpExtInst %5 %1 UMin %158 %166 +%168 = OpImageQuerySizeLod %12 %161 %167 +%170 = OpISub %12 %168 %169 +%171 = OpExtInst %12 %1 UMin %164 %170 +%172 = OpImageFetch %6 %161 %171 Lod %167 +%173 = OpCompositeExtract %4 %172 0 +OpReturnValue %173 OpFunctionEnd -%181 = OpFunction %8 None %182 -%178 = OpFunctionParameter %12 -%179 = OpFunctionParameter %4 -%180 = OpFunctionParameter %4 -%177 = OpLabel -%183 = OpLoad %18 %36 -OpBranch %184 -%184 = OpLabel -%185 = OpCompositeConstruct %15 %178 %179 -%186 = OpImageQueryLevels %4 %183 -%187 = OpISub %4 %186 %56 -%188 = OpExtInst %4 %1 UMin %180 %187 -%189 = OpImageQuerySizeLod %15 %183 %188 -%191 = OpISub %15 %189 %190 -%192 = OpExtInst %15 %1 UMin %185 %191 -%193 = OpImageFetch %10 %183 %192 Lod %188 -%194 = OpCompositeExtract %8 %193 0 -OpReturnValue %194 +%178 = OpFunction %4 None %179 +%175 = OpFunctionParameter %8 +%176 = OpFunctionParameter %5 +%177 = OpFunctionParameter %5 +%174 = OpLabel +%180 = OpLoad %15 %33 +OpBranch %181 +%181 = OpLabel +%182 = OpCompositeConstruct %12 %175 %176 +%183 = OpImageQueryLevels %5 %180 +%184 = OpISub %5 %183 %53 +%185 = OpExtInst %5 %1 UMin %177 %184 +%186 = OpImageQuerySizeLod %12 %180 %185 +%188 = OpISub %12 %186 %187 +%189 = OpExtInst %12 %1 UMin %182 %188 +%190 = OpImageFetch %6 %180 %189 Lod %185 +%191 = OpCompositeExtract %4 %190 0 +OpReturnValue %191 OpFunctionEnd -%198 = OpFunction %8 None %146 -%196 = OpFunctionParameter %12 -%197 = OpFunctionParameter %4 -%195 = OpLabel -%199 = OpLoad %19 %38 -OpBranch %200 -%200 = OpLabel -%201 = OpImageQuerySamples %4 %199 -%202 = OpISub %4 %201 %56 -%203 = OpExtInst %4 %1 UMin %197 %202 -%204 = OpImageQuerySize %12 %199 -%206 = OpISub %12 %204 %205 -%207 = OpExtInst %12 %1 UMin %196 %206 -%208 = OpImageFetch %10 %199 %207 Sample %203 -%209 = OpCompositeExtract %8 %208 0 -OpReturnValue %209 +%195 = OpFunction %4 None %143 +%193 = OpFunctionParameter %8 +%194 = OpFunctionParameter %5 +%192 = OpLabel +%196 = OpLoad %16 %35 +OpBranch %197 +%197 = OpLabel +%198 = OpImageQuerySamples %5 %196 +%199 = OpISub %5 %198 %53 +%200 = OpExtInst %5 %1 UMin %194 %199 +%201 = OpImageQuerySize %8 %196 +%203 = OpISub %8 %201 %202 +%204 = OpExtInst %8 %1 UMin %193 %203 +%205 = OpImageFetch %6 %196 %204 Sample %200 +%206 = OpCompositeExtract %4 %205 0 +OpReturnValue %206 OpFunctionEnd -%213 = OpFunction %2 None %214 -%211 = OpFunctionParameter %4 -%212 = OpFunctionParameter %10 -%210 = OpLabel -%215 = OpLoad %20 %40 -OpBranch %216 -%216 = OpLabel -%217 = OpImageQuerySize %4 %215 -%218 = OpISub %4 %217 %56 -%219 = OpExtInst %4 %1 UMin %211 %218 -OpImageWrite %215 %219 %212 +%210 = OpFunction %2 None %211 +%208 = OpFunctionParameter %5 +%209 = OpFunctionParameter %6 +%207 = OpLabel +%212 = OpLoad %17 %37 +OpBranch %213 +%213 = OpLabel +%214 = OpImageQuerySize %5 %212 +%215 = OpISub %5 %214 %53 +%216 = OpExtInst %5 %1 UMin %208 %215 +OpImageWrite %212 %216 %209 OpReturn OpFunctionEnd -%223 = OpFunction %2 None %224 -%221 = OpFunctionParameter %12 -%222 = OpFunctionParameter %10 -%220 = OpLabel -%225 = OpLoad %21 %42 -OpBranch %226 -%226 = OpLabel -%227 = OpImageQuerySize %12 %225 -%229 = OpISub %12 %227 %228 -%230 = OpExtInst %12 %1 UMin %221 %229 -OpImageWrite %225 %230 %222 +%220 = OpFunction %2 None %221 +%218 = OpFunctionParameter %8 +%219 = OpFunctionParameter %6 +%217 = OpLabel +%222 = OpLoad %18 %39 +OpBranch %223 +%223 = OpLabel +%224 = OpImageQuerySize %8 %222 +%226 = OpISub %8 %224 %225 +%227 = OpExtInst %8 %1 UMin %218 %226 +OpImageWrite %222 %227 %219 OpReturn OpFunctionEnd -%235 = OpFunction %2 None %236 -%232 = OpFunctionParameter %12 -%233 = OpFunctionParameter %6 -%234 = OpFunctionParameter %10 -%231 = OpLabel -%237 = OpLoad %22 %44 -OpBranch %238 -%238 = OpLabel -%239 = OpBitcast %4 %233 -%240 = OpCompositeConstruct %15 %232 %239 -%241 = OpImageQuerySize %15 %237 -%243 = OpISub %15 %241 %242 -%244 = OpExtInst %15 %1 UMin %240 %243 -OpImageWrite %237 %244 %234 +%232 = OpFunction %2 None %233 +%229 = OpFunctionParameter %8 +%230 = OpFunctionParameter %10 +%231 = OpFunctionParameter %6 +%228 = OpLabel +%234 = OpLoad %19 %41 +OpBranch %235 +%235 = OpLabel +%236 = OpBitcast %5 %230 +%237 = OpCompositeConstruct %12 %229 %236 +%238 = OpImageQuerySize %12 %234 +%240 = OpISub %12 %238 %239 +%241 = OpExtInst %12 %1 UMin %237 %240 +OpImageWrite %234 %241 %231 OpReturn OpFunctionEnd -%249 = OpFunction %2 None %250 -%246 = OpFunctionParameter %12 -%247 = OpFunctionParameter %4 -%248 = OpFunctionParameter %10 -%245 = OpLabel -%251 = OpLoad %22 %44 -OpBranch %252 -%252 = OpLabel -%253 = OpCompositeConstruct %15 %246 %247 -%254 = OpImageQuerySize %15 %251 -%256 = OpISub %15 %254 %255 -%257 = OpExtInst %15 %1 UMin %253 %256 -OpImageWrite %251 %257 %248 +%246 = OpFunction %2 None %247 +%243 = OpFunctionParameter %8 +%244 = OpFunctionParameter %5 +%245 = OpFunctionParameter %6 +%242 = OpLabel +%248 = OpLoad %19 %41 +OpBranch %249 +%249 = OpLabel +%250 = OpCompositeConstruct %12 %243 %244 +%251 = OpImageQuerySize %12 %248 +%253 = OpISub %12 %251 %252 +%254 = OpExtInst %12 %1 UMin %250 %253 +OpImageWrite %248 %254 %245 OpReturn OpFunctionEnd -%261 = OpFunction %2 None %262 -%259 = OpFunctionParameter %15 -%260 = OpFunctionParameter %10 -%258 = OpLabel -%263 = OpLoad %23 %46 -OpBranch %264 -%264 = OpLabel -%265 = OpImageQuerySize %15 %263 -%267 = OpISub %15 %265 %266 -%268 = OpExtInst %15 %1 UMin %259 %267 -OpImageWrite %263 %268 %260 +%258 = OpFunction %2 None %259 +%256 = OpFunctionParameter %12 +%257 = OpFunctionParameter %6 +%255 = OpLabel +%260 = OpLoad %20 %43 +OpBranch %261 +%261 = OpLabel +%262 = OpImageQuerySize %12 %260 +%264 = OpISub %12 %262 %263 +%265 = OpExtInst %12 %1 UMin %256 %264 +OpImageWrite %260 %265 %257 OpReturn OpFunctionEnd -%272 = OpFunction %2 None %273 -%269 = OpLabel -%274 = OpLoad %9 %24 -%275 = OpLoad %11 %26 -%276 = OpLoad %13 %28 -%277 = OpLoad %14 %30 -%278 = OpLoad %16 %32 -%279 = OpLoad %20 %40 -%280 = OpLoad %21 %42 -%281 = OpLoad %22 %44 -%282 = OpLoad %23 %46 +%269 = OpFunction %2 None %270 +%266 = OpLabel +%271 = OpLoad %3 %21 +%272 = OpLoad %7 %23 +%273 = OpLoad %9 %25 +%274 = OpLoad %11 %27 +%275 = OpLoad %13 %29 +%276 = OpLoad %17 %37 +%277 = OpLoad %18 %39 +%278 = OpLoad %19 %41 +%279 = OpLoad %20 %43 OpBranch %297 %297 = OpLabel -%298 = OpFunctionCall %10 %51 %3 %3 -%299 = OpFunctionCall %10 %66 %283 %3 -%300 = OpFunctionCall %10 %82 %284 %5 %3 -%301 = OpFunctionCall %10 %100 %285 %3 %3 -%302 = OpFunctionCall %10 %116 %286 %3 -%303 = OpFunctionCall %10 %131 %287 %3 -%304 = OpFunctionCall %2 %213 %3 %288 -%305 = OpFunctionCall %2 %223 %289 %290 -%306 = OpFunctionCall %2 %235 %291 %5 %292 -%307 = OpFunctionCall %2 %249 %293 %3 %294 -%308 = OpFunctionCall %2 %261 %295 %296 -%309 = OpCompositeConstruct %10 %7 %7 %7 %7 -OpStore %270 %309 +%298 = OpFunctionCall %6 %48 %280 %280 +%299 = OpFunctionCall %6 %63 %281 %280 +%300 = OpFunctionCall %6 %79 %282 %283 %280 +%301 = OpFunctionCall %6 %97 %284 %280 %280 +%302 = OpFunctionCall %6 %113 %285 %280 +%303 = OpFunctionCall %6 %128 %286 %280 +%304 = OpFunctionCall %2 %210 %280 %287 +%305 = OpFunctionCall %2 %220 %288 %289 +%306 = OpFunctionCall %2 %232 %290 %283 %291 +%307 = OpFunctionCall %2 %246 %292 %280 %293 +%308 = OpFunctionCall %2 %258 %294 %295 +%309 = OpCompositeConstruct %6 %296 %296 %296 %296 +OpStore %267 %309 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bounds-check-image-rzsw.spvasm b/tests/out/spv/bounds-check-image-rzsw.spvasm index 29a132a221..6228f45f91 100644 --- a/tests/out/spv/bounds-check-image-rzsw.spvasm +++ b/tests/out/spv/bounds-check-image-rzsw.spvasm @@ -8,553 +8,553 @@ OpCapability Shader OpCapability Sampled1D %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %309 "fragment_shader" %307 -OpExecutionMode %309 OriginUpperLeft +OpEntryPoint Fragment %306 "fragment_shader" %304 +OpExecutionMode %306 OriginUpperLeft OpSource GLSL 450 -OpName %24 "image_1d" -OpName %26 "image_2d" -OpName %28 "image_2d_array" -OpName %30 "image_3d" -OpName %32 "image_multisampled_2d" -OpName %34 "image_depth_2d" -OpName %36 "image_depth_2d_array" -OpName %38 "image_depth_multisampled_2d" -OpName %40 "image_storage_1d" -OpName %42 "image_storage_2d" -OpName %44 "image_storage_2d_array" -OpName %46 "image_storage_3d" -OpName %49 "coords" -OpName %50 "level" -OpName %51 "test_textureLoad_1d" -OpName %67 "coords" -OpName %68 "level" -OpName %69 "test_textureLoad_2d" -OpName %86 "coords" -OpName %87 "index" -OpName %88 "level" -OpName %89 "test_textureLoad_2d_array_u" -OpName %108 "coords" -OpName %109 "index" -OpName %110 "level" -OpName %111 "test_textureLoad_2d_array_s" -OpName %128 "coords" -OpName %129 "level" -OpName %130 "test_textureLoad_3d" -OpName %146 "coords" -OpName %147 "_sample" -OpName %148 "test_textureLoad_multisampled_2d" -OpName %163 "coords" -OpName %164 "level" -OpName %165 "test_textureLoad_depth_2d" -OpName %182 "coords" -OpName %183 "index" -OpName %184 "level" -OpName %185 "test_textureLoad_depth_2d_array_u" -OpName %204 "coords" -OpName %205 "index" -OpName %206 "level" -OpName %207 "test_textureLoad_depth_2d_array_s" -OpName %225 "coords" -OpName %226 "_sample" -OpName %227 "test_textureLoad_depth_multisampled_2d" -OpName %243 "coords" -OpName %244 "value" -OpName %245 "test_textureStore_1d" -OpName %254 "coords" -OpName %255 "value" -OpName %256 "test_textureStore_2d" -OpName %266 "coords" -OpName %267 "array_index" -OpName %268 "value" -OpName %269 "test_textureStore_2d_array_u" -OpName %281 "coords" -OpName %282 "array_index" -OpName %283 "value" -OpName %284 "test_textureStore_2d_array_s" -OpName %295 "coords" -OpName %296 "value" -OpName %297 "test_textureStore_3d" -OpName %309 "fragment_shader" -OpDecorate %24 DescriptorSet 0 -OpDecorate %24 Binding 0 -OpDecorate %26 DescriptorSet 0 -OpDecorate %26 Binding 1 -OpDecorate %28 DescriptorSet 0 -OpDecorate %28 Binding 2 -OpDecorate %30 DescriptorSet 0 -OpDecorate %30 Binding 3 -OpDecorate %32 DescriptorSet 0 -OpDecorate %32 Binding 4 -OpDecorate %34 DescriptorSet 0 -OpDecorate %34 Binding 5 -OpDecorate %36 DescriptorSet 0 -OpDecorate %36 Binding 6 -OpDecorate %38 DescriptorSet 0 -OpDecorate %38 Binding 7 -OpDecorate %40 NonReadable -OpDecorate %40 DescriptorSet 0 -OpDecorate %40 Binding 8 -OpDecorate %42 NonReadable -OpDecorate %42 DescriptorSet 0 -OpDecorate %42 Binding 9 -OpDecorate %44 NonReadable -OpDecorate %44 DescriptorSet 0 -OpDecorate %44 Binding 10 -OpDecorate %46 NonReadable -OpDecorate %46 DescriptorSet 0 -OpDecorate %46 Binding 11 -OpDecorate %307 Location 0 +OpName %21 "image_1d" +OpName %23 "image_2d" +OpName %25 "image_2d_array" +OpName %27 "image_3d" +OpName %29 "image_multisampled_2d" +OpName %31 "image_depth_2d" +OpName %33 "image_depth_2d_array" +OpName %35 "image_depth_multisampled_2d" +OpName %37 "image_storage_1d" +OpName %39 "image_storage_2d" +OpName %41 "image_storage_2d_array" +OpName %43 "image_storage_3d" +OpName %46 "coords" +OpName %47 "level" +OpName %48 "test_textureLoad_1d" +OpName %64 "coords" +OpName %65 "level" +OpName %66 "test_textureLoad_2d" +OpName %83 "coords" +OpName %84 "index" +OpName %85 "level" +OpName %86 "test_textureLoad_2d_array_u" +OpName %105 "coords" +OpName %106 "index" +OpName %107 "level" +OpName %108 "test_textureLoad_2d_array_s" +OpName %125 "coords" +OpName %126 "level" +OpName %127 "test_textureLoad_3d" +OpName %143 "coords" +OpName %144 "_sample" +OpName %145 "test_textureLoad_multisampled_2d" +OpName %160 "coords" +OpName %161 "level" +OpName %162 "test_textureLoad_depth_2d" +OpName %179 "coords" +OpName %180 "index" +OpName %181 "level" +OpName %182 "test_textureLoad_depth_2d_array_u" +OpName %201 "coords" +OpName %202 "index" +OpName %203 "level" +OpName %204 "test_textureLoad_depth_2d_array_s" +OpName %222 "coords" +OpName %223 "_sample" +OpName %224 "test_textureLoad_depth_multisampled_2d" +OpName %240 "coords" +OpName %241 "value" +OpName %242 "test_textureStore_1d" +OpName %251 "coords" +OpName %252 "value" +OpName %253 "test_textureStore_2d" +OpName %263 "coords" +OpName %264 "array_index" +OpName %265 "value" +OpName %266 "test_textureStore_2d_array_u" +OpName %278 "coords" +OpName %279 "array_index" +OpName %280 "value" +OpName %281 "test_textureStore_2d_array_s" +OpName %292 "coords" +OpName %293 "value" +OpName %294 "test_textureStore_3d" +OpName %306 "fragment_shader" +OpDecorate %21 DescriptorSet 0 +OpDecorate %21 Binding 0 +OpDecorate %23 DescriptorSet 0 +OpDecorate %23 Binding 1 +OpDecorate %25 DescriptorSet 0 +OpDecorate %25 Binding 2 +OpDecorate %27 DescriptorSet 0 +OpDecorate %27 Binding 3 +OpDecorate %29 DescriptorSet 0 +OpDecorate %29 Binding 4 +OpDecorate %31 DescriptorSet 0 +OpDecorate %31 Binding 5 +OpDecorate %33 DescriptorSet 0 +OpDecorate %33 Binding 6 +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 7 +OpDecorate %37 NonReadable +OpDecorate %37 DescriptorSet 0 +OpDecorate %37 Binding 8 +OpDecorate %39 NonReadable +OpDecorate %39 DescriptorSet 0 +OpDecorate %39 Binding 9 +OpDecorate %41 NonReadable +OpDecorate %41 DescriptorSet 0 +OpDecorate %41 Binding 10 +OpDecorate %43 NonReadable +OpDecorate %43 DescriptorSet 0 +OpDecorate %43 Binding 11 +OpDecorate %304 Location 0 %2 = OpTypeVoid -%4 = OpTypeInt 32 1 -%3 = OpConstant %4 0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 0 -%8 = OpTypeFloat 32 -%7 = OpConstant %8 0.0 -%9 = OpTypeImage %8 1D 0 0 0 1 Unknown -%10 = OpTypeVector %8 4 -%11 = OpTypeImage %8 2D 0 0 0 1 Unknown -%12 = OpTypeVector %4 2 -%13 = OpTypeImage %8 2D 0 1 0 1 Unknown -%14 = OpTypeImage %8 3D 0 0 0 1 Unknown -%15 = OpTypeVector %4 3 -%16 = OpTypeImage %8 2D 0 0 1 1 Unknown -%17 = OpTypeImage %8 2D 1 0 0 1 Unknown -%18 = OpTypeImage %8 2D 1 1 0 1 Unknown -%19 = OpTypeImage %8 2D 1 0 1 1 Unknown -%20 = OpTypeImage %8 1D 0 0 0 2 Rgba8 -%21 = OpTypeImage %8 2D 0 0 0 2 Rgba8 -%22 = OpTypeImage %8 2D 0 1 0 2 Rgba8 -%23 = OpTypeImage %8 3D 0 0 0 2 Rgba8 -%25 = OpTypePointer UniformConstant %9 -%24 = OpVariable %25 UniformConstant -%27 = OpTypePointer UniformConstant %11 -%26 = OpVariable %27 UniformConstant -%29 = OpTypePointer UniformConstant %13 -%28 = OpVariable %29 UniformConstant -%31 = OpTypePointer UniformConstant %14 -%30 = OpVariable %31 UniformConstant -%33 = OpTypePointer UniformConstant %16 -%32 = OpVariable %33 UniformConstant -%35 = OpTypePointer UniformConstant %17 -%34 = OpVariable %35 UniformConstant -%37 = OpTypePointer UniformConstant %18 -%36 = OpVariable %37 UniformConstant -%39 = OpTypePointer UniformConstant %19 -%38 = OpVariable %39 UniformConstant -%41 = OpTypePointer UniformConstant %20 -%40 = OpVariable %41 UniformConstant -%43 = OpTypePointer UniformConstant %21 -%42 = OpVariable %43 UniformConstant -%45 = OpTypePointer UniformConstant %22 -%44 = OpVariable %45 UniformConstant -%47 = OpTypePointer UniformConstant %23 -%46 = OpVariable %47 UniformConstant -%52 = OpTypeFunction %10 %4 %4 -%55 = OpTypeBool -%56 = OpConstantNull %10 -%70 = OpTypeFunction %10 %12 %4 -%73 = OpConstantNull %10 -%79 = OpTypeVector %55 2 -%90 = OpTypeFunction %10 %12 %6 %4 -%95 = OpConstantNull %10 -%101 = OpTypeVector %55 3 -%112 = OpTypeFunction %10 %12 %4 %4 -%116 = OpConstantNull %10 -%131 = OpTypeFunction %10 %15 %4 -%134 = OpConstantNull %10 -%151 = OpConstantNull %10 -%166 = OpTypeFunction %8 %12 %4 -%169 = OpConstantNull %10 -%186 = OpTypeFunction %8 %12 %6 %4 -%191 = OpConstantNull %10 -%208 = OpTypeFunction %8 %12 %4 %4 -%212 = OpConstantNull %10 -%230 = OpConstantNull %10 -%246 = OpTypeFunction %2 %4 %10 -%257 = OpTypeFunction %2 %12 %10 -%270 = OpTypeFunction %2 %12 %6 %10 -%285 = OpTypeFunction %2 %12 %4 %10 -%298 = OpTypeFunction %2 %15 %10 -%308 = OpTypePointer Output %10 -%307 = OpVariable %308 Output -%310 = OpTypeFunction %2 -%320 = OpConstantNull %12 -%321 = OpConstantNull %12 +%4 = OpTypeFloat 32 +%3 = OpTypeImage %4 1D 0 0 0 1 Unknown +%5 = OpTypeInt 32 1 +%6 = OpTypeVector %4 4 +%7 = OpTypeImage %4 2D 0 0 0 1 Unknown +%8 = OpTypeVector %5 2 +%9 = OpTypeImage %4 2D 0 1 0 1 Unknown +%10 = OpTypeInt 32 0 +%11 = OpTypeImage %4 3D 0 0 0 1 Unknown +%12 = OpTypeVector %5 3 +%13 = OpTypeImage %4 2D 0 0 1 1 Unknown +%14 = OpTypeImage %4 2D 1 0 0 1 Unknown +%15 = OpTypeImage %4 2D 1 1 0 1 Unknown +%16 = OpTypeImage %4 2D 1 0 1 1 Unknown +%17 = OpTypeImage %4 1D 0 0 0 2 Rgba8 +%18 = OpTypeImage %4 2D 0 0 0 2 Rgba8 +%19 = OpTypeImage %4 2D 0 1 0 2 Rgba8 +%20 = OpTypeImage %4 3D 0 0 0 2 Rgba8 +%22 = OpTypePointer UniformConstant %3 +%21 = OpVariable %22 UniformConstant +%24 = OpTypePointer UniformConstant %7 +%23 = OpVariable %24 UniformConstant +%26 = OpTypePointer UniformConstant %9 +%25 = OpVariable %26 UniformConstant +%28 = OpTypePointer UniformConstant %11 +%27 = OpVariable %28 UniformConstant +%30 = OpTypePointer UniformConstant %13 +%29 = OpVariable %30 UniformConstant +%32 = OpTypePointer UniformConstant %14 +%31 = OpVariable %32 UniformConstant +%34 = OpTypePointer UniformConstant %15 +%33 = OpVariable %34 UniformConstant +%36 = OpTypePointer UniformConstant %16 +%35 = OpVariable %36 UniformConstant +%38 = OpTypePointer UniformConstant %17 +%37 = OpVariable %38 UniformConstant +%40 = OpTypePointer UniformConstant %18 +%39 = OpVariable %40 UniformConstant +%42 = OpTypePointer UniformConstant %19 +%41 = OpVariable %42 UniformConstant +%44 = OpTypePointer UniformConstant %20 +%43 = OpVariable %44 UniformConstant +%49 = OpTypeFunction %6 %5 %5 +%52 = OpTypeBool +%53 = OpConstantNull %6 +%67 = OpTypeFunction %6 %8 %5 +%70 = OpConstantNull %6 +%76 = OpTypeVector %52 2 +%87 = OpTypeFunction %6 %8 %10 %5 +%92 = OpConstantNull %6 +%98 = OpTypeVector %52 3 +%109 = OpTypeFunction %6 %8 %5 %5 +%113 = OpConstantNull %6 +%128 = OpTypeFunction %6 %12 %5 +%131 = OpConstantNull %6 +%148 = OpConstantNull %6 +%163 = OpTypeFunction %4 %8 %5 +%166 = OpConstantNull %6 +%183 = OpTypeFunction %4 %8 %10 %5 +%188 = OpConstantNull %6 +%205 = OpTypeFunction %4 %8 %5 %5 +%209 = OpConstantNull %6 +%227 = OpConstantNull %6 +%243 = OpTypeFunction %2 %5 %6 +%254 = OpTypeFunction %2 %8 %6 +%267 = OpTypeFunction %2 %8 %10 %6 +%282 = OpTypeFunction %2 %8 %5 %6 +%295 = OpTypeFunction %2 %12 %6 +%305 = OpTypePointer Output %6 +%304 = OpVariable %305 Output +%307 = OpTypeFunction %2 +%317 = OpConstant %5 0 +%318 = OpConstantNull %8 +%319 = OpConstantNull %8 +%320 = OpConstant %10 0 +%321 = OpConstantNull %8 %322 = OpConstantNull %12 -%323 = OpConstantNull %15 -%324 = OpConstantNull %12 -%325 = OpConstantNull %10 -%326 = OpConstantNull %12 -%327 = OpConstantNull %10 -%328 = OpConstantNull %12 -%329 = OpConstantNull %10 -%330 = OpConstantNull %12 -%331 = OpConstantNull %10 -%332 = OpConstantNull %15 -%333 = OpConstantNull %10 -%51 = OpFunction %10 None %52 -%49 = OpFunctionParameter %4 -%50 = OpFunctionParameter %4 -%48 = OpLabel -%53 = OpLoad %9 %24 -OpBranch %54 -%54 = OpLabel -%57 = OpImageQueryLevels %4 %53 -%58 = OpULessThan %55 %50 %57 -OpSelectionMerge %59 None -OpBranchConditional %58 %60 %59 +%323 = OpConstantNull %8 +%324 = OpConstantNull %6 +%325 = OpConstantNull %8 +%326 = OpConstantNull %6 +%327 = OpConstantNull %8 +%328 = OpConstantNull %6 +%329 = OpConstantNull %8 +%330 = OpConstantNull %6 +%331 = OpConstantNull %12 +%332 = OpConstantNull %6 +%333 = OpConstant %4 0.0 +%48 = OpFunction %6 None %49 +%46 = OpFunctionParameter %5 +%47 = OpFunctionParameter %5 +%45 = OpLabel +%50 = OpLoad %3 %21 +OpBranch %51 +%51 = OpLabel +%54 = OpImageQueryLevels %5 %50 +%55 = OpULessThan %52 %47 %54 +OpSelectionMerge %56 None +OpBranchConditional %55 %57 %56 +%57 = OpLabel +%58 = OpImageQuerySizeLod %5 %50 %47 +%59 = OpULessThan %52 %46 %58 +OpBranchConditional %59 %60 %56 %60 = OpLabel -%61 = OpImageQuerySizeLod %4 %53 %50 -%62 = OpULessThan %55 %49 %61 -OpBranchConditional %62 %63 %59 +%61 = OpImageFetch %6 %50 %46 Lod %47 +OpBranch %56 +%56 = OpLabel +%62 = OpPhi %6 %53 %51 %53 %57 %61 %60 +OpReturnValue %62 +OpFunctionEnd +%66 = OpFunction %6 None %67 +%64 = OpFunctionParameter %8 +%65 = OpFunctionParameter %5 %63 = OpLabel -%64 = OpImageFetch %10 %53 %49 Lod %50 -OpBranch %59 -%59 = OpLabel -%65 = OpPhi %10 %56 %54 %56 %60 %64 %63 -OpReturnValue %65 +%68 = OpLoad %7 %23 +OpBranch %69 +%69 = OpLabel +%71 = OpImageQueryLevels %5 %68 +%72 = OpULessThan %52 %65 %71 +OpSelectionMerge %73 None +OpBranchConditional %72 %74 %73 +%74 = OpLabel +%75 = OpImageQuerySizeLod %8 %68 %65 +%77 = OpULessThan %76 %64 %75 +%78 = OpAll %52 %77 +OpBranchConditional %78 %79 %73 +%79 = OpLabel +%80 = OpImageFetch %6 %68 %64 Lod %65 +OpBranch %73 +%73 = OpLabel +%81 = OpPhi %6 %70 %69 %70 %74 %80 %79 +OpReturnValue %81 OpFunctionEnd -%69 = OpFunction %10 None %70 -%67 = OpFunctionParameter %12 -%68 = OpFunctionParameter %4 -%66 = OpLabel -%71 = OpLoad %11 %26 -OpBranch %72 -%72 = OpLabel -%74 = OpImageQueryLevels %4 %71 -%75 = OpULessThan %55 %68 %74 -OpSelectionMerge %76 None -OpBranchConditional %75 %77 %76 -%77 = OpLabel -%78 = OpImageQuerySizeLod %12 %71 %68 -%80 = OpULessThan %79 %67 %78 -%81 = OpAll %55 %80 -OpBranchConditional %81 %82 %76 +%86 = OpFunction %6 None %87 +%83 = OpFunctionParameter %8 +%84 = OpFunctionParameter %10 +%85 = OpFunctionParameter %5 %82 = OpLabel -%83 = OpImageFetch %10 %71 %67 Lod %68 -OpBranch %76 -%76 = OpLabel -%84 = OpPhi %10 %73 %72 %73 %77 %83 %82 -OpReturnValue %84 +%88 = OpLoad %9 %25 +OpBranch %89 +%89 = OpLabel +%90 = OpBitcast %5 %84 +%91 = OpCompositeConstruct %12 %83 %90 +%93 = OpImageQueryLevels %5 %88 +%94 = OpULessThan %52 %85 %93 +OpSelectionMerge %95 None +OpBranchConditional %94 %96 %95 +%96 = OpLabel +%97 = OpImageQuerySizeLod %12 %88 %85 +%99 = OpULessThan %98 %91 %97 +%100 = OpAll %52 %99 +OpBranchConditional %100 %101 %95 +%101 = OpLabel +%102 = OpImageFetch %6 %88 %91 Lod %85 +OpBranch %95 +%95 = OpLabel +%103 = OpPhi %6 %92 %89 %92 %96 %102 %101 +OpReturnValue %103 OpFunctionEnd -%89 = OpFunction %10 None %90 -%86 = OpFunctionParameter %12 -%87 = OpFunctionParameter %6 -%88 = OpFunctionParameter %4 -%85 = OpLabel -%91 = OpLoad %13 %28 -OpBranch %92 -%92 = OpLabel -%93 = OpBitcast %4 %87 -%94 = OpCompositeConstruct %15 %86 %93 -%96 = OpImageQueryLevels %4 %91 -%97 = OpULessThan %55 %88 %96 -OpSelectionMerge %98 None -OpBranchConditional %97 %99 %98 -%99 = OpLabel -%100 = OpImageQuerySizeLod %15 %91 %88 -%102 = OpULessThan %101 %94 %100 -%103 = OpAll %55 %102 -OpBranchConditional %103 %104 %98 +%108 = OpFunction %6 None %109 +%105 = OpFunctionParameter %8 +%106 = OpFunctionParameter %5 +%107 = OpFunctionParameter %5 %104 = OpLabel -%105 = OpImageFetch %10 %91 %94 Lod %88 -OpBranch %98 -%98 = OpLabel -%106 = OpPhi %10 %95 %92 %95 %99 %105 %104 -OpReturnValue %106 +%110 = OpLoad %9 %25 +OpBranch %111 +%111 = OpLabel +%112 = OpCompositeConstruct %12 %105 %106 +%114 = OpImageQueryLevels %5 %110 +%115 = OpULessThan %52 %107 %114 +OpSelectionMerge %116 None +OpBranchConditional %115 %117 %116 +%117 = OpLabel +%118 = OpImageQuerySizeLod %12 %110 %107 +%119 = OpULessThan %98 %112 %118 +%120 = OpAll %52 %119 +OpBranchConditional %120 %121 %116 +%121 = OpLabel +%122 = OpImageFetch %6 %110 %112 Lod %107 +OpBranch %116 +%116 = OpLabel +%123 = OpPhi %6 %113 %111 %113 %117 %122 %121 +OpReturnValue %123 OpFunctionEnd -%111 = OpFunction %10 None %112 -%108 = OpFunctionParameter %12 -%109 = OpFunctionParameter %4 -%110 = OpFunctionParameter %4 -%107 = OpLabel -%113 = OpLoad %13 %28 -OpBranch %114 -%114 = OpLabel -%115 = OpCompositeConstruct %15 %108 %109 -%117 = OpImageQueryLevels %4 %113 -%118 = OpULessThan %55 %110 %117 -OpSelectionMerge %119 None -OpBranchConditional %118 %120 %119 -%120 = OpLabel -%121 = OpImageQuerySizeLod %15 %113 %110 -%122 = OpULessThan %101 %115 %121 -%123 = OpAll %55 %122 -OpBranchConditional %123 %124 %119 +%127 = OpFunction %6 None %128 +%125 = OpFunctionParameter %12 +%126 = OpFunctionParameter %5 %124 = OpLabel -%125 = OpImageFetch %10 %113 %115 Lod %110 -OpBranch %119 -%119 = OpLabel -%126 = OpPhi %10 %116 %114 %116 %120 %125 %124 -OpReturnValue %126 +%129 = OpLoad %11 %27 +OpBranch %130 +%130 = OpLabel +%132 = OpImageQueryLevels %5 %129 +%133 = OpULessThan %52 %126 %132 +OpSelectionMerge %134 None +OpBranchConditional %133 %135 %134 +%135 = OpLabel +%136 = OpImageQuerySizeLod %12 %129 %126 +%137 = OpULessThan %98 %125 %136 +%138 = OpAll %52 %137 +OpBranchConditional %138 %139 %134 +%139 = OpLabel +%140 = OpImageFetch %6 %129 %125 Lod %126 +OpBranch %134 +%134 = OpLabel +%141 = OpPhi %6 %131 %130 %131 %135 %140 %139 +OpReturnValue %141 OpFunctionEnd -%130 = OpFunction %10 None %131 -%128 = OpFunctionParameter %15 -%129 = OpFunctionParameter %4 -%127 = OpLabel -%132 = OpLoad %14 %30 -OpBranch %133 -%133 = OpLabel -%135 = OpImageQueryLevels %4 %132 -%136 = OpULessThan %55 %129 %135 -OpSelectionMerge %137 None -OpBranchConditional %136 %138 %137 -%138 = OpLabel -%139 = OpImageQuerySizeLod %15 %132 %129 -%140 = OpULessThan %101 %128 %139 -%141 = OpAll %55 %140 -OpBranchConditional %141 %142 %137 +%145 = OpFunction %6 None %67 +%143 = OpFunctionParameter %8 +%144 = OpFunctionParameter %5 %142 = OpLabel -%143 = OpImageFetch %10 %132 %128 Lod %129 -OpBranch %137 -%137 = OpLabel -%144 = OpPhi %10 %134 %133 %134 %138 %143 %142 -OpReturnValue %144 +%146 = OpLoad %13 %29 +OpBranch %147 +%147 = OpLabel +%149 = OpImageQuerySamples %5 %146 +%150 = OpULessThan %52 %144 %149 +OpSelectionMerge %151 None +OpBranchConditional %150 %152 %151 +%152 = OpLabel +%153 = OpImageQuerySize %8 %146 +%154 = OpULessThan %76 %143 %153 +%155 = OpAll %52 %154 +OpBranchConditional %155 %156 %151 +%156 = OpLabel +%157 = OpImageFetch %6 %146 %143 Sample %144 +OpBranch %151 +%151 = OpLabel +%158 = OpPhi %6 %148 %147 %148 %152 %157 %156 +OpReturnValue %158 OpFunctionEnd -%148 = OpFunction %10 None %70 -%146 = OpFunctionParameter %12 -%147 = OpFunctionParameter %4 -%145 = OpLabel -%149 = OpLoad %16 %32 -OpBranch %150 -%150 = OpLabel -%152 = OpImageQuerySamples %4 %149 -%153 = OpULessThan %55 %147 %152 -OpSelectionMerge %154 None -OpBranchConditional %153 %155 %154 -%155 = OpLabel -%156 = OpImageQuerySize %12 %149 -%157 = OpULessThan %79 %146 %156 -%158 = OpAll %55 %157 -OpBranchConditional %158 %159 %154 +%162 = OpFunction %4 None %163 +%160 = OpFunctionParameter %8 +%161 = OpFunctionParameter %5 %159 = OpLabel -%160 = OpImageFetch %10 %149 %146 Sample %147 -OpBranch %154 -%154 = OpLabel -%161 = OpPhi %10 %151 %150 %151 %155 %160 %159 -OpReturnValue %161 +%164 = OpLoad %14 %31 +OpBranch %165 +%165 = OpLabel +%167 = OpImageQueryLevels %5 %164 +%168 = OpULessThan %52 %161 %167 +OpSelectionMerge %169 None +OpBranchConditional %168 %170 %169 +%170 = OpLabel +%171 = OpImageQuerySizeLod %8 %164 %161 +%172 = OpULessThan %76 %160 %171 +%173 = OpAll %52 %172 +OpBranchConditional %173 %174 %169 +%174 = OpLabel +%175 = OpImageFetch %6 %164 %160 Lod %161 +OpBranch %169 +%169 = OpLabel +%176 = OpPhi %6 %166 %165 %166 %170 %175 %174 +%177 = OpCompositeExtract %4 %176 0 +OpReturnValue %177 OpFunctionEnd -%165 = OpFunction %8 None %166 -%163 = OpFunctionParameter %12 -%164 = OpFunctionParameter %4 -%162 = OpLabel -%167 = OpLoad %17 %34 -OpBranch %168 -%168 = OpLabel -%170 = OpImageQueryLevels %4 %167 -%171 = OpULessThan %55 %164 %170 -OpSelectionMerge %172 None -OpBranchConditional %171 %173 %172 -%173 = OpLabel -%174 = OpImageQuerySizeLod %12 %167 %164 -%175 = OpULessThan %79 %163 %174 -%176 = OpAll %55 %175 -OpBranchConditional %176 %177 %172 -%177 = OpLabel -%178 = OpImageFetch %10 %167 %163 Lod %164 -OpBranch %172 -%172 = OpLabel -%179 = OpPhi %10 %169 %168 %169 %173 %178 %177 -%180 = OpCompositeExtract %8 %179 0 -OpReturnValue %180 +%182 = OpFunction %4 None %183 +%179 = OpFunctionParameter %8 +%180 = OpFunctionParameter %10 +%181 = OpFunctionParameter %5 +%178 = OpLabel +%184 = OpLoad %15 %33 +OpBranch %185 +%185 = OpLabel +%186 = OpBitcast %5 %180 +%187 = OpCompositeConstruct %12 %179 %186 +%189 = OpImageQueryLevels %5 %184 +%190 = OpULessThan %52 %181 %189 +OpSelectionMerge %191 None +OpBranchConditional %190 %192 %191 +%192 = OpLabel +%193 = OpImageQuerySizeLod %12 %184 %181 +%194 = OpULessThan %98 %187 %193 +%195 = OpAll %52 %194 +OpBranchConditional %195 %196 %191 +%196 = OpLabel +%197 = OpImageFetch %6 %184 %187 Lod %181 +OpBranch %191 +%191 = OpLabel +%198 = OpPhi %6 %188 %185 %188 %192 %197 %196 +%199 = OpCompositeExtract %4 %198 0 +OpReturnValue %199 OpFunctionEnd -%185 = OpFunction %8 None %186 -%182 = OpFunctionParameter %12 -%183 = OpFunctionParameter %6 -%184 = OpFunctionParameter %4 -%181 = OpLabel -%187 = OpLoad %18 %36 -OpBranch %188 -%188 = OpLabel -%189 = OpBitcast %4 %183 -%190 = OpCompositeConstruct %15 %182 %189 -%192 = OpImageQueryLevels %4 %187 -%193 = OpULessThan %55 %184 %192 -OpSelectionMerge %194 None -OpBranchConditional %193 %195 %194 -%195 = OpLabel -%196 = OpImageQuerySizeLod %15 %187 %184 -%197 = OpULessThan %101 %190 %196 -%198 = OpAll %55 %197 -OpBranchConditional %198 %199 %194 -%199 = OpLabel -%200 = OpImageFetch %10 %187 %190 Lod %184 -OpBranch %194 -%194 = OpLabel -%201 = OpPhi %10 %191 %188 %191 %195 %200 %199 -%202 = OpCompositeExtract %8 %201 0 -OpReturnValue %202 +%204 = OpFunction %4 None %205 +%201 = OpFunctionParameter %8 +%202 = OpFunctionParameter %5 +%203 = OpFunctionParameter %5 +%200 = OpLabel +%206 = OpLoad %15 %33 +OpBranch %207 +%207 = OpLabel +%208 = OpCompositeConstruct %12 %201 %202 +%210 = OpImageQueryLevels %5 %206 +%211 = OpULessThan %52 %203 %210 +OpSelectionMerge %212 None +OpBranchConditional %211 %213 %212 +%213 = OpLabel +%214 = OpImageQuerySizeLod %12 %206 %203 +%215 = OpULessThan %98 %208 %214 +%216 = OpAll %52 %215 +OpBranchConditional %216 %217 %212 +%217 = OpLabel +%218 = OpImageFetch %6 %206 %208 Lod %203 +OpBranch %212 +%212 = OpLabel +%219 = OpPhi %6 %209 %207 %209 %213 %218 %217 +%220 = OpCompositeExtract %4 %219 0 +OpReturnValue %220 OpFunctionEnd -%207 = OpFunction %8 None %208 -%204 = OpFunctionParameter %12 -%205 = OpFunctionParameter %4 -%206 = OpFunctionParameter %4 -%203 = OpLabel -%209 = OpLoad %18 %36 -OpBranch %210 -%210 = OpLabel -%211 = OpCompositeConstruct %15 %204 %205 -%213 = OpImageQueryLevels %4 %209 -%214 = OpULessThan %55 %206 %213 -OpSelectionMerge %215 None -OpBranchConditional %214 %216 %215 -%216 = OpLabel -%217 = OpImageQuerySizeLod %15 %209 %206 -%218 = OpULessThan %101 %211 %217 -%219 = OpAll %55 %218 -OpBranchConditional %219 %220 %215 -%220 = OpLabel -%221 = OpImageFetch %10 %209 %211 Lod %206 -OpBranch %215 -%215 = OpLabel -%222 = OpPhi %10 %212 %210 %212 %216 %221 %220 -%223 = OpCompositeExtract %8 %222 0 -OpReturnValue %223 +%224 = OpFunction %4 None %163 +%222 = OpFunctionParameter %8 +%223 = OpFunctionParameter %5 +%221 = OpLabel +%225 = OpLoad %16 %35 +OpBranch %226 +%226 = OpLabel +%228 = OpImageQuerySamples %5 %225 +%229 = OpULessThan %52 %223 %228 +OpSelectionMerge %230 None +OpBranchConditional %229 %231 %230 +%231 = OpLabel +%232 = OpImageQuerySize %8 %225 +%233 = OpULessThan %76 %222 %232 +%234 = OpAll %52 %233 +OpBranchConditional %234 %235 %230 +%235 = OpLabel +%236 = OpImageFetch %6 %225 %222 Sample %223 +OpBranch %230 +%230 = OpLabel +%237 = OpPhi %6 %227 %226 %227 %231 %236 %235 +%238 = OpCompositeExtract %4 %237 0 +OpReturnValue %238 OpFunctionEnd -%227 = OpFunction %8 None %166 -%225 = OpFunctionParameter %12 -%226 = OpFunctionParameter %4 -%224 = OpLabel -%228 = OpLoad %19 %38 -OpBranch %229 -%229 = OpLabel -%231 = OpImageQuerySamples %4 %228 -%232 = OpULessThan %55 %226 %231 -OpSelectionMerge %233 None -OpBranchConditional %232 %234 %233 -%234 = OpLabel -%235 = OpImageQuerySize %12 %228 -%236 = OpULessThan %79 %225 %235 -%237 = OpAll %55 %236 -OpBranchConditional %237 %238 %233 -%238 = OpLabel -%239 = OpImageFetch %10 %228 %225 Sample %226 -OpBranch %233 -%233 = OpLabel -%240 = OpPhi %10 %230 %229 %230 %234 %239 %238 -%241 = OpCompositeExtract %8 %240 0 -OpReturnValue %241 -OpFunctionEnd -%245 = OpFunction %2 None %246 -%243 = OpFunctionParameter %4 -%244 = OpFunctionParameter %10 -%242 = OpLabel -%247 = OpLoad %20 %40 +%242 = OpFunction %2 None %243 +%240 = OpFunctionParameter %5 +%241 = OpFunctionParameter %6 +%239 = OpLabel +%244 = OpLoad %17 %37 +OpBranch %245 +%245 = OpLabel +%246 = OpImageQuerySize %5 %244 +%247 = OpULessThan %52 %240 %246 +OpSelectionMerge %248 None +OpBranchConditional %247 %249 %248 +%249 = OpLabel +OpImageWrite %244 %240 %241 OpBranch %248 %248 = OpLabel -%249 = OpImageQuerySize %4 %247 -%250 = OpULessThan %55 %243 %249 -OpSelectionMerge %251 None -OpBranchConditional %250 %252 %251 -%252 = OpLabel -OpImageWrite %247 %243 %244 -OpBranch %251 -%251 = OpLabel OpReturn OpFunctionEnd -%256 = OpFunction %2 None %257 -%254 = OpFunctionParameter %12 -%255 = OpFunctionParameter %10 -%253 = OpLabel -%258 = OpLoad %21 %42 -OpBranch %259 -%259 = OpLabel -%260 = OpImageQuerySize %12 %258 -%261 = OpULessThan %79 %254 %260 -%262 = OpAll %55 %261 -OpSelectionMerge %263 None -OpBranchConditional %262 %264 %263 -%264 = OpLabel -OpImageWrite %258 %254 %255 -OpBranch %263 -%263 = OpLabel +%253 = OpFunction %2 None %254 +%251 = OpFunctionParameter %8 +%252 = OpFunctionParameter %6 +%250 = OpLabel +%255 = OpLoad %18 %39 +OpBranch %256 +%256 = OpLabel +%257 = OpImageQuerySize %8 %255 +%258 = OpULessThan %76 %251 %257 +%259 = OpAll %52 %258 +OpSelectionMerge %260 None +OpBranchConditional %259 %261 %260 +%261 = OpLabel +OpImageWrite %255 %251 %252 +OpBranch %260 +%260 = OpLabel OpReturn OpFunctionEnd -%269 = OpFunction %2 None %270 -%266 = OpFunctionParameter %12 -%267 = OpFunctionParameter %6 -%268 = OpFunctionParameter %10 -%265 = OpLabel -%271 = OpLoad %22 %44 -OpBranch %272 -%272 = OpLabel -%273 = OpBitcast %4 %267 -%274 = OpCompositeConstruct %15 %266 %273 -%275 = OpImageQuerySize %15 %271 -%276 = OpULessThan %101 %274 %275 -%277 = OpAll %55 %276 -OpSelectionMerge %278 None -OpBranchConditional %277 %279 %278 -%279 = OpLabel -OpImageWrite %271 %274 %268 -OpBranch %278 -%278 = OpLabel +%266 = OpFunction %2 None %267 +%263 = OpFunctionParameter %8 +%264 = OpFunctionParameter %10 +%265 = OpFunctionParameter %6 +%262 = OpLabel +%268 = OpLoad %19 %41 +OpBranch %269 +%269 = OpLabel +%270 = OpBitcast %5 %264 +%271 = OpCompositeConstruct %12 %263 %270 +%272 = OpImageQuerySize %12 %268 +%273 = OpULessThan %98 %271 %272 +%274 = OpAll %52 %273 +OpSelectionMerge %275 None +OpBranchConditional %274 %276 %275 +%276 = OpLabel +OpImageWrite %268 %271 %265 +OpBranch %275 +%275 = OpLabel OpReturn OpFunctionEnd -%284 = OpFunction %2 None %285 -%281 = OpFunctionParameter %12 -%282 = OpFunctionParameter %4 -%283 = OpFunctionParameter %10 -%280 = OpLabel -%286 = OpLoad %22 %44 -OpBranch %287 -%287 = OpLabel -%288 = OpCompositeConstruct %15 %281 %282 -%289 = OpImageQuerySize %15 %286 -%290 = OpULessThan %101 %288 %289 -%291 = OpAll %55 %290 -OpSelectionMerge %292 None -OpBranchConditional %291 %293 %292 -%293 = OpLabel -OpImageWrite %286 %288 %283 -OpBranch %292 -%292 = OpLabel +%281 = OpFunction %2 None %282 +%278 = OpFunctionParameter %8 +%279 = OpFunctionParameter %5 +%280 = OpFunctionParameter %6 +%277 = OpLabel +%283 = OpLoad %19 %41 +OpBranch %284 +%284 = OpLabel +%285 = OpCompositeConstruct %12 %278 %279 +%286 = OpImageQuerySize %12 %283 +%287 = OpULessThan %98 %285 %286 +%288 = OpAll %52 %287 +OpSelectionMerge %289 None +OpBranchConditional %288 %290 %289 +%290 = OpLabel +OpImageWrite %283 %285 %280 +OpBranch %289 +%289 = OpLabel OpReturn OpFunctionEnd -%297 = OpFunction %2 None %298 -%295 = OpFunctionParameter %15 -%296 = OpFunctionParameter %10 -%294 = OpLabel -%299 = OpLoad %23 %46 -OpBranch %300 -%300 = OpLabel -%301 = OpImageQuerySize %15 %299 -%302 = OpULessThan %101 %295 %301 -%303 = OpAll %55 %302 -OpSelectionMerge %304 None -OpBranchConditional %303 %305 %304 -%305 = OpLabel -OpImageWrite %299 %295 %296 -OpBranch %304 -%304 = OpLabel +%294 = OpFunction %2 None %295 +%292 = OpFunctionParameter %12 +%293 = OpFunctionParameter %6 +%291 = OpLabel +%296 = OpLoad %20 %43 +OpBranch %297 +%297 = OpLabel +%298 = OpImageQuerySize %12 %296 +%299 = OpULessThan %98 %292 %298 +%300 = OpAll %52 %299 +OpSelectionMerge %301 None +OpBranchConditional %300 %302 %301 +%302 = OpLabel +OpImageWrite %296 %292 %293 +OpBranch %301 +%301 = OpLabel OpReturn OpFunctionEnd -%309 = OpFunction %2 None %310 -%306 = OpLabel -%311 = OpLoad %9 %24 -%312 = OpLoad %11 %26 -%313 = OpLoad %13 %28 -%314 = OpLoad %14 %30 -%315 = OpLoad %16 %32 -%316 = OpLoad %20 %40 -%317 = OpLoad %21 %42 -%318 = OpLoad %22 %44 -%319 = OpLoad %23 %46 +%306 = OpFunction %2 None %307 +%303 = OpLabel +%308 = OpLoad %3 %21 +%309 = OpLoad %7 %23 +%310 = OpLoad %9 %25 +%311 = OpLoad %11 %27 +%312 = OpLoad %13 %29 +%313 = OpLoad %17 %37 +%314 = OpLoad %18 %39 +%315 = OpLoad %19 %41 +%316 = OpLoad %20 %43 OpBranch %334 %334 = OpLabel -%335 = OpFunctionCall %10 %51 %3 %3 -%336 = OpFunctionCall %10 %69 %320 %3 -%337 = OpFunctionCall %10 %89 %321 %5 %3 -%338 = OpFunctionCall %10 %111 %322 %3 %3 -%339 = OpFunctionCall %10 %130 %323 %3 -%340 = OpFunctionCall %10 %148 %324 %3 -%341 = OpFunctionCall %2 %245 %3 %325 -%342 = OpFunctionCall %2 %256 %326 %327 -%343 = OpFunctionCall %2 %269 %328 %5 %329 -%344 = OpFunctionCall %2 %284 %330 %3 %331 -%345 = OpFunctionCall %2 %297 %332 %333 -%346 = OpCompositeConstruct %10 %7 %7 %7 %7 -OpStore %307 %346 +%335 = OpFunctionCall %6 %48 %317 %317 +%336 = OpFunctionCall %6 %66 %318 %317 +%337 = OpFunctionCall %6 %86 %319 %320 %317 +%338 = OpFunctionCall %6 %108 %321 %317 %317 +%339 = OpFunctionCall %6 %127 %322 %317 +%340 = OpFunctionCall %6 %145 %323 %317 +%341 = OpFunctionCall %2 %242 %317 %324 +%342 = OpFunctionCall %2 %253 %325 %326 +%343 = OpFunctionCall %2 %266 %327 %320 %328 +%344 = OpFunctionCall %2 %281 %329 %317 %330 +%345 = OpFunctionCall %2 %294 %331 %332 +%346 = OpCompositeConstruct %6 %333 %333 %333 %333 +OpStore %304 %346 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bounds-check-restrict.spvasm b/tests/out/spv/bounds-check-restrict.spvasm index 1927123467..7977495aa2 100644 --- a/tests/out/spv/bounds-check-restrict.spvasm +++ b/tests/out/spv/bounds-check-restrict.spvasm @@ -7,232 +7,232 @@ OpCapability Linkage OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpDecorate %10 ArrayStride 4 -OpDecorate %13 ArrayStride 4 -OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 48 -OpMemberDecorate %14 2 Offset 64 -OpMemberDecorate %14 2 ColMajor -OpMemberDecorate %14 2 MatrixStride 16 -OpMemberDecorate %14 3 Offset 112 -OpDecorate %15 DescriptorSet 0 -OpDecorate %15 Binding 0 -OpDecorate %14 Block +OpDecorate %6 ArrayStride 4 +OpDecorate %9 ArrayStride 4 +OpMemberDecorate %10 0 Offset 0 +OpMemberDecorate %10 1 Offset 48 +OpMemberDecorate %10 2 Offset 64 +OpMemberDecorate %10 2 ColMajor +OpMemberDecorate %10 2 MatrixStride 16 +OpMemberDecorate %10 3 Offset 112 +OpDecorate %11 DescriptorSet 0 +OpDecorate %11 Binding 0 +OpDecorate %10 Block %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 10 -%6 = OpTypeFloat 32 -%5 = OpConstant %6 100.0 -%7 = OpConstant %4 9 -%8 = OpConstant %4 3 -%9 = OpConstant %4 2 -%10 = OpTypeArray %6 %3 -%11 = OpTypeVector %6 4 -%12 = OpTypeMatrix %11 3 -%13 = OpTypeRuntimeArray %6 -%14 = OpTypeStruct %10 %11 %12 %13 -%16 = OpTypePointer StorageBuffer %14 -%15 = OpVariable %16 StorageBuffer -%20 = OpTypeFunction %6 %4 -%22 = OpTypePointer StorageBuffer %10 -%23 = OpTypePointer StorageBuffer %6 -%25 = OpTypeInt 32 0 -%24 = OpConstant %25 9 -%27 = OpConstant %25 0 -%34 = OpTypePointer StorageBuffer %13 -%36 = OpConstant %25 1 -%39 = OpConstant %25 3 -%46 = OpTypePointer StorageBuffer %11 -%47 = OpTypePointer StorageBuffer %6 -%55 = OpTypeFunction %6 %11 %4 -%62 = OpTypeFunction %11 %4 -%64 = OpTypePointer StorageBuffer %12 -%65 = OpTypePointer StorageBuffer %11 -%66 = OpConstant %25 2 -%74 = OpTypeFunction %6 %4 %4 -%94 = OpTypeFunction %6 -%108 = OpTypeFunction %2 %4 %6 -%132 = OpTypeFunction %2 %4 %11 -%141 = OpTypeFunction %2 %4 %4 %6 -%161 = OpTypeFunction %2 %6 -%19 = OpFunction %6 None %20 -%18 = OpFunctionParameter %4 +%5 = OpTypeFloat 32 +%6 = OpTypeArray %5 %3 +%7 = OpTypeVector %5 4 +%8 = OpTypeMatrix %7 3 +%9 = OpTypeRuntimeArray %5 +%10 = OpTypeStruct %6 %7 %8 %9 +%12 = OpTypePointer StorageBuffer %10 +%11 = OpVariable %12 StorageBuffer +%16 = OpTypeFunction %5 %4 +%18 = OpTypePointer StorageBuffer %6 +%19 = OpTypePointer StorageBuffer %5 +%21 = OpTypeInt 32 0 +%20 = OpConstant %21 9 +%23 = OpConstant %21 0 +%30 = OpTypePointer StorageBuffer %9 +%32 = OpConstant %21 1 +%35 = OpConstant %21 3 +%42 = OpTypePointer StorageBuffer %7 +%43 = OpTypePointer StorageBuffer %5 +%51 = OpTypeFunction %5 %7 %4 +%58 = OpTypeFunction %7 %4 +%60 = OpTypePointer StorageBuffer %8 +%61 = OpTypePointer StorageBuffer %7 +%62 = OpConstant %21 2 +%70 = OpTypeFunction %5 %4 %4 +%79 = OpConstant %5 100.0 +%91 = OpTypeFunction %5 +%92 = OpConstant %4 9 +%93 = OpConstant %4 3 +%94 = OpConstant %4 2 +%108 = OpTypeFunction %2 %4 %5 +%132 = OpTypeFunction %2 %4 %7 +%141 = OpTypeFunction %2 %4 %4 %5 +%161 = OpTypeFunction %2 %5 +%15 = OpFunction %5 None %16 +%14 = OpFunctionParameter %4 +%13 = OpLabel +OpBranch %17 %17 = OpLabel -OpBranch %21 -%21 = OpLabel -%26 = OpExtInst %25 %1 UMin %18 %24 -%28 = OpAccessChain %23 %15 %27 %26 -%29 = OpLoad %6 %28 -OpReturnValue %29 +%22 = OpExtInst %21 %1 UMin %14 %20 +%24 = OpAccessChain %19 %11 %23 %22 +%25 = OpLoad %5 %24 +OpReturnValue %25 OpFunctionEnd -%32 = OpFunction %6 None %20 -%31 = OpFunctionParameter %4 -%30 = OpLabel -OpBranch %33 -%33 = OpLabel -%35 = OpArrayLength %25 %15 3 -%37 = OpISub %25 %35 %36 -%38 = OpExtInst %25 %1 UMin %31 %37 -%40 = OpAccessChain %23 %15 %39 %38 -%41 = OpLoad %6 %40 -OpReturnValue %41 +%28 = OpFunction %5 None %16 +%27 = OpFunctionParameter %4 +%26 = OpLabel +OpBranch %29 +%29 = OpLabel +%31 = OpArrayLength %21 %11 3 +%33 = OpISub %21 %31 %32 +%34 = OpExtInst %21 %1 UMin %27 %33 +%36 = OpAccessChain %19 %11 %35 %34 +%37 = OpLoad %5 %36 +OpReturnValue %37 OpFunctionEnd -%44 = OpFunction %6 None %20 -%43 = OpFunctionParameter %4 -%42 = OpLabel -OpBranch %45 -%45 = OpLabel -%48 = OpExtInst %25 %1 UMin %43 %39 -%49 = OpAccessChain %47 %15 %36 %48 -%50 = OpLoad %6 %49 -OpReturnValue %50 +%40 = OpFunction %5 None %16 +%39 = OpFunctionParameter %4 +%38 = OpLabel +OpBranch %41 +%41 = OpLabel +%44 = OpExtInst %21 %1 UMin %39 %35 +%45 = OpAccessChain %43 %11 %32 %44 +%46 = OpLoad %5 %45 +OpReturnValue %46 OpFunctionEnd -%54 = OpFunction %6 None %55 -%52 = OpFunctionParameter %11 -%53 = OpFunctionParameter %4 -%51 = OpLabel -OpBranch %56 -%56 = OpLabel -%57 = OpExtInst %25 %1 UMin %53 %39 -%58 = OpVectorExtractDynamic %6 %52 %57 -OpReturnValue %58 +%50 = OpFunction %5 None %51 +%48 = OpFunctionParameter %7 +%49 = OpFunctionParameter %4 +%47 = OpLabel +OpBranch %52 +%52 = OpLabel +%53 = OpExtInst %21 %1 UMin %49 %35 +%54 = OpVectorExtractDynamic %5 %48 %53 +OpReturnValue %54 OpFunctionEnd -%61 = OpFunction %11 None %62 -%60 = OpFunctionParameter %4 +%57 = OpFunction %7 None %58 +%56 = OpFunctionParameter %4 +%55 = OpLabel +OpBranch %59 %59 = OpLabel -OpBranch %63 -%63 = OpLabel -%67 = OpExtInst %25 %1 UMin %60 %66 -%68 = OpAccessChain %65 %15 %66 %67 -%69 = OpLoad %11 %68 -OpReturnValue %69 +%63 = OpExtInst %21 %1 UMin %56 %62 +%64 = OpAccessChain %61 %11 %62 %63 +%65 = OpLoad %7 %64 +OpReturnValue %65 OpFunctionEnd -%73 = OpFunction %6 None %74 -%71 = OpFunctionParameter %4 -%72 = OpFunctionParameter %4 -%70 = OpLabel -OpBranch %75 -%75 = OpLabel -%76 = OpExtInst %25 %1 UMin %72 %39 -%77 = OpExtInst %25 %1 UMin %71 %66 -%78 = OpAccessChain %47 %15 %66 %77 %76 -%79 = OpLoad %6 %78 -OpReturnValue %79 +%69 = OpFunction %5 None %70 +%67 = OpFunctionParameter %4 +%68 = OpFunctionParameter %4 +%66 = OpLabel +OpBranch %71 +%71 = OpLabel +%72 = OpExtInst %21 %1 UMin %68 %35 +%73 = OpExtInst %21 %1 UMin %67 %62 +%74 = OpAccessChain %43 %11 %62 %73 %72 +%75 = OpLoad %5 %74 +OpReturnValue %75 OpFunctionEnd -%82 = OpFunction %6 None %20 -%81 = OpFunctionParameter %4 +%78 = OpFunction %5 None %16 +%77 = OpFunctionParameter %4 +%76 = OpLabel +OpBranch %80 %80 = OpLabel -OpBranch %83 -%83 = OpLabel -%84 = OpConvertSToF %6 %81 -%85 = OpFDiv %6 %84 %5 -%86 = OpExtInst %6 %1 Sin %85 -%87 = OpFMul %6 %86 %5 -%88 = OpConvertFToS %4 %87 -%89 = OpExtInst %25 %1 UMin %88 %24 -%90 = OpAccessChain %23 %15 %27 %89 -%91 = OpLoad %6 %90 -OpReturnValue %91 +%81 = OpConvertSToF %5 %77 +%82 = OpFDiv %5 %81 %79 +%83 = OpExtInst %5 %1 Sin %82 +%84 = OpFMul %5 %83 %79 +%85 = OpConvertFToS %4 %84 +%86 = OpExtInst %21 %1 UMin %85 %20 +%87 = OpAccessChain %19 %11 %23 %86 +%88 = OpLoad %5 %87 +OpReturnValue %88 OpFunctionEnd -%93 = OpFunction %6 None %94 -%92 = OpLabel +%90 = OpFunction %5 None %91 +%89 = OpLabel OpBranch %95 %95 = OpLabel -%96 = OpAccessChain %23 %15 %27 %24 -%97 = OpLoad %6 %96 -%98 = OpAccessChain %47 %15 %36 %39 -%99 = OpLoad %6 %98 -%100 = OpFAdd %6 %97 %99 -%101 = OpAccessChain %47 %15 %66 %66 %39 -%102 = OpLoad %6 %101 -%103 = OpFAdd %6 %100 %102 +%96 = OpAccessChain %19 %11 %23 %20 +%97 = OpLoad %5 %96 +%98 = OpAccessChain %43 %11 %32 %35 +%99 = OpLoad %5 %98 +%100 = OpFAdd %5 %97 %99 +%101 = OpAccessChain %43 %11 %62 %62 %35 +%102 = OpLoad %5 %101 +%103 = OpFAdd %5 %100 %102 OpReturnValue %103 OpFunctionEnd %107 = OpFunction %2 None %108 %105 = OpFunctionParameter %4 -%106 = OpFunctionParameter %6 +%106 = OpFunctionParameter %5 %104 = OpLabel OpBranch %109 %109 = OpLabel -%110 = OpExtInst %25 %1 UMin %105 %24 -%111 = OpAccessChain %23 %15 %27 %110 +%110 = OpExtInst %21 %1 UMin %105 %20 +%111 = OpAccessChain %19 %11 %23 %110 OpStore %111 %106 OpReturn OpFunctionEnd %115 = OpFunction %2 None %108 %113 = OpFunctionParameter %4 -%114 = OpFunctionParameter %6 +%114 = OpFunctionParameter %5 %112 = OpLabel OpBranch %116 %116 = OpLabel -%117 = OpArrayLength %25 %15 3 -%118 = OpISub %25 %117 %36 -%119 = OpExtInst %25 %1 UMin %113 %118 -%120 = OpAccessChain %23 %15 %39 %119 +%117 = OpArrayLength %21 %11 3 +%118 = OpISub %21 %117 %32 +%119 = OpExtInst %21 %1 UMin %113 %118 +%120 = OpAccessChain %19 %11 %35 %119 OpStore %120 %114 OpReturn OpFunctionEnd %124 = OpFunction %2 None %108 %122 = OpFunctionParameter %4 -%123 = OpFunctionParameter %6 +%123 = OpFunctionParameter %5 %121 = OpLabel OpBranch %125 %125 = OpLabel -%126 = OpExtInst %25 %1 UMin %122 %39 -%127 = OpAccessChain %47 %15 %36 %126 +%126 = OpExtInst %21 %1 UMin %122 %35 +%127 = OpAccessChain %43 %11 %32 %126 OpStore %127 %123 OpReturn OpFunctionEnd %131 = OpFunction %2 None %132 %129 = OpFunctionParameter %4 -%130 = OpFunctionParameter %11 +%130 = OpFunctionParameter %7 %128 = OpLabel OpBranch %133 %133 = OpLabel -%134 = OpExtInst %25 %1 UMin %129 %66 -%135 = OpAccessChain %65 %15 %66 %134 +%134 = OpExtInst %21 %1 UMin %129 %62 +%135 = OpAccessChain %61 %11 %62 %134 OpStore %135 %130 OpReturn OpFunctionEnd %140 = OpFunction %2 None %141 %137 = OpFunctionParameter %4 %138 = OpFunctionParameter %4 -%139 = OpFunctionParameter %6 +%139 = OpFunctionParameter %5 %136 = OpLabel OpBranch %142 %142 = OpLabel -%143 = OpExtInst %25 %1 UMin %138 %39 -%144 = OpExtInst %25 %1 UMin %137 %66 -%145 = OpAccessChain %47 %15 %66 %144 %143 +%143 = OpExtInst %21 %1 UMin %138 %35 +%144 = OpExtInst %21 %1 UMin %137 %62 +%145 = OpAccessChain %43 %11 %62 %144 %143 OpStore %145 %139 OpReturn OpFunctionEnd %149 = OpFunction %2 None %108 %147 = OpFunctionParameter %4 -%148 = OpFunctionParameter %6 +%148 = OpFunctionParameter %5 %146 = OpLabel OpBranch %150 %150 = OpLabel -%151 = OpConvertSToF %6 %147 -%152 = OpFDiv %6 %151 %5 -%153 = OpExtInst %6 %1 Sin %152 -%154 = OpFMul %6 %153 %5 +%151 = OpConvertSToF %5 %147 +%152 = OpFDiv %5 %151 %79 +%153 = OpExtInst %5 %1 Sin %152 +%154 = OpFMul %5 %153 %79 %155 = OpConvertFToS %4 %154 -%156 = OpExtInst %25 %1 UMin %155 %24 -%157 = OpAccessChain %23 %15 %27 %156 +%156 = OpExtInst %21 %1 UMin %155 %20 +%157 = OpAccessChain %19 %11 %23 %156 OpStore %157 %148 OpReturn OpFunctionEnd %160 = OpFunction %2 None %161 -%159 = OpFunctionParameter %6 +%159 = OpFunctionParameter %5 %158 = OpLabel OpBranch %162 %162 = OpLabel -%163 = OpAccessChain %23 %15 %27 %24 +%163 = OpAccessChain %19 %11 %23 %20 OpStore %163 %159 -%164 = OpAccessChain %47 %15 %36 %39 +%164 = OpAccessChain %43 %11 %32 %35 OpStore %164 %159 -%165 = OpAccessChain %47 %15 %66 %66 %39 +%165 = OpAccessChain %43 %11 %62 %62 %35 OpStore %165 %159 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/bounds-check-zero.spvasm b/tests/out/spv/bounds-check-zero.spvasm index 5e5aac07fa..3879709a5b 100644 --- a/tests/out/spv/bounds-check-zero.spvasm +++ b/tests/out/spv/bounds-check-zero.spvasm @@ -7,210 +7,210 @@ OpCapability Linkage OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpDecorate %10 ArrayStride 4 -OpDecorate %13 ArrayStride 4 -OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 48 -OpMemberDecorate %14 2 Offset 64 -OpMemberDecorate %14 2 ColMajor -OpMemberDecorate %14 2 MatrixStride 16 -OpMemberDecorate %14 3 Offset 112 -OpDecorate %15 DescriptorSet 0 -OpDecorate %15 Binding 0 -OpDecorate %14 Block +OpDecorate %6 ArrayStride 4 +OpDecorate %9 ArrayStride 4 +OpMemberDecorate %10 0 Offset 0 +OpMemberDecorate %10 1 Offset 48 +OpMemberDecorate %10 2 Offset 64 +OpMemberDecorate %10 2 ColMajor +OpMemberDecorate %10 2 MatrixStride 16 +OpMemberDecorate %10 3 Offset 112 +OpDecorate %11 DescriptorSet 0 +OpDecorate %11 Binding 0 +OpDecorate %10 Block %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 10 -%6 = OpTypeFloat 32 -%5 = OpConstant %6 100.0 -%7 = OpConstant %4 9 -%8 = OpConstant %4 3 -%9 = OpConstant %4 2 -%10 = OpTypeArray %6 %3 -%11 = OpTypeVector %6 4 -%12 = OpTypeMatrix %11 3 -%13 = OpTypeRuntimeArray %6 -%14 = OpTypeStruct %10 %11 %12 %13 -%16 = OpTypePointer StorageBuffer %14 -%15 = OpVariable %16 StorageBuffer -%20 = OpTypeFunction %6 %4 -%22 = OpTypePointer StorageBuffer %10 -%23 = OpTypePointer StorageBuffer %6 -%25 = OpTypeInt 32 0 -%24 = OpConstant %25 10 -%27 = OpTypeBool -%28 = OpConstant %25 0 -%30 = OpConstantNull %6 -%39 = OpTypePointer StorageBuffer %13 -%42 = OpConstant %25 3 -%44 = OpConstantNull %6 -%53 = OpTypePointer StorageBuffer %11 -%54 = OpTypePointer StorageBuffer %6 -%55 = OpConstant %25 4 -%57 = OpConstant %25 1 -%59 = OpConstantNull %6 -%68 = OpTypeFunction %6 %11 %4 -%71 = OpConstantNull %6 -%79 = OpTypeFunction %11 %4 -%81 = OpTypePointer StorageBuffer %12 -%82 = OpTypePointer StorageBuffer %11 -%84 = OpConstant %25 2 -%86 = OpConstantNull %11 -%95 = OpTypeFunction %6 %4 %4 -%101 = OpConstantNull %6 -%117 = OpConstantNull %6 -%124 = OpTypeFunction %6 -%126 = OpConstant %25 9 -%139 = OpTypeFunction %2 %4 %6 -%168 = OpTypeFunction %2 %4 %11 -%179 = OpTypeFunction %2 %4 %4 %6 -%204 = OpTypeFunction %2 %6 -%19 = OpFunction %6 None %20 -%18 = OpFunctionParameter %4 +%5 = OpTypeFloat 32 +%6 = OpTypeArray %5 %3 +%7 = OpTypeVector %5 4 +%8 = OpTypeMatrix %7 3 +%9 = OpTypeRuntimeArray %5 +%10 = OpTypeStruct %6 %7 %8 %9 +%12 = OpTypePointer StorageBuffer %10 +%11 = OpVariable %12 StorageBuffer +%16 = OpTypeFunction %5 %4 +%18 = OpTypePointer StorageBuffer %6 +%19 = OpTypePointer StorageBuffer %5 +%21 = OpTypeInt 32 0 +%20 = OpConstant %21 10 +%23 = OpTypeBool +%24 = OpConstant %21 0 +%26 = OpConstantNull %5 +%35 = OpTypePointer StorageBuffer %9 +%38 = OpConstant %21 3 +%40 = OpConstantNull %5 +%49 = OpTypePointer StorageBuffer %7 +%50 = OpTypePointer StorageBuffer %5 +%51 = OpConstant %21 4 +%53 = OpConstant %21 1 +%55 = OpConstantNull %5 +%64 = OpTypeFunction %5 %7 %4 +%67 = OpConstantNull %5 +%75 = OpTypeFunction %7 %4 +%77 = OpTypePointer StorageBuffer %8 +%78 = OpTypePointer StorageBuffer %7 +%80 = OpConstant %21 2 +%82 = OpConstantNull %7 +%91 = OpTypeFunction %5 %4 %4 +%97 = OpConstantNull %5 +%105 = OpConstant %5 100.0 +%114 = OpConstantNull %5 +%121 = OpTypeFunction %5 +%122 = OpConstant %4 9 +%123 = OpConstant %4 3 +%124 = OpConstant %4 2 +%126 = OpConstant %21 9 +%139 = OpTypeFunction %2 %4 %5 +%168 = OpTypeFunction %2 %4 %7 +%179 = OpTypeFunction %2 %4 %4 %5 +%204 = OpTypeFunction %2 %5 +%15 = OpFunction %5 None %16 +%14 = OpFunctionParameter %4 +%13 = OpLabel +OpBranch %17 %17 = OpLabel -OpBranch %21 -%21 = OpLabel -%26 = OpULessThan %27 %18 %24 -OpSelectionMerge %31 None -OpBranchConditional %26 %32 %31 -%32 = OpLabel -%29 = OpAccessChain %23 %15 %28 %18 -%33 = OpLoad %6 %29 -OpBranch %31 +%22 = OpULessThan %23 %14 %20 +OpSelectionMerge %27 None +OpBranchConditional %22 %28 %27 +%28 = OpLabel +%25 = OpAccessChain %19 %11 %24 %14 +%29 = OpLoad %5 %25 +OpBranch %27 +%27 = OpLabel +%30 = OpPhi %5 %26 %17 %29 %28 +OpReturnValue %30 +OpFunctionEnd +%33 = OpFunction %5 None %16 +%32 = OpFunctionParameter %4 %31 = OpLabel -%34 = OpPhi %6 %30 %21 %33 %32 -OpReturnValue %34 +OpBranch %34 +%34 = OpLabel +%36 = OpArrayLength %21 %11 3 +%37 = OpULessThan %23 %32 %36 +OpSelectionMerge %41 None +OpBranchConditional %37 %42 %41 +%42 = OpLabel +%39 = OpAccessChain %19 %11 %38 %32 +%43 = OpLoad %5 %39 +OpBranch %41 +%41 = OpLabel +%44 = OpPhi %5 %40 %34 %43 %42 +OpReturnValue %44 OpFunctionEnd -%37 = OpFunction %6 None %20 -%36 = OpFunctionParameter %4 -%35 = OpLabel -OpBranch %38 -%38 = OpLabel -%40 = OpArrayLength %25 %15 3 -%41 = OpULessThan %27 %36 %40 -OpSelectionMerge %45 None -OpBranchConditional %41 %46 %45 -%46 = OpLabel -%43 = OpAccessChain %23 %15 %42 %36 -%47 = OpLoad %6 %43 -OpBranch %45 +%47 = OpFunction %5 None %16 +%46 = OpFunctionParameter %4 %45 = OpLabel -%48 = OpPhi %6 %44 %38 %47 %46 -OpReturnValue %48 +OpBranch %48 +%48 = OpLabel +%52 = OpULessThan %23 %46 %51 +OpSelectionMerge %56 None +OpBranchConditional %52 %57 %56 +%57 = OpLabel +%54 = OpAccessChain %50 %11 %53 %46 +%58 = OpLoad %5 %54 +OpBranch %56 +%56 = OpLabel +%59 = OpPhi %5 %55 %48 %58 %57 +OpReturnValue %59 OpFunctionEnd -%51 = OpFunction %6 None %20 -%50 = OpFunctionParameter %4 -%49 = OpLabel -OpBranch %52 -%52 = OpLabel -%56 = OpULessThan %27 %50 %55 -OpSelectionMerge %60 None -OpBranchConditional %56 %61 %60 -%61 = OpLabel -%58 = OpAccessChain %54 %15 %57 %50 -%62 = OpLoad %6 %58 -OpBranch %60 +%63 = OpFunction %5 None %64 +%61 = OpFunctionParameter %7 +%62 = OpFunctionParameter %4 %60 = OpLabel -%63 = OpPhi %6 %59 %52 %62 %61 -OpReturnValue %63 -OpFunctionEnd -%67 = OpFunction %6 None %68 -%65 = OpFunctionParameter %11 -%66 = OpFunctionParameter %4 -%64 = OpLabel -OpBranch %69 +OpBranch %65 +%65 = OpLabel +%66 = OpULessThan %23 %62 %51 +OpSelectionMerge %68 None +OpBranchConditional %66 %69 %68 %69 = OpLabel -%70 = OpULessThan %27 %66 %55 -OpSelectionMerge %72 None -OpBranchConditional %70 %73 %72 -%73 = OpLabel -%74 = OpVectorExtractDynamic %6 %65 %66 -OpBranch %72 +%70 = OpVectorExtractDynamic %5 %61 %62 +OpBranch %68 +%68 = OpLabel +%71 = OpPhi %5 %67 %65 %70 %69 +OpReturnValue %71 +OpFunctionEnd +%74 = OpFunction %7 None %75 +%73 = OpFunctionParameter %4 %72 = OpLabel -%75 = OpPhi %6 %71 %69 %74 %73 -OpReturnValue %75 -OpFunctionEnd -%78 = OpFunction %11 None %79 -%77 = OpFunctionParameter %4 +OpBranch %76 %76 = OpLabel -OpBranch %80 -%80 = OpLabel -%83 = OpULessThan %27 %77 %42 -OpSelectionMerge %87 None -OpBranchConditional %83 %88 %87 -%88 = OpLabel -%85 = OpAccessChain %82 %15 %84 %77 -%89 = OpLoad %11 %85 -OpBranch %87 +%79 = OpULessThan %23 %73 %38 +OpSelectionMerge %83 None +OpBranchConditional %79 %84 %83 +%84 = OpLabel +%81 = OpAccessChain %78 %11 %80 %73 +%85 = OpLoad %7 %81 +OpBranch %83 +%83 = OpLabel +%86 = OpPhi %7 %82 %76 %85 %84 +OpReturnValue %86 +OpFunctionEnd +%90 = OpFunction %5 None %91 +%88 = OpFunctionParameter %4 +%89 = OpFunctionParameter %4 %87 = OpLabel -%90 = OpPhi %11 %86 %80 %89 %88 -OpReturnValue %90 +OpBranch %92 +%92 = OpLabel +%93 = OpULessThan %23 %89 %51 +%94 = OpULessThan %23 %88 %38 +%95 = OpLogicalAnd %23 %93 %94 +OpSelectionMerge %98 None +OpBranchConditional %95 %99 %98 +%99 = OpLabel +%96 = OpAccessChain %50 %11 %80 %88 %89 +%100 = OpLoad %5 %96 +OpBranch %98 +%98 = OpLabel +%101 = OpPhi %5 %97 %92 %100 %99 +OpReturnValue %101 OpFunctionEnd -%94 = OpFunction %6 None %95 -%92 = OpFunctionParameter %4 -%93 = OpFunctionParameter %4 -%91 = OpLabel -OpBranch %96 -%96 = OpLabel -%97 = OpULessThan %27 %93 %55 -%98 = OpULessThan %27 %92 %42 -%99 = OpLogicalAnd %27 %97 %98 -OpSelectionMerge %102 None -OpBranchConditional %99 %103 %102 -%103 = OpLabel -%100 = OpAccessChain %54 %15 %84 %92 %93 -%104 = OpLoad %6 %100 -OpBranch %102 +%104 = OpFunction %5 None %16 +%103 = OpFunctionParameter %4 %102 = OpLabel -%105 = OpPhi %6 %101 %96 %104 %103 -OpReturnValue %105 -OpFunctionEnd -%108 = OpFunction %6 None %20 -%107 = OpFunctionParameter %4 +OpBranch %106 %106 = OpLabel -OpBranch %109 -%109 = OpLabel -%110 = OpConvertSToF %6 %107 -%111 = OpFDiv %6 %110 %5 -%112 = OpExtInst %6 %1 Sin %111 -%113 = OpFMul %6 %112 %5 -%114 = OpConvertFToS %4 %113 -%115 = OpULessThan %27 %114 %24 -OpSelectionMerge %118 None -OpBranchConditional %115 %119 %118 -%119 = OpLabel -%116 = OpAccessChain %23 %15 %28 %114 -%120 = OpLoad %6 %116 -OpBranch %118 -%118 = OpLabel -%121 = OpPhi %6 %117 %109 %120 %119 -OpReturnValue %121 +%107 = OpConvertSToF %5 %103 +%108 = OpFDiv %5 %107 %105 +%109 = OpExtInst %5 %1 Sin %108 +%110 = OpFMul %5 %109 %105 +%111 = OpConvertFToS %4 %110 +%112 = OpULessThan %23 %111 %20 +OpSelectionMerge %115 None +OpBranchConditional %112 %116 %115 +%116 = OpLabel +%113 = OpAccessChain %19 %11 %24 %111 +%117 = OpLoad %5 %113 +OpBranch %115 +%115 = OpLabel +%118 = OpPhi %5 %114 %106 %117 %116 +OpReturnValue %118 OpFunctionEnd -%123 = OpFunction %6 None %124 -%122 = OpLabel +%120 = OpFunction %5 None %121 +%119 = OpLabel OpBranch %125 %125 = OpLabel -%127 = OpAccessChain %23 %15 %28 %126 -%128 = OpLoad %6 %127 -%129 = OpAccessChain %54 %15 %57 %42 -%130 = OpLoad %6 %129 -%131 = OpFAdd %6 %128 %130 -%132 = OpAccessChain %54 %15 %84 %84 %42 -%133 = OpLoad %6 %132 -%134 = OpFAdd %6 %131 %133 +%127 = OpAccessChain %19 %11 %24 %126 +%128 = OpLoad %5 %127 +%129 = OpAccessChain %50 %11 %53 %38 +%130 = OpLoad %5 %129 +%131 = OpFAdd %5 %128 %130 +%132 = OpAccessChain %50 %11 %80 %80 %38 +%133 = OpLoad %5 %132 +%134 = OpFAdd %5 %131 %133 OpReturnValue %134 OpFunctionEnd %138 = OpFunction %2 None %139 %136 = OpFunctionParameter %4 -%137 = OpFunctionParameter %6 +%137 = OpFunctionParameter %5 %135 = OpLabel OpBranch %140 %140 = OpLabel -%141 = OpULessThan %27 %136 %24 +%141 = OpULessThan %23 %136 %20 OpSelectionMerge %143 None OpBranchConditional %141 %144 %143 %144 = OpLabel -%142 = OpAccessChain %23 %15 %28 %136 +%142 = OpAccessChain %19 %11 %24 %136 OpStore %142 %137 OpBranch %143 %143 = OpLabel @@ -218,16 +218,16 @@ OpReturn OpFunctionEnd %148 = OpFunction %2 None %139 %146 = OpFunctionParameter %4 -%147 = OpFunctionParameter %6 +%147 = OpFunctionParameter %5 %145 = OpLabel OpBranch %149 %149 = OpLabel -%150 = OpArrayLength %25 %15 3 -%151 = OpULessThan %27 %146 %150 +%150 = OpArrayLength %21 %11 3 +%151 = OpULessThan %23 %146 %150 OpSelectionMerge %153 None OpBranchConditional %151 %154 %153 %154 = OpLabel -%152 = OpAccessChain %23 %15 %42 %146 +%152 = OpAccessChain %19 %11 %38 %146 OpStore %152 %147 OpBranch %153 %153 = OpLabel @@ -235,15 +235,15 @@ OpReturn OpFunctionEnd %158 = OpFunction %2 None %139 %156 = OpFunctionParameter %4 -%157 = OpFunctionParameter %6 +%157 = OpFunctionParameter %5 %155 = OpLabel OpBranch %159 %159 = OpLabel -%160 = OpULessThan %27 %156 %55 +%160 = OpULessThan %23 %156 %51 OpSelectionMerge %162 None OpBranchConditional %160 %163 %162 %163 = OpLabel -%161 = OpAccessChain %54 %15 %57 %156 +%161 = OpAccessChain %50 %11 %53 %156 OpStore %161 %157 OpBranch %162 %162 = OpLabel @@ -251,15 +251,15 @@ OpReturn OpFunctionEnd %167 = OpFunction %2 None %168 %165 = OpFunctionParameter %4 -%166 = OpFunctionParameter %11 +%166 = OpFunctionParameter %7 %164 = OpLabel OpBranch %169 %169 = OpLabel -%170 = OpULessThan %27 %165 %42 +%170 = OpULessThan %23 %165 %38 OpSelectionMerge %172 None OpBranchConditional %170 %173 %172 %173 = OpLabel -%171 = OpAccessChain %82 %15 %84 %165 +%171 = OpAccessChain %78 %11 %80 %165 OpStore %171 %166 OpBranch %172 %172 = OpLabel @@ -268,17 +268,17 @@ OpFunctionEnd %178 = OpFunction %2 None %179 %175 = OpFunctionParameter %4 %176 = OpFunctionParameter %4 -%177 = OpFunctionParameter %6 +%177 = OpFunctionParameter %5 %174 = OpLabel OpBranch %180 %180 = OpLabel -%181 = OpULessThan %27 %176 %55 -%182 = OpULessThan %27 %175 %42 -%183 = OpLogicalAnd %27 %181 %182 +%181 = OpULessThan %23 %176 %51 +%182 = OpULessThan %23 %175 %38 +%183 = OpLogicalAnd %23 %181 %182 OpSelectionMerge %185 None OpBranchConditional %183 %186 %185 %186 = OpLabel -%184 = OpAccessChain %54 %15 %84 %175 %176 +%184 = OpAccessChain %50 %11 %80 %175 %176 OpStore %184 %177 OpBranch %185 %185 = OpLabel @@ -286,35 +286,35 @@ OpReturn OpFunctionEnd %190 = OpFunction %2 None %139 %188 = OpFunctionParameter %4 -%189 = OpFunctionParameter %6 +%189 = OpFunctionParameter %5 %187 = OpLabel OpBranch %191 %191 = OpLabel -%192 = OpConvertSToF %6 %188 -%193 = OpFDiv %6 %192 %5 -%194 = OpExtInst %6 %1 Sin %193 -%195 = OpFMul %6 %194 %5 +%192 = OpConvertSToF %5 %188 +%193 = OpFDiv %5 %192 %105 +%194 = OpExtInst %5 %1 Sin %193 +%195 = OpFMul %5 %194 %105 %196 = OpConvertFToS %4 %195 -%197 = OpULessThan %27 %196 %24 +%197 = OpULessThan %23 %196 %20 OpSelectionMerge %199 None OpBranchConditional %197 %200 %199 %200 = OpLabel -%198 = OpAccessChain %23 %15 %28 %196 +%198 = OpAccessChain %19 %11 %24 %196 OpStore %198 %189 OpBranch %199 %199 = OpLabel OpReturn OpFunctionEnd %203 = OpFunction %2 None %204 -%202 = OpFunctionParameter %6 +%202 = OpFunctionParameter %5 %201 = OpLabel OpBranch %205 %205 = OpLabel -%206 = OpAccessChain %23 %15 %28 %126 +%206 = OpAccessChain %19 %11 %24 %126 OpStore %206 %202 -%207 = OpAccessChain %54 %15 %57 %42 +%207 = OpAccessChain %50 %11 %53 %38 OpStore %207 %202 -%208 = OpAccessChain %54 %15 %84 %84 %42 +%208 = OpAccessChain %50 %11 %80 %80 %38 OpStore %208 %202 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/break-if.spvasm b/tests/out/spv/break-if.spvasm index 138fb0b610..081cd21ccb 100644 --- a/tests/out/spv/break-if.spvasm +++ b/tests/out/spv/break-if.spvasm @@ -8,17 +8,17 @@ OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %48 "main" OpExecutionMode %48 LocalSize 1 1 1 %2 = OpTypeVoid -%4 = OpTypeBool -%3 = OpConstantTrue %4 -%7 = OpTypeFunction %2 -%14 = OpTypePointer Function %4 -%15 = OpConstantNull %4 -%17 = OpConstantNull %4 -%21 = OpTypeFunction %2 %4 -%32 = OpConstantNull %4 -%34 = OpConstantNull %4 -%6 = OpFunction %2 None %7 -%5 = OpLabel +%3 = OpTypeBool +%6 = OpTypeFunction %2 +%7 = OpConstantTrue %3 +%14 = OpTypePointer Function %3 +%15 = OpConstantNull %3 +%17 = OpConstantNull %3 +%21 = OpTypeFunction %2 %3 +%32 = OpConstantNull %3 +%34 = OpConstantNull %3 +%5 = OpFunction %2 None %6 +%4 = OpLabel OpBranch %8 %8 = OpLabel OpBranch %9 @@ -28,12 +28,12 @@ OpBranch %11 %11 = OpLabel OpBranch %12 %12 = OpLabel -OpBranchConditional %3 %10 %9 +OpBranchConditional %7 %10 %9 %10 = OpLabel OpReturn OpFunctionEnd %20 = OpFunction %2 None %21 -%19 = OpFunctionParameter %4 +%19 = OpFunctionParameter %3 %18 = OpLabel %13 = OpVariable %14 Function %15 %16 = OpVariable %14 Function %17 @@ -47,17 +47,17 @@ OpBranch %25 OpBranch %26 %26 = OpLabel OpStore %13 %19 -%27 = OpLoad %4 %13 -%28 = OpLogicalNotEqual %4 %19 %27 +%27 = OpLoad %3 %13 +%28 = OpLogicalNotEqual %3 %19 %27 OpStore %16 %28 -%29 = OpLoad %4 %16 -%30 = OpLogicalEqual %4 %19 %29 +%29 = OpLoad %3 %16 +%30 = OpLogicalEqual %3 %19 %29 OpBranchConditional %30 %24 %23 %24 = OpLabel OpReturn OpFunctionEnd %37 = OpFunction %2 None %21 -%36 = OpFunctionParameter %4 +%36 = OpFunctionParameter %3 %35 = OpLabel %31 = OpVariable %14 Function %32 %33 = OpVariable %14 Function %34 @@ -69,18 +69,18 @@ OpLoopMerge %40 %42 None OpBranch %41 %41 = OpLabel OpStore %31 %36 -%43 = OpLoad %4 %31 -%44 = OpLogicalNotEqual %4 %36 %43 +%43 = OpLoad %3 %31 +%44 = OpLogicalNotEqual %3 %36 %43 OpStore %33 %44 OpBranch %42 %42 = OpLabel -%45 = OpLoad %4 %33 -%46 = OpLogicalEqual %4 %36 %45 +%45 = OpLoad %3 %33 +%46 = OpLogicalEqual %3 %36 %45 OpBranchConditional %46 %40 %39 %40 = OpLabel OpReturn OpFunctionEnd -%48 = OpFunction %2 None %7 +%48 = OpFunction %2 None %6 %47 = OpLabel OpBranch %49 %49 = OpLabel diff --git a/tests/out/spv/collatz.spvasm b/tests/out/spv/collatz.spvasm index 7be8c912ca..a08b44670f 100644 --- a/tests/out/spv/collatz.spvasm +++ b/tests/out/spv/collatz.spvasm @@ -9,58 +9,58 @@ OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %52 "main" %49 OpExecutionMode %52 LocalSize 1 1 1 OpSource GLSL 450 -OpMemberName %9 0 "data" -OpName %9 "PrimeIndices" -OpName %11 "v_indices" -OpName %13 "n" -OpName %16 "i" -OpName %19 "n_base" -OpName %20 "collatz_iterations" +OpMemberName %5 0 "data" +OpName %5 "PrimeIndices" +OpName %7 "v_indices" +OpName %9 "n" +OpName %12 "i" +OpName %15 "n_base" +OpName %16 "collatz_iterations" OpName %49 "global_id" OpName %52 "main" -OpDecorate %8 ArrayStride 4 -OpMemberDecorate %9 0 Offset 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %11 Binding 0 -OpDecorate %9 Block +OpDecorate %4 ArrayStride 4 +OpMemberDecorate %5 0 Offset 0 +OpDecorate %7 DescriptorSet 0 +OpDecorate %7 Binding 0 +OpDecorate %5 Block OpDecorate %49 BuiltIn GlobalInvocationId %2 = OpTypeVoid -%4 = OpTypeInt 32 0 -%3 = OpConstant %4 0 -%5 = OpConstant %4 1 -%6 = OpConstant %4 2 -%7 = OpConstant %4 3 -%8 = OpTypeRuntimeArray %4 -%9 = OpTypeStruct %8 -%10 = OpTypeVector %4 3 -%12 = OpTypePointer StorageBuffer %9 -%11 = OpVariable %12 StorageBuffer -%14 = OpTypePointer Function %4 -%15 = OpConstantNull %4 -%17 = OpConstantNull %4 -%21 = OpTypeFunction %4 %4 +%3 = OpTypeInt 32 0 +%4 = OpTypeRuntimeArray %3 +%5 = OpTypeStruct %4 +%6 = OpTypeVector %3 3 +%8 = OpTypePointer StorageBuffer %5 +%7 = OpVariable %8 StorageBuffer +%10 = OpTypePointer Function %3 +%11 = OpConstantNull %3 +%13 = OpConstantNull %3 +%17 = OpTypeFunction %3 %3 +%18 = OpConstant %3 0 +%19 = OpConstant %3 1 +%20 = OpConstant %3 2 +%21 = OpConstant %3 3 %28 = OpTypeBool -%50 = OpTypePointer Input %10 +%50 = OpTypePointer Input %6 %49 = OpVariable %50 Input %53 = OpTypeFunction %2 -%55 = OpTypePointer StorageBuffer %8 -%57 = OpTypePointer StorageBuffer %4 -%20 = OpFunction %4 None %21 -%19 = OpFunctionParameter %4 -%18 = OpLabel -%13 = OpVariable %14 Function %15 -%16 = OpVariable %14 Function %17 +%55 = OpTypePointer StorageBuffer %4 +%57 = OpTypePointer StorageBuffer %3 +%16 = OpFunction %3 None %17 +%15 = OpFunctionParameter %3 +%14 = OpLabel +%9 = OpVariable %10 Function %11 +%12 = OpVariable %10 Function %13 OpBranch %22 %22 = OpLabel -OpStore %13 %19 -OpStore %16 %3 +OpStore %9 %15 +OpStore %12 %18 OpBranch %23 %23 = OpLabel OpLoopMerge %24 %26 None OpBranch %25 %25 = OpLabel -%27 = OpLoad %4 %13 -%29 = OpUGreaterThan %28 %27 %5 +%27 = OpLoad %3 %9 +%29 = OpUGreaterThan %28 %27 %19 OpSelectionMerge %30 None OpBranchConditional %29 %30 %31 %31 = OpLabel @@ -68,46 +68,46 @@ OpBranch %24 %30 = OpLabel OpBranch %32 %32 = OpLabel -%34 = OpLoad %4 %13 -%35 = OpUMod %4 %34 %6 -%36 = OpIEqual %28 %35 %3 +%34 = OpLoad %3 %9 +%35 = OpUMod %3 %34 %20 +%36 = OpIEqual %28 %35 %18 OpSelectionMerge %37 None OpBranchConditional %36 %38 %39 %38 = OpLabel -%40 = OpLoad %4 %13 -%41 = OpUDiv %4 %40 %6 -OpStore %13 %41 +%40 = OpLoad %3 %9 +%41 = OpUDiv %3 %40 %20 +OpStore %9 %41 OpBranch %37 %39 = OpLabel -%42 = OpLoad %4 %13 -%43 = OpIMul %4 %7 %42 -%44 = OpIAdd %4 %43 %5 -OpStore %13 %44 +%42 = OpLoad %3 %9 +%43 = OpIMul %3 %21 %42 +%44 = OpIAdd %3 %43 %19 +OpStore %9 %44 OpBranch %37 %37 = OpLabel -%45 = OpLoad %4 %16 -%46 = OpIAdd %4 %45 %5 -OpStore %16 %46 +%45 = OpLoad %3 %12 +%46 = OpIAdd %3 %45 %19 +OpStore %12 %46 OpBranch %33 %33 = OpLabel OpBranch %26 %26 = OpLabel OpBranch %23 %24 = OpLabel -%47 = OpLoad %4 %16 +%47 = OpLoad %3 %12 OpReturnValue %47 OpFunctionEnd %52 = OpFunction %2 None %53 %48 = OpLabel -%51 = OpLoad %10 %49 +%51 = OpLoad %6 %49 OpBranch %54 %54 = OpLabel -%56 = OpCompositeExtract %4 %51 0 -%58 = OpCompositeExtract %4 %51 0 -%59 = OpAccessChain %57 %11 %3 %58 -%60 = OpLoad %4 %59 -%61 = OpFunctionCall %4 %20 %60 -%62 = OpAccessChain %57 %11 %3 %56 +%56 = OpCompositeExtract %3 %51 0 +%58 = OpCompositeExtract %3 %51 0 +%59 = OpAccessChain %57 %7 %18 %58 +%60 = OpLoad %3 %59 +%61 = OpFunctionCall %3 %16 %60 +%62 = OpAccessChain %57 %7 %18 %56 OpStore %62 %61 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/control-flow.spvasm b/tests/out/spv/control-flow.spvasm index e1885e7159..eb2f3b62ec 100644 --- a/tests/out/spv/control-flow.spvasm +++ b/tests/out/spv/control-flow.spvasm @@ -5,133 +5,133 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %44 "main" %41 -OpExecutionMode %44 LocalSize 1 1 1 -OpDecorate %41 BuiltIn GlobalInvocationId +OpEntryPoint GLCompute %39 "main" %36 +OpExecutionMode %39 LocalSize 1 1 1 +OpDecorate %36 BuiltIn GlobalInvocationId %2 = OpTypeVoid -%4 = OpTypeInt 32 1 -%3 = OpConstant %4 1 -%5 = OpConstant %4 0 -%6 = OpConstant %4 2 -%7 = OpConstant %4 3 -%8 = OpConstant %4 4 -%10 = OpTypeInt 32 0 -%9 = OpConstant %10 0 -%11 = OpTypeVector %10 3 -%15 = OpTypeFunction %2 %4 -%21 = OpTypeFunction %2 -%38 = OpTypePointer Function %4 -%39 = OpConstantNull %4 -%42 = OpTypePointer Input %11 -%41 = OpVariable %42 Input -%46 = OpConstant %10 2 -%47 = OpConstant %10 1 -%48 = OpConstant %10 72 -%49 = OpConstant %10 264 -%14 = OpFunction %2 None %15 -%13 = OpFunctionParameter %4 +%4 = OpTypeInt 32 0 +%3 = OpTypeVector %4 3 +%5 = OpTypeInt 32 1 +%9 = OpTypeFunction %2 %5 +%15 = OpTypeFunction %2 +%16 = OpConstant %5 0 +%33 = OpTypePointer Function %5 +%34 = OpConstantNull %5 +%37 = OpTypePointer Input %3 +%36 = OpVariable %37 Input +%40 = OpConstant %5 1 +%41 = OpConstant %5 2 +%42 = OpConstant %5 3 +%43 = OpConstant %5 4 +%44 = OpConstant %4 0 +%46 = OpConstant %4 2 +%47 = OpConstant %4 1 +%48 = OpConstant %4 72 +%49 = OpConstant %4 264 +%8 = OpFunction %2 None %9 +%7 = OpFunctionParameter %5 +%6 = OpLabel +OpBranch %10 +%10 = OpLabel +OpSelectionMerge %11 None +OpSwitch %7 %12 %12 = OpLabel -OpBranch %16 -%16 = OpLabel -OpSelectionMerge %17 None -OpSwitch %13 %18 -%18 = OpLabel +OpBranch %11 +%11 = OpLabel +OpReturn +OpFunctionEnd +%14 = OpFunction %2 None %15 +%13 = OpLabel OpBranch %17 %17 = OpLabel -OpReturn -OpFunctionEnd -%20 = OpFunction %2 None %21 +OpSelectionMerge %18 None +OpSwitch %16 %20 0 %19 %19 = OpLabel -OpBranch %22 -%22 = OpLabel -OpSelectionMerge %23 None -OpSwitch %5 %25 0 %24 -%24 = OpLabel -OpBranch %23 -%25 = OpLabel -OpBranch %23 -%23 = OpLabel +OpBranch %18 +%20 = OpLabel +OpBranch %18 +%18 = OpLabel OpReturn OpFunctionEnd -%28 = OpFunction %2 None %15 -%27 = OpFunctionParameter %4 -%26 = OpLabel +%23 = OpFunction %2 None %9 +%22 = OpFunctionParameter %5 +%21 = OpLabel +OpBranch %24 +%24 = OpLabel +OpBranch %25 +%25 = OpLabel +OpLoopMerge %26 %28 None +OpBranch %27 +%27 = OpLabel +OpSelectionMerge %29 None +OpSwitch %22 %31 1 %30 +%30 = OpLabel +OpBranch %28 +%31 = OpLabel OpBranch %29 %29 = OpLabel -OpBranch %30 -%30 = OpLabel -OpLoopMerge %31 %33 None -OpBranch %32 -%32 = OpLabel -OpSelectionMerge %34 None -OpSwitch %27 %36 1 %35 -%35 = OpLabel -OpBranch %33 -%36 = OpLabel -OpBranch %34 -%34 = OpLabel -OpBranch %33 -%33 = OpLabel -OpBranch %30 -%31 = OpLabel +OpBranch %28 +%28 = OpLabel +OpBranch %25 +%26 = OpLabel OpReturn OpFunctionEnd -%44 = OpFunction %2 None %21 -%40 = OpLabel -%37 = OpVariable %38 Function %39 -%43 = OpLoad %11 %41 +%39 = OpFunction %2 None %15 +%35 = OpLabel +%32 = OpVariable %33 Function %34 +%38 = OpLoad %3 %36 OpBranch %45 %45 = OpLabel OpControlBarrier %46 %47 %48 OpControlBarrier %46 %46 %49 OpSelectionMerge %50 None -OpSwitch %3 %51 +OpSwitch %40 %51 %51 = OpLabel -OpStore %37 %3 +OpStore %32 %40 OpBranch %50 %50 = OpLabel -%52 = OpLoad %4 %37 +%52 = OpLoad %5 %32 OpSelectionMerge %53 None OpSwitch %52 %58 1 %54 2 %55 3 %56 4 %56 5 %57 6 %58 %54 = OpLabel -OpStore %37 %5 +OpStore %32 %16 OpBranch %53 %55 = OpLabel -OpStore %37 %3 +OpStore %32 %40 OpBranch %53 %56 = OpLabel -OpStore %37 %6 +OpStore %32 %41 OpBranch %53 %57 = OpLabel -OpStore %37 %7 +OpStore %32 %42 OpBranch %53 %58 = OpLabel -OpStore %37 %8 +OpStore %32 %43 OpBranch %53 %53 = OpLabel OpSelectionMerge %59 None -OpSwitch %9 %61 0 %60 +OpSwitch %44 %61 0 %60 %60 = OpLabel OpBranch %59 %61 = OpLabel OpBranch %59 %59 = OpLabel -%62 = OpLoad %4 %37 +%62 = OpLoad %5 %32 OpSelectionMerge %63 None OpSwitch %62 %68 1 %64 2 %65 3 %66 4 %67 %64 = OpLabel -OpStore %37 %5 +OpStore %32 %16 OpBranch %63 %65 = OpLabel -OpStore %37 %3 +OpStore %32 %40 OpReturn %66 = OpLabel -OpStore %37 %6 +OpStore %32 %41 OpReturn %67 = OpLabel OpReturn %68 = OpLabel -OpStore %37 %7 +OpStore %32 %42 OpReturn %63 = OpLabel OpReturn diff --git a/tests/out/spv/extra.spvasm b/tests/out/spv/extra.spvasm index 0c4f7a1d7e..16b9b750c9 100644 --- a/tests/out/spv/extra.spvasm +++ b/tests/out/spv/extra.spvasm @@ -7,69 +7,69 @@ OpCapability Float64 OpCapability Geometry %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %25 "main" %17 %20 %23 -OpExecutionMode %25 OriginUpperLeft -OpMemberDecorate %8 0 Offset 0 -OpMemberDecorate %8 1 Offset 16 -OpMemberDecorate %10 0 Offset 0 -OpMemberDecorate %10 1 Offset 16 -OpDecorate %13 Block -OpMemberDecorate %13 0 Offset 0 -OpDecorate %17 Location 0 -OpDecorate %20 BuiltIn PrimitiveId -OpDecorate %20 Flat -OpDecorate %23 Location 0 +OpEntryPoint Fragment %24 "main" %16 %19 %22 +OpExecutionMode %24 OriginUpperLeft +OpMemberDecorate %6 0 Offset 0 +OpMemberDecorate %6 1 Offset 16 +OpMemberDecorate %9 0 Offset 0 +OpMemberDecorate %9 1 Offset 16 +OpDecorate %12 Block +OpMemberDecorate %12 0 Offset 0 +OpDecorate %16 Location 0 +OpDecorate %19 BuiltIn PrimitiveId +OpDecorate %19 Flat +OpDecorate %22 Location 0 %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%5 = OpTypeInt 32 0 -%7 = OpTypeFloat 64 -%6 = OpTypeVector %7 2 -%8 = OpTypeStruct %5 %6 -%9 = OpTypeVector %4 4 -%10 = OpTypeStruct %9 %5 -%11 = OpTypeVector %4 3 -%13 = OpTypeStruct %8 -%14 = OpTypePointer PushConstant %13 -%12 = OpVariable %14 PushConstant -%18 = OpTypePointer Input %9 -%17 = OpVariable %18 Input -%21 = OpTypePointer Input %5 -%20 = OpVariable %21 Input -%24 = OpTypePointer Output %9 -%23 = OpVariable %24 Output -%26 = OpTypeFunction %2 -%27 = OpTypePointer PushConstant %8 -%28 = OpConstant %5 0 -%32 = OpTypePointer PushConstant %5 +%3 = OpTypeInt 32 0 +%5 = OpTypeFloat 64 +%4 = OpTypeVector %5 2 +%6 = OpTypeStruct %3 %4 +%8 = OpTypeFloat 32 +%7 = OpTypeVector %8 4 +%9 = OpTypeStruct %7 %3 +%10 = OpTypeVector %8 3 +%12 = OpTypeStruct %6 +%13 = OpTypePointer PushConstant %12 +%11 = OpVariable %13 PushConstant +%17 = OpTypePointer Input %7 +%16 = OpVariable %17 Input +%20 = OpTypePointer Input %3 +%19 = OpVariable %20 Input +%23 = OpTypePointer Output %7 +%22 = OpVariable %23 Output +%25 = OpTypeFunction %2 +%26 = OpTypePointer PushConstant %6 +%27 = OpConstant %3 0 +%29 = OpConstant %8 1.0 +%32 = OpTypePointer PushConstant %3 %35 = OpTypeBool -%25 = OpFunction %2 None %26 -%15 = OpLabel -%19 = OpLoad %9 %17 -%22 = OpLoad %5 %20 -%16 = OpCompositeConstruct %10 %19 %22 -%29 = OpAccessChain %27 %12 %28 +%24 = OpFunction %2 None %25 +%14 = OpLabel +%18 = OpLoad %7 %16 +%21 = OpLoad %3 %19 +%15 = OpCompositeConstruct %9 %18 %21 +%28 = OpAccessChain %26 %11 %27 OpBranch %30 %30 = OpLabel -%31 = OpCompositeExtract %5 %16 1 -%33 = OpAccessChain %32 %29 %28 -%34 = OpLoad %5 %33 +%31 = OpCompositeExtract %3 %15 1 +%33 = OpAccessChain %32 %28 %27 +%34 = OpLoad %3 %33 %36 = OpIEqual %35 %31 %34 OpSelectionMerge %37 None OpBranchConditional %36 %38 %39 %38 = OpLabel -%40 = OpCompositeExtract %9 %16 0 -OpStore %23 %40 +%40 = OpCompositeExtract %7 %15 0 +OpStore %22 %40 OpReturn %39 = OpLabel -%41 = OpCompositeConstruct %11 %3 %3 %3 -%42 = OpCompositeExtract %9 %16 0 -%43 = OpVectorShuffle %11 %42 %42 0 1 2 -%44 = OpFSub %11 %41 %43 -%45 = OpCompositeExtract %9 %16 0 -%46 = OpCompositeExtract %4 %45 3 -%47 = OpCompositeConstruct %9 %44 %46 -OpStore %23 %47 +%41 = OpCompositeConstruct %10 %29 %29 %29 +%42 = OpCompositeExtract %7 %15 0 +%43 = OpVectorShuffle %10 %42 %42 0 1 2 +%44 = OpFSub %10 %41 %43 +%45 = OpCompositeExtract %7 %15 0 +%46 = OpCompositeExtract %8 %45 3 +%47 = OpCompositeConstruct %7 %44 %46 +OpStore %22 %47 OpReturn %37 = OpLabel OpReturn diff --git a/tests/out/spv/fragment-output.spvasm b/tests/out/spv/fragment-output.spvasm index aafc8c2d1f..0a6541799d 100644 --- a/tests/out/spv/fragment-output.spvasm +++ b/tests/out/spv/fragment-output.spvasm @@ -5,28 +5,28 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %36 "main_vec4vec3" %24 %26 %28 %30 %32 %34 +OpEntryPoint Fragment %33 "main_vec4vec3" %21 %23 %25 %27 %29 %31 OpEntryPoint Fragment %85 "main_vec2scalar" %73 %75 %77 %79 %81 %83 -OpExecutionMode %36 OriginUpperLeft +OpExecutionMode %33 OriginUpperLeft OpExecutionMode %85 OriginUpperLeft -OpMemberDecorate %15 0 Offset 0 -OpMemberDecorate %15 1 Offset 16 -OpMemberDecorate %15 2 Offset 32 -OpMemberDecorate %15 3 Offset 48 -OpMemberDecorate %15 4 Offset 64 -OpMemberDecorate %15 5 Offset 80 -OpMemberDecorate %19 0 Offset 0 -OpMemberDecorate %19 1 Offset 8 -OpMemberDecorate %19 2 Offset 16 -OpMemberDecorate %19 3 Offset 24 -OpMemberDecorate %19 4 Offset 28 -OpMemberDecorate %19 5 Offset 32 -OpDecorate %24 Location 0 -OpDecorate %26 Location 1 -OpDecorate %28 Location 2 -OpDecorate %30 Location 3 -OpDecorate %32 Location 4 -OpDecorate %34 Location 5 +OpMemberDecorate %12 0 Offset 0 +OpMemberDecorate %12 1 Offset 16 +OpMemberDecorate %12 2 Offset 32 +OpMemberDecorate %12 3 Offset 48 +OpMemberDecorate %12 4 Offset 64 +OpMemberDecorate %12 5 Offset 80 +OpMemberDecorate %16 0 Offset 0 +OpMemberDecorate %16 1 Offset 8 +OpMemberDecorate %16 2 Offset 16 +OpMemberDecorate %16 3 Offset 24 +OpMemberDecorate %16 4 Offset 28 +OpMemberDecorate %16 5 Offset 32 +OpDecorate %21 Location 0 +OpDecorate %23 Location 1 +OpDecorate %25 Location 2 +OpDecorate %27 Location 3 +OpDecorate %29 Location 4 +OpDecorate %31 Location 5 OpDecorate %73 Location 0 OpDecorate %75 Location 1 OpDecorate %77 Location 2 @@ -35,55 +35,55 @@ OpDecorate %81 Location 4 OpDecorate %83 Location 5 %2 = OpTypeVoid %4 = OpTypeFloat 32 -%3 = OpConstant %4 0.0 +%3 = OpTypeVector %4 4 %6 = OpTypeInt 32 1 -%5 = OpConstant %6 0 +%5 = OpTypeVector %6 4 %8 = OpTypeInt 32 0 -%7 = OpConstant %8 0 -%9 = OpTypeVector %4 4 -%10 = OpTypeVector %6 4 -%11 = OpTypeVector %8 4 -%12 = OpTypeVector %4 3 -%13 = OpTypeVector %6 3 -%14 = OpTypeVector %8 3 -%15 = OpTypeStruct %9 %10 %11 %12 %13 %14 -%16 = OpTypeVector %4 2 -%17 = OpTypeVector %6 2 -%18 = OpTypeVector %8 2 -%19 = OpTypeStruct %16 %17 %18 %4 %6 %8 -%21 = OpTypePointer Function %15 -%22 = OpConstantNull %15 -%25 = OpTypePointer Output %9 -%24 = OpVariable %25 Output -%27 = OpTypePointer Output %10 -%26 = OpVariable %27 Output -%29 = OpTypePointer Output %11 -%28 = OpVariable %29 Output -%31 = OpTypePointer Output %12 -%30 = OpVariable %31 Output -%33 = OpTypePointer Output %13 -%32 = OpVariable %33 Output -%35 = OpTypePointer Output %14 -%34 = OpVariable %35 Output -%37 = OpTypeFunction %2 -%39 = OpTypePointer Function %9 -%42 = OpTypePointer Function %10 +%7 = OpTypeVector %8 4 +%9 = OpTypeVector %4 3 +%10 = OpTypeVector %6 3 +%11 = OpTypeVector %8 3 +%12 = OpTypeStruct %3 %5 %7 %9 %10 %11 +%13 = OpTypeVector %4 2 +%14 = OpTypeVector %6 2 +%15 = OpTypeVector %8 2 +%16 = OpTypeStruct %13 %14 %15 %4 %6 %8 +%18 = OpTypePointer Function %12 +%19 = OpConstantNull %12 +%22 = OpTypePointer Output %3 +%21 = OpVariable %22 Output +%24 = OpTypePointer Output %5 +%23 = OpVariable %24 Output +%26 = OpTypePointer Output %7 +%25 = OpVariable %26 Output +%28 = OpTypePointer Output %9 +%27 = OpVariable %28 Output +%30 = OpTypePointer Output %10 +%29 = OpVariable %30 Output +%32 = OpTypePointer Output %11 +%31 = OpVariable %32 Output +%34 = OpTypeFunction %2 +%35 = OpConstant %4 0.0 +%36 = OpConstant %6 0 +%37 = OpConstant %8 0 +%39 = OpTypePointer Function %3 +%42 = OpTypePointer Function %5 %44 = OpConstant %8 1 -%46 = OpTypePointer Function %11 +%46 = OpTypePointer Function %7 %48 = OpConstant %8 2 -%50 = OpTypePointer Function %12 +%50 = OpTypePointer Function %9 %52 = OpConstant %8 3 -%54 = OpTypePointer Function %13 +%54 = OpTypePointer Function %10 %56 = OpConstant %8 4 -%58 = OpTypePointer Function %14 +%58 = OpTypePointer Function %11 %60 = OpConstant %8 5 -%70 = OpTypePointer Function %19 -%71 = OpConstantNull %19 -%74 = OpTypePointer Output %16 +%70 = OpTypePointer Function %16 +%71 = OpConstantNull %16 +%74 = OpTypePointer Output %13 %73 = OpVariable %74 Output -%76 = OpTypePointer Output %17 +%76 = OpTypePointer Output %14 %75 = OpVariable %76 Output -%78 = OpTypePointer Output %18 +%78 = OpTypePointer Output %15 %77 = OpVariable %78 Output %80 = OpTypePointer Output %4 %79 = OpVariable %80 Output @@ -91,76 +91,76 @@ OpDecorate %83 Location 5 %81 = OpVariable %82 Output %84 = OpTypePointer Output %8 %83 = OpVariable %84 Output -%87 = OpTypePointer Function %16 -%90 = OpTypePointer Function %17 -%93 = OpTypePointer Function %18 +%87 = OpTypePointer Function %13 +%90 = OpTypePointer Function %14 +%93 = OpTypePointer Function %15 %96 = OpTypePointer Function %4 %98 = OpTypePointer Function %6 %100 = OpTypePointer Function %8 -%36 = OpFunction %2 None %37 -%23 = OpLabel -%20 = OpVariable %21 Function %22 +%33 = OpFunction %2 None %34 +%20 = OpLabel +%17 = OpVariable %18 Function %19 OpBranch %38 %38 = OpLabel -%40 = OpCompositeConstruct %9 %3 %3 %3 %3 -%41 = OpAccessChain %39 %20 %7 +%40 = OpCompositeConstruct %3 %35 %35 %35 %35 +%41 = OpAccessChain %39 %17 %37 OpStore %41 %40 -%43 = OpCompositeConstruct %10 %5 %5 %5 %5 -%45 = OpAccessChain %42 %20 %44 +%43 = OpCompositeConstruct %5 %36 %36 %36 %36 +%45 = OpAccessChain %42 %17 %44 OpStore %45 %43 -%47 = OpCompositeConstruct %11 %7 %7 %7 %7 -%49 = OpAccessChain %46 %20 %48 +%47 = OpCompositeConstruct %7 %37 %37 %37 %37 +%49 = OpAccessChain %46 %17 %48 OpStore %49 %47 -%51 = OpCompositeConstruct %12 %3 %3 %3 -%53 = OpAccessChain %50 %20 %52 +%51 = OpCompositeConstruct %9 %35 %35 %35 +%53 = OpAccessChain %50 %17 %52 OpStore %53 %51 -%55 = OpCompositeConstruct %13 %5 %5 %5 -%57 = OpAccessChain %54 %20 %56 +%55 = OpCompositeConstruct %10 %36 %36 %36 +%57 = OpAccessChain %54 %17 %56 OpStore %57 %55 -%59 = OpCompositeConstruct %14 %7 %7 %7 -%61 = OpAccessChain %58 %20 %60 +%59 = OpCompositeConstruct %11 %37 %37 %37 +%61 = OpAccessChain %58 %17 %60 OpStore %61 %59 -%62 = OpLoad %15 %20 -%63 = OpCompositeExtract %9 %62 0 -OpStore %24 %63 -%64 = OpCompositeExtract %10 %62 1 -OpStore %26 %64 -%65 = OpCompositeExtract %11 %62 2 -OpStore %28 %65 -%66 = OpCompositeExtract %12 %62 3 -OpStore %30 %66 -%67 = OpCompositeExtract %13 %62 4 -OpStore %32 %67 -%68 = OpCompositeExtract %14 %62 5 -OpStore %34 %68 +%62 = OpLoad %12 %17 +%63 = OpCompositeExtract %3 %62 0 +OpStore %21 %63 +%64 = OpCompositeExtract %5 %62 1 +OpStore %23 %64 +%65 = OpCompositeExtract %7 %62 2 +OpStore %25 %65 +%66 = OpCompositeExtract %9 %62 3 +OpStore %27 %66 +%67 = OpCompositeExtract %10 %62 4 +OpStore %29 %67 +%68 = OpCompositeExtract %11 %62 5 +OpStore %31 %68 OpReturn OpFunctionEnd -%85 = OpFunction %2 None %37 +%85 = OpFunction %2 None %34 %72 = OpLabel %69 = OpVariable %70 Function %71 OpBranch %86 %86 = OpLabel -%88 = OpCompositeConstruct %16 %3 %3 -%89 = OpAccessChain %87 %69 %7 +%88 = OpCompositeConstruct %13 %35 %35 +%89 = OpAccessChain %87 %69 %37 OpStore %89 %88 -%91 = OpCompositeConstruct %17 %5 %5 +%91 = OpCompositeConstruct %14 %36 %36 %92 = OpAccessChain %90 %69 %44 OpStore %92 %91 -%94 = OpCompositeConstruct %18 %7 %7 +%94 = OpCompositeConstruct %15 %37 %37 %95 = OpAccessChain %93 %69 %48 OpStore %95 %94 %97 = OpAccessChain %96 %69 %52 -OpStore %97 %3 +OpStore %97 %35 %99 = OpAccessChain %98 %69 %56 -OpStore %99 %5 +OpStore %99 %36 %101 = OpAccessChain %100 %69 %60 -OpStore %101 %7 -%102 = OpLoad %19 %69 -%103 = OpCompositeExtract %16 %102 0 +OpStore %101 %37 +%102 = OpLoad %16 %69 +%103 = OpCompositeExtract %13 %102 0 OpStore %73 %103 -%104 = OpCompositeExtract %17 %102 1 +%104 = OpCompositeExtract %14 %102 1 OpStore %75 %104 -%105 = OpCompositeExtract %18 %102 2 +%105 = OpCompositeExtract %15 %102 2 OpStore %77 %105 %106 = OpCompositeExtract %4 %102 3 OpStore %79 %106 diff --git a/tests/out/spv/functions.spvasm b/tests/out/spv/functions.spvasm index ef3a2cd235..c3fd238917 100644 --- a/tests/out/spv/functions.spvasm +++ b/tests/out/spv/functions.spvasm @@ -9,87 +9,87 @@ OpEntryPoint GLCompute %74 "main" OpExecutionMode %74 LocalSize 1 1 1 %2 = OpTypeVoid %4 = OpTypeFloat 32 -%3 = OpConstant %4 2.0 -%5 = OpConstant %4 0.5 -%7 = OpTypeInt 32 1 -%6 = OpConstant %7 1 -%9 = OpTypeInt 32 0 -%8 = OpConstant %9 1 -%10 = OpConstant %7 4 -%11 = OpConstant %7 2 -%12 = OpTypeVector %4 2 -%13 = OpTypeVector %7 2 -%14 = OpTypeVector %9 3 -%15 = OpTypeVector %7 4 -%18 = OpTypeFunction %12 -%26 = OpTypeFunction %7 -%31 = OpConstantNull %7 -%42 = OpConstantNull %9 -%57 = OpConstantNull %7 +%3 = OpTypeVector %4 2 +%5 = OpTypeInt 32 1 +%6 = OpTypeVector %5 2 +%8 = OpTypeInt 32 0 +%7 = OpTypeVector %8 3 +%9 = OpTypeVector %5 4 +%12 = OpTypeFunction %3 +%13 = OpConstant %4 2.0 +%14 = OpConstant %4 0.5 +%22 = OpTypeFunction %5 +%23 = OpConstant %5 1 +%24 = OpConstant %8 1 +%25 = OpConstant %5 4 +%26 = OpConstant %5 2 +%31 = OpConstantNull %5 +%42 = OpConstantNull %8 +%57 = OpConstantNull %5 %75 = OpTypeFunction %2 -%17 = OpFunction %12 None %18 -%16 = OpLabel -OpBranch %19 -%19 = OpLabel -%20 = OpCompositeConstruct %12 %3 %3 -%21 = OpCompositeConstruct %12 %5 %5 -%22 = OpCompositeConstruct %12 %5 %5 -%23 = OpExtInst %12 %1 Fma %20 %21 %22 -OpReturnValue %23 +%11 = OpFunction %3 None %12 +%10 = OpLabel +OpBranch %15 +%15 = OpLabel +%16 = OpCompositeConstruct %3 %13 %13 +%17 = OpCompositeConstruct %3 %14 %14 +%18 = OpCompositeConstruct %3 %14 %14 +%19 = OpExtInst %3 %1 Fma %16 %17 %18 +OpReturnValue %19 OpFunctionEnd -%25 = OpFunction %7 None %26 -%24 = OpLabel +%21 = OpFunction %5 None %22 +%20 = OpLabel OpBranch %27 %27 = OpLabel -%28 = OpCompositeConstruct %13 %6 %6 -%29 = OpCompositeConstruct %13 %6 %6 -%32 = OpCompositeExtract %7 %28 0 -%33 = OpCompositeExtract %7 %29 0 -%34 = OpIMul %7 %32 %33 -%35 = OpIAdd %7 %31 %34 -%36 = OpCompositeExtract %7 %28 1 -%37 = OpCompositeExtract %7 %29 1 -%38 = OpIMul %7 %36 %37 -%30 = OpIAdd %7 %35 %38 -%39 = OpCompositeConstruct %14 %8 %8 %8 -%40 = OpCompositeConstruct %14 %8 %8 %8 -%43 = OpCompositeExtract %9 %39 0 -%44 = OpCompositeExtract %9 %40 0 -%45 = OpIMul %9 %43 %44 -%46 = OpIAdd %9 %42 %45 -%47 = OpCompositeExtract %9 %39 1 -%48 = OpCompositeExtract %9 %40 1 -%49 = OpIMul %9 %47 %48 -%50 = OpIAdd %9 %46 %49 -%51 = OpCompositeExtract %9 %39 2 -%52 = OpCompositeExtract %9 %40 2 -%53 = OpIMul %9 %51 %52 -%41 = OpIAdd %9 %50 %53 -%54 = OpCompositeConstruct %15 %10 %10 %10 %10 -%55 = OpCompositeConstruct %15 %11 %11 %11 %11 -%58 = OpCompositeExtract %7 %54 0 -%59 = OpCompositeExtract %7 %55 0 -%60 = OpIMul %7 %58 %59 -%61 = OpIAdd %7 %57 %60 -%62 = OpCompositeExtract %7 %54 1 -%63 = OpCompositeExtract %7 %55 1 -%64 = OpIMul %7 %62 %63 -%65 = OpIAdd %7 %61 %64 -%66 = OpCompositeExtract %7 %54 2 -%67 = OpCompositeExtract %7 %55 2 -%68 = OpIMul %7 %66 %67 -%69 = OpIAdd %7 %65 %68 -%70 = OpCompositeExtract %7 %54 3 -%71 = OpCompositeExtract %7 %55 3 -%72 = OpIMul %7 %70 %71 -%56 = OpIAdd %7 %69 %72 +%28 = OpCompositeConstruct %6 %23 %23 +%29 = OpCompositeConstruct %6 %23 %23 +%32 = OpCompositeExtract %5 %28 0 +%33 = OpCompositeExtract %5 %29 0 +%34 = OpIMul %5 %32 %33 +%35 = OpIAdd %5 %31 %34 +%36 = OpCompositeExtract %5 %28 1 +%37 = OpCompositeExtract %5 %29 1 +%38 = OpIMul %5 %36 %37 +%30 = OpIAdd %5 %35 %38 +%39 = OpCompositeConstruct %7 %24 %24 %24 +%40 = OpCompositeConstruct %7 %24 %24 %24 +%43 = OpCompositeExtract %8 %39 0 +%44 = OpCompositeExtract %8 %40 0 +%45 = OpIMul %8 %43 %44 +%46 = OpIAdd %8 %42 %45 +%47 = OpCompositeExtract %8 %39 1 +%48 = OpCompositeExtract %8 %40 1 +%49 = OpIMul %8 %47 %48 +%50 = OpIAdd %8 %46 %49 +%51 = OpCompositeExtract %8 %39 2 +%52 = OpCompositeExtract %8 %40 2 +%53 = OpIMul %8 %51 %52 +%41 = OpIAdd %8 %50 %53 +%54 = OpCompositeConstruct %9 %25 %25 %25 %25 +%55 = OpCompositeConstruct %9 %26 %26 %26 %26 +%58 = OpCompositeExtract %5 %54 0 +%59 = OpCompositeExtract %5 %55 0 +%60 = OpIMul %5 %58 %59 +%61 = OpIAdd %5 %57 %60 +%62 = OpCompositeExtract %5 %54 1 +%63 = OpCompositeExtract %5 %55 1 +%64 = OpIMul %5 %62 %63 +%65 = OpIAdd %5 %61 %64 +%66 = OpCompositeExtract %5 %54 2 +%67 = OpCompositeExtract %5 %55 2 +%68 = OpIMul %5 %66 %67 +%69 = OpIAdd %5 %65 %68 +%70 = OpCompositeExtract %5 %54 3 +%71 = OpCompositeExtract %5 %55 3 +%72 = OpIMul %5 %70 %71 +%56 = OpIAdd %5 %69 %72 OpReturnValue %56 OpFunctionEnd %74 = OpFunction %2 None %75 %73 = OpLabel OpBranch %76 %76 = OpLabel -%77 = OpFunctionCall %12 %17 -%78 = OpFunctionCall %7 %25 +%77 = OpFunctionCall %3 %11 +%78 = OpFunctionCall %5 %21 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/globals.spvasm b/tests/out/spv/globals.spvasm index 5b801db0fb..f2cc50b3d2 100644 --- a/tests/out/spv/globals.spvasm +++ b/tests/out/spv/globals.spvasm @@ -6,48 +6,48 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %110 "main" %128 -OpExecutionMode %110 LocalSize 1 1 1 -OpDecorate %24 ArrayStride 4 -OpMemberDecorate %26 0 Offset 0 -OpMemberDecorate %26 1 Offset 12 -OpDecorate %28 ArrayStride 8 -OpDecorate %30 ArrayStride 16 -OpDecorate %33 ArrayStride 32 -OpDecorate %34 ArrayStride 64 -OpDecorate %36 ArrayStride 32 -OpDecorate %37 ArrayStride 64 -OpDecorate %43 DescriptorSet 0 -OpDecorate %43 Binding 1 -OpDecorate %44 Block -OpMemberDecorate %44 0 Offset 0 -OpDecorate %46 NonWritable -OpDecorate %46 DescriptorSet 0 -OpDecorate %46 Binding 2 -OpDecorate %47 Block -OpMemberDecorate %47 0 Offset 0 -OpDecorate %49 DescriptorSet 0 -OpDecorate %49 Binding 3 -OpDecorate %50 Block -OpMemberDecorate %50 0 Offset 0 -OpDecorate %52 DescriptorSet 0 -OpDecorate %52 Binding 4 -OpDecorate %53 Block -OpMemberDecorate %53 0 Offset 0 -OpDecorate %55 DescriptorSet 0 -OpDecorate %55 Binding 5 -OpDecorate %56 Block -OpMemberDecorate %56 0 Offset 0 -OpMemberDecorate %56 0 ColMajor -OpMemberDecorate %56 0 MatrixStride 8 -OpDecorate %58 DescriptorSet 0 -OpDecorate %58 Binding 6 -OpDecorate %59 Block -OpMemberDecorate %59 0 Offset 0 -OpDecorate %61 DescriptorSet 0 -OpDecorate %61 Binding 7 -OpDecorate %62 Block -OpMemberDecorate %62 0 Offset 0 +OpEntryPoint GLCompute %102 "main" %128 +OpExecutionMode %102 LocalSize 1 1 1 +OpDecorate %11 ArrayStride 4 +OpMemberDecorate %13 0 Offset 0 +OpMemberDecorate %13 1 Offset 12 +OpDecorate %15 ArrayStride 8 +OpDecorate %17 ArrayStride 16 +OpDecorate %20 ArrayStride 32 +OpDecorate %21 ArrayStride 64 +OpDecorate %23 ArrayStride 32 +OpDecorate %24 ArrayStride 64 +OpDecorate %30 DescriptorSet 0 +OpDecorate %30 Binding 1 +OpDecorate %31 Block +OpMemberDecorate %31 0 Offset 0 +OpDecorate %33 NonWritable +OpDecorate %33 DescriptorSet 0 +OpDecorate %33 Binding 2 +OpDecorate %34 Block +OpMemberDecorate %34 0 Offset 0 +OpDecorate %36 DescriptorSet 0 +OpDecorate %36 Binding 3 +OpDecorate %37 Block +OpMemberDecorate %37 0 Offset 0 +OpDecorate %39 DescriptorSet 0 +OpDecorate %39 Binding 4 +OpDecorate %40 Block +OpMemberDecorate %40 0 Offset 0 +OpDecorate %42 DescriptorSet 0 +OpDecorate %42 Binding 5 +OpDecorate %43 Block +OpMemberDecorate %43 0 Offset 0 +OpMemberDecorate %43 0 ColMajor +OpMemberDecorate %43 0 MatrixStride 8 +OpDecorate %45 DescriptorSet 0 +OpDecorate %45 Binding 6 +OpDecorate %46 Block +OpMemberDecorate %46 0 Offset 0 +OpDecorate %48 DescriptorSet 0 +OpDecorate %48 Binding 7 +OpDecorate %49 Block +OpMemberDecorate %49 0 Offset 0 OpDecorate %128 BuiltIn LocalInvocationId %2 = OpTypeVoid %4 = OpTypeBool @@ -57,81 +57,81 @@ OpDecorate %128 BuiltIn LocalInvocationId %8 = OpTypeInt 32 1 %7 = OpConstant %8 20 %9 = OpConstant %8 2 -%11 = OpTypeFloat 32 -%10 = OpConstant %11 1.0 -%12 = OpConstant %8 1 -%13 = OpConstant %8 0 -%14 = OpConstant %11 2.0 -%15 = OpConstant %11 3.0 -%16 = OpConstant %8 7 -%17 = OpConstant %8 6 -%18 = OpConstant %8 5 -%19 = OpConstant %8 4 -%20 = OpConstant %8 3 -%21 = OpConstant %11 4.0 -%22 = OpConstant %6 2 -%23 = OpConstantTrue %4 -%24 = OpTypeArray %11 %5 -%25 = OpTypeVector %11 3 -%26 = OpTypeStruct %25 %11 -%27 = OpTypeVector %11 2 -%28 = OpTypeRuntimeArray %27 -%29 = OpTypeVector %11 4 -%30 = OpTypeArray %29 %7 -%31 = OpTypeMatrix %27 3 -%32 = OpTypeMatrix %29 2 -%33 = OpTypeArray %32 %9 -%34 = OpTypeArray %33 %9 -%35 = OpTypeMatrix %27 4 -%36 = OpTypeArray %35 %9 -%37 = OpTypeArray %36 %9 -%38 = OpTypeMatrix %25 3 -%40 = OpTypePointer Workgroup %24 -%39 = OpVariable %40 Workgroup -%42 = OpTypePointer Workgroup %6 -%41 = OpVariable %42 Workgroup -%44 = OpTypeStruct %26 -%45 = OpTypePointer StorageBuffer %44 -%43 = OpVariable %45 StorageBuffer -%47 = OpTypeStruct %28 -%48 = OpTypePointer StorageBuffer %47 -%46 = OpVariable %48 StorageBuffer -%50 = OpTypeStruct %30 -%51 = OpTypePointer Uniform %50 -%49 = OpVariable %51 Uniform -%53 = OpTypeStruct %25 -%54 = OpTypePointer Uniform %53 -%52 = OpVariable %54 Uniform -%56 = OpTypeStruct %31 -%57 = OpTypePointer Uniform %56 -%55 = OpVariable %57 Uniform -%59 = OpTypeStruct %34 -%60 = OpTypePointer Uniform %59 -%58 = OpVariable %60 Uniform -%62 = OpTypeStruct %37 -%63 = OpTypePointer Uniform %62 -%61 = OpVariable %63 Uniform -%67 = OpTypeFunction %2 %25 -%70 = OpTypePointer Function %8 -%71 = OpConstantNull %8 -%74 = OpTypeFunction %2 -%75 = OpTypePointer StorageBuffer %26 -%76 = OpConstant %6 0 -%78 = OpConstantNull %38 -%79 = OpConstantNull %38 -%81 = OpTypePointer StorageBuffer %25 -%84 = OpTypePointer StorageBuffer %11 -%104 = OpTypePointer Function %11 -%105 = OpConstantNull %11 -%107 = OpTypePointer Function %4 -%108 = OpConstantNull %4 -%112 = OpTypePointer StorageBuffer %28 -%114 = OpTypePointer Uniform %30 -%116 = OpTypePointer Uniform %25 -%118 = OpTypePointer Uniform %31 -%120 = OpTypePointer Uniform %34 -%122 = OpTypePointer Uniform %37 -%125 = OpConstantNull %24 +%10 = OpTypeFloat 32 +%11 = OpTypeArray %10 %5 +%12 = OpTypeVector %10 3 +%13 = OpTypeStruct %12 %10 +%14 = OpTypeVector %10 2 +%15 = OpTypeRuntimeArray %14 +%16 = OpTypeVector %10 4 +%17 = OpTypeArray %16 %7 +%18 = OpTypeMatrix %14 3 +%19 = OpTypeMatrix %16 2 +%20 = OpTypeArray %19 %9 +%21 = OpTypeArray %20 %9 +%22 = OpTypeMatrix %14 4 +%23 = OpTypeArray %22 %9 +%24 = OpTypeArray %23 %9 +%25 = OpTypeMatrix %12 3 +%27 = OpTypePointer Workgroup %11 +%26 = OpVariable %27 Workgroup +%29 = OpTypePointer Workgroup %6 +%28 = OpVariable %29 Workgroup +%31 = OpTypeStruct %13 +%32 = OpTypePointer StorageBuffer %31 +%30 = OpVariable %32 StorageBuffer +%34 = OpTypeStruct %15 +%35 = OpTypePointer StorageBuffer %34 +%33 = OpVariable %35 StorageBuffer +%37 = OpTypeStruct %17 +%38 = OpTypePointer Uniform %37 +%36 = OpVariable %38 Uniform +%40 = OpTypeStruct %12 +%41 = OpTypePointer Uniform %40 +%39 = OpVariable %41 Uniform +%43 = OpTypeStruct %18 +%44 = OpTypePointer Uniform %43 +%42 = OpVariable %44 Uniform +%46 = OpTypeStruct %21 +%47 = OpTypePointer Uniform %46 +%45 = OpVariable %47 Uniform +%49 = OpTypeStruct %24 +%50 = OpTypePointer Uniform %49 +%48 = OpVariable %50 Uniform +%54 = OpTypeFunction %2 %12 +%57 = OpTypePointer Function %8 +%58 = OpConstantNull %8 +%61 = OpTypeFunction %2 +%62 = OpTypePointer StorageBuffer %13 +%63 = OpConstant %6 0 +%65 = OpConstant %10 1.0 +%66 = OpConstant %8 1 +%67 = OpConstant %8 0 +%68 = OpConstant %10 2.0 +%69 = OpConstant %10 3.0 +%70 = OpConstantNull %25 +%71 = OpConstantNull %25 +%73 = OpTypePointer StorageBuffer %12 +%76 = OpTypePointer StorageBuffer %10 +%96 = OpTypePointer Function %10 +%97 = OpConstantNull %10 +%99 = OpTypePointer Function %4 +%100 = OpConstantNull %4 +%104 = OpTypePointer StorageBuffer %15 +%106 = OpTypePointer Uniform %17 +%108 = OpTypePointer Uniform %12 +%110 = OpTypePointer Uniform %18 +%112 = OpTypePointer Uniform %21 +%114 = OpTypePointer Uniform %24 +%116 = OpConstant %8 7 +%117 = OpConstant %8 6 +%118 = OpConstant %8 5 +%119 = OpConstant %8 4 +%120 = OpConstant %8 3 +%121 = OpConstant %10 4.0 +%122 = OpConstant %6 2 +%123 = OpConstantTrue %4 +%125 = OpConstantNull %11 %126 = OpConstantNull %6 %127 = OpTypeVector %6 3 %129 = OpTypePointer Input %127 @@ -139,74 +139,74 @@ OpDecorate %128 BuiltIn LocalInvocationId %131 = OpConstantNull %127 %132 = OpTypeVector %4 3 %137 = OpConstant %6 264 -%140 = OpTypePointer Workgroup %11 -%141 = OpTypePointer Uniform %36 -%142 = OpTypePointer Uniform %35 -%145 = OpTypePointer Uniform %33 -%146 = OpTypePointer Uniform %32 -%147 = OpTypePointer Uniform %29 +%140 = OpTypePointer Workgroup %10 +%141 = OpTypePointer Uniform %23 +%142 = OpTypePointer Uniform %22 +%145 = OpTypePointer Uniform %20 +%146 = OpTypePointer Uniform %19 +%147 = OpTypePointer Uniform %16 %152 = OpConstant %6 7 %158 = OpConstant %6 6 -%160 = OpTypePointer StorageBuffer %27 +%160 = OpTypePointer StorageBuffer %14 %161 = OpConstant %6 1 %164 = OpConstant %6 5 -%166 = OpTypePointer Uniform %29 -%167 = OpTypePointer Uniform %11 +%166 = OpTypePointer Uniform %16 +%167 = OpTypePointer Uniform %10 %168 = OpConstant %6 3 %171 = OpConstant %6 4 -%173 = OpTypePointer StorageBuffer %11 +%173 = OpTypePointer StorageBuffer %10 %184 = OpConstant %6 256 -%66 = OpFunction %2 None %67 -%65 = OpFunctionParameter %25 -%64 = OpLabel -OpBranch %68 -%68 = OpLabel +%53 = OpFunction %2 None %54 +%52 = OpFunctionParameter %12 +%51 = OpLabel +OpBranch %55 +%55 = OpLabel OpReturn OpFunctionEnd -%73 = OpFunction %2 None %74 +%60 = OpFunction %2 None %61 +%59 = OpLabel +%56 = OpVariable %57 Function %58 +%64 = OpAccessChain %62 %30 %63 +OpBranch %72 %72 = OpLabel -%69 = OpVariable %70 Function %71 -%77 = OpAccessChain %75 %43 %76 -OpBranch %80 -%80 = OpLabel -%82 = OpCompositeConstruct %25 %10 %10 %10 -%83 = OpAccessChain %81 %77 %76 -OpStore %83 %82 -OpStore %69 %12 -%85 = OpAccessChain %84 %77 %76 %76 -OpStore %85 %10 -%86 = OpAccessChain %84 %77 %76 %76 -OpStore %86 %14 -%87 = OpLoad %8 %69 -%88 = OpAccessChain %84 %77 %76 %87 -OpStore %88 %15 -%89 = OpLoad %26 %77 -%90 = OpCompositeExtract %25 %89 0 -%91 = OpCompositeExtract %25 %89 0 -%92 = OpVectorShuffle %27 %91 %91 2 0 -%93 = OpCompositeExtract %25 %89 0 -%94 = OpFunctionCall %2 %66 %93 -%95 = OpCompositeExtract %25 %89 0 -%96 = OpVectorTimesMatrix %25 %95 %78 -%97 = OpCompositeExtract %25 %89 0 -%98 = OpMatrixTimesVector %25 %79 %97 -%99 = OpCompositeExtract %25 %89 0 -%100 = OpVectorTimesScalar %25 %99 %14 -%101 = OpCompositeExtract %25 %89 0 -%102 = OpVectorTimesScalar %25 %101 %14 +%74 = OpCompositeConstruct %12 %65 %65 %65 +%75 = OpAccessChain %73 %64 %63 +OpStore %75 %74 +OpStore %56 %66 +%77 = OpAccessChain %76 %64 %63 %63 +OpStore %77 %65 +%78 = OpAccessChain %76 %64 %63 %63 +OpStore %78 %68 +%79 = OpLoad %8 %56 +%80 = OpAccessChain %76 %64 %63 %79 +OpStore %80 %69 +%81 = OpLoad %13 %64 +%82 = OpCompositeExtract %12 %81 0 +%83 = OpCompositeExtract %12 %81 0 +%84 = OpVectorShuffle %14 %83 %83 2 0 +%85 = OpCompositeExtract %12 %81 0 +%86 = OpFunctionCall %2 %53 %85 +%87 = OpCompositeExtract %12 %81 0 +%88 = OpVectorTimesMatrix %12 %87 %70 +%89 = OpCompositeExtract %12 %81 0 +%90 = OpMatrixTimesVector %12 %71 %89 +%91 = OpCompositeExtract %12 %81 0 +%92 = OpVectorTimesScalar %12 %91 %68 +%93 = OpCompositeExtract %12 %81 0 +%94 = OpVectorTimesScalar %12 %93 %68 OpReturn OpFunctionEnd -%110 = OpFunction %2 None %74 -%109 = OpLabel -%103 = OpVariable %104 Function %105 -%106 = OpVariable %107 Function %108 -%111 = OpAccessChain %75 %43 %76 -%113 = OpAccessChain %112 %46 %76 -%115 = OpAccessChain %114 %49 %76 -%117 = OpAccessChain %116 %52 %76 -%119 = OpAccessChain %118 %55 %76 -%121 = OpAccessChain %120 %58 %76 -%123 = OpAccessChain %122 %61 %76 +%102 = OpFunction %2 None %61 +%101 = OpLabel +%95 = OpVariable %96 Function %97 +%98 = OpVariable %99 Function %100 +%103 = OpAccessChain %62 %30 %63 +%105 = OpAccessChain %104 %33 %63 +%107 = OpAccessChain %106 %36 %63 +%109 = OpAccessChain %108 %39 %63 +%111 = OpAccessChain %110 %42 %63 +%113 = OpAccessChain %112 %45 %63 +%115 = OpAccessChain %114 %48 %63 OpBranch %124 %124 = OpLabel %130 = OpLoad %127 %128 @@ -215,52 +215,52 @@ OpBranch %124 OpSelectionMerge %135 None OpBranchConditional %134 %136 %135 %136 = OpLabel -OpStore %39 %125 -OpStore %41 %126 +OpStore %26 %125 +OpStore %28 %126 OpBranch %135 %135 = OpLabel -OpControlBarrier %22 %22 %137 +OpControlBarrier %122 %122 %137 OpBranch %138 %138 = OpLabel -%139 = OpFunctionCall %2 %73 -%143 = OpAccessChain %142 %123 %76 %76 -%144 = OpLoad %35 %143 -%148 = OpAccessChain %147 %121 %76 %76 %76 -%149 = OpLoad %29 %148 -%150 = OpMatrixTimesVector %27 %144 %149 -%151 = OpCompositeExtract %11 %150 0 -%153 = OpAccessChain %140 %39 %152 +%139 = OpFunctionCall %2 %60 +%143 = OpAccessChain %142 %115 %63 %63 +%144 = OpLoad %22 %143 +%148 = OpAccessChain %147 %113 %63 %63 %63 +%149 = OpLoad %16 %148 +%150 = OpMatrixTimesVector %14 %144 %149 +%151 = OpCompositeExtract %10 %150 0 +%153 = OpAccessChain %140 %26 %152 OpStore %153 %151 -%154 = OpLoad %31 %119 -%155 = OpLoad %25 %117 -%156 = OpMatrixTimesVector %27 %154 %155 -%157 = OpCompositeExtract %11 %156 0 -%159 = OpAccessChain %140 %39 %158 +%154 = OpLoad %18 %111 +%155 = OpLoad %12 %109 +%156 = OpMatrixTimesVector %14 %154 %155 +%157 = OpCompositeExtract %10 %156 0 +%159 = OpAccessChain %140 %26 %158 OpStore %159 %157 -%162 = OpAccessChain %84 %113 %161 %161 -%163 = OpLoad %11 %162 -%165 = OpAccessChain %140 %39 %164 +%162 = OpAccessChain %76 %105 %161 %161 +%163 = OpLoad %10 %162 +%165 = OpAccessChain %140 %26 %164 OpStore %165 %163 -%169 = OpAccessChain %167 %115 %76 %168 -%170 = OpLoad %11 %169 -%172 = OpAccessChain %140 %39 %171 +%169 = OpAccessChain %167 %107 %63 %168 +%170 = OpLoad %10 %169 +%172 = OpAccessChain %140 %26 %171 OpStore %172 %170 -%174 = OpAccessChain %173 %111 %161 -%175 = OpLoad %11 %174 -%176 = OpAccessChain %140 %39 %168 +%174 = OpAccessChain %173 %103 %161 +%175 = OpLoad %10 %174 +%176 = OpAccessChain %140 %26 %168 OpStore %176 %175 -%177 = OpAccessChain %84 %111 %76 %76 -%178 = OpLoad %11 %177 -%179 = OpAccessChain %140 %39 %22 +%177 = OpAccessChain %76 %103 %63 %63 +%178 = OpLoad %10 %177 +%179 = OpAccessChain %140 %26 %122 OpStore %179 %178 -%180 = OpAccessChain %173 %111 %161 -OpStore %180 %21 -%181 = OpArrayLength %6 %46 0 -%182 = OpConvertUToF %11 %181 -%183 = OpAccessChain %140 %39 %161 +%180 = OpAccessChain %173 %103 %161 +OpStore %180 %121 +%181 = OpArrayLength %6 %33 0 +%182 = OpConvertUToF %10 %181 +%183 = OpAccessChain %140 %26 %161 OpStore %183 %182 -OpAtomicStore %41 %9 %184 %22 -OpStore %103 %10 -OpStore %106 %23 +OpAtomicStore %28 %9 %184 %122 +OpStore %95 %65 +OpStore %98 %123 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/image.spvasm b/tests/out/spv/image.spvasm index 040ded2af0..7b9aa5ed63 100644 --- a/tests/out/spv/image.spvasm +++ b/tests/out/spv/image.spvasm @@ -9,713 +9,713 @@ OpCapability Shader OpCapability Sampled1D %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %89 "main" %86 -OpEntryPoint GLCompute %177 "depth_load" %175 -OpEntryPoint Vertex %199 "queries" %197 -OpEntryPoint Vertex %263 "levels_queries" %262 -OpEntryPoint Fragment %303 "texture_sample" %302 +OpEntryPoint GLCompute %82 "main" %79 +OpEntryPoint GLCompute %172 "depth_load" %170 +OpEntryPoint Vertex %194 "queries" %192 +OpEntryPoint Vertex %259 "levels_queries" %258 +OpEntryPoint Fragment %299 "texture_sample" %298 OpEntryPoint Fragment %444 "texture_sample_comparison" %442 OpEntryPoint Fragment %499 "gather" %498 OpEntryPoint Fragment %534 "depth_no_comparison" %533 -OpExecutionMode %89 LocalSize 16 1 1 -OpExecutionMode %177 LocalSize 16 1 1 -OpExecutionMode %303 OriginUpperLeft +OpExecutionMode %82 LocalSize 16 1 1 +OpExecutionMode %172 LocalSize 16 1 1 +OpExecutionMode %299 OriginUpperLeft OpExecutionMode %444 OriginUpperLeft OpExecutionMode %499 OriginUpperLeft OpExecutionMode %534 OriginUpperLeft OpSource GLSL 450 -OpName %42 "image_mipmapped_src" -OpName %44 "image_multisampled_src" -OpName %46 "image_depth_multisampled_src" -OpName %48 "image_storage_src" -OpName %50 "image_array_src" -OpName %52 "image_dup_src" -OpName %54 "image_1d_src" -OpName %56 "image_dst" -OpName %58 "image_1d" -OpName %60 "image_2d" -OpName %62 "image_2d_u32" -OpName %63 "image_2d_i32" -OpName %65 "image_2d_array" -OpName %67 "image_cube" -OpName %69 "image_cube_array" -OpName %71 "image_3d" -OpName %73 "image_aa" -OpName %75 "sampler_reg" -OpName %77 "sampler_cmp" -OpName %79 "image_2d_depth" -OpName %81 "image_2d_array_depth" -OpName %83 "image_cube_depth" -OpName %86 "local_id" -OpName %89 "main" -OpName %175 "local_id" -OpName %177 "depth_load" -OpName %199 "queries" -OpName %263 "levels_queries" -OpName %298 "a" -OpName %303 "texture_sample" +OpName %35 "image_mipmapped_src" +OpName %37 "image_multisampled_src" +OpName %39 "image_depth_multisampled_src" +OpName %41 "image_storage_src" +OpName %43 "image_array_src" +OpName %45 "image_dup_src" +OpName %47 "image_1d_src" +OpName %49 "image_dst" +OpName %51 "image_1d" +OpName %53 "image_2d" +OpName %55 "image_2d_u32" +OpName %56 "image_2d_i32" +OpName %58 "image_2d_array" +OpName %60 "image_cube" +OpName %62 "image_cube_array" +OpName %64 "image_3d" +OpName %66 "image_aa" +OpName %68 "sampler_reg" +OpName %70 "sampler_cmp" +OpName %72 "image_2d_depth" +OpName %74 "image_2d_array_depth" +OpName %76 "image_cube_depth" +OpName %79 "local_id" +OpName %82 "main" +OpName %170 "local_id" +OpName %172 "depth_load" +OpName %194 "queries" +OpName %259 "levels_queries" +OpName %294 "a" +OpName %299 "texture_sample" OpName %438 "a" OpName %444 "texture_sample_comparison" OpName %499 "gather" OpName %534 "depth_no_comparison" -OpDecorate %42 DescriptorSet 0 -OpDecorate %42 Binding 0 -OpDecorate %44 DescriptorSet 0 -OpDecorate %44 Binding 3 -OpDecorate %46 DescriptorSet 0 -OpDecorate %46 Binding 4 -OpDecorate %48 NonWritable -OpDecorate %48 DescriptorSet 0 -OpDecorate %48 Binding 1 -OpDecorate %50 DescriptorSet 0 -OpDecorate %50 Binding 5 -OpDecorate %52 NonWritable -OpDecorate %52 DescriptorSet 0 -OpDecorate %52 Binding 6 -OpDecorate %54 DescriptorSet 0 -OpDecorate %54 Binding 7 -OpDecorate %56 NonReadable +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 0 +OpDecorate %37 DescriptorSet 0 +OpDecorate %37 Binding 3 +OpDecorate %39 DescriptorSet 0 +OpDecorate %39 Binding 4 +OpDecorate %41 NonWritable +OpDecorate %41 DescriptorSet 0 +OpDecorate %41 Binding 1 +OpDecorate %43 DescriptorSet 0 +OpDecorate %43 Binding 5 +OpDecorate %45 NonWritable +OpDecorate %45 DescriptorSet 0 +OpDecorate %45 Binding 6 +OpDecorate %47 DescriptorSet 0 +OpDecorate %47 Binding 7 +OpDecorate %49 NonReadable +OpDecorate %49 DescriptorSet 0 +OpDecorate %49 Binding 2 +OpDecorate %51 DescriptorSet 0 +OpDecorate %51 Binding 0 +OpDecorate %53 DescriptorSet 0 +OpDecorate %53 Binding 1 +OpDecorate %55 DescriptorSet 0 +OpDecorate %55 Binding 2 OpDecorate %56 DescriptorSet 0 -OpDecorate %56 Binding 2 +OpDecorate %56 Binding 3 OpDecorate %58 DescriptorSet 0 -OpDecorate %58 Binding 0 +OpDecorate %58 Binding 4 OpDecorate %60 DescriptorSet 0 -OpDecorate %60 Binding 1 +OpDecorate %60 Binding 5 OpDecorate %62 DescriptorSet 0 -OpDecorate %62 Binding 2 -OpDecorate %63 DescriptorSet 0 -OpDecorate %63 Binding 3 -OpDecorate %65 DescriptorSet 0 -OpDecorate %65 Binding 4 -OpDecorate %67 DescriptorSet 0 -OpDecorate %67 Binding 5 -OpDecorate %69 DescriptorSet 0 -OpDecorate %69 Binding 6 -OpDecorate %71 DescriptorSet 0 -OpDecorate %71 Binding 7 -OpDecorate %73 DescriptorSet 0 -OpDecorate %73 Binding 8 -OpDecorate %75 DescriptorSet 1 -OpDecorate %75 Binding 0 -OpDecorate %77 DescriptorSet 1 -OpDecorate %77 Binding 1 -OpDecorate %79 DescriptorSet 1 -OpDecorate %79 Binding 2 -OpDecorate %81 DescriptorSet 1 -OpDecorate %81 Binding 3 -OpDecorate %83 DescriptorSet 1 -OpDecorate %83 Binding 4 -OpDecorate %86 BuiltIn LocalInvocationId -OpDecorate %175 BuiltIn LocalInvocationId -OpDecorate %197 BuiltIn Position -OpDecorate %262 BuiltIn Position -OpDecorate %302 Location 0 +OpDecorate %62 Binding 6 +OpDecorate %64 DescriptorSet 0 +OpDecorate %64 Binding 7 +OpDecorate %66 DescriptorSet 0 +OpDecorate %66 Binding 8 +OpDecorate %68 DescriptorSet 1 +OpDecorate %68 Binding 0 +OpDecorate %70 DescriptorSet 1 +OpDecorate %70 Binding 1 +OpDecorate %72 DescriptorSet 1 +OpDecorate %72 Binding 2 +OpDecorate %74 DescriptorSet 1 +OpDecorate %74 Binding 3 +OpDecorate %76 DescriptorSet 1 +OpDecorate %76 Binding 4 +OpDecorate %79 BuiltIn LocalInvocationId +OpDecorate %170 BuiltIn LocalInvocationId +OpDecorate %192 BuiltIn Position +OpDecorate %258 BuiltIn Position +OpDecorate %298 Location 0 OpDecorate %442 Location 0 OpDecorate %498 Location 0 OpDecorate %533 Location 0 %2 = OpTypeVoid %4 = OpTypeInt 32 1 -%3 = OpConstant %4 10 -%5 = OpConstant %4 20 -%6 = OpConstant %4 1 -%8 = OpTypeFloat 32 -%7 = OpConstant %8 0.5 -%9 = OpConstant %8 2.3 -%10 = OpConstant %4 3 -%11 = OpConstant %8 2.0 -%13 = OpTypeInt 32 0 -%12 = OpConstant %13 0 -%14 = OpConstant %4 0 -%15 = OpTypeImage %13 2D 0 0 0 1 Unknown -%16 = OpTypeImage %13 2D 0 0 1 1 Unknown -%17 = OpTypeImage %8 2D 1 0 1 1 Unknown -%18 = OpTypeImage %13 2D 0 0 0 2 Rgba8ui -%19 = OpTypeImage %13 2D 0 1 0 1 Unknown -%20 = OpTypeImage %13 1D 0 0 0 2 R32ui -%21 = OpTypeImage %13 1D 0 0 0 1 Unknown -%22 = OpTypeVector %13 3 -%23 = OpTypeVector %4 2 -%24 = OpTypeVector %13 2 -%25 = OpTypeVector %13 4 -%26 = OpTypeImage %8 1D 0 0 0 1 Unknown -%27 = OpTypeImage %8 2D 0 0 0 1 Unknown -%28 = OpTypeImage %4 2D 0 0 0 1 Unknown -%29 = OpTypeImage %8 2D 0 1 0 1 Unknown -%30 = OpTypeImage %8 Cube 0 0 0 1 Unknown -%31 = OpTypeImage %8 Cube 0 1 0 1 Unknown -%32 = OpTypeImage %8 3D 0 0 0 1 Unknown -%33 = OpTypeImage %8 2D 0 0 1 1 Unknown -%34 = OpTypeVector %8 4 -%35 = OpTypeSampler -%36 = OpTypeVector %8 2 -%37 = OpTypeVector %8 3 -%38 = OpTypeImage %8 2D 1 0 0 1 Unknown -%39 = OpTypeImage %8 2D 1 1 0 1 Unknown -%40 = OpTypeImage %8 Cube 1 0 0 1 Unknown -%41 = OpConstantComposite %23 %10 %6 -%43 = OpTypePointer UniformConstant %15 -%42 = OpVariable %43 UniformConstant -%45 = OpTypePointer UniformConstant %16 -%44 = OpVariable %45 UniformConstant -%47 = OpTypePointer UniformConstant %17 -%46 = OpVariable %47 UniformConstant -%49 = OpTypePointer UniformConstant %18 -%48 = OpVariable %49 UniformConstant -%51 = OpTypePointer UniformConstant %19 -%50 = OpVariable %51 UniformConstant -%53 = OpTypePointer UniformConstant %20 -%52 = OpVariable %53 UniformConstant -%55 = OpTypePointer UniformConstant %21 -%54 = OpVariable %55 UniformConstant -%57 = OpTypePointer UniformConstant %20 +%3 = OpConstant %4 3 +%5 = OpConstant %4 1 +%7 = OpTypeInt 32 0 +%6 = OpTypeImage %7 2D 0 0 0 1 Unknown +%8 = OpTypeImage %7 2D 0 0 1 1 Unknown +%10 = OpTypeFloat 32 +%9 = OpTypeImage %10 2D 1 0 1 1 Unknown +%11 = OpTypeImage %7 2D 0 0 0 2 Rgba8ui +%12 = OpTypeImage %7 2D 0 1 0 1 Unknown +%13 = OpTypeImage %7 1D 0 0 0 2 R32ui +%14 = OpTypeImage %7 1D 0 0 0 1 Unknown +%15 = OpTypeVector %7 3 +%16 = OpTypeVector %4 2 +%17 = OpTypeVector %7 2 +%18 = OpTypeVector %7 4 +%19 = OpTypeImage %10 1D 0 0 0 1 Unknown +%20 = OpTypeImage %10 2D 0 0 0 1 Unknown +%21 = OpTypeImage %4 2D 0 0 0 1 Unknown +%22 = OpTypeImage %10 2D 0 1 0 1 Unknown +%23 = OpTypeImage %10 Cube 0 0 0 1 Unknown +%24 = OpTypeImage %10 Cube 0 1 0 1 Unknown +%25 = OpTypeImage %10 3D 0 0 0 1 Unknown +%26 = OpTypeImage %10 2D 0 0 1 1 Unknown +%27 = OpTypeVector %10 4 +%28 = OpTypeSampler +%29 = OpTypeVector %10 2 +%30 = OpTypeVector %10 3 +%31 = OpTypeImage %10 2D 1 0 0 1 Unknown +%32 = OpTypeImage %10 2D 1 1 0 1 Unknown +%33 = OpTypeImage %10 Cube 1 0 0 1 Unknown +%34 = OpConstantComposite %16 %3 %5 +%36 = OpTypePointer UniformConstant %6 +%35 = OpVariable %36 UniformConstant +%38 = OpTypePointer UniformConstant %8 +%37 = OpVariable %38 UniformConstant +%40 = OpTypePointer UniformConstant %9 +%39 = OpVariable %40 UniformConstant +%42 = OpTypePointer UniformConstant %11 +%41 = OpVariable %42 UniformConstant +%44 = OpTypePointer UniformConstant %12 +%43 = OpVariable %44 UniformConstant +%46 = OpTypePointer UniformConstant %13 +%45 = OpVariable %46 UniformConstant +%48 = OpTypePointer UniformConstant %14 +%47 = OpVariable %48 UniformConstant +%50 = OpTypePointer UniformConstant %13 +%49 = OpVariable %50 UniformConstant +%52 = OpTypePointer UniformConstant %19 +%51 = OpVariable %52 UniformConstant +%54 = OpTypePointer UniformConstant %20 +%53 = OpVariable %54 UniformConstant +%55 = OpVariable %36 UniformConstant +%57 = OpTypePointer UniformConstant %21 %56 = OpVariable %57 UniformConstant -%59 = OpTypePointer UniformConstant %26 +%59 = OpTypePointer UniformConstant %22 %58 = OpVariable %59 UniformConstant -%61 = OpTypePointer UniformConstant %27 +%61 = OpTypePointer UniformConstant %23 %60 = OpVariable %61 UniformConstant -%62 = OpVariable %43 UniformConstant -%64 = OpTypePointer UniformConstant %28 -%63 = OpVariable %64 UniformConstant -%66 = OpTypePointer UniformConstant %29 -%65 = OpVariable %66 UniformConstant -%68 = OpTypePointer UniformConstant %30 -%67 = OpVariable %68 UniformConstant -%70 = OpTypePointer UniformConstant %31 -%69 = OpVariable %70 UniformConstant -%72 = OpTypePointer UniformConstant %32 -%71 = OpVariable %72 UniformConstant -%74 = OpTypePointer UniformConstant %33 -%73 = OpVariable %74 UniformConstant -%76 = OpTypePointer UniformConstant %35 -%75 = OpVariable %76 UniformConstant -%78 = OpTypePointer UniformConstant %35 -%77 = OpVariable %78 UniformConstant -%80 = OpTypePointer UniformConstant %38 -%79 = OpVariable %80 UniformConstant -%82 = OpTypePointer UniformConstant %39 -%81 = OpVariable %82 UniformConstant -%84 = OpTypePointer UniformConstant %40 -%83 = OpVariable %84 UniformConstant -%87 = OpTypePointer Input %22 -%86 = OpVariable %87 Input -%90 = OpTypeFunction %2 -%117 = OpTypeVector %4 3 -%175 = OpVariable %87 Input -%198 = OpTypePointer Output %34 -%197 = OpVariable %198 Output -%262 = OpVariable %198 Output -%299 = OpTypePointer Function %34 -%300 = OpConstantNull %34 -%302 = OpVariable %198 Output -%313 = OpTypeSampledImage %26 -%318 = OpTypeSampledImage %27 -%339 = OpTypeSampledImage %29 -%400 = OpTypeSampledImage %31 -%439 = OpTypePointer Function %8 -%440 = OpConstantNull %8 -%443 = OpTypePointer Output %8 +%63 = OpTypePointer UniformConstant %24 +%62 = OpVariable %63 UniformConstant +%65 = OpTypePointer UniformConstant %25 +%64 = OpVariable %65 UniformConstant +%67 = OpTypePointer UniformConstant %26 +%66 = OpVariable %67 UniformConstant +%69 = OpTypePointer UniformConstant %28 +%68 = OpVariable %69 UniformConstant +%71 = OpTypePointer UniformConstant %28 +%70 = OpVariable %71 UniformConstant +%73 = OpTypePointer UniformConstant %31 +%72 = OpVariable %73 UniformConstant +%75 = OpTypePointer UniformConstant %32 +%74 = OpVariable %75 UniformConstant +%77 = OpTypePointer UniformConstant %33 +%76 = OpVariable %77 UniformConstant +%80 = OpTypePointer Input %15 +%79 = OpVariable %80 Input +%83 = OpTypeFunction %2 +%90 = OpConstant %4 10 +%91 = OpConstant %4 20 +%112 = OpTypeVector %4 3 +%170 = OpVariable %80 Input +%193 = OpTypePointer Output %27 +%192 = OpVariable %193 Output +%203 = OpConstant %7 0 +%258 = OpVariable %193 Output +%295 = OpTypePointer Function %27 +%296 = OpConstantNull %27 +%298 = OpVariable %193 Output +%305 = OpConstant %10 0.5 +%306 = OpConstant %10 2.3 +%307 = OpConstant %10 2.0 +%308 = OpConstant %4 0 +%313 = OpTypeSampledImage %19 +%318 = OpTypeSampledImage %20 +%339 = OpTypeSampledImage %22 +%400 = OpTypeSampledImage %24 +%439 = OpTypePointer Function %10 +%440 = OpConstantNull %10 +%443 = OpTypePointer Output %10 %442 = OpVariable %443 Output -%452 = OpTypeSampledImage %38 -%457 = OpTypeSampledImage %39 -%470 = OpTypeSampledImage %40 -%477 = OpConstant %8 0.0 -%498 = OpVariable %198 Output -%510 = OpConstant %13 1 -%513 = OpConstant %13 3 -%518 = OpTypeSampledImage %15 +%452 = OpTypeSampledImage %31 +%457 = OpTypeSampledImage %32 +%470 = OpTypeSampledImage %33 +%477 = OpConstant %10 0.0 +%498 = OpVariable %193 Output +%510 = OpConstant %7 1 +%513 = OpConstant %7 3 +%518 = OpTypeSampledImage %6 %521 = OpTypeVector %4 4 -%522 = OpTypeSampledImage %28 -%533 = OpVariable %198 Output -%89 = OpFunction %2 None %90 -%85 = OpLabel -%88 = OpLoad %22 %86 -%91 = OpLoad %15 %42 -%92 = OpLoad %16 %44 -%93 = OpLoad %18 %48 -%94 = OpLoad %19 %50 -%95 = OpLoad %21 %54 -%96 = OpLoad %20 %56 -OpBranch %97 -%97 = OpLabel -%98 = OpImageQuerySize %23 %93 -%99 = OpBitcast %24 %98 -%100 = OpVectorShuffle %24 %88 %88 0 1 -%101 = OpIMul %24 %99 %100 -%102 = OpBitcast %23 %101 -%103 = OpCompositeConstruct %23 %3 %5 -%104 = OpSRem %23 %102 %103 -%105 = OpCompositeExtract %13 %88 2 -%106 = OpBitcast %4 %105 -%107 = OpImageFetch %25 %91 %104 Lod %106 -%108 = OpCompositeExtract %13 %88 2 +%522 = OpTypeSampledImage %21 +%533 = OpVariable %193 Output +%82 = OpFunction %2 None %83 +%78 = OpLabel +%81 = OpLoad %15 %79 +%84 = OpLoad %6 %35 +%85 = OpLoad %8 %37 +%86 = OpLoad %11 %41 +%87 = OpLoad %12 %43 +%88 = OpLoad %14 %47 +%89 = OpLoad %13 %49 +OpBranch %92 +%92 = OpLabel +%93 = OpImageQuerySize %16 %86 +%94 = OpBitcast %17 %93 +%95 = OpVectorShuffle %17 %81 %81 0 1 +%96 = OpIMul %17 %94 %95 +%97 = OpBitcast %16 %96 +%98 = OpCompositeConstruct %16 %90 %91 +%99 = OpSRem %16 %97 %98 +%100 = OpCompositeExtract %7 %81 2 +%101 = OpBitcast %4 %100 +%102 = OpImageFetch %18 %84 %99 Lod %101 +%103 = OpCompositeExtract %7 %81 2 +%104 = OpBitcast %4 %103 +%105 = OpImageFetch %18 %85 %99 Sample %104 +%106 = OpImageRead %18 %86 %99 +%107 = OpCompositeExtract %7 %81 2 +%108 = OpCompositeExtract %7 %81 2 %109 = OpBitcast %4 %108 -%110 = OpImageFetch %25 %92 %104 Sample %109 -%111 = OpImageRead %25 %93 %104 -%112 = OpCompositeExtract %13 %88 2 -%113 = OpCompositeExtract %13 %88 2 -%114 = OpBitcast %4 %113 -%115 = OpIAdd %4 %114 %6 -%116 = OpBitcast %4 %112 -%118 = OpCompositeConstruct %117 %104 %116 -%119 = OpImageFetch %25 %94 %118 Lod %115 -%120 = OpCompositeExtract %13 %88 2 -%121 = OpBitcast %4 %120 -%122 = OpCompositeExtract %13 %88 2 +%110 = OpIAdd %4 %109 %5 +%111 = OpBitcast %4 %107 +%113 = OpCompositeConstruct %112 %99 %111 +%114 = OpImageFetch %18 %87 %113 Lod %110 +%115 = OpCompositeExtract %7 %81 2 +%116 = OpBitcast %4 %115 +%117 = OpCompositeExtract %7 %81 2 +%118 = OpBitcast %4 %117 +%119 = OpIAdd %4 %118 %5 +%120 = OpCompositeConstruct %112 %99 %116 +%121 = OpImageFetch %18 %87 %120 Lod %119 +%122 = OpCompositeExtract %7 %81 0 %123 = OpBitcast %4 %122 -%124 = OpIAdd %4 %123 %6 -%125 = OpCompositeConstruct %117 %104 %121 -%126 = OpImageFetch %25 %94 %125 Lod %124 -%127 = OpCompositeExtract %13 %88 0 -%128 = OpBitcast %4 %127 -%129 = OpCompositeExtract %13 %88 2 -%130 = OpBitcast %4 %129 -%131 = OpImageFetch %25 %95 %128 Lod %130 -%132 = OpBitcast %24 %104 -%133 = OpCompositeExtract %13 %88 2 -%134 = OpBitcast %4 %133 -%135 = OpImageFetch %25 %91 %132 Lod %134 -%136 = OpBitcast %24 %104 -%137 = OpCompositeExtract %13 %88 2 -%138 = OpBitcast %4 %137 -%139 = OpImageFetch %25 %92 %136 Sample %138 -%140 = OpBitcast %24 %104 -%141 = OpImageRead %25 %93 %140 -%142 = OpBitcast %24 %104 -%143 = OpCompositeExtract %13 %88 2 -%144 = OpCompositeExtract %13 %88 2 -%145 = OpBitcast %4 %144 -%146 = OpIAdd %4 %145 %6 -%147 = OpCompositeConstruct %22 %142 %143 -%148 = OpImageFetch %25 %94 %147 Lod %146 -%149 = OpBitcast %24 %104 -%150 = OpCompositeExtract %13 %88 2 -%151 = OpBitcast %4 %150 -%152 = OpCompositeExtract %13 %88 2 -%153 = OpBitcast %4 %152 -%154 = OpIAdd %4 %153 %6 -%155 = OpBitcast %13 %151 -%156 = OpCompositeConstruct %22 %149 %155 -%157 = OpImageFetch %25 %94 %156 Lod %154 -%158 = OpCompositeExtract %13 %88 0 -%160 = OpCompositeExtract %13 %88 2 -%161 = OpBitcast %4 %160 -%162 = OpImageFetch %25 %95 %158 Lod %161 -%163 = OpCompositeExtract %4 %104 0 -%164 = OpIAdd %25 %107 %110 -%165 = OpIAdd %25 %164 %111 -%166 = OpIAdd %25 %165 %119 -%167 = OpIAdd %25 %166 %126 -OpImageWrite %96 %163 %167 -%168 = OpCompositeExtract %4 %104 0 -%169 = OpBitcast %13 %168 -%170 = OpIAdd %25 %135 %139 -%171 = OpIAdd %25 %170 %141 -%172 = OpIAdd %25 %171 %148 -%173 = OpIAdd %25 %172 %157 -OpImageWrite %96 %169 %173 +%124 = OpCompositeExtract %7 %81 2 +%125 = OpBitcast %4 %124 +%126 = OpImageFetch %18 %88 %123 Lod %125 +%127 = OpBitcast %17 %99 +%128 = OpCompositeExtract %7 %81 2 +%129 = OpBitcast %4 %128 +%130 = OpImageFetch %18 %84 %127 Lod %129 +%131 = OpBitcast %17 %99 +%132 = OpCompositeExtract %7 %81 2 +%133 = OpBitcast %4 %132 +%134 = OpImageFetch %18 %85 %131 Sample %133 +%135 = OpBitcast %17 %99 +%136 = OpImageRead %18 %86 %135 +%137 = OpBitcast %17 %99 +%138 = OpCompositeExtract %7 %81 2 +%139 = OpCompositeExtract %7 %81 2 +%140 = OpBitcast %4 %139 +%141 = OpIAdd %4 %140 %5 +%142 = OpCompositeConstruct %15 %137 %138 +%143 = OpImageFetch %18 %87 %142 Lod %141 +%144 = OpBitcast %17 %99 +%145 = OpCompositeExtract %7 %81 2 +%146 = OpBitcast %4 %145 +%147 = OpCompositeExtract %7 %81 2 +%148 = OpBitcast %4 %147 +%149 = OpIAdd %4 %148 %5 +%150 = OpBitcast %7 %146 +%151 = OpCompositeConstruct %15 %144 %150 +%152 = OpImageFetch %18 %87 %151 Lod %149 +%153 = OpCompositeExtract %7 %81 0 +%155 = OpCompositeExtract %7 %81 2 +%156 = OpBitcast %4 %155 +%157 = OpImageFetch %18 %88 %153 Lod %156 +%158 = OpCompositeExtract %4 %99 0 +%159 = OpIAdd %18 %102 %105 +%160 = OpIAdd %18 %159 %106 +%161 = OpIAdd %18 %160 %114 +%162 = OpIAdd %18 %161 %121 +OpImageWrite %89 %158 %162 +%163 = OpCompositeExtract %4 %99 0 +%164 = OpBitcast %7 %163 +%165 = OpIAdd %18 %130 %134 +%166 = OpIAdd %18 %165 %136 +%167 = OpIAdd %18 %166 %143 +%168 = OpIAdd %18 %167 %152 +OpImageWrite %89 %164 %168 OpReturn OpFunctionEnd -%177 = OpFunction %2 None %90 -%174 = OpLabel -%176 = OpLoad %22 %175 -%178 = OpLoad %17 %46 -%179 = OpLoad %18 %48 -%180 = OpLoad %20 %56 -OpBranch %181 -%181 = OpLabel -%182 = OpImageQuerySize %23 %179 -%183 = OpBitcast %24 %182 -%184 = OpVectorShuffle %24 %176 %176 0 1 -%185 = OpIMul %24 %183 %184 -%186 = OpBitcast %23 %185 -%187 = OpCompositeConstruct %23 %3 %5 -%188 = OpSRem %23 %186 %187 -%189 = OpCompositeExtract %13 %176 2 -%190 = OpBitcast %4 %189 -%191 = OpImageFetch %34 %178 %188 Sample %190 -%192 = OpCompositeExtract %8 %191 0 -%193 = OpCompositeExtract %4 %188 0 -%194 = OpConvertFToU %13 %192 -%195 = OpCompositeConstruct %25 %194 %194 %194 %194 -OpImageWrite %180 %193 %195 +%172 = OpFunction %2 None %83 +%169 = OpLabel +%171 = OpLoad %15 %170 +%173 = OpLoad %9 %39 +%174 = OpLoad %11 %41 +%175 = OpLoad %13 %49 +OpBranch %176 +%176 = OpLabel +%177 = OpImageQuerySize %16 %174 +%178 = OpBitcast %17 %177 +%179 = OpVectorShuffle %17 %171 %171 0 1 +%180 = OpIMul %17 %178 %179 +%181 = OpBitcast %16 %180 +%182 = OpCompositeConstruct %16 %90 %91 +%183 = OpSRem %16 %181 %182 +%184 = OpCompositeExtract %7 %171 2 +%185 = OpBitcast %4 %184 +%186 = OpImageFetch %27 %173 %183 Sample %185 +%187 = OpCompositeExtract %10 %186 0 +%188 = OpCompositeExtract %4 %183 0 +%189 = OpConvertFToU %7 %187 +%190 = OpCompositeConstruct %18 %189 %189 %189 %189 +OpImageWrite %175 %188 %190 OpReturn OpFunctionEnd -%199 = OpFunction %2 None %90 -%196 = OpLabel -%200 = OpLoad %26 %58 -%201 = OpLoad %27 %60 -%202 = OpLoad %29 %65 -%203 = OpLoad %30 %67 -%204 = OpLoad %31 %69 -%205 = OpLoad %32 %71 -%206 = OpLoad %33 %73 -OpBranch %207 -%207 = OpLabel -%208 = OpImageQuerySizeLod %4 %200 %12 -%209 = OpBitcast %13 %208 -%210 = OpBitcast %4 %209 -%211 = OpImageQuerySizeLod %4 %200 %210 -%212 = OpBitcast %13 %211 -%213 = OpImageQuerySizeLod %23 %201 %12 -%214 = OpBitcast %24 %213 -%215 = OpImageQuerySizeLod %23 %201 %6 -%216 = OpBitcast %24 %215 -%217 = OpImageQuerySizeLod %117 %202 %12 -%218 = OpBitcast %22 %217 -%219 = OpVectorShuffle %24 %218 %218 0 1 -%220 = OpImageQuerySizeLod %117 %202 %6 -%221 = OpBitcast %22 %220 -%222 = OpVectorShuffle %24 %221 %221 0 1 -%223 = OpImageQuerySizeLod %23 %203 %12 -%224 = OpBitcast %24 %223 -%225 = OpImageQuerySizeLod %23 %203 %6 -%226 = OpBitcast %24 %225 -%227 = OpImageQuerySizeLod %117 %204 %12 -%228 = OpBitcast %22 %227 -%229 = OpVectorShuffle %24 %228 %228 0 0 -%230 = OpImageQuerySizeLod %117 %204 %6 -%231 = OpBitcast %22 %230 -%232 = OpVectorShuffle %24 %231 %231 0 0 -%233 = OpImageQuerySizeLod %117 %205 %12 -%234 = OpBitcast %22 %233 -%235 = OpImageQuerySizeLod %117 %205 %6 -%236 = OpBitcast %22 %235 -%237 = OpImageQuerySize %23 %206 -%238 = OpBitcast %24 %237 -%239 = OpCompositeExtract %13 %214 1 -%240 = OpIAdd %13 %209 %239 -%241 = OpCompositeExtract %13 %216 1 -%242 = OpIAdd %13 %240 %241 -%243 = OpCompositeExtract %13 %219 1 -%244 = OpIAdd %13 %242 %243 -%245 = OpCompositeExtract %13 %222 1 -%246 = OpIAdd %13 %244 %245 -%247 = OpCompositeExtract %13 %224 1 -%248 = OpIAdd %13 %246 %247 -%249 = OpCompositeExtract %13 %226 1 -%250 = OpIAdd %13 %248 %249 -%251 = OpCompositeExtract %13 %229 1 -%252 = OpIAdd %13 %250 %251 -%253 = OpCompositeExtract %13 %232 1 -%254 = OpIAdd %13 %252 %253 -%255 = OpCompositeExtract %13 %234 2 -%256 = OpIAdd %13 %254 %255 -%257 = OpCompositeExtract %13 %236 2 -%258 = OpIAdd %13 %256 %257 -%259 = OpConvertUToF %8 %258 -%260 = OpCompositeConstruct %34 %259 %259 %259 %259 -OpStore %197 %260 +%194 = OpFunction %2 None %83 +%191 = OpLabel +%195 = OpLoad %19 %51 +%196 = OpLoad %20 %53 +%197 = OpLoad %22 %58 +%198 = OpLoad %23 %60 +%199 = OpLoad %24 %62 +%200 = OpLoad %25 %64 +%201 = OpLoad %26 %66 +OpBranch %202 +%202 = OpLabel +%204 = OpImageQuerySizeLod %4 %195 %203 +%205 = OpBitcast %7 %204 +%206 = OpBitcast %4 %205 +%207 = OpImageQuerySizeLod %4 %195 %206 +%208 = OpBitcast %7 %207 +%209 = OpImageQuerySizeLod %16 %196 %203 +%210 = OpBitcast %17 %209 +%211 = OpImageQuerySizeLod %16 %196 %5 +%212 = OpBitcast %17 %211 +%213 = OpImageQuerySizeLod %112 %197 %203 +%214 = OpBitcast %15 %213 +%215 = OpVectorShuffle %17 %214 %214 0 1 +%216 = OpImageQuerySizeLod %112 %197 %5 +%217 = OpBitcast %15 %216 +%218 = OpVectorShuffle %17 %217 %217 0 1 +%219 = OpImageQuerySizeLod %16 %198 %203 +%220 = OpBitcast %17 %219 +%221 = OpImageQuerySizeLod %16 %198 %5 +%222 = OpBitcast %17 %221 +%223 = OpImageQuerySizeLod %112 %199 %203 +%224 = OpBitcast %15 %223 +%225 = OpVectorShuffle %17 %224 %224 0 0 +%226 = OpImageQuerySizeLod %112 %199 %5 +%227 = OpBitcast %15 %226 +%228 = OpVectorShuffle %17 %227 %227 0 0 +%229 = OpImageQuerySizeLod %112 %200 %203 +%230 = OpBitcast %15 %229 +%231 = OpImageQuerySizeLod %112 %200 %5 +%232 = OpBitcast %15 %231 +%233 = OpImageQuerySize %16 %201 +%234 = OpBitcast %17 %233 +%235 = OpCompositeExtract %7 %210 1 +%236 = OpIAdd %7 %205 %235 +%237 = OpCompositeExtract %7 %212 1 +%238 = OpIAdd %7 %236 %237 +%239 = OpCompositeExtract %7 %215 1 +%240 = OpIAdd %7 %238 %239 +%241 = OpCompositeExtract %7 %218 1 +%242 = OpIAdd %7 %240 %241 +%243 = OpCompositeExtract %7 %220 1 +%244 = OpIAdd %7 %242 %243 +%245 = OpCompositeExtract %7 %222 1 +%246 = OpIAdd %7 %244 %245 +%247 = OpCompositeExtract %7 %225 1 +%248 = OpIAdd %7 %246 %247 +%249 = OpCompositeExtract %7 %228 1 +%250 = OpIAdd %7 %248 %249 +%251 = OpCompositeExtract %7 %230 2 +%252 = OpIAdd %7 %250 %251 +%253 = OpCompositeExtract %7 %232 2 +%254 = OpIAdd %7 %252 %253 +%255 = OpConvertUToF %10 %254 +%256 = OpCompositeConstruct %27 %255 %255 %255 %255 +OpStore %192 %256 OpReturn OpFunctionEnd -%263 = OpFunction %2 None %90 -%261 = OpLabel -%264 = OpLoad %27 %60 -%265 = OpLoad %29 %65 -%266 = OpLoad %30 %67 -%267 = OpLoad %31 %69 -%268 = OpLoad %32 %71 -%269 = OpLoad %33 %73 -OpBranch %270 -%270 = OpLabel -%271 = OpImageQueryLevels %4 %264 -%272 = OpBitcast %13 %271 -%273 = OpImageQueryLevels %4 %265 -%274 = OpBitcast %13 %273 -%275 = OpImageQuerySizeLod %117 %265 %12 -%276 = OpCompositeExtract %4 %275 2 -%277 = OpBitcast %13 %276 -%278 = OpImageQueryLevels %4 %266 -%279 = OpBitcast %13 %278 -%280 = OpImageQueryLevels %4 %267 -%281 = OpBitcast %13 %280 -%282 = OpImageQuerySizeLod %117 %267 %12 -%283 = OpCompositeExtract %4 %282 2 -%284 = OpBitcast %13 %283 -%285 = OpImageQueryLevels %4 %268 -%286 = OpBitcast %13 %285 -%287 = OpImageQuerySamples %4 %269 -%288 = OpBitcast %13 %287 -%289 = OpIAdd %13 %277 %284 -%290 = OpIAdd %13 %289 %288 -%291 = OpIAdd %13 %290 %272 -%292 = OpIAdd %13 %291 %274 -%293 = OpIAdd %13 %292 %286 -%294 = OpIAdd %13 %293 %279 -%295 = OpIAdd %13 %294 %281 -%296 = OpConvertUToF %8 %295 -%297 = OpCompositeConstruct %34 %296 %296 %296 %296 -OpStore %262 %297 +%259 = OpFunction %2 None %83 +%257 = OpLabel +%260 = OpLoad %20 %53 +%261 = OpLoad %22 %58 +%262 = OpLoad %23 %60 +%263 = OpLoad %24 %62 +%264 = OpLoad %25 %64 +%265 = OpLoad %26 %66 +OpBranch %266 +%266 = OpLabel +%267 = OpImageQueryLevels %4 %260 +%268 = OpBitcast %7 %267 +%269 = OpImageQueryLevels %4 %261 +%270 = OpBitcast %7 %269 +%271 = OpImageQuerySizeLod %112 %261 %203 +%272 = OpCompositeExtract %4 %271 2 +%273 = OpBitcast %7 %272 +%274 = OpImageQueryLevels %4 %262 +%275 = OpBitcast %7 %274 +%276 = OpImageQueryLevels %4 %263 +%277 = OpBitcast %7 %276 +%278 = OpImageQuerySizeLod %112 %263 %203 +%279 = OpCompositeExtract %4 %278 2 +%280 = OpBitcast %7 %279 +%281 = OpImageQueryLevels %4 %264 +%282 = OpBitcast %7 %281 +%283 = OpImageQuerySamples %4 %265 +%284 = OpBitcast %7 %283 +%285 = OpIAdd %7 %273 %280 +%286 = OpIAdd %7 %285 %284 +%287 = OpIAdd %7 %286 %268 +%288 = OpIAdd %7 %287 %270 +%289 = OpIAdd %7 %288 %282 +%290 = OpIAdd %7 %289 %275 +%291 = OpIAdd %7 %290 %277 +%292 = OpConvertUToF %10 %291 +%293 = OpCompositeConstruct %27 %292 %292 %292 %292 +OpStore %258 %293 OpReturn OpFunctionEnd -%303 = OpFunction %2 None %90 -%301 = OpLabel -%298 = OpVariable %299 Function %300 -%304 = OpLoad %26 %58 -%305 = OpLoad %27 %60 -%306 = OpLoad %29 %65 -%307 = OpLoad %31 %69 -%308 = OpLoad %35 %75 +%299 = OpFunction %2 None %83 +%297 = OpLabel +%294 = OpVariable %295 Function %296 +%300 = OpLoad %19 %51 +%301 = OpLoad %20 %53 +%302 = OpLoad %22 %58 +%303 = OpLoad %24 %62 +%304 = OpLoad %28 %68 OpBranch %309 %309 = OpLabel -%310 = OpCompositeConstruct %36 %7 %7 -%311 = OpCompositeConstruct %37 %7 %7 %7 -%312 = OpCompositeExtract %8 %310 0 -%314 = OpSampledImage %313 %304 %308 -%315 = OpImageSampleImplicitLod %34 %314 %312 -%316 = OpLoad %34 %298 -%317 = OpFAdd %34 %316 %315 -OpStore %298 %317 -%319 = OpSampledImage %318 %305 %308 -%320 = OpImageSampleImplicitLod %34 %319 %310 -%321 = OpLoad %34 %298 -%322 = OpFAdd %34 %321 %320 -OpStore %298 %322 -%323 = OpSampledImage %318 %305 %308 -%324 = OpImageSampleImplicitLod %34 %323 %310 ConstOffset %41 -%325 = OpLoad %34 %298 -%326 = OpFAdd %34 %325 %324 -OpStore %298 %326 -%327 = OpSampledImage %318 %305 %308 -%328 = OpImageSampleExplicitLod %34 %327 %310 Lod %9 -%329 = OpLoad %34 %298 -%330 = OpFAdd %34 %329 %328 -OpStore %298 %330 -%331 = OpSampledImage %318 %305 %308 -%332 = OpImageSampleExplicitLod %34 %331 %310 Lod|ConstOffset %9 %41 -%333 = OpLoad %34 %298 -%334 = OpFAdd %34 %333 %332 -OpStore %298 %334 -%335 = OpSampledImage %318 %305 %308 -%336 = OpImageSampleImplicitLod %34 %335 %310 Bias|ConstOffset %11 %41 -%337 = OpLoad %34 %298 -%338 = OpFAdd %34 %337 %336 -OpStore %298 %338 -%340 = OpConvertUToF %8 %12 -%341 = OpCompositeConstruct %37 %310 %340 -%342 = OpSampledImage %339 %306 %308 -%343 = OpImageSampleImplicitLod %34 %342 %341 -%344 = OpLoad %34 %298 -%345 = OpFAdd %34 %344 %343 -OpStore %298 %345 -%346 = OpConvertUToF %8 %12 -%347 = OpCompositeConstruct %37 %310 %346 -%348 = OpSampledImage %339 %306 %308 -%349 = OpImageSampleImplicitLod %34 %348 %347 ConstOffset %41 -%350 = OpLoad %34 %298 -%351 = OpFAdd %34 %350 %349 -OpStore %298 %351 -%352 = OpConvertUToF %8 %12 -%353 = OpCompositeConstruct %37 %310 %352 -%354 = OpSampledImage %339 %306 %308 -%355 = OpImageSampleExplicitLod %34 %354 %353 Lod %9 -%356 = OpLoad %34 %298 -%357 = OpFAdd %34 %356 %355 -OpStore %298 %357 -%358 = OpConvertUToF %8 %12 -%359 = OpCompositeConstruct %37 %310 %358 -%360 = OpSampledImage %339 %306 %308 -%361 = OpImageSampleExplicitLod %34 %360 %359 Lod|ConstOffset %9 %41 -%362 = OpLoad %34 %298 -%363 = OpFAdd %34 %362 %361 -OpStore %298 %363 -%364 = OpConvertUToF %8 %12 -%365 = OpCompositeConstruct %37 %310 %364 -%366 = OpSampledImage %339 %306 %308 -%367 = OpImageSampleImplicitLod %34 %366 %365 Bias|ConstOffset %11 %41 -%368 = OpLoad %34 %298 -%369 = OpFAdd %34 %368 %367 -OpStore %298 %369 -%370 = OpConvertSToF %8 %14 -%371 = OpCompositeConstruct %37 %310 %370 -%372 = OpSampledImage %339 %306 %308 -%373 = OpImageSampleImplicitLod %34 %372 %371 -%374 = OpLoad %34 %298 -%375 = OpFAdd %34 %374 %373 -OpStore %298 %375 -%376 = OpConvertSToF %8 %14 -%377 = OpCompositeConstruct %37 %310 %376 -%378 = OpSampledImage %339 %306 %308 -%379 = OpImageSampleImplicitLod %34 %378 %377 ConstOffset %41 -%380 = OpLoad %34 %298 -%381 = OpFAdd %34 %380 %379 -OpStore %298 %381 -%382 = OpConvertSToF %8 %14 -%383 = OpCompositeConstruct %37 %310 %382 -%384 = OpSampledImage %339 %306 %308 -%385 = OpImageSampleExplicitLod %34 %384 %383 Lod %9 -%386 = OpLoad %34 %298 -%387 = OpFAdd %34 %386 %385 -OpStore %298 %387 -%388 = OpConvertSToF %8 %14 -%389 = OpCompositeConstruct %37 %310 %388 -%390 = OpSampledImage %339 %306 %308 -%391 = OpImageSampleExplicitLod %34 %390 %389 Lod|ConstOffset %9 %41 -%392 = OpLoad %34 %298 -%393 = OpFAdd %34 %392 %391 -OpStore %298 %393 -%394 = OpConvertSToF %8 %14 -%395 = OpCompositeConstruct %37 %310 %394 -%396 = OpSampledImage %339 %306 %308 -%397 = OpImageSampleImplicitLod %34 %396 %395 Bias|ConstOffset %11 %41 -%398 = OpLoad %34 %298 -%399 = OpFAdd %34 %398 %397 -OpStore %298 %399 -%401 = OpConvertUToF %8 %12 -%402 = OpCompositeConstruct %34 %311 %401 -%403 = OpSampledImage %400 %307 %308 -%404 = OpImageSampleImplicitLod %34 %403 %402 -%405 = OpLoad %34 %298 -%406 = OpFAdd %34 %405 %404 -OpStore %298 %406 -%407 = OpConvertUToF %8 %12 -%408 = OpCompositeConstruct %34 %311 %407 -%409 = OpSampledImage %400 %307 %308 -%410 = OpImageSampleExplicitLod %34 %409 %408 Lod %9 -%411 = OpLoad %34 %298 -%412 = OpFAdd %34 %411 %410 -OpStore %298 %412 -%413 = OpConvertUToF %8 %12 -%414 = OpCompositeConstruct %34 %311 %413 -%415 = OpSampledImage %400 %307 %308 -%416 = OpImageSampleImplicitLod %34 %415 %414 Bias %11 -%417 = OpLoad %34 %298 -%418 = OpFAdd %34 %417 %416 -OpStore %298 %418 -%419 = OpConvertSToF %8 %14 -%420 = OpCompositeConstruct %34 %311 %419 -%421 = OpSampledImage %400 %307 %308 -%422 = OpImageSampleImplicitLod %34 %421 %420 -%423 = OpLoad %34 %298 -%424 = OpFAdd %34 %423 %422 -OpStore %298 %424 -%425 = OpConvertSToF %8 %14 -%426 = OpCompositeConstruct %34 %311 %425 -%427 = OpSampledImage %400 %307 %308 -%428 = OpImageSampleExplicitLod %34 %427 %426 Lod %9 -%429 = OpLoad %34 %298 -%430 = OpFAdd %34 %429 %428 -OpStore %298 %430 -%431 = OpConvertSToF %8 %14 -%432 = OpCompositeConstruct %34 %311 %431 -%433 = OpSampledImage %400 %307 %308 -%434 = OpImageSampleImplicitLod %34 %433 %432 Bias %11 -%435 = OpLoad %34 %298 -%436 = OpFAdd %34 %435 %434 -OpStore %298 %436 -%437 = OpLoad %34 %298 -OpStore %302 %437 +%310 = OpCompositeConstruct %29 %305 %305 +%311 = OpCompositeConstruct %30 %305 %305 %305 +%312 = OpCompositeExtract %10 %310 0 +%314 = OpSampledImage %313 %300 %304 +%315 = OpImageSampleImplicitLod %27 %314 %312 +%316 = OpLoad %27 %294 +%317 = OpFAdd %27 %316 %315 +OpStore %294 %317 +%319 = OpSampledImage %318 %301 %304 +%320 = OpImageSampleImplicitLod %27 %319 %310 +%321 = OpLoad %27 %294 +%322 = OpFAdd %27 %321 %320 +OpStore %294 %322 +%323 = OpSampledImage %318 %301 %304 +%324 = OpImageSampleImplicitLod %27 %323 %310 ConstOffset %34 +%325 = OpLoad %27 %294 +%326 = OpFAdd %27 %325 %324 +OpStore %294 %326 +%327 = OpSampledImage %318 %301 %304 +%328 = OpImageSampleExplicitLod %27 %327 %310 Lod %306 +%329 = OpLoad %27 %294 +%330 = OpFAdd %27 %329 %328 +OpStore %294 %330 +%331 = OpSampledImage %318 %301 %304 +%332 = OpImageSampleExplicitLod %27 %331 %310 Lod|ConstOffset %306 %34 +%333 = OpLoad %27 %294 +%334 = OpFAdd %27 %333 %332 +OpStore %294 %334 +%335 = OpSampledImage %318 %301 %304 +%336 = OpImageSampleImplicitLod %27 %335 %310 Bias|ConstOffset %307 %34 +%337 = OpLoad %27 %294 +%338 = OpFAdd %27 %337 %336 +OpStore %294 %338 +%340 = OpConvertUToF %10 %203 +%341 = OpCompositeConstruct %30 %310 %340 +%342 = OpSampledImage %339 %302 %304 +%343 = OpImageSampleImplicitLod %27 %342 %341 +%344 = OpLoad %27 %294 +%345 = OpFAdd %27 %344 %343 +OpStore %294 %345 +%346 = OpConvertUToF %10 %203 +%347 = OpCompositeConstruct %30 %310 %346 +%348 = OpSampledImage %339 %302 %304 +%349 = OpImageSampleImplicitLod %27 %348 %347 ConstOffset %34 +%350 = OpLoad %27 %294 +%351 = OpFAdd %27 %350 %349 +OpStore %294 %351 +%352 = OpConvertUToF %10 %203 +%353 = OpCompositeConstruct %30 %310 %352 +%354 = OpSampledImage %339 %302 %304 +%355 = OpImageSampleExplicitLod %27 %354 %353 Lod %306 +%356 = OpLoad %27 %294 +%357 = OpFAdd %27 %356 %355 +OpStore %294 %357 +%358 = OpConvertUToF %10 %203 +%359 = OpCompositeConstruct %30 %310 %358 +%360 = OpSampledImage %339 %302 %304 +%361 = OpImageSampleExplicitLod %27 %360 %359 Lod|ConstOffset %306 %34 +%362 = OpLoad %27 %294 +%363 = OpFAdd %27 %362 %361 +OpStore %294 %363 +%364 = OpConvertUToF %10 %203 +%365 = OpCompositeConstruct %30 %310 %364 +%366 = OpSampledImage %339 %302 %304 +%367 = OpImageSampleImplicitLod %27 %366 %365 Bias|ConstOffset %307 %34 +%368 = OpLoad %27 %294 +%369 = OpFAdd %27 %368 %367 +OpStore %294 %369 +%370 = OpConvertSToF %10 %308 +%371 = OpCompositeConstruct %30 %310 %370 +%372 = OpSampledImage %339 %302 %304 +%373 = OpImageSampleImplicitLod %27 %372 %371 +%374 = OpLoad %27 %294 +%375 = OpFAdd %27 %374 %373 +OpStore %294 %375 +%376 = OpConvertSToF %10 %308 +%377 = OpCompositeConstruct %30 %310 %376 +%378 = OpSampledImage %339 %302 %304 +%379 = OpImageSampleImplicitLod %27 %378 %377 ConstOffset %34 +%380 = OpLoad %27 %294 +%381 = OpFAdd %27 %380 %379 +OpStore %294 %381 +%382 = OpConvertSToF %10 %308 +%383 = OpCompositeConstruct %30 %310 %382 +%384 = OpSampledImage %339 %302 %304 +%385 = OpImageSampleExplicitLod %27 %384 %383 Lod %306 +%386 = OpLoad %27 %294 +%387 = OpFAdd %27 %386 %385 +OpStore %294 %387 +%388 = OpConvertSToF %10 %308 +%389 = OpCompositeConstruct %30 %310 %388 +%390 = OpSampledImage %339 %302 %304 +%391 = OpImageSampleExplicitLod %27 %390 %389 Lod|ConstOffset %306 %34 +%392 = OpLoad %27 %294 +%393 = OpFAdd %27 %392 %391 +OpStore %294 %393 +%394 = OpConvertSToF %10 %308 +%395 = OpCompositeConstruct %30 %310 %394 +%396 = OpSampledImage %339 %302 %304 +%397 = OpImageSampleImplicitLod %27 %396 %395 Bias|ConstOffset %307 %34 +%398 = OpLoad %27 %294 +%399 = OpFAdd %27 %398 %397 +OpStore %294 %399 +%401 = OpConvertUToF %10 %203 +%402 = OpCompositeConstruct %27 %311 %401 +%403 = OpSampledImage %400 %303 %304 +%404 = OpImageSampleImplicitLod %27 %403 %402 +%405 = OpLoad %27 %294 +%406 = OpFAdd %27 %405 %404 +OpStore %294 %406 +%407 = OpConvertUToF %10 %203 +%408 = OpCompositeConstruct %27 %311 %407 +%409 = OpSampledImage %400 %303 %304 +%410 = OpImageSampleExplicitLod %27 %409 %408 Lod %306 +%411 = OpLoad %27 %294 +%412 = OpFAdd %27 %411 %410 +OpStore %294 %412 +%413 = OpConvertUToF %10 %203 +%414 = OpCompositeConstruct %27 %311 %413 +%415 = OpSampledImage %400 %303 %304 +%416 = OpImageSampleImplicitLod %27 %415 %414 Bias %307 +%417 = OpLoad %27 %294 +%418 = OpFAdd %27 %417 %416 +OpStore %294 %418 +%419 = OpConvertSToF %10 %308 +%420 = OpCompositeConstruct %27 %311 %419 +%421 = OpSampledImage %400 %303 %304 +%422 = OpImageSampleImplicitLod %27 %421 %420 +%423 = OpLoad %27 %294 +%424 = OpFAdd %27 %423 %422 +OpStore %294 %424 +%425 = OpConvertSToF %10 %308 +%426 = OpCompositeConstruct %27 %311 %425 +%427 = OpSampledImage %400 %303 %304 +%428 = OpImageSampleExplicitLod %27 %427 %426 Lod %306 +%429 = OpLoad %27 %294 +%430 = OpFAdd %27 %429 %428 +OpStore %294 %430 +%431 = OpConvertSToF %10 %308 +%432 = OpCompositeConstruct %27 %311 %431 +%433 = OpSampledImage %400 %303 %304 +%434 = OpImageSampleImplicitLod %27 %433 %432 Bias %307 +%435 = OpLoad %27 %294 +%436 = OpFAdd %27 %435 %434 +OpStore %294 %436 +%437 = OpLoad %27 %294 +OpStore %298 %437 OpReturn OpFunctionEnd -%444 = OpFunction %2 None %90 +%444 = OpFunction %2 None %83 %441 = OpLabel %438 = OpVariable %439 Function %440 -%445 = OpLoad %35 %77 -%446 = OpLoad %38 %79 -%447 = OpLoad %39 %81 -%448 = OpLoad %40 %83 +%445 = OpLoad %28 %70 +%446 = OpLoad %31 %72 +%447 = OpLoad %32 %74 +%448 = OpLoad %33 %76 OpBranch %449 %449 = OpLabel -%450 = OpCompositeConstruct %36 %7 %7 -%451 = OpCompositeConstruct %37 %7 %7 %7 +%450 = OpCompositeConstruct %29 %305 %305 +%451 = OpCompositeConstruct %30 %305 %305 %305 %453 = OpSampledImage %452 %446 %445 -%454 = OpImageSampleDrefImplicitLod %8 %453 %450 %7 -%455 = OpLoad %8 %438 -%456 = OpFAdd %8 %455 %454 +%454 = OpImageSampleDrefImplicitLod %10 %453 %450 %305 +%455 = OpLoad %10 %438 +%456 = OpFAdd %10 %455 %454 OpStore %438 %456 -%458 = OpConvertUToF %8 %12 -%459 = OpCompositeConstruct %37 %450 %458 +%458 = OpConvertUToF %10 %203 +%459 = OpCompositeConstruct %30 %450 %458 %460 = OpSampledImage %457 %447 %445 -%461 = OpImageSampleDrefImplicitLod %8 %460 %459 %7 -%462 = OpLoad %8 %438 -%463 = OpFAdd %8 %462 %461 +%461 = OpImageSampleDrefImplicitLod %10 %460 %459 %305 +%462 = OpLoad %10 %438 +%463 = OpFAdd %10 %462 %461 OpStore %438 %463 -%464 = OpConvertSToF %8 %14 -%465 = OpCompositeConstruct %37 %450 %464 +%464 = OpConvertSToF %10 %308 +%465 = OpCompositeConstruct %30 %450 %464 %466 = OpSampledImage %457 %447 %445 -%467 = OpImageSampleDrefImplicitLod %8 %466 %465 %7 -%468 = OpLoad %8 %438 -%469 = OpFAdd %8 %468 %467 +%467 = OpImageSampleDrefImplicitLod %10 %466 %465 %305 +%468 = OpLoad %10 %438 +%469 = OpFAdd %10 %468 %467 OpStore %438 %469 %471 = OpSampledImage %470 %448 %445 -%472 = OpImageSampleDrefImplicitLod %8 %471 %451 %7 -%473 = OpLoad %8 %438 -%474 = OpFAdd %8 %473 %472 +%472 = OpImageSampleDrefImplicitLod %10 %471 %451 %305 +%473 = OpLoad %10 %438 +%474 = OpFAdd %10 %473 %472 OpStore %438 %474 %475 = OpSampledImage %452 %446 %445 -%476 = OpImageSampleDrefExplicitLod %8 %475 %450 %7 Lod %477 -%478 = OpLoad %8 %438 -%479 = OpFAdd %8 %478 %476 +%476 = OpImageSampleDrefExplicitLod %10 %475 %450 %305 Lod %477 +%478 = OpLoad %10 %438 +%479 = OpFAdd %10 %478 %476 OpStore %438 %479 -%480 = OpConvertUToF %8 %12 -%481 = OpCompositeConstruct %37 %450 %480 +%480 = OpConvertUToF %10 %203 +%481 = OpCompositeConstruct %30 %450 %480 %482 = OpSampledImage %457 %447 %445 -%483 = OpImageSampleDrefExplicitLod %8 %482 %481 %7 Lod %477 -%484 = OpLoad %8 %438 -%485 = OpFAdd %8 %484 %483 +%483 = OpImageSampleDrefExplicitLod %10 %482 %481 %305 Lod %477 +%484 = OpLoad %10 %438 +%485 = OpFAdd %10 %484 %483 OpStore %438 %485 -%486 = OpConvertSToF %8 %14 -%487 = OpCompositeConstruct %37 %450 %486 +%486 = OpConvertSToF %10 %308 +%487 = OpCompositeConstruct %30 %450 %486 %488 = OpSampledImage %457 %447 %445 -%489 = OpImageSampleDrefExplicitLod %8 %488 %487 %7 Lod %477 -%490 = OpLoad %8 %438 -%491 = OpFAdd %8 %490 %489 +%489 = OpImageSampleDrefExplicitLod %10 %488 %487 %305 Lod %477 +%490 = OpLoad %10 %438 +%491 = OpFAdd %10 %490 %489 OpStore %438 %491 %492 = OpSampledImage %470 %448 %445 -%493 = OpImageSampleDrefExplicitLod %8 %492 %451 %7 Lod %477 -%494 = OpLoad %8 %438 -%495 = OpFAdd %8 %494 %493 +%493 = OpImageSampleDrefExplicitLod %10 %492 %451 %305 Lod %477 +%494 = OpLoad %10 %438 +%495 = OpFAdd %10 %494 %493 OpStore %438 %495 -%496 = OpLoad %8 %438 +%496 = OpLoad %10 %438 OpStore %442 %496 OpReturn OpFunctionEnd -%499 = OpFunction %2 None %90 +%499 = OpFunction %2 None %83 %497 = OpLabel -%500 = OpLoad %27 %60 -%501 = OpLoad %15 %62 -%502 = OpLoad %28 %63 -%503 = OpLoad %35 %75 -%504 = OpLoad %35 %77 -%505 = OpLoad %38 %79 +%500 = OpLoad %20 %53 +%501 = OpLoad %6 %55 +%502 = OpLoad %21 %56 +%503 = OpLoad %28 %68 +%504 = OpLoad %28 %70 +%505 = OpLoad %31 %72 OpBranch %506 %506 = OpLabel -%507 = OpCompositeConstruct %36 %7 %7 +%507 = OpCompositeConstruct %29 %305 %305 %508 = OpSampledImage %318 %500 %503 -%509 = OpImageGather %34 %508 %507 %510 +%509 = OpImageGather %27 %508 %507 %510 %511 = OpSampledImage %318 %500 %503 -%512 = OpImageGather %34 %511 %507 %513 ConstOffset %41 +%512 = OpImageGather %27 %511 %507 %513 ConstOffset %34 %514 = OpSampledImage %452 %505 %504 -%515 = OpImageDrefGather %34 %514 %507 %7 +%515 = OpImageDrefGather %27 %514 %507 %305 %516 = OpSampledImage %452 %505 %504 -%517 = OpImageDrefGather %34 %516 %507 %7 ConstOffset %41 +%517 = OpImageDrefGather %27 %516 %507 %305 ConstOffset %34 %519 = OpSampledImage %518 %501 %503 -%520 = OpImageGather %25 %519 %507 %12 +%520 = OpImageGather %18 %519 %507 %203 %523 = OpSampledImage %522 %502 %503 -%524 = OpImageGather %521 %523 %507 %12 -%525 = OpConvertUToF %34 %520 -%526 = OpConvertSToF %34 %524 -%527 = OpFAdd %34 %525 %526 -%528 = OpFAdd %34 %509 %512 -%529 = OpFAdd %34 %528 %515 -%530 = OpFAdd %34 %529 %517 -%531 = OpFAdd %34 %530 %527 +%524 = OpImageGather %521 %523 %507 %203 +%525 = OpConvertUToF %27 %520 +%526 = OpConvertSToF %27 %524 +%527 = OpFAdd %27 %525 %526 +%528 = OpFAdd %27 %509 %512 +%529 = OpFAdd %27 %528 %515 +%530 = OpFAdd %27 %529 %517 +%531 = OpFAdd %27 %530 %527 OpStore %498 %531 OpReturn OpFunctionEnd -%534 = OpFunction %2 None %90 +%534 = OpFunction %2 None %83 %532 = OpLabel -%535 = OpLoad %35 %75 -%536 = OpLoad %38 %79 +%535 = OpLoad %28 %68 +%536 = OpLoad %31 %72 OpBranch %537 %537 = OpLabel -%538 = OpCompositeConstruct %36 %7 %7 +%538 = OpCompositeConstruct %29 %305 %305 %539 = OpSampledImage %452 %536 %535 -%540 = OpImageSampleImplicitLod %34 %539 %538 -%541 = OpCompositeExtract %8 %540 0 +%540 = OpImageSampleImplicitLod %27 %539 %538 +%541 = OpCompositeExtract %10 %540 0 %542 = OpSampledImage %452 %536 %535 -%543 = OpImageGather %34 %542 %538 %12 -%544 = OpCompositeConstruct %34 %541 %541 %541 %541 -%545 = OpFAdd %34 %544 %543 +%543 = OpImageGather %27 %542 %538 %203 +%544 = OpCompositeConstruct %27 %541 %541 %541 %541 +%545 = OpFAdd %27 %544 %543 OpStore %533 %545 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/interface.compute.spvasm b/tests/out/spv/interface.compute.spvasm index a37437a964..f42fb1255e 100644 --- a/tests/out/spv/interface.compute.spvasm +++ b/tests/out/spv/interface.compute.spvasm @@ -1,88 +1,85 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 58 +; Bound: 55 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %35 "compute" %23 %26 %28 %31 %33 -OpExecutionMode %35 LocalSize 1 1 1 +OpEntryPoint GLCompute %30 "compute" %18 %21 %23 %26 %28 +OpExecutionMode %30 LocalSize 1 1 1 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpMemberDecorate %9 0 Offset 0 +OpMemberDecorate %9 1 Offset 4 +OpMemberDecorate %9 2 Offset 8 +OpDecorate %11 ArrayStride 4 OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 1 Offset 16 OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 4 -OpMemberDecorate %14 2 Offset 8 -OpDecorate %16 ArrayStride 4 -OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %19 0 Offset 0 -OpDecorate %23 BuiltIn GlobalInvocationId -OpDecorate %26 BuiltIn LocalInvocationId -OpDecorate %28 BuiltIn LocalInvocationIndex -OpDecorate %31 BuiltIn WorkgroupId -OpDecorate %33 BuiltIn NumWorkgroups +OpDecorate %18 BuiltIn GlobalInvocationId +OpDecorate %21 BuiltIn LocalInvocationId +OpDecorate %23 BuiltIn LocalInvocationIndex +OpDecorate %26 BuiltIn WorkgroupId +OpDecorate %28 BuiltIn NumWorkgroups %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 1 -%7 = OpConstant %4 0.0 -%9 = OpTypeInt 32 1 -%8 = OpConstant %9 1 -%10 = OpConstant %9 0 -%11 = OpConstant %6 2 -%12 = OpTypeVector %4 4 -%13 = OpTypeStruct %12 %4 -%14 = OpTypeStruct %4 %6 %4 -%15 = OpTypeBool -%16 = OpTypeArray %6 %8 -%17 = OpTypeVector %6 3 -%18 = OpTypeStruct %6 -%19 = OpTypeStruct %6 -%21 = OpTypePointer Workgroup %16 -%20 = OpVariable %21 Workgroup -%24 = OpTypePointer Input %17 +%4 = OpTypeInt 32 1 +%3 = OpConstant %4 1 +%6 = OpTypeFloat 32 +%5 = OpTypeVector %6 4 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeInt 32 0 +%9 = OpTypeStruct %6 %8 %6 +%10 = OpTypeBool +%11 = OpTypeArray %8 %3 +%12 = OpTypeVector %8 3 +%13 = OpTypeStruct %8 +%14 = OpTypeStruct %8 +%16 = OpTypePointer Workgroup %11 +%15 = OpVariable %16 Workgroup +%19 = OpTypePointer Input %12 +%18 = OpVariable %19 Input +%21 = OpVariable %19 Input +%24 = OpTypePointer Input %8 %23 = OpVariable %24 Input -%26 = OpVariable %24 Input -%29 = OpTypePointer Input %6 -%28 = OpVariable %29 Input -%31 = OpVariable %24 Input -%33 = OpVariable %24 Input -%36 = OpTypeFunction %2 -%38 = OpConstantNull %16 -%39 = OpConstantNull %17 -%40 = OpTypeVector %15 3 -%45 = OpConstant %6 264 -%47 = OpTypePointer Workgroup %6 -%56 = OpConstant %6 0 -%35 = OpFunction %2 None %36 -%22 = OpLabel -%25 = OpLoad %17 %23 -%27 = OpLoad %17 %26 -%30 = OpLoad %6 %28 -%32 = OpLoad %17 %31 -%34 = OpLoad %17 %33 -OpBranch %37 -%37 = OpLabel -%41 = OpIEqual %40 %27 %39 -%42 = OpAll %15 %41 -OpSelectionMerge %43 None -OpBranchConditional %42 %44 %43 -%44 = OpLabel -OpStore %20 %38 +%26 = OpVariable %19 Input +%28 = OpVariable %19 Input +%31 = OpTypeFunction %2 +%32 = OpConstant %4 0 +%34 = OpConstantNull %11 +%35 = OpConstantNull %12 +%36 = OpTypeVector %10 3 +%41 = OpConstant %8 2 +%42 = OpConstant %8 264 +%44 = OpTypePointer Workgroup %8 +%53 = OpConstant %8 0 +%30 = OpFunction %2 None %31 +%17 = OpLabel +%20 = OpLoad %12 %18 +%22 = OpLoad %12 %21 +%25 = OpLoad %8 %23 +%27 = OpLoad %12 %26 +%29 = OpLoad %12 %28 +OpBranch %33 +%33 = OpLabel +%37 = OpIEqual %36 %22 %35 +%38 = OpAll %10 %37 +OpSelectionMerge %39 None +OpBranchConditional %38 %40 %39 +%40 = OpLabel +OpStore %15 %34 +OpBranch %39 +%39 = OpLabel +OpControlBarrier %41 %41 %42 OpBranch %43 %43 = OpLabel -OpControlBarrier %11 %11 %45 -OpBranch %46 -%46 = OpLabel -%48 = OpCompositeExtract %6 %25 0 -%49 = OpCompositeExtract %6 %27 0 -%50 = OpIAdd %6 %48 %49 -%51 = OpIAdd %6 %50 %30 -%52 = OpCompositeExtract %6 %32 0 -%53 = OpIAdd %6 %51 %52 -%54 = OpCompositeExtract %6 %34 0 -%55 = OpIAdd %6 %53 %54 -%57 = OpAccessChain %47 %20 %56 -OpStore %57 %55 +%45 = OpCompositeExtract %8 %20 0 +%46 = OpCompositeExtract %8 %22 0 +%47 = OpIAdd %8 %45 %46 +%48 = OpIAdd %8 %47 %25 +%49 = OpCompositeExtract %8 %27 0 +%50 = OpIAdd %8 %48 %49 +%51 = OpCompositeExtract %8 %29 0 +%52 = OpIAdd %8 %50 %51 +%54 = OpAccessChain %44 %15 %53 +OpStore %54 %52 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/interface.fragment.spvasm b/tests/out/spv/interface.fragment.spvasm index 424208def3..682fa7ca6f 100644 --- a/tests/out/spv/interface.fragment.spvasm +++ b/tests/out/spv/interface.fragment.spvasm @@ -1,90 +1,88 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 54 +; Bound: 52 OpCapability Shader OpCapability SampleRateShading %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %41 "fragment" %22 %25 %28 %31 %34 %36 %38 %40 -OpExecutionMode %41 OriginUpperLeft -OpExecutionMode %41 DepthReplacing +OpEntryPoint Fragment %36 "fragment" %17 %20 %23 %26 %29 %31 %33 %35 +OpExecutionMode %36 OriginUpperLeft +OpExecutionMode %36 DepthReplacing +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpMemberDecorate %9 0 Offset 0 +OpMemberDecorate %9 1 Offset 4 +OpMemberDecorate %9 2 Offset 8 +OpDecorate %11 ArrayStride 4 OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 1 Offset 16 OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 4 -OpMemberDecorate %14 2 Offset 8 -OpDecorate %16 ArrayStride 4 -OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %19 0 Offset 0 -OpDecorate %22 Invariant -OpDecorate %22 BuiltIn FragCoord -OpDecorate %25 Location 1 -OpDecorate %28 BuiltIn FrontFacing -OpDecorate %28 Flat -OpDecorate %31 BuiltIn SampleId -OpDecorate %31 Flat -OpDecorate %34 BuiltIn SampleMask -OpDecorate %34 Flat -OpDecorate %36 BuiltIn FragDepth -OpDecorate %38 BuiltIn SampleMask -OpDecorate %40 Location 0 +OpDecorate %17 Invariant +OpDecorate %17 BuiltIn FragCoord +OpDecorate %20 Location 1 +OpDecorate %23 BuiltIn FrontFacing +OpDecorate %23 Flat +OpDecorate %26 BuiltIn SampleId +OpDecorate %26 Flat +OpDecorate %29 BuiltIn SampleMask +OpDecorate %29 Flat +OpDecorate %31 BuiltIn FragDepth +OpDecorate %33 BuiltIn SampleMask +OpDecorate %35 Location 0 %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 1 -%7 = OpConstant %4 0.0 -%9 = OpTypeInt 32 1 -%8 = OpConstant %9 1 -%10 = OpConstant %9 0 -%11 = OpConstant %6 2 -%12 = OpTypeVector %4 4 -%13 = OpTypeStruct %12 %4 -%14 = OpTypeStruct %4 %6 %4 -%15 = OpTypeBool -%16 = OpTypeArray %6 %8 -%17 = OpTypeVector %6 3 -%18 = OpTypeStruct %6 -%19 = OpTypeStruct %6 -%23 = OpTypePointer Input %12 -%22 = OpVariable %23 Input -%26 = OpTypePointer Input %4 -%25 = OpVariable %26 Input -%29 = OpTypePointer Input %15 -%28 = OpVariable %29 Input -%32 = OpTypePointer Input %6 -%31 = OpVariable %32 Input -%34 = OpVariable %32 Input -%37 = OpTypePointer Output %4 -%36 = OpVariable %37 Output -%39 = OpTypePointer Output %6 -%38 = OpVariable %39 Output -%40 = OpVariable %37 Output -%42 = OpTypeFunction %2 -%41 = OpFunction %2 None %42 -%20 = OpLabel -%24 = OpLoad %12 %22 -%27 = OpLoad %4 %25 -%21 = OpCompositeConstruct %13 %24 %27 -%30 = OpLoad %15 %28 -%33 = OpLoad %6 %31 -%35 = OpLoad %6 %34 -OpBranch %43 -%43 = OpLabel -%44 = OpShiftLeftLogical %6 %5 %33 -%45 = OpBitwiseAnd %6 %35 %44 -%46 = OpSelect %4 %30 %3 %7 -%47 = OpCompositeExtract %4 %21 1 -%48 = OpCompositeConstruct %14 %47 %45 %46 -%49 = OpCompositeExtract %4 %48 0 -OpStore %36 %49 -%50 = OpLoad %4 %36 -%51 = OpExtInst %4 %1 FClamp %50 %7 %3 -OpStore %36 %51 -%52 = OpCompositeExtract %6 %48 1 -OpStore %38 %52 -%53 = OpCompositeExtract %4 %48 2 -OpStore %40 %53 +%4 = OpTypeInt 32 1 +%3 = OpConstant %4 1 +%6 = OpTypeFloat 32 +%5 = OpTypeVector %6 4 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeInt 32 0 +%9 = OpTypeStruct %6 %8 %6 +%10 = OpTypeBool +%11 = OpTypeArray %8 %3 +%12 = OpTypeVector %8 3 +%13 = OpTypeStruct %8 +%14 = OpTypeStruct %8 +%18 = OpTypePointer Input %5 +%17 = OpVariable %18 Input +%21 = OpTypePointer Input %6 +%20 = OpVariable %21 Input +%24 = OpTypePointer Input %10 +%23 = OpVariable %24 Input +%27 = OpTypePointer Input %8 +%26 = OpVariable %27 Input +%29 = OpVariable %27 Input +%32 = OpTypePointer Output %6 +%31 = OpVariable %32 Output +%34 = OpTypePointer Output %8 +%33 = OpVariable %34 Output +%35 = OpVariable %32 Output +%37 = OpTypeFunction %2 +%38 = OpConstant %8 1 +%39 = OpConstant %6 0.0 +%40 = OpConstant %6 1.0 +%36 = OpFunction %2 None %37 +%15 = OpLabel +%19 = OpLoad %5 %17 +%22 = OpLoad %6 %20 +%16 = OpCompositeConstruct %7 %19 %22 +%25 = OpLoad %10 %23 +%28 = OpLoad %8 %26 +%30 = OpLoad %8 %29 +OpBranch %41 +%41 = OpLabel +%42 = OpShiftLeftLogical %8 %38 %28 +%43 = OpBitwiseAnd %8 %30 %42 +%44 = OpSelect %6 %25 %40 %39 +%45 = OpCompositeExtract %6 %16 1 +%46 = OpCompositeConstruct %9 %45 %43 %44 +%47 = OpCompositeExtract %6 %46 0 +OpStore %31 %47 +%48 = OpLoad %6 %31 +%49 = OpExtInst %6 %1 FClamp %48 %39 %40 +OpStore %31 %49 +%50 = OpCompositeExtract %8 %46 1 +OpStore %33 %50 +%51 = OpCompositeExtract %6 %46 2 +OpStore %35 %51 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/interface.vertex.spvasm b/tests/out/spv/interface.vertex.spvasm index 62e4acb1b6..f1b2bb51a3 100644 --- a/tests/out/spv/interface.vertex.spvasm +++ b/tests/out/spv/interface.vertex.spvasm @@ -1,71 +1,67 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 44 +; Bound: 40 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %34 "vertex" %21 %24 %26 %28 %30 %32 +OpEntryPoint Vertex %30 "vertex" %16 %19 %21 %23 %25 %27 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpMemberDecorate %9 0 Offset 0 +OpMemberDecorate %9 1 Offset 4 +OpMemberDecorate %9 2 Offset 8 +OpDecorate %11 ArrayStride 4 OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 1 Offset 16 OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 4 -OpMemberDecorate %14 2 Offset 8 -OpDecorate %16 ArrayStride 4 -OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %19 0 Offset 0 -OpDecorate %21 BuiltIn VertexIndex -OpDecorate %24 BuiltIn InstanceIndex -OpDecorate %26 Location 10 -OpDecorate %28 Invariant -OpDecorate %28 BuiltIn Position -OpDecorate %30 Location 1 -OpDecorate %32 BuiltIn PointSize +OpDecorate %16 BuiltIn VertexIndex +OpDecorate %19 BuiltIn InstanceIndex +OpDecorate %21 Location 10 +OpDecorate %23 Invariant +OpDecorate %23 BuiltIn Position +OpDecorate %25 Location 1 +OpDecorate %27 BuiltIn PointSize %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 1 -%7 = OpConstant %4 0.0 -%9 = OpTypeInt 32 1 -%8 = OpConstant %9 1 -%10 = OpConstant %9 0 -%11 = OpConstant %6 2 -%12 = OpTypeVector %4 4 -%13 = OpTypeStruct %12 %4 -%14 = OpTypeStruct %4 %6 %4 -%15 = OpTypeBool -%16 = OpTypeArray %6 %8 -%17 = OpTypeVector %6 3 -%18 = OpTypeStruct %6 -%19 = OpTypeStruct %6 -%22 = OpTypePointer Input %6 -%21 = OpVariable %22 Input -%24 = OpVariable %22 Input -%26 = OpVariable %22 Input -%29 = OpTypePointer Output %12 -%28 = OpVariable %29 Output -%31 = OpTypePointer Output %4 -%30 = OpVariable %31 Output -%33 = OpTypePointer Output %4 -%32 = OpVariable %33 Output -%35 = OpTypeFunction %2 -%34 = OpFunction %2 None %35 -%20 = OpLabel -%23 = OpLoad %6 %21 -%25 = OpLoad %6 %24 -%27 = OpLoad %6 %26 -OpStore %32 %3 -OpBranch %36 -%36 = OpLabel -%37 = OpIAdd %6 %23 %25 -%38 = OpIAdd %6 %37 %27 -%39 = OpCompositeConstruct %12 %3 %3 %3 %3 -%40 = OpConvertUToF %4 %38 -%41 = OpCompositeConstruct %13 %39 %40 -%42 = OpCompositeExtract %12 %41 0 -OpStore %28 %42 -%43 = OpCompositeExtract %4 %41 1 -OpStore %30 %43 +%4 = OpTypeInt 32 1 +%3 = OpConstant %4 1 +%6 = OpTypeFloat 32 +%5 = OpTypeVector %6 4 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeInt 32 0 +%9 = OpTypeStruct %6 %8 %6 +%10 = OpTypeBool +%11 = OpTypeArray %8 %3 +%12 = OpTypeVector %8 3 +%13 = OpTypeStruct %8 +%14 = OpTypeStruct %8 +%17 = OpTypePointer Input %8 +%16 = OpVariable %17 Input +%19 = OpVariable %17 Input +%21 = OpVariable %17 Input +%24 = OpTypePointer Output %5 +%23 = OpVariable %24 Output +%26 = OpTypePointer Output %6 +%25 = OpVariable %26 Output +%28 = OpTypePointer Output %6 +%27 = OpVariable %28 Output +%29 = OpConstant %6 1.0 +%31 = OpTypeFunction %2 +%30 = OpFunction %2 None %31 +%15 = OpLabel +%18 = OpLoad %8 %16 +%20 = OpLoad %8 %19 +%22 = OpLoad %8 %21 +OpStore %27 %29 +OpBranch %32 +%32 = OpLabel +%33 = OpIAdd %8 %18 %20 +%34 = OpIAdd %8 %33 %22 +%35 = OpCompositeConstruct %5 %29 %29 %29 %29 +%36 = OpConvertUToF %6 %34 +%37 = OpCompositeConstruct %7 %35 %36 +%38 = OpCompositeExtract %5 %37 0 +OpStore %23 %38 +%39 = OpCompositeExtract %6 %37 1 +OpStore %25 %39 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/interface.vertex_two_structs.spvasm b/tests/out/spv/interface.vertex_two_structs.spvasm index 1455090aba..7c6c8fd1e4 100644 --- a/tests/out/spv/interface.vertex_two_structs.spvasm +++ b/tests/out/spv/interface.vertex_two_structs.spvasm @@ -1,70 +1,68 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 45 +; Bound: 43 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %35 "vertex_two_structs" %25 %29 %31 %33 +OpEntryPoint Vertex %31 "vertex_two_structs" %20 %24 %26 %28 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpMemberDecorate %9 0 Offset 0 +OpMemberDecorate %9 1 Offset 4 +OpMemberDecorate %9 2 Offset 8 +OpDecorate %11 ArrayStride 4 OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 1 Offset 16 OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 1 Offset 4 -OpMemberDecorate %14 2 Offset 8 -OpDecorate %16 ArrayStride 4 -OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %19 0 Offset 0 -OpDecorate %25 BuiltIn VertexIndex -OpDecorate %29 BuiltIn InstanceIndex -OpDecorate %31 Invariant -OpDecorate %31 BuiltIn Position -OpDecorate %33 BuiltIn PointSize +OpDecorate %20 BuiltIn VertexIndex +OpDecorate %24 BuiltIn InstanceIndex +OpDecorate %26 Invariant +OpDecorate %26 BuiltIn Position +OpDecorate %28 BuiltIn PointSize %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%6 = OpTypeInt 32 0 -%5 = OpConstant %6 1 -%7 = OpConstant %4 0.0 -%9 = OpTypeInt 32 1 -%8 = OpConstant %9 1 -%10 = OpConstant %9 0 -%11 = OpConstant %6 2 -%12 = OpTypeVector %4 4 -%13 = OpTypeStruct %12 %4 -%14 = OpTypeStruct %4 %6 %4 -%15 = OpTypeBool -%16 = OpTypeArray %6 %8 -%17 = OpTypeVector %6 3 -%18 = OpTypeStruct %6 -%19 = OpTypeStruct %6 -%21 = OpTypePointer Function %6 -%22 = OpConstantNull %6 -%26 = OpTypePointer Input %6 -%25 = OpVariable %26 Input -%29 = OpVariable %26 Input -%32 = OpTypePointer Output %12 -%31 = OpVariable %32 Output -%34 = OpTypePointer Output %4 -%33 = OpVariable %34 Output -%36 = OpTypeFunction %2 -%35 = OpFunction %2 None %36 -%23 = OpLabel -%20 = OpVariable %21 Function %22 -%27 = OpLoad %6 %25 -%24 = OpCompositeConstruct %18 %27 -%30 = OpLoad %6 %29 -%28 = OpCompositeConstruct %19 %30 -OpStore %33 %3 -OpBranch %37 -%37 = OpLabel -OpStore %20 %11 -%38 = OpCompositeExtract %6 %24 0 -%39 = OpConvertUToF %4 %38 -%40 = OpCompositeExtract %6 %28 0 -%41 = OpConvertUToF %4 %40 -%42 = OpLoad %6 %20 -%43 = OpConvertUToF %4 %42 -%44 = OpCompositeConstruct %12 %39 %41 %43 %7 -OpStore %31 %44 +%4 = OpTypeInt 32 1 +%3 = OpConstant %4 1 +%6 = OpTypeFloat 32 +%5 = OpTypeVector %6 4 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeInt 32 0 +%9 = OpTypeStruct %6 %8 %6 +%10 = OpTypeBool +%11 = OpTypeArray %8 %3 +%12 = OpTypeVector %8 3 +%13 = OpTypeStruct %8 +%14 = OpTypeStruct %8 +%16 = OpTypePointer Function %8 +%17 = OpConstantNull %8 +%21 = OpTypePointer Input %8 +%20 = OpVariable %21 Input +%24 = OpVariable %21 Input +%27 = OpTypePointer Output %5 +%26 = OpVariable %27 Output +%29 = OpTypePointer Output %6 +%28 = OpVariable %29 Output +%30 = OpConstant %6 1.0 +%32 = OpTypeFunction %2 +%33 = OpConstant %8 2 +%34 = OpConstant %6 0.0 +%31 = OpFunction %2 None %32 +%18 = OpLabel +%15 = OpVariable %16 Function %17 +%22 = OpLoad %8 %20 +%19 = OpCompositeConstruct %13 %22 +%25 = OpLoad %8 %24 +%23 = OpCompositeConstruct %14 %25 +OpStore %28 %30 +OpBranch %35 +%35 = OpLabel +OpStore %15 %33 +%36 = OpCompositeExtract %8 %19 0 +%37 = OpConvertUToF %6 %36 +%38 = OpCompositeExtract %8 %23 0 +%39 = OpConvertUToF %6 %38 +%40 = OpLoad %8 %15 +%41 = OpConvertUToF %6 %40 +%42 = OpCompositeConstruct %5 %37 %39 %41 %34 +OpStore %26 %42 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/interpolate.spvasm b/tests/out/spv/interpolate.spvasm index a6fae2b2d0..b9df1e0593 100644 --- a/tests/out/spv/interpolate.spvasm +++ b/tests/out/spv/interpolate.spvasm @@ -6,29 +6,29 @@ OpCapability Shader OpCapability SampleRateShading %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %46 "vert_main" %30 %32 %34 %36 %38 %40 %41 %42 %43 +OpEntryPoint Vertex %29 "vert_main" %13 %15 %17 %19 %21 %23 %24 %25 %26 OpEntryPoint Fragment %109 "frag_main" %88 %91 %94 %97 %100 %103 %105 %107 OpExecutionMode %109 OriginUpperLeft OpSource GLSL 450 -OpMemberName %25 0 "position" -OpMemberName %25 1 "_flat" -OpMemberName %25 2 "_linear" -OpMemberName %25 3 "linear_centroid" -OpMemberName %25 4 "linear_sample" -OpMemberName %25 5 "perspective" -OpMemberName %25 6 "perspective_centroid" -OpMemberName %25 7 "perspective_sample" -OpName %25 "FragmentInput" -OpName %26 "out" -OpName %30 "position" -OpName %32 "_flat" -OpName %34 "_linear" -OpName %36 "linear_centroid" -OpName %38 "linear_sample" -OpName %40 "perspective" -OpName %41 "perspective_centroid" -OpName %42 "perspective_sample" -OpName %46 "vert_main" +OpMemberName %8 0 "position" +OpMemberName %8 1 "_flat" +OpMemberName %8 2 "_linear" +OpMemberName %8 3 "linear_centroid" +OpMemberName %8 4 "linear_sample" +OpMemberName %8 5 "perspective" +OpMemberName %8 6 "perspective_centroid" +OpMemberName %8 7 "perspective_sample" +OpName %8 "FragmentInput" +OpName %9 "out" +OpName %13 "position" +OpName %15 "_flat" +OpName %17 "_linear" +OpName %19 "linear_centroid" +OpName %21 "linear_sample" +OpName %23 "perspective" +OpName %24 "perspective_centroid" +OpName %25 "perspective_sample" +OpName %29 "vert_main" OpName %88 "position" OpName %91 "_flat" OpName %94 "_linear" @@ -38,31 +38,31 @@ OpName %103 "perspective" OpName %105 "perspective_centroid" OpName %107 "perspective_sample" OpName %109 "frag_main" -OpMemberDecorate %25 0 Offset 0 -OpMemberDecorate %25 1 Offset 16 -OpMemberDecorate %25 2 Offset 20 -OpMemberDecorate %25 3 Offset 24 -OpMemberDecorate %25 4 Offset 32 -OpMemberDecorate %25 5 Offset 48 -OpMemberDecorate %25 6 Offset 64 -OpMemberDecorate %25 7 Offset 68 -OpDecorate %30 BuiltIn Position -OpDecorate %32 Location 0 -OpDecorate %32 Flat -OpDecorate %34 Location 1 -OpDecorate %34 NoPerspective -OpDecorate %36 Location 2 -OpDecorate %36 NoPerspective -OpDecorate %36 Centroid -OpDecorate %38 Location 3 -OpDecorate %38 NoPerspective -OpDecorate %38 Sample -OpDecorate %40 Location 4 -OpDecorate %41 Location 5 -OpDecorate %41 Centroid -OpDecorate %42 Location 6 -OpDecorate %42 Sample -OpDecorate %43 BuiltIn PointSize +OpMemberDecorate %8 0 Offset 0 +OpMemberDecorate %8 1 Offset 16 +OpMemberDecorate %8 2 Offset 20 +OpMemberDecorate %8 3 Offset 24 +OpMemberDecorate %8 4 Offset 32 +OpMemberDecorate %8 5 Offset 48 +OpMemberDecorate %8 6 Offset 64 +OpMemberDecorate %8 7 Offset 68 +OpDecorate %13 BuiltIn Position +OpDecorate %15 Location 0 +OpDecorate %15 Flat +OpDecorate %17 Location 1 +OpDecorate %17 NoPerspective +OpDecorate %19 Location 2 +OpDecorate %19 NoPerspective +OpDecorate %19 Centroid +OpDecorate %21 Location 3 +OpDecorate %21 NoPerspective +OpDecorate %21 Sample +OpDecorate %23 Location 4 +OpDecorate %24 Location 5 +OpDecorate %24 Centroid +OpDecorate %25 Location 6 +OpDecorate %25 Sample +OpDecorate %26 BuiltIn PointSize OpDecorate %88 BuiltIn FragCoord OpDecorate %91 Location 0 OpDecorate %91 Flat @@ -81,133 +81,133 @@ OpDecorate %107 Location 6 OpDecorate %107 Sample %2 = OpTypeVoid %4 = OpTypeFloat 32 -%3 = OpConstant %4 2.0 -%5 = OpConstant %4 4.0 -%6 = OpConstant %4 5.0 -%7 = OpConstant %4 6.0 -%9 = OpTypeInt 32 0 -%8 = OpConstant %9 8 -%10 = OpConstant %4 27.0 -%11 = OpConstant %4 64.0 -%12 = OpConstant %4 125.0 -%13 = OpConstant %4 216.0 -%14 = OpConstant %4 343.0 -%15 = OpConstant %4 512.0 -%16 = OpConstant %4 729.0 -%17 = OpConstant %4 1000.0 -%18 = OpConstant %4 1331.0 -%19 = OpConstant %4 1728.0 -%20 = OpConstant %4 2197.0 -%21 = OpConstant %4 2744.0 -%22 = OpTypeVector %4 4 -%23 = OpTypeVector %4 2 -%24 = OpTypeVector %4 3 -%25 = OpTypeStruct %22 %9 %4 %23 %24 %22 %4 %4 -%27 = OpTypePointer Function %25 -%28 = OpConstantNull %25 -%31 = OpTypePointer Output %22 -%30 = OpVariable %31 Output -%33 = OpTypePointer Output %9 -%32 = OpVariable %33 Output -%35 = OpTypePointer Output %4 -%34 = OpVariable %35 Output -%37 = OpTypePointer Output %23 -%36 = OpVariable %37 Output -%39 = OpTypePointer Output %24 -%38 = OpVariable %39 Output -%40 = OpVariable %31 Output -%41 = OpVariable %35 Output -%42 = OpVariable %35 Output -%44 = OpTypePointer Output %4 -%43 = OpVariable %44 Output -%45 = OpConstant %4 1.0 -%47 = OpTypeFunction %2 -%49 = OpTypePointer Function %22 -%51 = OpConstant %9 0 -%53 = OpTypePointer Function %9 -%54 = OpConstant %9 1 +%3 = OpTypeVector %4 4 +%5 = OpTypeInt 32 0 +%6 = OpTypeVector %4 2 +%7 = OpTypeVector %4 3 +%8 = OpTypeStruct %3 %5 %4 %6 %7 %3 %4 %4 +%10 = OpTypePointer Function %8 +%11 = OpConstantNull %8 +%14 = OpTypePointer Output %3 +%13 = OpVariable %14 Output +%16 = OpTypePointer Output %5 +%15 = OpVariable %16 Output +%18 = OpTypePointer Output %4 +%17 = OpVariable %18 Output +%20 = OpTypePointer Output %6 +%19 = OpVariable %20 Output +%22 = OpTypePointer Output %7 +%21 = OpVariable %22 Output +%23 = OpVariable %14 Output +%24 = OpVariable %18 Output +%25 = OpVariable %18 Output +%27 = OpTypePointer Output %4 +%26 = OpVariable %27 Output +%28 = OpConstant %4 1.0 +%30 = OpTypeFunction %2 +%31 = OpConstant %4 2.0 +%32 = OpConstant %4 4.0 +%33 = OpConstant %4 5.0 +%34 = OpConstant %4 6.0 +%35 = OpConstant %5 8 +%36 = OpConstant %4 27.0 +%37 = OpConstant %4 64.0 +%38 = OpConstant %4 125.0 +%39 = OpConstant %4 216.0 +%40 = OpConstant %4 343.0 +%41 = OpConstant %4 512.0 +%42 = OpConstant %4 729.0 +%43 = OpConstant %4 1000.0 +%44 = OpConstant %4 1331.0 +%45 = OpConstant %4 1728.0 +%46 = OpConstant %4 2197.0 +%47 = OpConstant %4 2744.0 +%49 = OpTypePointer Function %3 +%51 = OpConstant %5 0 +%53 = OpTypePointer Function %5 +%54 = OpConstant %5 1 %56 = OpTypePointer Function %4 -%57 = OpConstant %9 2 -%59 = OpTypePointer Function %23 -%61 = OpConstant %9 3 -%63 = OpTypePointer Function %24 -%65 = OpConstant %9 4 -%68 = OpConstant %9 5 -%70 = OpConstant %9 6 -%72 = OpConstant %9 7 -%89 = OpTypePointer Input %22 +%57 = OpConstant %5 2 +%59 = OpTypePointer Function %6 +%61 = OpConstant %5 3 +%63 = OpTypePointer Function %7 +%65 = OpConstant %5 4 +%68 = OpConstant %5 5 +%70 = OpConstant %5 6 +%72 = OpConstant %5 7 +%89 = OpTypePointer Input %3 %88 = OpVariable %89 Input -%92 = OpTypePointer Input %9 +%92 = OpTypePointer Input %5 %91 = OpVariable %92 Input %95 = OpTypePointer Input %4 %94 = OpVariable %95 Input -%98 = OpTypePointer Input %23 +%98 = OpTypePointer Input %6 %97 = OpVariable %98 Input -%101 = OpTypePointer Input %24 +%101 = OpTypePointer Input %7 %100 = OpVariable %101 Input %103 = OpVariable %89 Input %105 = OpVariable %95 Input %107 = OpVariable %95 Input -%46 = OpFunction %2 None %47 -%29 = OpLabel -%26 = OpVariable %27 Function %28 -OpStore %43 %45 +%29 = OpFunction %2 None %30 +%12 = OpLabel +%9 = OpVariable %10 Function %11 +OpStore %26 %28 OpBranch %48 %48 = OpLabel -%50 = OpCompositeConstruct %22 %3 %5 %6 %7 -%52 = OpAccessChain %49 %26 %51 +%50 = OpCompositeConstruct %3 %31 %32 %33 %34 +%52 = OpAccessChain %49 %9 %51 OpStore %52 %50 -%55 = OpAccessChain %53 %26 %54 -OpStore %55 %8 -%58 = OpAccessChain %56 %26 %57 -OpStore %58 %10 -%60 = OpCompositeConstruct %23 %11 %12 -%62 = OpAccessChain %59 %26 %61 +%55 = OpAccessChain %53 %9 %54 +OpStore %55 %35 +%58 = OpAccessChain %56 %9 %57 +OpStore %58 %36 +%60 = OpCompositeConstruct %6 %37 %38 +%62 = OpAccessChain %59 %9 %61 OpStore %62 %60 -%64 = OpCompositeConstruct %24 %13 %14 %15 -%66 = OpAccessChain %63 %26 %65 +%64 = OpCompositeConstruct %7 %39 %40 %41 +%66 = OpAccessChain %63 %9 %65 OpStore %66 %64 -%67 = OpCompositeConstruct %22 %16 %17 %18 %19 -%69 = OpAccessChain %49 %26 %68 +%67 = OpCompositeConstruct %3 %42 %43 %44 %45 +%69 = OpAccessChain %49 %9 %68 OpStore %69 %67 -%71 = OpAccessChain %56 %26 %70 -OpStore %71 %20 -%73 = OpAccessChain %56 %26 %72 -OpStore %73 %21 -%74 = OpLoad %25 %26 -%75 = OpCompositeExtract %22 %74 0 -OpStore %30 %75 -%76 = OpAccessChain %44 %30 %54 +%71 = OpAccessChain %56 %9 %70 +OpStore %71 %46 +%73 = OpAccessChain %56 %9 %72 +OpStore %73 %47 +%74 = OpLoad %8 %9 +%75 = OpCompositeExtract %3 %74 0 +OpStore %13 %75 +%76 = OpAccessChain %27 %13 %54 %77 = OpLoad %4 %76 %78 = OpFNegate %4 %77 OpStore %76 %78 -%79 = OpCompositeExtract %9 %74 1 -OpStore %32 %79 +%79 = OpCompositeExtract %5 %74 1 +OpStore %15 %79 %80 = OpCompositeExtract %4 %74 2 -OpStore %34 %80 -%81 = OpCompositeExtract %23 %74 3 -OpStore %36 %81 -%82 = OpCompositeExtract %24 %74 4 -OpStore %38 %82 -%83 = OpCompositeExtract %22 %74 5 -OpStore %40 %83 +OpStore %17 %80 +%81 = OpCompositeExtract %6 %74 3 +OpStore %19 %81 +%82 = OpCompositeExtract %7 %74 4 +OpStore %21 %82 +%83 = OpCompositeExtract %3 %74 5 +OpStore %23 %83 %84 = OpCompositeExtract %4 %74 6 -OpStore %41 %84 +OpStore %24 %84 %85 = OpCompositeExtract %4 %74 7 -OpStore %42 %85 +OpStore %25 %85 OpReturn OpFunctionEnd -%109 = OpFunction %2 None %47 +%109 = OpFunction %2 None %30 %86 = OpLabel -%90 = OpLoad %22 %88 -%93 = OpLoad %9 %91 +%90 = OpLoad %3 %88 +%93 = OpLoad %5 %91 %96 = OpLoad %4 %94 -%99 = OpLoad %23 %97 -%102 = OpLoad %24 %100 -%104 = OpLoad %22 %103 +%99 = OpLoad %6 %97 +%102 = OpLoad %7 %100 +%104 = OpLoad %3 %103 %106 = OpLoad %4 %105 %108 = OpLoad %4 %107 -%87 = OpCompositeConstruct %25 %90 %93 %96 %99 %102 %104 %106 %108 +%87 = OpCompositeConstruct %8 %90 %93 %96 %99 %102 %104 %106 %108 OpBranch %110 %110 = OpLabel OpReturn diff --git a/tests/out/spv/math-functions.spvasm b/tests/out/spv/math-functions.spvasm index ecf925bdd7..0fa6bf5295 100644 --- a/tests/out/spv/math-functions.spvasm +++ b/tests/out/spv/math-functions.spvasm @@ -5,94 +5,94 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %17 "main" -OpExecutionMode %17 OriginUpperLeft +OpEntryPoint Fragment %8 "main" +OpExecutionMode %8 OriginUpperLeft %2 = OpTypeVoid %4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%5 = OpConstant %4 0.0 -%7 = OpTypeInt 32 0 -%6 = OpConstant %7 0 -%9 = OpTypeInt 32 1 -%8 = OpConstant %9 -1 -%10 = OpConstant %7 1 -%11 = OpConstant %9 0 -%12 = OpConstant %7 4294967295 -%13 = OpConstant %9 1 -%14 = OpTypeVector %4 4 -%15 = OpTypeVector %9 2 -%18 = OpTypeFunction %2 -%19 = OpConstantNull %15 -%20 = OpConstantNull %15 -%28 = OpConstantComposite %14 %5 %5 %5 %5 -%29 = OpConstantComposite %14 %3 %3 %3 %3 -%32 = OpConstantNull %9 -%45 = OpTypeVector %7 2 -%55 = OpConstant %7 32 +%3 = OpTypeVector %4 4 +%6 = OpTypeInt 32 1 +%5 = OpTypeVector %6 2 +%9 = OpTypeFunction %2 +%10 = OpConstant %4 1.0 +%11 = OpConstant %4 0.0 +%12 = OpConstantNull %5 +%13 = OpConstantNull %5 +%14 = OpTypeInt 32 0 +%15 = OpConstant %14 0 +%16 = OpConstant %6 -1 +%17 = OpConstant %14 1 +%18 = OpConstant %6 0 +%19 = OpConstant %14 4294967295 +%20 = OpConstant %6 1 +%28 = OpConstantComposite %3 %11 %11 %11 %11 +%29 = OpConstantComposite %3 %10 %10 %10 %10 +%32 = OpConstantNull %6 +%45 = OpTypeVector %14 2 +%55 = OpConstant %14 32 %65 = OpConstantComposite %45 %55 %55 -%77 = OpConstant %9 31 -%83 = OpConstantComposite %15 %77 %77 -%17 = OpFunction %2 None %18 -%16 = OpLabel +%77 = OpConstant %6 31 +%83 = OpConstantComposite %5 %77 %77 +%8 = OpFunction %2 None %9 +%7 = OpLabel OpBranch %21 %21 = OpLabel -%22 = OpCompositeConstruct %14 %5 %5 %5 %5 -%23 = OpExtInst %4 %1 Degrees %3 -%24 = OpExtInst %4 %1 Radians %3 -%25 = OpExtInst %14 %1 Degrees %22 -%26 = OpExtInst %14 %1 Radians %22 -%27 = OpExtInst %14 %1 FClamp %22 %28 %29 -%30 = OpExtInst %14 %1 Refract %22 %22 %3 -%33 = OpCompositeExtract %9 %19 0 -%34 = OpCompositeExtract %9 %20 0 -%35 = OpIMul %9 %33 %34 -%36 = OpIAdd %9 %32 %35 -%37 = OpCompositeExtract %9 %19 1 -%38 = OpCompositeExtract %9 %20 1 -%39 = OpIMul %9 %37 %38 -%31 = OpIAdd %9 %36 %39 -%40 = OpCopyObject %7 %6 -%41 = OpExtInst %7 %1 FindUMsb %40 -%42 = OpExtInst %9 %1 FindSMsb %8 -%43 = OpCompositeConstruct %15 %8 %8 -%44 = OpExtInst %15 %1 FindSMsb %43 -%46 = OpCompositeConstruct %45 %10 %10 +%22 = OpCompositeConstruct %3 %11 %11 %11 %11 +%23 = OpExtInst %4 %1 Degrees %10 +%24 = OpExtInst %4 %1 Radians %10 +%25 = OpExtInst %3 %1 Degrees %22 +%26 = OpExtInst %3 %1 Radians %22 +%27 = OpExtInst %3 %1 FClamp %22 %28 %29 +%30 = OpExtInst %3 %1 Refract %22 %22 %10 +%33 = OpCompositeExtract %6 %12 0 +%34 = OpCompositeExtract %6 %13 0 +%35 = OpIMul %6 %33 %34 +%36 = OpIAdd %6 %32 %35 +%37 = OpCompositeExtract %6 %12 1 +%38 = OpCompositeExtract %6 %13 1 +%39 = OpIMul %6 %37 %38 +%31 = OpIAdd %6 %36 %39 +%40 = OpCopyObject %14 %15 +%41 = OpExtInst %14 %1 FindUMsb %40 +%42 = OpExtInst %6 %1 FindSMsb %16 +%43 = OpCompositeConstruct %5 %16 %16 +%44 = OpExtInst %5 %1 FindSMsb %43 +%46 = OpCompositeConstruct %45 %17 %17 %47 = OpExtInst %45 %1 FindUMsb %46 -%48 = OpExtInst %9 %1 FindILsb %8 -%49 = OpExtInst %7 %1 FindILsb %10 -%50 = OpCompositeConstruct %15 %8 %8 -%51 = OpExtInst %15 %1 FindILsb %50 -%52 = OpCompositeConstruct %45 %10 %10 +%48 = OpExtInst %6 %1 FindILsb %16 +%49 = OpExtInst %14 %1 FindILsb %17 +%50 = OpCompositeConstruct %5 %16 %16 +%51 = OpExtInst %5 %1 FindILsb %50 +%52 = OpCompositeConstruct %45 %17 %17 %53 = OpExtInst %45 %1 FindILsb %52 -%56 = OpExtInst %7 %1 FindILsb %6 -%54 = OpExtInst %7 %1 UMin %55 %56 -%58 = OpExtInst %9 %1 FindILsb %11 -%57 = OpExtInst %9 %1 UMin %55 %58 -%60 = OpExtInst %7 %1 FindILsb %12 -%59 = OpExtInst %7 %1 UMin %55 %60 -%62 = OpExtInst %9 %1 FindILsb %8 -%61 = OpExtInst %9 %1 UMin %55 %62 -%63 = OpCompositeConstruct %45 %6 %6 +%56 = OpExtInst %14 %1 FindILsb %15 +%54 = OpExtInst %14 %1 UMin %55 %56 +%58 = OpExtInst %6 %1 FindILsb %18 +%57 = OpExtInst %6 %1 UMin %55 %58 +%60 = OpExtInst %14 %1 FindILsb %19 +%59 = OpExtInst %14 %1 UMin %55 %60 +%62 = OpExtInst %6 %1 FindILsb %16 +%61 = OpExtInst %6 %1 UMin %55 %62 +%63 = OpCompositeConstruct %45 %15 %15 %66 = OpExtInst %45 %1 FindILsb %63 %64 = OpExtInst %45 %1 UMin %65 %66 -%67 = OpCompositeConstruct %15 %11 %11 -%69 = OpExtInst %15 %1 FindILsb %67 -%68 = OpExtInst %15 %1 UMin %65 %69 -%70 = OpCompositeConstruct %45 %10 %10 +%67 = OpCompositeConstruct %5 %18 %18 +%69 = OpExtInst %5 %1 FindILsb %67 +%68 = OpExtInst %5 %1 UMin %65 %69 +%70 = OpCompositeConstruct %45 %17 %17 %72 = OpExtInst %45 %1 FindILsb %70 %71 = OpExtInst %45 %1 UMin %65 %72 -%73 = OpCompositeConstruct %15 %13 %13 -%75 = OpExtInst %15 %1 FindILsb %73 -%74 = OpExtInst %15 %1 UMin %65 %75 -%78 = OpExtInst %9 %1 FindUMsb %8 -%76 = OpISub %9 %77 %78 -%80 = OpExtInst %9 %1 FindUMsb %10 -%79 = OpISub %7 %77 %80 -%81 = OpCompositeConstruct %15 %8 %8 -%84 = OpExtInst %15 %1 FindUMsb %81 -%82 = OpISub %15 %83 %84 -%85 = OpCompositeConstruct %45 %10 %10 -%87 = OpExtInst %15 %1 FindUMsb %85 +%73 = OpCompositeConstruct %5 %20 %20 +%75 = OpExtInst %5 %1 FindILsb %73 +%74 = OpExtInst %5 %1 UMin %65 %75 +%78 = OpExtInst %6 %1 FindUMsb %16 +%76 = OpISub %6 %77 %78 +%80 = OpExtInst %6 %1 FindUMsb %17 +%79 = OpISub %14 %77 %80 +%81 = OpCompositeConstruct %5 %16 %16 +%84 = OpExtInst %5 %1 FindUMsb %81 +%82 = OpISub %5 %83 %84 +%85 = OpCompositeConstruct %45 %17 %17 +%87 = OpExtInst %5 %1 FindUMsb %85 %86 = OpISub %45 %83 %87 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/operators.spvasm b/tests/out/spv/operators.spvasm index 64a2ed2f45..1fc38dea98 100644 --- a/tests/out/spv/operators.spvasm +++ b/tests/out/spv/operators.spvasm @@ -7,10 +7,10 @@ OpCapability Shader OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %576 "main" OpExecutionMode %576 LocalSize 1 1 1 -OpMemberDecorate %40 0 Offset 0 -OpMemberDecorate %40 1 Offset 16 -OpDecorate %44 ArrayStride 32 -OpDecorate %45 ArrayStride 4 +OpMemberDecorate %19 0 Offset 0 +OpMemberDecorate %19 1 Offset 16 +OpDecorate %23 ArrayStride 32 +OpDecorate %24 ArrayStride 4 %2 = OpTypeVoid %4 = OpTypeFloat 32 %3 = OpConstant %4 1.0 @@ -18,633 +18,633 @@ OpDecorate %45 ArrayStride 4 %6 = OpConstant %4 0.5 %8 = OpTypeInt 32 1 %7 = OpConstant %8 1 -%10 = OpTypeBool -%9 = OpConstantTrue %10 -%11 = OpConstant %8 0 -%12 = OpConstantFalse %10 -%13 = OpConstant %4 0.1 -%14 = OpConstant %4 2.0 -%15 = OpConstant %4 3.0 -%16 = OpConstant %4 4.0 -%17 = OpConstant %8 5 -%18 = OpConstant %8 2 -%19 = OpConstant %8 3 -%21 = OpTypeInt 32 0 -%20 = OpConstant %21 0 -%22 = OpConstant %21 4 -%23 = OpConstant %4 -1.0 -%24 = OpConstant %21 2 -%25 = OpConstant %21 1 -%26 = OpConstant %8 -1 -%27 = OpConstant %8 -2 -%28 = OpConstant %8 -3 -%29 = OpConstant %8 4 -%30 = OpConstant %8 -5 -%31 = OpConstant %8 6 -%32 = OpConstant %8 -7 -%33 = OpConstant %8 -8 -%34 = OpTypeVector %4 4 -%35 = OpTypeVector %8 4 -%36 = OpTypeVector %10 4 -%37 = OpTypeVector %4 2 -%38 = OpTypeVector %4 3 -%39 = OpTypeVector %10 3 -%40 = OpTypeStruct %34 %8 -%41 = OpTypeMatrix %37 2 -%42 = OpTypeMatrix %34 4 -%43 = OpTypeVector %21 2 -%44 = OpTypeArray %40 %19 -%45 = OpTypeArray %8 %22 -%46 = OpTypeMatrix %38 2 -%47 = OpTypeMatrix %38 3 -%48 = OpTypeMatrix %38 4 -%49 = OpTypeMatrix %34 3 -%50 = OpTypeVector %8 3 -%51 = OpConstantComposite %34 %3 %3 %3 %3 -%52 = OpConstantComposite %34 %5 %5 %5 %5 -%53 = OpConstantComposite %34 %6 %6 %6 %6 -%54 = OpConstantComposite %35 %7 %7 %7 %7 -%57 = OpTypeFunction %34 -%97 = OpTypePointer Function %37 -%98 = OpConstantNull %37 -%101 = OpTypeFunction %37 -%117 = OpTypeFunction %38 %38 -%119 = OpConstantComposite %38 %5 %5 %5 -%121 = OpConstantComposite %38 %3 %3 %3 -%124 = OpTypePointer Function %40 -%125 = OpConstantNull %40 -%128 = OpTypeFunction %4 -%129 = OpConstantNull %10 -%130 = OpConstantNull %8 -%131 = OpConstantNull %21 -%132 = OpConstantNull %4 -%133 = OpConstantNull %43 -%134 = OpConstantNull %41 -%135 = OpConstantNull %44 -%136 = OpConstantNull %40 -%137 = OpConstantNull %10 -%138 = OpConstantNull %8 -%139 = OpConstantNull %21 -%140 = OpConstantNull %4 -%141 = OpConstantNull %43 -%142 = OpConstantNull %46 -%143 = OpConstantNull %43 -%144 = OpConstantNull %46 -%169 = OpTypePointer Function %34 -%170 = OpTypePointer Function %4 -%175 = OpTypeFunction %2 -%178 = OpTypeVector %10 2 -%193 = OpConstantNull %47 -%194 = OpConstantNull %47 -%195 = OpConstantNull %47 -%196 = OpConstantNull %47 -%197 = OpConstantNull %47 -%198 = OpConstantNull %47 -%199 = OpConstantNull %48 -%200 = OpConstantNull %48 -%201 = OpConstantNull %48 -%202 = OpConstantNull %49 -%204 = OpTypeVector %8 2 -%215 = OpTypeVector %21 3 -%510 = OpTypePointer Function %8 -%511 = OpConstantNull %8 -%513 = OpTypePointer Function %50 -%514 = OpConstantNull %50 -%517 = OpConstantNull %50 -%545 = OpTypePointer Function %8 -%56 = OpFunction %34 None %57 -%55 = OpLabel -OpBranch %58 -%58 = OpLabel -%59 = OpSelect %8 %9 %7 %11 -%61 = OpCompositeConstruct %36 %9 %9 %9 %9 -%60 = OpSelect %34 %61 %51 %52 -%62 = OpCompositeConstruct %36 %12 %12 %12 %12 -%63 = OpSelect %34 %62 %52 %51 -%64 = OpExtInst %34 %1 FMix %52 %51 %53 -%66 = OpCompositeConstruct %34 %13 %13 %13 %13 -%65 = OpExtInst %34 %1 FMix %52 %51 %66 -%67 = OpCompositeExtract %8 %54 0 -%68 = OpBitcast %4 %67 -%69 = OpBitcast %34 %54 -%70 = OpConvertFToS %35 %52 -%71 = OpCompositeConstruct %35 %59 %59 %59 %59 -%72 = OpIAdd %35 %71 %70 -%73 = OpConvertSToF %34 %72 -%74 = OpFAdd %34 %73 %60 -%75 = OpFAdd %34 %74 %64 -%76 = OpFAdd %34 %75 %65 -%77 = OpCompositeConstruct %34 %68 %68 %68 %68 -%78 = OpFAdd %34 %76 %77 -%79 = OpFAdd %34 %78 %69 -OpReturnValue %79 +%9 = OpConstant %8 3 +%11 = OpTypeInt 32 0 +%10 = OpConstant %11 4 +%12 = OpTypeVector %4 4 +%13 = OpTypeVector %8 4 +%15 = OpTypeBool +%14 = OpTypeVector %15 4 +%16 = OpTypeVector %4 2 +%17 = OpTypeVector %4 3 +%18 = OpTypeVector %15 3 +%19 = OpTypeStruct %12 %8 +%20 = OpTypeMatrix %16 2 +%21 = OpTypeMatrix %12 4 +%22 = OpTypeVector %11 2 +%23 = OpTypeArray %19 %9 +%24 = OpTypeArray %8 %10 +%25 = OpTypeMatrix %17 2 +%26 = OpTypeMatrix %17 3 +%27 = OpTypeMatrix %17 4 +%28 = OpTypeMatrix %12 3 +%29 = OpTypeVector %8 3 +%30 = OpConstantComposite %12 %3 %3 %3 %3 +%31 = OpConstantComposite %12 %5 %5 %5 %5 +%32 = OpConstantComposite %12 %6 %6 %6 %6 +%33 = OpConstantComposite %13 %7 %7 %7 %7 +%36 = OpTypeFunction %12 +%37 = OpConstantTrue %15 +%38 = OpConstant %8 0 +%39 = OpConstantFalse %15 +%40 = OpConstant %4 0.1 +%65 = OpConstant %4 2.0 +%66 = OpConstant %4 3.0 +%67 = OpConstant %4 4.0 +%68 = OpConstant %8 5 +%69 = OpConstant %8 2 +%85 = OpTypePointer Function %16 +%86 = OpConstantNull %16 +%89 = OpTypeFunction %16 +%105 = OpTypeFunction %17 %17 +%107 = OpConstantComposite %17 %5 %5 %5 +%109 = OpConstantComposite %17 %3 %3 %3 +%112 = OpTypePointer Function %19 +%113 = OpConstantNull %19 +%116 = OpTypeFunction %4 +%117 = OpConstantNull %15 +%118 = OpConstantNull %8 +%119 = OpConstantNull %11 +%120 = OpConstantNull %4 +%121 = OpConstantNull %22 +%122 = OpConstantNull %20 +%123 = OpConstantNull %23 +%124 = OpConstantNull %19 +%125 = OpConstant %11 0 +%126 = OpConstantNull %15 +%127 = OpConstantNull %8 +%128 = OpConstantNull %11 +%129 = OpConstantNull %4 +%130 = OpConstantNull %22 +%131 = OpConstantNull %25 +%132 = OpConstantNull %22 +%133 = OpConstantNull %25 +%158 = OpTypePointer Function %12 +%159 = OpTypePointer Function %4 +%164 = OpTypeFunction %2 +%167 = OpTypeVector %15 2 +%182 = OpConstant %4 -1.0 +%183 = OpConstant %11 2 +%184 = OpConstant %11 1 +%185 = OpConstantNull %26 +%186 = OpConstantNull %26 +%187 = OpConstantNull %26 +%188 = OpConstantNull %26 +%189 = OpConstantNull %26 +%190 = OpConstantNull %26 +%191 = OpConstantNull %27 +%192 = OpConstantNull %27 +%193 = OpConstantNull %27 +%194 = OpConstantNull %28 +%196 = OpTypeVector %8 2 +%207 = OpTypeVector %11 3 +%502 = OpTypePointer Function %8 +%503 = OpConstantNull %8 +%505 = OpTypePointer Function %29 +%506 = OpConstantNull %29 +%509 = OpConstantNull %29 +%537 = OpTypePointer Function %8 +%548 = OpConstant %8 -1 +%549 = OpConstant %8 -2 +%550 = OpConstant %8 -3 +%551 = OpConstant %8 4 +%552 = OpConstant %8 -5 +%553 = OpConstant %8 6 +%554 = OpConstant %8 -7 +%555 = OpConstant %8 -8 +%35 = OpFunction %12 None %36 +%34 = OpLabel +OpBranch %41 +%41 = OpLabel +%42 = OpSelect %8 %37 %7 %38 +%44 = OpCompositeConstruct %14 %37 %37 %37 %37 +%43 = OpSelect %12 %44 %30 %31 +%45 = OpCompositeConstruct %14 %39 %39 %39 %39 +%46 = OpSelect %12 %45 %31 %30 +%47 = OpExtInst %12 %1 FMix %31 %30 %32 +%49 = OpCompositeConstruct %12 %40 %40 %40 %40 +%48 = OpExtInst %12 %1 FMix %31 %30 %49 +%50 = OpCompositeExtract %8 %33 0 +%51 = OpBitcast %4 %50 +%52 = OpBitcast %12 %33 +%53 = OpConvertFToS %13 %31 +%54 = OpCompositeConstruct %13 %42 %42 %42 %42 +%55 = OpIAdd %13 %54 %53 +%56 = OpConvertSToF %12 %55 +%57 = OpFAdd %12 %56 %43 +%58 = OpFAdd %12 %57 %47 +%59 = OpFAdd %12 %58 %48 +%60 = OpCompositeConstruct %12 %51 %51 %51 %51 +%61 = OpFAdd %12 %59 %60 +%62 = OpFAdd %12 %61 %52 +OpReturnValue %62 OpFunctionEnd -%81 = OpFunction %34 None %57 -%80 = OpLabel -OpBranch %82 -%82 = OpLabel -%83 = OpCompositeConstruct %37 %14 %14 -%84 = OpCompositeConstruct %37 %3 %3 -%85 = OpFAdd %37 %84 %83 -%86 = OpCompositeConstruct %37 %15 %15 -%87 = OpFSub %37 %85 %86 -%88 = OpCompositeConstruct %37 %16 %16 -%89 = OpFDiv %37 %87 %88 -%90 = OpCompositeConstruct %35 %17 %17 %17 %17 -%91 = OpCompositeConstruct %35 %18 %18 %18 %18 -%92 = OpSRem %35 %90 %91 -%93 = OpVectorShuffle %34 %89 %89 0 1 0 1 -%94 = OpConvertSToF %34 %92 -%95 = OpFAdd %34 %93 %94 -OpReturnValue %95 +%64 = OpFunction %12 None %36 +%63 = OpLabel +OpBranch %70 +%70 = OpLabel +%71 = OpCompositeConstruct %16 %65 %65 +%72 = OpCompositeConstruct %16 %3 %3 +%73 = OpFAdd %16 %72 %71 +%74 = OpCompositeConstruct %16 %66 %66 +%75 = OpFSub %16 %73 %74 +%76 = OpCompositeConstruct %16 %67 %67 +%77 = OpFDiv %16 %75 %76 +%78 = OpCompositeConstruct %13 %68 %68 %68 %68 +%79 = OpCompositeConstruct %13 %69 %69 %69 %69 +%80 = OpSRem %13 %78 %79 +%81 = OpVectorShuffle %12 %77 %77 0 1 0 1 +%82 = OpConvertSToF %12 %80 +%83 = OpFAdd %12 %81 %82 +OpReturnValue %83 OpFunctionEnd -%100 = OpFunction %37 None %101 -%99 = OpLabel -%96 = OpVariable %97 Function %98 -OpBranch %102 +%88 = OpFunction %16 None %89 +%87 = OpLabel +%84 = OpVariable %85 Function %86 +OpBranch %90 +%90 = OpLabel +%91 = OpCompositeConstruct %16 %65 %65 +OpStore %84 %91 +%92 = OpLoad %16 %84 +%93 = OpCompositeConstruct %16 %3 %3 +%94 = OpFAdd %16 %92 %93 +OpStore %84 %94 +%95 = OpLoad %16 %84 +%96 = OpCompositeConstruct %16 %66 %66 +%97 = OpFSub %16 %95 %96 +OpStore %84 %97 +%98 = OpLoad %16 %84 +%99 = OpCompositeConstruct %16 %67 %67 +%100 = OpFDiv %16 %98 %99 +OpStore %84 %100 +%101 = OpLoad %16 %84 +OpReturnValue %101 +OpFunctionEnd +%104 = OpFunction %17 None %105 +%103 = OpFunctionParameter %17 %102 = OpLabel -%103 = OpCompositeConstruct %37 %14 %14 -OpStore %96 %103 -%104 = OpLoad %37 %96 -%105 = OpCompositeConstruct %37 %3 %3 -%106 = OpFAdd %37 %104 %105 -OpStore %96 %106 -%107 = OpLoad %37 %96 -%108 = OpCompositeConstruct %37 %15 %15 -%109 = OpFSub %37 %107 %108 -OpStore %96 %109 -%110 = OpLoad %37 %96 -%111 = OpCompositeConstruct %37 %16 %16 -%112 = OpFDiv %37 %110 %111 -OpStore %96 %112 -%113 = OpLoad %37 %96 -OpReturnValue %113 +OpBranch %106 +%106 = OpLabel +%108 = OpFUnordNotEqual %18 %103 %107 +%110 = OpSelect %17 %108 %109 %107 +OpReturnValue %110 OpFunctionEnd -%116 = OpFunction %38 None %117 -%115 = OpFunctionParameter %38 +%115 = OpFunction %4 None %116 %114 = OpLabel -OpBranch %118 -%118 = OpLabel -%120 = OpFUnordNotEqual %39 %115 %119 -%122 = OpSelect %38 %120 %121 %119 -OpReturnValue %122 +%111 = OpVariable %112 Function %113 +OpBranch %134 +%134 = OpLabel +%135 = OpCompositeConstruct %12 %3 %3 %3 %3 +%136 = OpCompositeConstruct %19 %135 %7 +OpStore %111 %136 +%137 = OpCompositeConstruct %16 %3 %5 +%138 = OpCompositeConstruct %16 %5 %3 +%139 = OpCompositeConstruct %20 %137 %138 +%140 = OpCompositeConstruct %12 %3 %5 %5 %5 +%141 = OpCompositeConstruct %12 %5 %3 %5 %5 +%142 = OpCompositeConstruct %12 %5 %5 %3 %5 +%143 = OpCompositeConstruct %12 %5 %5 %5 %3 +%144 = OpCompositeConstruct %21 %140 %141 %142 %143 +%145 = OpCompositeConstruct %22 %125 %125 +%146 = OpCompositeConstruct %16 %5 %5 +%147 = OpCompositeConstruct %16 %5 %5 +%148 = OpCompositeConstruct %20 %146 %147 +%149 = OpCompositeConstruct %24 %38 %7 %69 %9 +%155 = OpCopyObject %25 %131 +%157 = OpCopyObject %25 %133 +%160 = OpAccessChain %159 %111 %125 %125 +%161 = OpLoad %4 %160 +OpReturnValue %161 OpFunctionEnd -%127 = OpFunction %4 None %128 -%126 = OpLabel -%123 = OpVariable %124 Function %125 -OpBranch %145 -%145 = OpLabel -%146 = OpCompositeConstruct %34 %3 %3 %3 %3 -%147 = OpCompositeConstruct %40 %146 %7 -OpStore %123 %147 -%148 = OpCompositeConstruct %37 %3 %5 -%149 = OpCompositeConstruct %37 %5 %3 -%150 = OpCompositeConstruct %41 %148 %149 -%151 = OpCompositeConstruct %34 %3 %5 %5 %5 -%152 = OpCompositeConstruct %34 %5 %3 %5 %5 -%153 = OpCompositeConstruct %34 %5 %5 %3 %5 -%154 = OpCompositeConstruct %34 %5 %5 %5 %3 -%155 = OpCompositeConstruct %42 %151 %152 %153 %154 -%156 = OpCompositeConstruct %43 %20 %20 -%157 = OpCompositeConstruct %37 %5 %5 -%158 = OpCompositeConstruct %37 %5 %5 -%159 = OpCompositeConstruct %41 %157 %158 -%160 = OpCompositeConstruct %45 %11 %7 %18 %19 -%166 = OpCopyObject %46 %142 -%168 = OpCopyObject %46 %144 -%171 = OpAccessChain %170 %123 %20 %20 -%172 = OpLoad %4 %171 -OpReturnValue %172 -OpFunctionEnd -%174 = OpFunction %2 None %175 -%173 = OpLabel -OpBranch %176 -%176 = OpLabel -%177 = OpLogicalNot %10 %9 -%179 = OpCompositeConstruct %178 %9 %9 -%180 = OpLogicalNot %178 %179 -%181 = OpLogicalOr %10 %9 %12 -%182 = OpLogicalAnd %10 %9 %12 -%183 = OpLogicalOr %10 %9 %12 -%184 = OpCompositeConstruct %39 %9 %9 %9 -%185 = OpCompositeConstruct %39 %12 %12 %12 -%186 = OpLogicalOr %39 %184 %185 -%187 = OpLogicalAnd %10 %9 %12 -%188 = OpCompositeConstruct %36 %9 %9 %9 %9 -%189 = OpCompositeConstruct %36 %12 %12 %12 %12 -%190 = OpLogicalAnd %36 %188 %189 +%163 = OpFunction %2 None %164 +%162 = OpLabel +OpBranch %165 +%165 = OpLabel +%166 = OpLogicalNot %15 %37 +%168 = OpCompositeConstruct %167 %37 %37 +%169 = OpLogicalNot %167 %168 +%170 = OpLogicalOr %15 %37 %39 +%171 = OpLogicalAnd %15 %37 %39 +%172 = OpLogicalOr %15 %37 %39 +%173 = OpCompositeConstruct %18 %37 %37 %37 +%174 = OpCompositeConstruct %18 %39 %39 %39 +%175 = OpLogicalOr %18 %173 %174 +%176 = OpLogicalAnd %15 %37 %39 +%177 = OpCompositeConstruct %14 %37 %37 %37 %37 +%178 = OpCompositeConstruct %14 %39 %39 %39 %39 +%179 = OpLogicalAnd %14 %177 %178 OpReturn OpFunctionEnd -%192 = OpFunction %2 None %175 -%191 = OpLabel -OpBranch %203 -%203 = OpLabel -%205 = OpCompositeConstruct %204 %7 %7 -%206 = OpSNegate %204 %205 -%207 = OpCompositeConstruct %37 %3 %3 -%208 = OpFNegate %37 %207 -%209 = OpIAdd %8 %18 %7 -%210 = OpIAdd %21 %24 %25 -%211 = OpFAdd %4 %14 %3 -%212 = OpCompositeConstruct %204 %18 %18 -%213 = OpCompositeConstruct %204 %7 %7 -%214 = OpIAdd %204 %212 %213 -%216 = OpCompositeConstruct %215 %24 %24 %24 -%217 = OpCompositeConstruct %215 %25 %25 %25 -%218 = OpIAdd %215 %216 %217 -%219 = OpCompositeConstruct %34 %14 %14 %14 %14 -%220 = OpCompositeConstruct %34 %3 %3 %3 %3 -%221 = OpFAdd %34 %219 %220 -%222 = OpISub %8 %18 %7 -%223 = OpISub %21 %24 %25 -%224 = OpFSub %4 %14 %3 -%225 = OpCompositeConstruct %204 %18 %18 -%226 = OpCompositeConstruct %204 %7 %7 -%227 = OpISub %204 %225 %226 -%228 = OpCompositeConstruct %215 %24 %24 %24 -%229 = OpCompositeConstruct %215 %25 %25 %25 -%230 = OpISub %215 %228 %229 -%231 = OpCompositeConstruct %34 %14 %14 %14 %14 -%232 = OpCompositeConstruct %34 %3 %3 %3 %3 -%233 = OpFSub %34 %231 %232 -%234 = OpIMul %8 %18 %7 -%235 = OpIMul %21 %24 %25 -%236 = OpFMul %4 %14 %3 -%237 = OpCompositeConstruct %204 %18 %18 -%238 = OpCompositeConstruct %204 %7 %7 -%239 = OpIMul %204 %237 %238 -%240 = OpCompositeConstruct %215 %24 %24 %24 -%241 = OpCompositeConstruct %215 %25 %25 %25 -%242 = OpIMul %215 %240 %241 -%243 = OpCompositeConstruct %34 %14 %14 %14 %14 -%244 = OpCompositeConstruct %34 %3 %3 %3 %3 -%245 = OpFMul %34 %243 %244 -%246 = OpSDiv %8 %18 %7 -%247 = OpUDiv %21 %24 %25 -%248 = OpFDiv %4 %14 %3 -%249 = OpCompositeConstruct %204 %18 %18 -%250 = OpCompositeConstruct %204 %7 %7 -%251 = OpSDiv %204 %249 %250 -%252 = OpCompositeConstruct %215 %24 %24 %24 -%253 = OpCompositeConstruct %215 %25 %25 %25 -%254 = OpUDiv %215 %252 %253 -%255 = OpCompositeConstruct %34 %14 %14 %14 %14 -%256 = OpCompositeConstruct %34 %3 %3 %3 %3 -%257 = OpFDiv %34 %255 %256 -%258 = OpSRem %8 %18 %7 -%259 = OpUMod %21 %24 %25 -%260 = OpFRem %4 %14 %3 -%261 = OpCompositeConstruct %204 %18 %18 -%262 = OpCompositeConstruct %204 %7 %7 -%263 = OpSRem %204 %261 %262 -%264 = OpCompositeConstruct %215 %24 %24 %24 -%265 = OpCompositeConstruct %215 %25 %25 %25 -%266 = OpUMod %215 %264 %265 -%267 = OpCompositeConstruct %34 %14 %14 %14 %14 -%268 = OpCompositeConstruct %34 %3 %3 %3 %3 -%269 = OpFRem %34 %267 %268 -%270 = OpCompositeConstruct %204 %18 %18 -%271 = OpCompositeConstruct %204 %7 %7 -%272 = OpIAdd %204 %270 %271 -%273 = OpCompositeConstruct %204 %7 %7 -%274 = OpCompositeConstruct %204 %18 %18 -%275 = OpIAdd %204 %274 %273 -%276 = OpCompositeConstruct %43 %24 %24 -%277 = OpCompositeConstruct %43 %25 %25 -%278 = OpIAdd %43 %276 %277 -%279 = OpCompositeConstruct %43 %25 %25 -%280 = OpCompositeConstruct %43 %24 %24 -%281 = OpIAdd %43 %280 %279 -%282 = OpCompositeConstruct %37 %14 %14 -%283 = OpCompositeConstruct %37 %3 %3 -%284 = OpFAdd %37 %282 %283 -%285 = OpCompositeConstruct %37 %3 %3 -%286 = OpCompositeConstruct %37 %14 %14 -%287 = OpFAdd %37 %286 %285 -%288 = OpCompositeConstruct %204 %18 %18 -%289 = OpCompositeConstruct %204 %7 %7 -%290 = OpISub %204 %288 %289 -%291 = OpCompositeConstruct %204 %7 %7 -%292 = OpCompositeConstruct %204 %18 %18 -%293 = OpISub %204 %292 %291 -%294 = OpCompositeConstruct %43 %24 %24 -%295 = OpCompositeConstruct %43 %25 %25 -%296 = OpISub %43 %294 %295 -%297 = OpCompositeConstruct %43 %25 %25 -%298 = OpCompositeConstruct %43 %24 %24 -%299 = OpISub %43 %298 %297 -%300 = OpCompositeConstruct %37 %14 %14 -%301 = OpCompositeConstruct %37 %3 %3 -%302 = OpFSub %37 %300 %301 -%303 = OpCompositeConstruct %37 %3 %3 -%304 = OpCompositeConstruct %37 %14 %14 -%305 = OpFSub %37 %304 %303 -%306 = OpCompositeConstruct %204 %18 %18 -%308 = OpCompositeConstruct %204 %7 %7 -%307 = OpIMul %204 %306 %308 -%309 = OpCompositeConstruct %204 %7 %7 -%311 = OpCompositeConstruct %204 %18 %18 -%310 = OpIMul %204 %309 %311 -%312 = OpCompositeConstruct %43 %24 %24 -%314 = OpCompositeConstruct %43 %25 %25 -%313 = OpIMul %43 %312 %314 -%315 = OpCompositeConstruct %43 %25 %25 -%317 = OpCompositeConstruct %43 %24 %24 -%316 = OpIMul %43 %315 %317 -%318 = OpCompositeConstruct %37 %14 %14 -%319 = OpVectorTimesScalar %37 %318 %3 -%320 = OpCompositeConstruct %37 %3 %3 -%321 = OpVectorTimesScalar %37 %320 %14 -%322 = OpCompositeConstruct %204 %18 %18 -%323 = OpCompositeConstruct %204 %7 %7 -%324 = OpSDiv %204 %322 %323 -%325 = OpCompositeConstruct %204 %7 %7 -%326 = OpCompositeConstruct %204 %18 %18 -%327 = OpSDiv %204 %326 %325 -%328 = OpCompositeConstruct %43 %24 %24 -%329 = OpCompositeConstruct %43 %25 %25 -%330 = OpUDiv %43 %328 %329 -%331 = OpCompositeConstruct %43 %25 %25 -%332 = OpCompositeConstruct %43 %24 %24 -%333 = OpUDiv %43 %332 %331 -%334 = OpCompositeConstruct %37 %14 %14 -%335 = OpCompositeConstruct %37 %3 %3 -%336 = OpFDiv %37 %334 %335 -%337 = OpCompositeConstruct %37 %3 %3 -%338 = OpCompositeConstruct %37 %14 %14 -%339 = OpFDiv %37 %338 %337 -%340 = OpCompositeConstruct %204 %18 %18 -%341 = OpCompositeConstruct %204 %7 %7 -%342 = OpSRem %204 %340 %341 -%343 = OpCompositeConstruct %204 %7 %7 -%344 = OpCompositeConstruct %204 %18 %18 -%345 = OpSRem %204 %344 %343 -%346 = OpCompositeConstruct %43 %24 %24 -%347 = OpCompositeConstruct %43 %25 %25 -%348 = OpUMod %43 %346 %347 -%349 = OpCompositeConstruct %43 %25 %25 -%350 = OpCompositeConstruct %43 %24 %24 -%351 = OpUMod %43 %350 %349 -%352 = OpCompositeConstruct %37 %14 %14 -%353 = OpCompositeConstruct %37 %3 %3 -%354 = OpFRem %37 %352 %353 -%355 = OpCompositeConstruct %37 %3 %3 -%356 = OpCompositeConstruct %37 %14 %14 -%357 = OpFRem %37 %356 %355 -%359 = OpCompositeExtract %38 %193 0 -%360 = OpCompositeExtract %38 %194 0 -%361 = OpFAdd %38 %359 %360 -%362 = OpCompositeExtract %38 %193 1 -%363 = OpCompositeExtract %38 %194 1 -%364 = OpFAdd %38 %362 %363 -%365 = OpCompositeExtract %38 %193 2 -%366 = OpCompositeExtract %38 %194 2 -%367 = OpFAdd %38 %365 %366 -%358 = OpCompositeConstruct %47 %361 %364 %367 -%369 = OpCompositeExtract %38 %195 0 -%370 = OpCompositeExtract %38 %196 0 -%371 = OpFSub %38 %369 %370 -%372 = OpCompositeExtract %38 %195 1 -%373 = OpCompositeExtract %38 %196 1 -%374 = OpFSub %38 %372 %373 -%375 = OpCompositeExtract %38 %195 2 -%376 = OpCompositeExtract %38 %196 2 -%377 = OpFSub %38 %375 %376 -%368 = OpCompositeConstruct %47 %371 %374 %377 -%378 = OpMatrixTimesScalar %47 %197 %3 -%379 = OpMatrixTimesScalar %47 %198 %14 -%380 = OpCompositeConstruct %34 %3 %3 %3 %3 -%381 = OpMatrixTimesVector %38 %199 %380 -%382 = OpCompositeConstruct %38 %14 %14 %14 -%383 = OpVectorTimesMatrix %34 %382 %200 -%384 = OpMatrixTimesMatrix %47 %201 %202 +%181 = OpFunction %2 None %164 +%180 = OpLabel +OpBranch %195 +%195 = OpLabel +%197 = OpCompositeConstruct %196 %7 %7 +%198 = OpSNegate %196 %197 +%199 = OpCompositeConstruct %16 %3 %3 +%200 = OpFNegate %16 %199 +%201 = OpIAdd %8 %69 %7 +%202 = OpIAdd %11 %183 %184 +%203 = OpFAdd %4 %65 %3 +%204 = OpCompositeConstruct %196 %69 %69 +%205 = OpCompositeConstruct %196 %7 %7 +%206 = OpIAdd %196 %204 %205 +%208 = OpCompositeConstruct %207 %183 %183 %183 +%209 = OpCompositeConstruct %207 %184 %184 %184 +%210 = OpIAdd %207 %208 %209 +%211 = OpCompositeConstruct %12 %65 %65 %65 %65 +%212 = OpCompositeConstruct %12 %3 %3 %3 %3 +%213 = OpFAdd %12 %211 %212 +%214 = OpISub %8 %69 %7 +%215 = OpISub %11 %183 %184 +%216 = OpFSub %4 %65 %3 +%217 = OpCompositeConstruct %196 %69 %69 +%218 = OpCompositeConstruct %196 %7 %7 +%219 = OpISub %196 %217 %218 +%220 = OpCompositeConstruct %207 %183 %183 %183 +%221 = OpCompositeConstruct %207 %184 %184 %184 +%222 = OpISub %207 %220 %221 +%223 = OpCompositeConstruct %12 %65 %65 %65 %65 +%224 = OpCompositeConstruct %12 %3 %3 %3 %3 +%225 = OpFSub %12 %223 %224 +%226 = OpIMul %8 %69 %7 +%227 = OpIMul %11 %183 %184 +%228 = OpFMul %4 %65 %3 +%229 = OpCompositeConstruct %196 %69 %69 +%230 = OpCompositeConstruct %196 %7 %7 +%231 = OpIMul %196 %229 %230 +%232 = OpCompositeConstruct %207 %183 %183 %183 +%233 = OpCompositeConstruct %207 %184 %184 %184 +%234 = OpIMul %207 %232 %233 +%235 = OpCompositeConstruct %12 %65 %65 %65 %65 +%236 = OpCompositeConstruct %12 %3 %3 %3 %3 +%237 = OpFMul %12 %235 %236 +%238 = OpSDiv %8 %69 %7 +%239 = OpUDiv %11 %183 %184 +%240 = OpFDiv %4 %65 %3 +%241 = OpCompositeConstruct %196 %69 %69 +%242 = OpCompositeConstruct %196 %7 %7 +%243 = OpSDiv %196 %241 %242 +%244 = OpCompositeConstruct %207 %183 %183 %183 +%245 = OpCompositeConstruct %207 %184 %184 %184 +%246 = OpUDiv %207 %244 %245 +%247 = OpCompositeConstruct %12 %65 %65 %65 %65 +%248 = OpCompositeConstruct %12 %3 %3 %3 %3 +%249 = OpFDiv %12 %247 %248 +%250 = OpSRem %8 %69 %7 +%251 = OpUMod %11 %183 %184 +%252 = OpFRem %4 %65 %3 +%253 = OpCompositeConstruct %196 %69 %69 +%254 = OpCompositeConstruct %196 %7 %7 +%255 = OpSRem %196 %253 %254 +%256 = OpCompositeConstruct %207 %183 %183 %183 +%257 = OpCompositeConstruct %207 %184 %184 %184 +%258 = OpUMod %207 %256 %257 +%259 = OpCompositeConstruct %12 %65 %65 %65 %65 +%260 = OpCompositeConstruct %12 %3 %3 %3 %3 +%261 = OpFRem %12 %259 %260 +%262 = OpCompositeConstruct %196 %69 %69 +%263 = OpCompositeConstruct %196 %7 %7 +%264 = OpIAdd %196 %262 %263 +%265 = OpCompositeConstruct %196 %7 %7 +%266 = OpCompositeConstruct %196 %69 %69 +%267 = OpIAdd %196 %266 %265 +%268 = OpCompositeConstruct %22 %183 %183 +%269 = OpCompositeConstruct %22 %184 %184 +%270 = OpIAdd %22 %268 %269 +%271 = OpCompositeConstruct %22 %184 %184 +%272 = OpCompositeConstruct %22 %183 %183 +%273 = OpIAdd %22 %272 %271 +%274 = OpCompositeConstruct %16 %65 %65 +%275 = OpCompositeConstruct %16 %3 %3 +%276 = OpFAdd %16 %274 %275 +%277 = OpCompositeConstruct %16 %3 %3 +%278 = OpCompositeConstruct %16 %65 %65 +%279 = OpFAdd %16 %278 %277 +%280 = OpCompositeConstruct %196 %69 %69 +%281 = OpCompositeConstruct %196 %7 %7 +%282 = OpISub %196 %280 %281 +%283 = OpCompositeConstruct %196 %7 %7 +%284 = OpCompositeConstruct %196 %69 %69 +%285 = OpISub %196 %284 %283 +%286 = OpCompositeConstruct %22 %183 %183 +%287 = OpCompositeConstruct %22 %184 %184 +%288 = OpISub %22 %286 %287 +%289 = OpCompositeConstruct %22 %184 %184 +%290 = OpCompositeConstruct %22 %183 %183 +%291 = OpISub %22 %290 %289 +%292 = OpCompositeConstruct %16 %65 %65 +%293 = OpCompositeConstruct %16 %3 %3 +%294 = OpFSub %16 %292 %293 +%295 = OpCompositeConstruct %16 %3 %3 +%296 = OpCompositeConstruct %16 %65 %65 +%297 = OpFSub %16 %296 %295 +%298 = OpCompositeConstruct %196 %69 %69 +%300 = OpCompositeConstruct %196 %7 %7 +%299 = OpIMul %196 %298 %300 +%301 = OpCompositeConstruct %196 %7 %7 +%303 = OpCompositeConstruct %196 %69 %69 +%302 = OpIMul %196 %301 %303 +%304 = OpCompositeConstruct %22 %183 %183 +%306 = OpCompositeConstruct %22 %184 %184 +%305 = OpIMul %22 %304 %306 +%307 = OpCompositeConstruct %22 %184 %184 +%309 = OpCompositeConstruct %22 %183 %183 +%308 = OpIMul %22 %307 %309 +%310 = OpCompositeConstruct %16 %65 %65 +%311 = OpVectorTimesScalar %16 %310 %3 +%312 = OpCompositeConstruct %16 %3 %3 +%313 = OpVectorTimesScalar %16 %312 %65 +%314 = OpCompositeConstruct %196 %69 %69 +%315 = OpCompositeConstruct %196 %7 %7 +%316 = OpSDiv %196 %314 %315 +%317 = OpCompositeConstruct %196 %7 %7 +%318 = OpCompositeConstruct %196 %69 %69 +%319 = OpSDiv %196 %318 %317 +%320 = OpCompositeConstruct %22 %183 %183 +%321 = OpCompositeConstruct %22 %184 %184 +%322 = OpUDiv %22 %320 %321 +%323 = OpCompositeConstruct %22 %184 %184 +%324 = OpCompositeConstruct %22 %183 %183 +%325 = OpUDiv %22 %324 %323 +%326 = OpCompositeConstruct %16 %65 %65 +%327 = OpCompositeConstruct %16 %3 %3 +%328 = OpFDiv %16 %326 %327 +%329 = OpCompositeConstruct %16 %3 %3 +%330 = OpCompositeConstruct %16 %65 %65 +%331 = OpFDiv %16 %330 %329 +%332 = OpCompositeConstruct %196 %69 %69 +%333 = OpCompositeConstruct %196 %7 %7 +%334 = OpSRem %196 %332 %333 +%335 = OpCompositeConstruct %196 %7 %7 +%336 = OpCompositeConstruct %196 %69 %69 +%337 = OpSRem %196 %336 %335 +%338 = OpCompositeConstruct %22 %183 %183 +%339 = OpCompositeConstruct %22 %184 %184 +%340 = OpUMod %22 %338 %339 +%341 = OpCompositeConstruct %22 %184 %184 +%342 = OpCompositeConstruct %22 %183 %183 +%343 = OpUMod %22 %342 %341 +%344 = OpCompositeConstruct %16 %65 %65 +%345 = OpCompositeConstruct %16 %3 %3 +%346 = OpFRem %16 %344 %345 +%347 = OpCompositeConstruct %16 %3 %3 +%348 = OpCompositeConstruct %16 %65 %65 +%349 = OpFRem %16 %348 %347 +%351 = OpCompositeExtract %17 %185 0 +%352 = OpCompositeExtract %17 %186 0 +%353 = OpFAdd %17 %351 %352 +%354 = OpCompositeExtract %17 %185 1 +%355 = OpCompositeExtract %17 %186 1 +%356 = OpFAdd %17 %354 %355 +%357 = OpCompositeExtract %17 %185 2 +%358 = OpCompositeExtract %17 %186 2 +%359 = OpFAdd %17 %357 %358 +%350 = OpCompositeConstruct %26 %353 %356 %359 +%361 = OpCompositeExtract %17 %187 0 +%362 = OpCompositeExtract %17 %188 0 +%363 = OpFSub %17 %361 %362 +%364 = OpCompositeExtract %17 %187 1 +%365 = OpCompositeExtract %17 %188 1 +%366 = OpFSub %17 %364 %365 +%367 = OpCompositeExtract %17 %187 2 +%368 = OpCompositeExtract %17 %188 2 +%369 = OpFSub %17 %367 %368 +%360 = OpCompositeConstruct %26 %363 %366 %369 +%370 = OpMatrixTimesScalar %26 %189 %3 +%371 = OpMatrixTimesScalar %26 %190 %65 +%372 = OpCompositeConstruct %12 %3 %3 %3 %3 +%373 = OpMatrixTimesVector %17 %191 %372 +%374 = OpCompositeConstruct %17 %65 %65 %65 +%375 = OpVectorTimesMatrix %12 %374 %192 +%376 = OpMatrixTimesMatrix %26 %193 %194 OpReturn OpFunctionEnd -%386 = OpFunction %2 None %175 -%385 = OpLabel -OpBranch %387 -%387 = OpLabel -%388 = OpNot %8 %7 -%389 = OpNot %21 %25 -%390 = OpCompositeConstruct %204 %7 %7 -%391 = OpNot %204 %390 -%392 = OpCompositeConstruct %215 %25 %25 %25 -%393 = OpNot %215 %392 -%394 = OpBitwiseOr %8 %18 %7 -%395 = OpBitwiseOr %21 %24 %25 -%396 = OpCompositeConstruct %204 %18 %18 -%397 = OpCompositeConstruct %204 %7 %7 -%398 = OpBitwiseOr %204 %396 %397 -%399 = OpCompositeConstruct %215 %24 %24 %24 -%400 = OpCompositeConstruct %215 %25 %25 %25 -%401 = OpBitwiseOr %215 %399 %400 -%402 = OpBitwiseAnd %8 %18 %7 -%403 = OpBitwiseAnd %21 %24 %25 -%404 = OpCompositeConstruct %204 %18 %18 -%405 = OpCompositeConstruct %204 %7 %7 -%406 = OpBitwiseAnd %204 %404 %405 -%407 = OpCompositeConstruct %215 %24 %24 %24 -%408 = OpCompositeConstruct %215 %25 %25 %25 -%409 = OpBitwiseAnd %215 %407 %408 -%410 = OpBitwiseXor %8 %18 %7 -%411 = OpBitwiseXor %21 %24 %25 -%412 = OpCompositeConstruct %204 %18 %18 -%413 = OpCompositeConstruct %204 %7 %7 -%414 = OpBitwiseXor %204 %412 %413 -%415 = OpCompositeConstruct %215 %24 %24 %24 -%416 = OpCompositeConstruct %215 %25 %25 %25 -%417 = OpBitwiseXor %215 %415 %416 -%418 = OpShiftLeftLogical %8 %18 %25 -%419 = OpShiftLeftLogical %21 %24 %25 -%420 = OpCompositeConstruct %204 %18 %18 -%421 = OpCompositeConstruct %43 %25 %25 -%422 = OpShiftLeftLogical %204 %420 %421 -%423 = OpCompositeConstruct %215 %24 %24 %24 -%424 = OpCompositeConstruct %215 %25 %25 %25 -%425 = OpShiftLeftLogical %215 %423 %424 -%426 = OpShiftRightArithmetic %8 %18 %25 -%427 = OpShiftRightLogical %21 %24 %25 -%428 = OpCompositeConstruct %204 %18 %18 -%429 = OpCompositeConstruct %43 %25 %25 -%430 = OpShiftRightArithmetic %204 %428 %429 -%431 = OpCompositeConstruct %215 %24 %24 %24 -%432 = OpCompositeConstruct %215 %25 %25 %25 -%433 = OpShiftRightLogical %215 %431 %432 +%378 = OpFunction %2 None %164 +%377 = OpLabel +OpBranch %379 +%379 = OpLabel +%380 = OpNot %8 %7 +%381 = OpNot %11 %184 +%382 = OpCompositeConstruct %196 %7 %7 +%383 = OpNot %196 %382 +%384 = OpCompositeConstruct %207 %184 %184 %184 +%385 = OpNot %207 %384 +%386 = OpBitwiseOr %8 %69 %7 +%387 = OpBitwiseOr %11 %183 %184 +%388 = OpCompositeConstruct %196 %69 %69 +%389 = OpCompositeConstruct %196 %7 %7 +%390 = OpBitwiseOr %196 %388 %389 +%391 = OpCompositeConstruct %207 %183 %183 %183 +%392 = OpCompositeConstruct %207 %184 %184 %184 +%393 = OpBitwiseOr %207 %391 %392 +%394 = OpBitwiseAnd %8 %69 %7 +%395 = OpBitwiseAnd %11 %183 %184 +%396 = OpCompositeConstruct %196 %69 %69 +%397 = OpCompositeConstruct %196 %7 %7 +%398 = OpBitwiseAnd %196 %396 %397 +%399 = OpCompositeConstruct %207 %183 %183 %183 +%400 = OpCompositeConstruct %207 %184 %184 %184 +%401 = OpBitwiseAnd %207 %399 %400 +%402 = OpBitwiseXor %8 %69 %7 +%403 = OpBitwiseXor %11 %183 %184 +%404 = OpCompositeConstruct %196 %69 %69 +%405 = OpCompositeConstruct %196 %7 %7 +%406 = OpBitwiseXor %196 %404 %405 +%407 = OpCompositeConstruct %207 %183 %183 %183 +%408 = OpCompositeConstruct %207 %184 %184 %184 +%409 = OpBitwiseXor %207 %407 %408 +%410 = OpShiftLeftLogical %8 %69 %184 +%411 = OpShiftLeftLogical %11 %183 %184 +%412 = OpCompositeConstruct %196 %69 %69 +%413 = OpCompositeConstruct %22 %184 %184 +%414 = OpShiftLeftLogical %196 %412 %413 +%415 = OpCompositeConstruct %207 %183 %183 %183 +%416 = OpCompositeConstruct %207 %184 %184 %184 +%417 = OpShiftLeftLogical %207 %415 %416 +%418 = OpShiftRightArithmetic %8 %69 %184 +%419 = OpShiftRightLogical %11 %183 %184 +%420 = OpCompositeConstruct %196 %69 %69 +%421 = OpCompositeConstruct %22 %184 %184 +%422 = OpShiftRightArithmetic %196 %420 %421 +%423 = OpCompositeConstruct %207 %183 %183 %183 +%424 = OpCompositeConstruct %207 %184 %184 %184 +%425 = OpShiftRightLogical %207 %423 %424 OpReturn OpFunctionEnd -%435 = OpFunction %2 None %175 -%434 = OpLabel -OpBranch %436 -%436 = OpLabel -%437 = OpIEqual %10 %18 %7 -%438 = OpIEqual %10 %24 %25 -%439 = OpFOrdEqual %10 %14 %3 -%440 = OpCompositeConstruct %204 %18 %18 -%441 = OpCompositeConstruct %204 %7 %7 -%442 = OpIEqual %178 %440 %441 -%443 = OpCompositeConstruct %215 %24 %24 %24 -%444 = OpCompositeConstruct %215 %25 %25 %25 -%445 = OpIEqual %39 %443 %444 -%446 = OpCompositeConstruct %34 %14 %14 %14 %14 -%447 = OpCompositeConstruct %34 %3 %3 %3 %3 -%448 = OpFOrdEqual %36 %446 %447 -%449 = OpINotEqual %10 %18 %7 -%450 = OpINotEqual %10 %24 %25 -%451 = OpFOrdNotEqual %10 %14 %3 -%452 = OpCompositeConstruct %204 %18 %18 -%453 = OpCompositeConstruct %204 %7 %7 -%454 = OpINotEqual %178 %452 %453 -%455 = OpCompositeConstruct %215 %24 %24 %24 -%456 = OpCompositeConstruct %215 %25 %25 %25 -%457 = OpINotEqual %39 %455 %456 -%458 = OpCompositeConstruct %34 %14 %14 %14 %14 -%459 = OpCompositeConstruct %34 %3 %3 %3 %3 -%460 = OpFOrdNotEqual %36 %458 %459 -%461 = OpSLessThan %10 %18 %7 -%462 = OpULessThan %10 %24 %25 -%463 = OpFOrdLessThan %10 %14 %3 -%464 = OpCompositeConstruct %204 %18 %18 -%465 = OpCompositeConstruct %204 %7 %7 -%466 = OpSLessThan %178 %464 %465 -%467 = OpCompositeConstruct %215 %24 %24 %24 -%468 = OpCompositeConstruct %215 %25 %25 %25 -%469 = OpULessThan %39 %467 %468 -%470 = OpCompositeConstruct %34 %14 %14 %14 %14 -%471 = OpCompositeConstruct %34 %3 %3 %3 %3 -%472 = OpFOrdLessThan %36 %470 %471 -%473 = OpSLessThanEqual %10 %18 %7 -%474 = OpULessThanEqual %10 %24 %25 -%475 = OpFOrdLessThanEqual %10 %14 %3 -%476 = OpCompositeConstruct %204 %18 %18 -%477 = OpCompositeConstruct %204 %7 %7 -%478 = OpSLessThanEqual %178 %476 %477 -%479 = OpCompositeConstruct %215 %24 %24 %24 -%480 = OpCompositeConstruct %215 %25 %25 %25 -%481 = OpULessThanEqual %39 %479 %480 -%482 = OpCompositeConstruct %34 %14 %14 %14 %14 -%483 = OpCompositeConstruct %34 %3 %3 %3 %3 -%484 = OpFOrdLessThanEqual %36 %482 %483 -%485 = OpSGreaterThan %10 %18 %7 -%486 = OpUGreaterThan %10 %24 %25 -%487 = OpFOrdGreaterThan %10 %14 %3 -%488 = OpCompositeConstruct %204 %18 %18 -%489 = OpCompositeConstruct %204 %7 %7 -%490 = OpSGreaterThan %178 %488 %489 -%491 = OpCompositeConstruct %215 %24 %24 %24 -%492 = OpCompositeConstruct %215 %25 %25 %25 -%493 = OpUGreaterThan %39 %491 %492 -%494 = OpCompositeConstruct %34 %14 %14 %14 %14 -%495 = OpCompositeConstruct %34 %3 %3 %3 %3 -%496 = OpFOrdGreaterThan %36 %494 %495 -%497 = OpSGreaterThanEqual %10 %18 %7 -%498 = OpUGreaterThanEqual %10 %24 %25 -%499 = OpFOrdGreaterThanEqual %10 %14 %3 -%500 = OpCompositeConstruct %204 %18 %18 -%501 = OpCompositeConstruct %204 %7 %7 -%502 = OpSGreaterThanEqual %178 %500 %501 -%503 = OpCompositeConstruct %215 %24 %24 %24 -%504 = OpCompositeConstruct %215 %25 %25 %25 -%505 = OpUGreaterThanEqual %39 %503 %504 -%506 = OpCompositeConstruct %34 %14 %14 %14 %14 -%507 = OpCompositeConstruct %34 %3 %3 %3 %3 -%508 = OpFOrdGreaterThanEqual %36 %506 %507 +%427 = OpFunction %2 None %164 +%426 = OpLabel +OpBranch %428 +%428 = OpLabel +%429 = OpIEqual %15 %69 %7 +%430 = OpIEqual %15 %183 %184 +%431 = OpFOrdEqual %15 %65 %3 +%432 = OpCompositeConstruct %196 %69 %69 +%433 = OpCompositeConstruct %196 %7 %7 +%434 = OpIEqual %167 %432 %433 +%435 = OpCompositeConstruct %207 %183 %183 %183 +%436 = OpCompositeConstruct %207 %184 %184 %184 +%437 = OpIEqual %18 %435 %436 +%438 = OpCompositeConstruct %12 %65 %65 %65 %65 +%439 = OpCompositeConstruct %12 %3 %3 %3 %3 +%440 = OpFOrdEqual %14 %438 %439 +%441 = OpINotEqual %15 %69 %7 +%442 = OpINotEqual %15 %183 %184 +%443 = OpFOrdNotEqual %15 %65 %3 +%444 = OpCompositeConstruct %196 %69 %69 +%445 = OpCompositeConstruct %196 %7 %7 +%446 = OpINotEqual %167 %444 %445 +%447 = OpCompositeConstruct %207 %183 %183 %183 +%448 = OpCompositeConstruct %207 %184 %184 %184 +%449 = OpINotEqual %18 %447 %448 +%450 = OpCompositeConstruct %12 %65 %65 %65 %65 +%451 = OpCompositeConstruct %12 %3 %3 %3 %3 +%452 = OpFOrdNotEqual %14 %450 %451 +%453 = OpSLessThan %15 %69 %7 +%454 = OpULessThan %15 %183 %184 +%455 = OpFOrdLessThan %15 %65 %3 +%456 = OpCompositeConstruct %196 %69 %69 +%457 = OpCompositeConstruct %196 %7 %7 +%458 = OpSLessThan %167 %456 %457 +%459 = OpCompositeConstruct %207 %183 %183 %183 +%460 = OpCompositeConstruct %207 %184 %184 %184 +%461 = OpULessThan %18 %459 %460 +%462 = OpCompositeConstruct %12 %65 %65 %65 %65 +%463 = OpCompositeConstruct %12 %3 %3 %3 %3 +%464 = OpFOrdLessThan %14 %462 %463 +%465 = OpSLessThanEqual %15 %69 %7 +%466 = OpULessThanEqual %15 %183 %184 +%467 = OpFOrdLessThanEqual %15 %65 %3 +%468 = OpCompositeConstruct %196 %69 %69 +%469 = OpCompositeConstruct %196 %7 %7 +%470 = OpSLessThanEqual %167 %468 %469 +%471 = OpCompositeConstruct %207 %183 %183 %183 +%472 = OpCompositeConstruct %207 %184 %184 %184 +%473 = OpULessThanEqual %18 %471 %472 +%474 = OpCompositeConstruct %12 %65 %65 %65 %65 +%475 = OpCompositeConstruct %12 %3 %3 %3 %3 +%476 = OpFOrdLessThanEqual %14 %474 %475 +%477 = OpSGreaterThan %15 %69 %7 +%478 = OpUGreaterThan %15 %183 %184 +%479 = OpFOrdGreaterThan %15 %65 %3 +%480 = OpCompositeConstruct %196 %69 %69 +%481 = OpCompositeConstruct %196 %7 %7 +%482 = OpSGreaterThan %167 %480 %481 +%483 = OpCompositeConstruct %207 %183 %183 %183 +%484 = OpCompositeConstruct %207 %184 %184 %184 +%485 = OpUGreaterThan %18 %483 %484 +%486 = OpCompositeConstruct %12 %65 %65 %65 %65 +%487 = OpCompositeConstruct %12 %3 %3 %3 %3 +%488 = OpFOrdGreaterThan %14 %486 %487 +%489 = OpSGreaterThanEqual %15 %69 %7 +%490 = OpUGreaterThanEqual %15 %183 %184 +%491 = OpFOrdGreaterThanEqual %15 %65 %3 +%492 = OpCompositeConstruct %196 %69 %69 +%493 = OpCompositeConstruct %196 %7 %7 +%494 = OpSGreaterThanEqual %167 %492 %493 +%495 = OpCompositeConstruct %207 %183 %183 %183 +%496 = OpCompositeConstruct %207 %184 %184 %184 +%497 = OpUGreaterThanEqual %18 %495 %496 +%498 = OpCompositeConstruct %12 %65 %65 %65 %65 +%499 = OpCompositeConstruct %12 %3 %3 %3 %3 +%500 = OpFOrdGreaterThanEqual %14 %498 %499 OpReturn OpFunctionEnd -%516 = OpFunction %2 None %175 -%515 = OpLabel -%509 = OpVariable %510 Function %511 -%512 = OpVariable %513 Function %514 -OpBranch %518 -%518 = OpLabel -OpStore %509 %7 -%519 = OpLoad %8 %509 -%520 = OpIAdd %8 %519 %7 -OpStore %509 %520 -%521 = OpLoad %8 %509 -%522 = OpISub %8 %521 %7 -OpStore %509 %522 -%523 = OpLoad %8 %509 -%524 = OpLoad %8 %509 -%525 = OpIMul %8 %524 %523 -OpStore %509 %525 -%526 = OpLoad %8 %509 -%527 = OpLoad %8 %509 -%528 = OpSDiv %8 %527 %526 -OpStore %509 %528 -%529 = OpLoad %8 %509 -%530 = OpSRem %8 %529 %7 -OpStore %509 %530 -%531 = OpLoad %8 %509 -%532 = OpBitwiseAnd %8 %531 %11 -OpStore %509 %532 -%533 = OpLoad %8 %509 -%534 = OpBitwiseOr %8 %533 %11 -OpStore %509 %534 -%535 = OpLoad %8 %509 -%536 = OpBitwiseXor %8 %535 %11 -OpStore %509 %536 -%537 = OpLoad %8 %509 -%538 = OpShiftLeftLogical %8 %537 %24 -OpStore %509 %538 -%539 = OpLoad %8 %509 -%540 = OpShiftRightArithmetic %8 %539 %25 -OpStore %509 %540 -%541 = OpLoad %8 %509 -%542 = OpIAdd %8 %541 %7 -OpStore %509 %542 -%543 = OpLoad %8 %509 +%508 = OpFunction %2 None %164 +%507 = OpLabel +%501 = OpVariable %502 Function %503 +%504 = OpVariable %505 Function %506 +OpBranch %510 +%510 = OpLabel +OpStore %501 %7 +%511 = OpLoad %8 %501 +%512 = OpIAdd %8 %511 %7 +OpStore %501 %512 +%513 = OpLoad %8 %501 +%514 = OpISub %8 %513 %7 +OpStore %501 %514 +%515 = OpLoad %8 %501 +%516 = OpLoad %8 %501 +%517 = OpIMul %8 %516 %515 +OpStore %501 %517 +%518 = OpLoad %8 %501 +%519 = OpLoad %8 %501 +%520 = OpSDiv %8 %519 %518 +OpStore %501 %520 +%521 = OpLoad %8 %501 +%522 = OpSRem %8 %521 %7 +OpStore %501 %522 +%523 = OpLoad %8 %501 +%524 = OpBitwiseAnd %8 %523 %38 +OpStore %501 %524 +%525 = OpLoad %8 %501 +%526 = OpBitwiseOr %8 %525 %38 +OpStore %501 %526 +%527 = OpLoad %8 %501 +%528 = OpBitwiseXor %8 %527 %38 +OpStore %501 %528 +%529 = OpLoad %8 %501 +%530 = OpShiftLeftLogical %8 %529 %183 +OpStore %501 %530 +%531 = OpLoad %8 %501 +%532 = OpShiftRightArithmetic %8 %531 %184 +OpStore %501 %532 +%533 = OpLoad %8 %501 +%534 = OpIAdd %8 %533 %7 +OpStore %501 %534 +%535 = OpLoad %8 %501 +%536 = OpISub %8 %535 %7 +OpStore %501 %536 +OpStore %504 %509 +%538 = OpAccessChain %537 %504 %184 +%539 = OpLoad %8 %538 +%540 = OpIAdd %8 %539 %7 +%541 = OpAccessChain %537 %504 %184 +OpStore %541 %540 +%542 = OpAccessChain %537 %504 %184 +%543 = OpLoad %8 %542 %544 = OpISub %8 %543 %7 -OpStore %509 %544 -OpStore %512 %517 -%546 = OpAccessChain %545 %512 %25 -%547 = OpLoad %8 %546 -%548 = OpIAdd %8 %547 %7 -%549 = OpAccessChain %545 %512 %25 -OpStore %549 %548 -%550 = OpAccessChain %545 %512 %25 -%551 = OpLoad %8 %550 -%552 = OpISub %8 %551 %7 -%553 = OpAccessChain %545 %512 %25 -OpStore %553 %552 +%545 = OpAccessChain %537 %504 %184 +OpStore %545 %544 OpReturn OpFunctionEnd -%555 = OpFunction %2 None %175 -%554 = OpLabel +%547 = OpFunction %2 None %164 +%546 = OpLabel OpBranch %556 %556 = OpLabel -%557 = OpSNegate %8 %27 -%558 = OpSNegate %8 %28 -%559 = OpSNegate %8 %29 +%557 = OpSNegate %8 %549 +%558 = OpSNegate %8 %550 +%559 = OpSNegate %8 %551 %560 = OpSNegate %8 %559 -%561 = OpSNegate %8 %30 +%561 = OpSNegate %8 %552 %562 = OpSNegate %8 %561 -%563 = OpSNegate %8 %31 +%563 = OpSNegate %8 %553 %564 = OpSNegate %8 %563 %565 = OpSNegate %8 %564 %566 = OpSNegate %8 %565 -%567 = OpSNegate %8 %32 +%567 = OpSNegate %8 %554 %568 = OpSNegate %8 %567 %569 = OpSNegate %8 %568 %570 = OpSNegate %8 %569 -%571 = OpSNegate %8 %33 +%571 = OpSNegate %8 %555 %572 = OpSNegate %8 %571 %573 = OpSNegate %8 %572 %574 = OpSNegate %8 %573 OpReturn OpFunctionEnd -%576 = OpFunction %2 None %175 +%576 = OpFunction %2 None %164 %575 = OpLabel OpBranch %577 %577 = OpLabel -%578 = OpFunctionCall %34 %56 -%579 = OpFunctionCall %34 %81 -%580 = OpVectorShuffle %38 %51 %51 0 1 2 -%581 = OpFunctionCall %38 %116 %580 -%582 = OpFunctionCall %4 %127 -%583 = OpFunctionCall %2 %174 -%584 = OpFunctionCall %2 %192 -%585 = OpFunctionCall %2 %386 -%586 = OpFunctionCall %2 %435 -%587 = OpFunctionCall %2 %516 +%578 = OpFunctionCall %12 %35 +%579 = OpFunctionCall %12 %64 +%580 = OpVectorShuffle %17 %30 %30 0 1 2 +%581 = OpFunctionCall %17 %104 %580 +%582 = OpFunctionCall %4 %115 +%583 = OpFunctionCall %2 %163 +%584 = OpFunctionCall %2 %181 +%585 = OpFunctionCall %2 %378 +%586 = OpFunctionCall %2 %427 +%587 = OpFunctionCall %2 %508 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/padding.spvasm b/tests/out/spv/padding.spvasm index 44ec6a4d19..713979b355 100644 --- a/tests/out/spv/padding.spvasm +++ b/tests/out/spv/padding.spvasm @@ -5,95 +5,95 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %27 "vertex" %25 +OpEntryPoint Vertex %26 "vertex" %24 OpSource GLSL 450 +OpMemberName %7 0 "a" +OpName %7 "S" OpMemberName %8 0 "a" -OpName %8 "S" -OpMemberName %9 0 "a" -OpMemberName %9 1 "b" -OpName %9 "Test" -OpMemberName %11 0 "a" -OpMemberName %11 1 "b" -OpName %11 "Test2" -OpMemberName %13 0 "a" -OpMemberName %13 1 "b" -OpName %13 "Test3" -OpName %15 "input1" -OpName %18 "input2" -OpName %21 "input3" -OpName %27 "vertex" +OpMemberName %8 1 "b" +OpName %8 "Test" +OpMemberName %10 0 "a" +OpMemberName %10 1 "b" +OpName %10 "Test2" +OpMemberName %12 0 "a" +OpMemberName %12 1 "b" +OpName %12 "Test3" +OpName %14 "input1" +OpName %17 "input2" +OpName %20 "input3" +OpName %26 "vertex" +OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %8 0 Offset 0 -OpMemberDecorate %9 0 Offset 0 -OpMemberDecorate %9 1 Offset 16 -OpDecorate %10 ArrayStride 16 -OpMemberDecorate %11 0 Offset 0 -OpMemberDecorate %11 1 Offset 32 -OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 0 ColMajor -OpMemberDecorate %13 0 MatrixStride 16 -OpMemberDecorate %13 1 Offset 64 -OpDecorate %15 DescriptorSet 0 -OpDecorate %15 Binding 0 -OpDecorate %16 Block -OpMemberDecorate %16 0 Offset 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %18 Binding 1 -OpDecorate %19 Block -OpMemberDecorate %19 0 Offset 0 -OpDecorate %21 DescriptorSet 0 -OpDecorate %21 Binding 2 -OpDecorate %22 Block -OpMemberDecorate %22 0 Offset 0 -OpDecorate %25 BuiltIn Position +OpMemberDecorate %8 1 Offset 16 +OpDecorate %9 ArrayStride 16 +OpMemberDecorate %10 0 Offset 0 +OpMemberDecorate %10 1 Offset 32 +OpMemberDecorate %12 0 Offset 0 +OpMemberDecorate %12 0 ColMajor +OpMemberDecorate %12 0 MatrixStride 16 +OpMemberDecorate %12 1 Offset 64 +OpDecorate %14 DescriptorSet 0 +OpDecorate %14 Binding 0 +OpDecorate %15 Block +OpMemberDecorate %15 0 Offset 0 +OpDecorate %17 DescriptorSet 0 +OpDecorate %17 Binding 1 +OpDecorate %18 Block +OpMemberDecorate %18 0 Offset 0 +OpDecorate %20 DescriptorSet 0 +OpDecorate %20 Binding 2 +OpDecorate %21 Block +OpMemberDecorate %21 0 Offset 0 +OpDecorate %24 BuiltIn Position %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 2 %6 = OpTypeFloat 32 -%5 = OpConstant %6 1.0 -%7 = OpTypeVector %6 3 -%8 = OpTypeStruct %7 -%9 = OpTypeStruct %8 %6 -%10 = OpTypeArray %7 %3 -%11 = OpTypeStruct %10 %6 -%12 = OpTypeMatrix %7 4 -%13 = OpTypeStruct %12 %6 -%14 = OpTypeVector %6 4 -%16 = OpTypeStruct %9 -%17 = OpTypePointer Uniform %16 -%15 = OpVariable %17 Uniform -%19 = OpTypeStruct %11 -%20 = OpTypePointer Uniform %19 -%18 = OpVariable %20 Uniform -%22 = OpTypeStruct %13 -%23 = OpTypePointer Uniform %22 -%21 = OpVariable %23 Uniform -%26 = OpTypePointer Output %14 -%25 = OpVariable %26 Output -%28 = OpTypeFunction %2 -%29 = OpTypePointer Uniform %9 -%31 = OpTypeInt 32 0 -%30 = OpConstant %31 0 -%33 = OpTypePointer Uniform %11 -%35 = OpTypePointer Uniform %13 +%5 = OpTypeVector %6 3 +%7 = OpTypeStruct %5 +%8 = OpTypeStruct %7 %6 +%9 = OpTypeArray %5 %3 +%10 = OpTypeStruct %9 %6 +%11 = OpTypeMatrix %5 4 +%12 = OpTypeStruct %11 %6 +%13 = OpTypeVector %6 4 +%15 = OpTypeStruct %8 +%16 = OpTypePointer Uniform %15 +%14 = OpVariable %16 Uniform +%18 = OpTypeStruct %10 +%19 = OpTypePointer Uniform %18 +%17 = OpVariable %19 Uniform +%21 = OpTypeStruct %12 +%22 = OpTypePointer Uniform %21 +%20 = OpVariable %22 Uniform +%25 = OpTypePointer Output %13 +%24 = OpVariable %25 Output +%27 = OpTypeFunction %2 +%28 = OpTypePointer Uniform %8 +%30 = OpTypeInt 32 0 +%29 = OpConstant %30 0 +%32 = OpTypePointer Uniform %10 +%34 = OpTypePointer Uniform %12 +%36 = OpConstant %6 1.0 %39 = OpTypePointer Uniform %6 -%40 = OpConstant %31 1 -%27 = OpFunction %2 None %28 -%24 = OpLabel -%32 = OpAccessChain %29 %15 %30 -%34 = OpAccessChain %33 %18 %30 -%36 = OpAccessChain %35 %21 %30 +%40 = OpConstant %30 1 +%26 = OpFunction %2 None %27 +%23 = OpLabel +%31 = OpAccessChain %28 %14 %29 +%33 = OpAccessChain %32 %17 %29 +%35 = OpAccessChain %34 %20 %29 OpBranch %37 %37 = OpLabel -%38 = OpCompositeConstruct %14 %5 %5 %5 %5 -%41 = OpAccessChain %39 %32 %40 +%38 = OpCompositeConstruct %13 %36 %36 %36 %36 +%41 = OpAccessChain %39 %31 %40 %42 = OpLoad %6 %41 -%43 = OpVectorTimesScalar %14 %38 %42 -%44 = OpAccessChain %39 %34 %40 +%43 = OpVectorTimesScalar %13 %38 %42 +%44 = OpAccessChain %39 %33 %40 %45 = OpLoad %6 %44 -%46 = OpVectorTimesScalar %14 %43 %45 -%47 = OpAccessChain %39 %36 %40 +%46 = OpVectorTimesScalar %13 %43 %45 +%47 = OpAccessChain %39 %35 %40 %48 = OpLoad %6 %47 -%49 = OpVectorTimesScalar %14 %46 %48 -OpStore %25 %49 +%49 = OpVectorTimesScalar %13 %46 %48 +OpStore %24 %49 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/pointers.spvasm b/tests/out/spv/pointers.spvasm index 81a17b558c..71a680aa73 100644 --- a/tests/out/spv/pointers.spvasm +++ b/tests/out/spv/pointers.spvasm @@ -8,71 +8,71 @@ OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpSource GLSL 450 -OpMemberName %8 0 "arr" -OpName %8 "DynamicArray" -OpName %11 "dynamic_array" -OpName %12 "v" -OpName %16 "f" +OpMemberName %7 0 "arr" +OpName %7 "DynamicArray" +OpName %10 "dynamic_array" +OpName %11 "v" +OpName %15 "f" OpName %23 "i" OpName %24 "v" OpName %25 "index_unsized" OpName %34 "i" OpName %35 "v" OpName %36 "index_dynamic_array" -OpDecorate %7 ArrayStride 4 -OpMemberDecorate %8 0 Offset 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %11 Binding 0 -OpDecorate %8 Block +OpDecorate %6 ArrayStride 4 +OpMemberDecorate %7 0 Offset 0 +OpDecorate %10 DescriptorSet 0 +OpDecorate %10 Binding 0 +OpDecorate %7 Block %2 = OpTypeVoid %4 = OpTypeInt 32 1 -%3 = OpConstant %4 10 -%5 = OpTypeVector %4 2 -%6 = OpTypeInt 32 0 -%7 = OpTypeRuntimeArray %6 -%8 = OpTypeStruct %7 -%9 = OpTypePointer StorageBuffer %8 -%10 = OpTypePointer StorageBuffer %7 -%11 = OpVariable %9 StorageBuffer -%13 = OpTypePointer Function %5 -%14 = OpConstantNull %5 -%17 = OpTypeFunction %2 +%3 = OpTypeVector %4 2 +%5 = OpTypeInt 32 0 +%6 = OpTypeRuntimeArray %5 +%7 = OpTypeStruct %6 +%8 = OpTypePointer StorageBuffer %7 +%9 = OpTypePointer StorageBuffer %6 +%10 = OpVariable %8 StorageBuffer +%12 = OpTypePointer Function %3 +%13 = OpConstantNull %3 +%16 = OpTypeFunction %2 +%17 = OpConstant %4 10 %19 = OpTypePointer Function %4 -%20 = OpConstant %6 0 -%26 = OpTypeFunction %2 %4 %6 -%28 = OpTypePointer StorageBuffer %6 -%16 = OpFunction %2 None %17 -%15 = OpLabel -%12 = OpVariable %13 Function %14 +%20 = OpConstant %5 0 +%26 = OpTypeFunction %2 %4 %5 +%28 = OpTypePointer StorageBuffer %5 +%15 = OpFunction %2 None %16 +%14 = OpLabel +%11 = OpVariable %12 Function %13 OpBranch %18 %18 = OpLabel -%21 = OpAccessChain %19 %12 %20 -OpStore %21 %3 +%21 = OpAccessChain %19 %11 %20 +OpStore %21 %17 OpReturn OpFunctionEnd %25 = OpFunction %2 None %26 %23 = OpFunctionParameter %4 -%24 = OpFunctionParameter %6 +%24 = OpFunctionParameter %5 %22 = OpLabel OpBranch %27 %27 = OpLabel -%29 = OpAccessChain %28 %11 %20 %23 -%30 = OpLoad %6 %29 -%31 = OpIAdd %6 %30 %24 -%32 = OpAccessChain %28 %11 %20 %23 +%29 = OpAccessChain %28 %10 %20 %23 +%30 = OpLoad %5 %29 +%31 = OpIAdd %5 %30 %24 +%32 = OpAccessChain %28 %10 %20 %23 OpStore %32 %31 OpReturn OpFunctionEnd %36 = OpFunction %2 None %26 %34 = OpFunctionParameter %4 -%35 = OpFunctionParameter %6 +%35 = OpFunctionParameter %5 %33 = OpLabel OpBranch %37 %37 = OpLabel -%38 = OpAccessChain %28 %11 %20 %34 -%39 = OpLoad %6 %38 -%40 = OpIAdd %6 %39 %35 -%41 = OpAccessChain %28 %11 %20 %34 +%38 = OpAccessChain %28 %10 %20 %34 +%39 = OpLoad %5 %38 +%40 = OpIAdd %5 %39 %35 +%41 = OpAccessChain %28 %10 %20 %34 OpStore %41 %40 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/policy-mix.spvasm b/tests/out/spv/policy-mix.spvasm index c082d3d469..3ba407dedb 100644 --- a/tests/out/spv/policy-mix.spvasm +++ b/tests/out/spv/policy-mix.spvasm @@ -9,38 +9,38 @@ OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpSource GLSL 450 -OpMemberName %15 0 "a" -OpName %15 "InStorage" -OpMemberName %17 0 "a" -OpName %17 "InUniform" -OpName %23 "in_storage" -OpName %26 "in_uniform" -OpName %29 "image_2d_array" -OpName %31 "in_workgroup" -OpName %33 "in_private" -OpName %36 "in_function" -OpName %40 "c" -OpName %41 "i" -OpName %42 "l" -OpName %43 "mock_function" -OpDecorate %14 ArrayStride 16 -OpMemberDecorate %15 0 Offset 0 -OpDecorate %16 ArrayStride 16 -OpMemberDecorate %17 0 Offset 0 -OpDecorate %19 ArrayStride 4 -OpDecorate %20 ArrayStride 4 -OpDecorate %22 ArrayStride 16 -OpDecorate %23 NonWritable +OpMemberName %12 0 "a" +OpName %12 "InStorage" +OpMemberName %14 0 "a" +OpName %14 "InUniform" +OpName %20 "in_storage" +OpName %23 "in_uniform" +OpName %26 "image_2d_array" +OpName %28 "in_workgroup" +OpName %30 "in_private" +OpName %33 "in_function" +OpName %37 "c" +OpName %38 "i" +OpName %39 "l" +OpName %40 "mock_function" +OpDecorate %11 ArrayStride 16 +OpMemberDecorate %12 0 Offset 0 +OpDecorate %13 ArrayStride 16 +OpMemberDecorate %14 0 Offset 0 +OpDecorate %16 ArrayStride 4 +OpDecorate %17 ArrayStride 4 +OpDecorate %19 ArrayStride 16 +OpDecorate %20 NonWritable +OpDecorate %20 DescriptorSet 0 +OpDecorate %20 Binding 0 +OpDecorate %21 Block +OpMemberDecorate %21 0 Offset 0 OpDecorate %23 DescriptorSet 0 -OpDecorate %23 Binding 0 +OpDecorate %23 Binding 1 OpDecorate %24 Block OpMemberDecorate %24 0 Offset 0 OpDecorate %26 DescriptorSet 0 -OpDecorate %26 Binding 1 -OpDecorate %27 Block -OpMemberDecorate %27 0 Offset 0 -OpDecorate %29 DescriptorSet 0 -OpDecorate %29 Binding 2 +OpDecorate %26 Binding 2 %2 = OpTypeVoid %4 = OpTypeInt 32 1 %3 = OpConstant %4 10 @@ -49,102 +49,102 @@ OpDecorate %29 Binding 2 %7 = OpConstant %4 40 %8 = OpConstant %4 2 %10 = OpTypeFloat 32 -%9 = OpConstant %10 0.707 -%11 = OpConstant %10 0.0 -%12 = OpConstant %10 1.0 -%13 = OpTypeVector %10 4 -%14 = OpTypeArray %13 %3 -%15 = OpTypeStruct %14 -%16 = OpTypeArray %13 %5 -%17 = OpTypeStruct %16 -%18 = OpTypeImage %10 2D 0 1 0 1 Unknown -%19 = OpTypeArray %10 %6 -%20 = OpTypeArray %10 %7 -%21 = OpTypeVector %4 2 -%22 = OpTypeArray %13 %8 -%24 = OpTypeStruct %15 -%25 = OpTypePointer StorageBuffer %24 -%23 = OpVariable %25 StorageBuffer -%27 = OpTypeStruct %17 -%28 = OpTypePointer Uniform %27 -%26 = OpVariable %28 Uniform -%30 = OpTypePointer UniformConstant %18 -%29 = OpVariable %30 UniformConstant -%32 = OpTypePointer Workgroup %19 -%31 = OpVariable %32 Workgroup -%34 = OpTypePointer Private %20 -%35 = OpConstantNull %20 -%33 = OpVariable %34 Private %35 -%37 = OpTypePointer Function %22 -%38 = OpConstantNull %22 -%44 = OpTypeFunction %13 %21 %4 %4 -%45 = OpTypePointer StorageBuffer %15 -%47 = OpTypeInt 32 0 -%46 = OpConstant %47 0 -%49 = OpTypePointer Uniform %17 -%56 = OpTypePointer StorageBuffer %14 -%57 = OpTypePointer StorageBuffer %13 -%60 = OpTypePointer Uniform %16 -%61 = OpTypePointer Uniform %13 +%9 = OpTypeVector %10 4 +%11 = OpTypeArray %9 %3 +%12 = OpTypeStruct %11 +%13 = OpTypeArray %9 %5 +%14 = OpTypeStruct %13 +%15 = OpTypeImage %10 2D 0 1 0 1 Unknown +%16 = OpTypeArray %10 %6 +%17 = OpTypeArray %10 %7 +%18 = OpTypeVector %4 2 +%19 = OpTypeArray %9 %8 +%21 = OpTypeStruct %12 +%22 = OpTypePointer StorageBuffer %21 +%20 = OpVariable %22 StorageBuffer +%24 = OpTypeStruct %14 +%25 = OpTypePointer Uniform %24 +%23 = OpVariable %25 Uniform +%27 = OpTypePointer UniformConstant %15 +%26 = OpVariable %27 UniformConstant +%29 = OpTypePointer Workgroup %16 +%28 = OpVariable %29 Workgroup +%31 = OpTypePointer Private %17 +%32 = OpConstantNull %17 +%30 = OpVariable %31 Private %32 +%34 = OpTypePointer Function %19 +%35 = OpConstantNull %19 +%41 = OpTypeFunction %9 %18 %4 %4 +%42 = OpTypePointer StorageBuffer %12 +%44 = OpTypeInt 32 0 +%43 = OpConstant %44 0 +%46 = OpTypePointer Uniform %14 +%49 = OpConstant %10 0.707 +%50 = OpConstant %10 0.0 +%51 = OpConstant %10 1.0 +%56 = OpTypePointer StorageBuffer %11 +%57 = OpTypePointer StorageBuffer %9 +%60 = OpTypePointer Uniform %13 +%61 = OpTypePointer Uniform %9 %65 = OpTypeVector %4 3 %67 = OpTypeBool -%68 = OpConstantNull %13 +%68 = OpConstantNull %9 %74 = OpTypeVector %67 3 %81 = OpTypePointer Workgroup %10 -%82 = OpConstant %47 29 +%82 = OpConstant %44 29 %88 = OpTypePointer Private %10 -%89 = OpConstant %47 39 -%95 = OpTypePointer Function %13 -%96 = OpConstant %47 1 -%43 = OpFunction %13 None %44 -%40 = OpFunctionParameter %21 -%41 = OpFunctionParameter %4 -%42 = OpFunctionParameter %4 -%39 = OpLabel -%36 = OpVariable %37 Function %38 -%48 = OpAccessChain %45 %23 %46 -%50 = OpAccessChain %49 %26 %46 -%51 = OpLoad %18 %29 +%89 = OpConstant %44 39 +%95 = OpTypePointer Function %9 +%96 = OpConstant %44 1 +%40 = OpFunction %9 None %41 +%37 = OpFunctionParameter %18 +%38 = OpFunctionParameter %4 +%39 = OpFunctionParameter %4 +%36 = OpLabel +%33 = OpVariable %34 Function %35 +%45 = OpAccessChain %42 %20 %43 +%47 = OpAccessChain %46 %23 %43 +%48 = OpLoad %15 %26 OpBranch %52 %52 = OpLabel -%53 = OpCompositeConstruct %13 %9 %11 %11 %12 -%54 = OpCompositeConstruct %13 %11 %9 %11 %12 -%55 = OpCompositeConstruct %22 %53 %54 -OpStore %36 %55 -%58 = OpAccessChain %57 %48 %46 %41 -%59 = OpLoad %13 %58 -%62 = OpAccessChain %61 %50 %46 %41 -%63 = OpLoad %13 %62 -%64 = OpFAdd %13 %59 %63 -%66 = OpCompositeConstruct %65 %40 %41 -%69 = OpImageQueryLevels %4 %51 -%70 = OpULessThan %67 %42 %69 +%53 = OpCompositeConstruct %9 %49 %50 %50 %51 +%54 = OpCompositeConstruct %9 %50 %49 %50 %51 +%55 = OpCompositeConstruct %19 %53 %54 +OpStore %33 %55 +%58 = OpAccessChain %57 %45 %43 %38 +%59 = OpLoad %9 %58 +%62 = OpAccessChain %61 %47 %43 %38 +%63 = OpLoad %9 %62 +%64 = OpFAdd %9 %59 %63 +%66 = OpCompositeConstruct %65 %37 %38 +%69 = OpImageQueryLevels %4 %48 +%70 = OpULessThan %67 %39 %69 OpSelectionMerge %71 None OpBranchConditional %70 %72 %71 %72 = OpLabel -%73 = OpImageQuerySizeLod %65 %51 %42 +%73 = OpImageQuerySizeLod %65 %48 %39 %75 = OpULessThan %74 %66 %73 %76 = OpAll %67 %75 OpBranchConditional %76 %77 %71 %77 = OpLabel -%78 = OpImageFetch %13 %51 %66 Lod %42 +%78 = OpImageFetch %9 %48 %66 Lod %39 OpBranch %71 %71 = OpLabel -%79 = OpPhi %13 %68 %52 %68 %72 %78 %77 -%80 = OpFAdd %13 %64 %79 -%83 = OpExtInst %47 %1 UMin %41 %82 -%84 = OpAccessChain %81 %31 %83 +%79 = OpPhi %9 %68 %52 %68 %72 %78 %77 +%80 = OpFAdd %9 %64 %79 +%83 = OpExtInst %44 %1 UMin %38 %82 +%84 = OpAccessChain %81 %28 %83 %85 = OpLoad %10 %84 -%86 = OpCompositeConstruct %13 %85 %85 %85 %85 -%87 = OpFAdd %13 %80 %86 -%90 = OpExtInst %47 %1 UMin %41 %89 -%91 = OpAccessChain %88 %33 %90 +%86 = OpCompositeConstruct %9 %85 %85 %85 %85 +%87 = OpFAdd %9 %80 %86 +%90 = OpExtInst %44 %1 UMin %38 %89 +%91 = OpAccessChain %88 %30 %90 %92 = OpLoad %10 %91 -%93 = OpCompositeConstruct %13 %92 %92 %92 %92 -%94 = OpFAdd %13 %87 %93 -%97 = OpExtInst %47 %1 UMin %41 %96 -%98 = OpAccessChain %95 %36 %97 -%99 = OpLoad %13 %98 -%100 = OpFAdd %13 %94 %99 +%93 = OpCompositeConstruct %9 %92 %92 %92 %92 +%94 = OpFAdd %9 %87 %93 +%97 = OpExtInst %44 %1 UMin %38 %96 +%98 = OpAccessChain %95 %33 %97 +%99 = OpLoad %9 %98 +%100 = OpFAdd %9 %94 %99 OpReturnValue %100 OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/quad.spvasm b/tests/out/spv/quad.spvasm index bb0409d141..9d4ba02268 100644 --- a/tests/out/spv/quad.spvasm +++ b/tests/out/spv/quad.spvasm @@ -5,115 +5,115 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %27 "vert_main" %18 %21 %23 %25 -OpEntryPoint Fragment %45 "frag_main" %42 %44 -OpEntryPoint Fragment %61 "fs_extra" %60 -OpExecutionMode %45 OriginUpperLeft -OpExecutionMode %61 OriginUpperLeft +OpEntryPoint Vertex %24 "vert_main" %15 %18 %20 %22 +OpEntryPoint Fragment %44 "frag_main" %41 %43 +OpEntryPoint Fragment %60 "fs_extra" %59 +OpExecutionMode %44 OriginUpperLeft +OpExecutionMode %60 OriginUpperLeft OpSource GLSL 450 OpName %3 "c_scale" -OpMemberName %10 0 "uv" -OpMemberName %10 1 "position" -OpName %10 "VertexOutput" -OpName %13 "u_texture" -OpName %15 "u_sampler" -OpName %18 "pos" -OpName %21 "uv" -OpName %23 "uv" -OpName %25 "position" -OpName %27 "vert_main" -OpName %42 "uv" -OpName %45 "frag_main" -OpName %61 "fs_extra" -OpMemberDecorate %10 0 Offset 0 -OpMemberDecorate %10 1 Offset 16 -OpDecorate %13 DescriptorSet 0 -OpDecorate %13 Binding 0 -OpDecorate %15 DescriptorSet 0 -OpDecorate %15 Binding 1 -OpDecorate %18 Location 0 -OpDecorate %21 Location 1 -OpDecorate %23 Location 0 -OpDecorate %25 BuiltIn Position -OpDecorate %42 Location 0 -OpDecorate %44 Location 0 -OpDecorate %60 Location 0 +OpMemberName %7 0 "uv" +OpMemberName %7 1 "position" +OpName %7 "VertexOutput" +OpName %10 "u_texture" +OpName %12 "u_sampler" +OpName %15 "pos" +OpName %18 "uv" +OpName %20 "uv" +OpName %22 "position" +OpName %24 "vert_main" +OpName %41 "uv" +OpName %44 "frag_main" +OpName %60 "fs_extra" +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpDecorate %10 DescriptorSet 0 +OpDecorate %10 Binding 0 +OpDecorate %12 DescriptorSet 0 +OpDecorate %12 Binding 1 +OpDecorate %15 Location 0 +OpDecorate %18 Location 1 +OpDecorate %20 Location 0 +OpDecorate %22 BuiltIn Position +OpDecorate %41 Location 0 +OpDecorate %43 Location 0 +OpDecorate %59 Location 0 %2 = OpTypeVoid %4 = OpTypeFloat 32 %3 = OpConstant %4 1.2 -%5 = OpConstant %4 0.0 -%6 = OpConstant %4 1.0 -%7 = OpConstant %4 0.5 -%8 = OpTypeVector %4 2 -%9 = OpTypeVector %4 4 -%10 = OpTypeStruct %8 %9 -%11 = OpTypeImage %4 2D 0 0 0 1 Unknown -%12 = OpTypeSampler -%14 = OpTypePointer UniformConstant %11 -%13 = OpVariable %14 UniformConstant -%16 = OpTypePointer UniformConstant %12 -%15 = OpVariable %16 UniformConstant -%19 = OpTypePointer Input %8 -%18 = OpVariable %19 Input -%21 = OpVariable %19 Input -%24 = OpTypePointer Output %8 -%23 = OpVariable %24 Output -%26 = OpTypePointer Output %9 -%25 = OpVariable %26 Output -%28 = OpTypeFunction %2 -%35 = OpTypePointer Output %4 -%37 = OpTypeInt 32 0 -%36 = OpConstant %37 1 -%42 = OpVariable %19 Input -%44 = OpVariable %26 Output -%49 = OpTypeSampledImage %11 -%53 = OpTypeBool -%60 = OpVariable %26 Output -%27 = OpFunction %2 None %28 -%17 = OpLabel -%20 = OpLoad %8 %18 -%22 = OpLoad %8 %21 -OpBranch %29 -%29 = OpLabel -%30 = OpVectorTimesScalar %8 %20 %3 -%31 = OpCompositeConstruct %9 %30 %5 %6 -%32 = OpCompositeConstruct %10 %22 %31 -%33 = OpCompositeExtract %8 %32 0 -OpStore %23 %33 -%34 = OpCompositeExtract %9 %32 1 -OpStore %25 %34 -%38 = OpAccessChain %35 %25 %36 -%39 = OpLoad %4 %38 -%40 = OpFNegate %4 %39 -OpStore %38 %40 +%5 = OpTypeVector %4 2 +%6 = OpTypeVector %4 4 +%7 = OpTypeStruct %5 %6 +%8 = OpTypeImage %4 2D 0 0 0 1 Unknown +%9 = OpTypeSampler +%11 = OpTypePointer UniformConstant %8 +%10 = OpVariable %11 UniformConstant +%13 = OpTypePointer UniformConstant %9 +%12 = OpVariable %13 UniformConstant +%16 = OpTypePointer Input %5 +%15 = OpVariable %16 Input +%18 = OpVariable %16 Input +%21 = OpTypePointer Output %5 +%20 = OpVariable %21 Output +%23 = OpTypePointer Output %6 +%22 = OpVariable %23 Output +%25 = OpTypeFunction %2 +%26 = OpConstant %4 0.0 +%27 = OpConstant %4 1.0 +%34 = OpTypePointer Output %4 +%36 = OpTypeInt 32 0 +%35 = OpConstant %36 1 +%41 = OpVariable %16 Input +%43 = OpVariable %23 Output +%48 = OpTypeSampledImage %8 +%52 = OpTypeBool +%59 = OpVariable %23 Output +%61 = OpConstant %4 0.5 +%24 = OpFunction %2 None %25 +%14 = OpLabel +%17 = OpLoad %5 %15 +%19 = OpLoad %5 %18 +OpBranch %28 +%28 = OpLabel +%29 = OpVectorTimesScalar %5 %17 %3 +%30 = OpCompositeConstruct %6 %29 %26 %27 +%31 = OpCompositeConstruct %7 %19 %30 +%32 = OpCompositeExtract %5 %31 0 +OpStore %20 %32 +%33 = OpCompositeExtract %6 %31 1 +OpStore %22 %33 +%37 = OpAccessChain %34 %22 %35 +%38 = OpLoad %4 %37 +%39 = OpFNegate %4 %38 +OpStore %37 %39 OpReturn OpFunctionEnd -%45 = OpFunction %2 None %28 -%41 = OpLabel -%43 = OpLoad %8 %42 -%46 = OpLoad %11 %13 -%47 = OpLoad %12 %15 -OpBranch %48 -%48 = OpLabel -%50 = OpSampledImage %49 %46 %47 -%51 = OpImageSampleImplicitLod %9 %50 %43 -%52 = OpCompositeExtract %4 %51 3 -%54 = OpFOrdEqual %53 %52 %5 -OpSelectionMerge %55 None -OpBranchConditional %54 %56 %55 -%56 = OpLabel -OpKill +%44 = OpFunction %2 None %25 +%40 = OpLabel +%42 = OpLoad %5 %41 +%45 = OpLoad %8 %10 +%46 = OpLoad %9 %12 +OpBranch %47 +%47 = OpLabel +%49 = OpSampledImage %48 %45 %46 +%50 = OpImageSampleImplicitLod %6 %49 %42 +%51 = OpCompositeExtract %4 %50 3 +%53 = OpFOrdEqual %52 %51 %26 +OpSelectionMerge %54 None +OpBranchConditional %53 %55 %54 %55 = OpLabel -%57 = OpCompositeExtract %4 %51 3 -%58 = OpVectorTimesScalar %9 %51 %57 -OpStore %44 %58 +OpKill +%54 = OpLabel +%56 = OpCompositeExtract %4 %50 3 +%57 = OpVectorTimesScalar %6 %50 %56 +OpStore %43 %57 OpReturn OpFunctionEnd -%61 = OpFunction %2 None %28 -%59 = OpLabel +%60 = OpFunction %2 None %25 +%58 = OpLabel OpBranch %62 %62 = OpLabel -%63 = OpCompositeConstruct %9 %5 %7 %5 %7 -OpStore %60 %63 +%63 = OpCompositeConstruct %6 %26 %61 %26 %61 +OpStore %59 %63 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/ray-query.spvasm b/tests/out/spv/ray-query.spvasm index 31dc7d75e6..03a43966e7 100644 --- a/tests/out/spv/ray-query.spvasm +++ b/tests/out/spv/ray-query.spvasm @@ -7,112 +7,112 @@ OpCapability Shader OpExtension "SPV_KHR_ray_query" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %48 "main" %23 %25 -OpExecutionMode %48 LocalSize 1 1 1 -OpMemberDecorate %15 0 Offset 0 -OpMemberDecorate %15 1 Offset 16 -OpMemberDecorate %19 0 Offset 0 -OpMemberDecorate %19 1 Offset 4 -OpMemberDecorate %19 2 Offset 8 -OpMemberDecorate %19 3 Offset 12 -OpMemberDecorate %19 4 Offset 16 -OpMemberDecorate %19 5 Offset 20 -OpMemberDecorate %19 6 Offset 24 -OpMemberDecorate %19 7 Offset 28 -OpMemberDecorate %19 8 Offset 36 -OpMemberDecorate %19 9 Offset 48 -OpMemberDecorate %19 9 ColMajor -OpMemberDecorate %19 9 MatrixStride 16 -OpMemberDecorate %19 10 Offset 112 -OpMemberDecorate %19 10 ColMajor -OpMemberDecorate %19 10 MatrixStride 16 -OpMemberDecorate %22 0 Offset 0 -OpMemberDecorate %22 1 Offset 4 -OpMemberDecorate %22 2 Offset 8 -OpMemberDecorate %22 3 Offset 12 -OpMemberDecorate %22 4 Offset 16 -OpMemberDecorate %22 5 Offset 32 -OpDecorate %23 DescriptorSet 0 -OpDecorate %23 Binding 0 -OpDecorate %25 DescriptorSet 0 -OpDecorate %25 Binding 1 -OpDecorate %26 Block -OpMemberDecorate %26 0 Offset 0 +OpEntryPoint GLCompute %43 "main" %15 %17 +OpExecutionMode %43 LocalSize 1 1 1 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 1 Offset 16 +OpMemberDecorate %11 0 Offset 0 +OpMemberDecorate %11 1 Offset 4 +OpMemberDecorate %11 2 Offset 8 +OpMemberDecorate %11 3 Offset 12 +OpMemberDecorate %11 4 Offset 16 +OpMemberDecorate %11 5 Offset 20 +OpMemberDecorate %11 6 Offset 24 +OpMemberDecorate %11 7 Offset 28 +OpMemberDecorate %11 8 Offset 36 +OpMemberDecorate %11 9 Offset 48 +OpMemberDecorate %11 9 ColMajor +OpMemberDecorate %11 9 MatrixStride 16 +OpMemberDecorate %11 10 Offset 112 +OpMemberDecorate %11 10 ColMajor +OpMemberDecorate %11 10 MatrixStride 16 +OpMemberDecorate %14 0 Offset 0 +OpMemberDecorate %14 1 Offset 4 +OpMemberDecorate %14 2 Offset 8 +OpMemberDecorate %14 3 Offset 12 +OpMemberDecorate %14 4 Offset 16 +OpMemberDecorate %14 5 Offset 32 +OpDecorate %15 DescriptorSet 0 +OpDecorate %15 Binding 0 +OpDecorate %17 DescriptorSet 0 +OpDecorate %17 Binding 1 +OpDecorate %18 Block +OpMemberDecorate %18 0 Offset 0 %2 = OpTypeVoid -%4 = OpTypeFloat 32 -%3 = OpConstant %4 1.0 -%5 = OpConstant %4 2.4 -%6 = OpConstant %4 0.0 -%8 = OpTypeInt 32 0 -%7 = OpConstant %8 4 -%9 = OpConstant %8 255 -%10 = OpConstant %4 0.1 -%11 = OpConstant %4 100.0 -%12 = OpConstant %8 0 -%13 = OpTypeAccelerationStructureNV -%14 = OpTypeVector %4 3 -%15 = OpTypeStruct %8 %14 -%16 = OpTypeVector %4 2 -%17 = OpTypeBool -%18 = OpTypeMatrix %14 4 -%19 = OpTypeStruct %8 %4 %8 %8 %8 %8 %8 %16 %17 %18 %18 -%20 = OpTypeVector %4 4 -%21 = OpTypeRayQueryKHR -%22 = OpTypeStruct %8 %8 %4 %4 %14 %14 -%24 = OpTypePointer UniformConstant %13 -%23 = OpVariable %24 UniformConstant -%26 = OpTypeStruct %15 -%27 = OpTypePointer StorageBuffer %26 -%25 = OpVariable %27 StorageBuffer -%32 = OpTypeFunction %14 %14 %19 -%46 = OpTypePointer Function %21 -%49 = OpTypeFunction %2 -%51 = OpTypePointer StorageBuffer %15 -%72 = OpConstant %8 1 -%85 = OpTypePointer StorageBuffer %8 -%90 = OpTypePointer StorageBuffer %14 -%31 = OpFunction %14 None %32 -%29 = OpFunctionParameter %14 -%30 = OpFunctionParameter %19 +%3 = OpTypeAccelerationStructureNV +%4 = OpTypeInt 32 0 +%6 = OpTypeFloat 32 +%5 = OpTypeVector %6 3 +%7 = OpTypeStruct %4 %5 +%8 = OpTypeVector %6 2 +%9 = OpTypeBool +%10 = OpTypeMatrix %5 4 +%11 = OpTypeStruct %4 %6 %4 %4 %4 %4 %4 %8 %9 %10 %10 +%12 = OpTypeVector %6 4 +%13 = OpTypeRayQueryKHR +%14 = OpTypeStruct %4 %4 %6 %6 %5 %5 +%16 = OpTypePointer UniformConstant %3 +%15 = OpVariable %16 UniformConstant +%18 = OpTypeStruct %7 +%19 = OpTypePointer StorageBuffer %18 +%17 = OpVariable %19 StorageBuffer +%24 = OpTypeFunction %5 %5 %11 +%25 = OpConstant %6 1.0 +%26 = OpConstant %6 2.4 +%27 = OpConstant %6 0.0 +%41 = OpTypePointer Function %13 +%44 = OpTypeFunction %2 +%46 = OpTypePointer StorageBuffer %7 +%47 = OpConstant %4 0 +%49 = OpConstant %4 4 +%50 = OpConstant %4 255 +%51 = OpConstant %6 0.1 +%52 = OpConstant %6 100.0 +%72 = OpConstant %4 1 +%85 = OpTypePointer StorageBuffer %4 +%90 = OpTypePointer StorageBuffer %5 +%23 = OpFunction %5 None %24 +%21 = OpFunctionParameter %5 +%22 = OpFunctionParameter %11 +%20 = OpLabel +OpBranch %28 %28 = OpLabel -OpBranch %33 -%33 = OpLabel -%34 = OpCompositeExtract %18 %30 10 -%35 = OpCompositeConstruct %20 %29 %3 -%36 = OpMatrixTimesVector %14 %34 %35 -%37 = OpVectorShuffle %16 %36 %36 0 1 -%38 = OpExtInst %16 %1 Normalize %37 -%39 = OpVectorTimesScalar %16 %38 %5 -%40 = OpCompositeExtract %18 %30 9 -%41 = OpCompositeConstruct %20 %39 %6 %3 -%42 = OpMatrixTimesVector %14 %40 %41 -%43 = OpFSub %14 %29 %42 -%44 = OpExtInst %14 %1 Normalize %43 -OpReturnValue %44 +%29 = OpCompositeExtract %10 %22 10 +%30 = OpCompositeConstruct %12 %21 %25 +%31 = OpMatrixTimesVector %5 %29 %30 +%32 = OpVectorShuffle %8 %31 %31 0 1 +%33 = OpExtInst %8 %1 Normalize %32 +%34 = OpVectorTimesScalar %8 %33 %26 +%35 = OpCompositeExtract %10 %22 9 +%36 = OpCompositeConstruct %12 %34 %27 %25 +%37 = OpMatrixTimesVector %5 %35 %36 +%38 = OpFSub %5 %21 %37 +%39 = OpExtInst %5 %1 Normalize %38 +OpReturnValue %39 OpFunctionEnd -%48 = OpFunction %2 None %49 -%47 = OpLabel -%45 = OpVariable %46 Function -%50 = OpLoad %13 %23 -%52 = OpAccessChain %51 %25 %12 +%43 = OpFunction %2 None %44 +%42 = OpLabel +%40 = OpVariable %41 Function +%45 = OpLoad %3 %15 +%48 = OpAccessChain %46 %17 %47 OpBranch %53 %53 = OpLabel -%54 = OpCompositeConstruct %14 %6 %3 %6 -%55 = OpCompositeConstruct %14 %6 %6 %6 -%56 = OpCompositeConstruct %22 %7 %9 %10 %11 %55 %54 -%57 = OpCompositeExtract %8 %56 0 -%58 = OpCompositeExtract %8 %56 1 -%59 = OpCompositeExtract %4 %56 2 -%60 = OpCompositeExtract %4 %56 3 -%61 = OpCompositeExtract %14 %56 4 -%62 = OpCompositeExtract %14 %56 5 -OpRayQueryInitializeKHR %45 %50 %57 %58 %61 %59 %62 %60 +%54 = OpCompositeConstruct %5 %27 %25 %27 +%55 = OpCompositeConstruct %5 %27 %27 %27 +%56 = OpCompositeConstruct %14 %49 %50 %51 %52 %55 %54 +%57 = OpCompositeExtract %4 %56 0 +%58 = OpCompositeExtract %4 %56 1 +%59 = OpCompositeExtract %6 %56 2 +%60 = OpCompositeExtract %6 %56 3 +%61 = OpCompositeExtract %5 %56 4 +%62 = OpCompositeExtract %5 %56 5 +OpRayQueryInitializeKHR %40 %45 %57 %58 %61 %59 %62 %60 OpBranch %63 %63 = OpLabel OpLoopMerge %64 %66 None OpBranch %65 %65 = OpLabel -%67 = OpRayQueryProceedKHR %17 %45 +%67 = OpRayQueryProceedKHR %9 %40 OpSelectionMerge %68 None OpBranchConditional %67 %68 %69 %69 = OpLabel @@ -126,27 +126,27 @@ OpBranch %66 %66 = OpLabel OpBranch %63 %64 = OpLabel -%73 = OpRayQueryGetIntersectionTypeKHR %8 %45 %72 -%74 = OpRayQueryGetIntersectionInstanceCustomIndexKHR %8 %45 %72 -%75 = OpRayQueryGetIntersectionInstanceIdKHR %8 %45 %72 -%76 = OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR %8 %45 %72 -%77 = OpRayQueryGetIntersectionGeometryIndexKHR %8 %45 %72 -%78 = OpRayQueryGetIntersectionPrimitiveIndexKHR %8 %45 %72 -%79 = OpRayQueryGetIntersectionTKHR %4 %45 %72 -%80 = OpRayQueryGetIntersectionBarycentricsKHR %16 %45 %72 -%81 = OpRayQueryGetIntersectionFrontFaceKHR %17 %45 %72 -%82 = OpRayQueryGetIntersectionObjectToWorldKHR %18 %45 %72 -%83 = OpRayQueryGetIntersectionWorldToObjectKHR %18 %45 %72 -%84 = OpCompositeConstruct %19 %73 %79 %74 %75 %76 %77 %78 %80 %81 %82 %83 -%86 = OpCompositeExtract %8 %84 0 -%87 = OpIEqual %17 %86 %12 -%88 = OpSelect %8 %87 %72 %12 -%89 = OpAccessChain %85 %52 %12 +%73 = OpRayQueryGetIntersectionTypeKHR %4 %40 %72 +%74 = OpRayQueryGetIntersectionInstanceCustomIndexKHR %4 %40 %72 +%75 = OpRayQueryGetIntersectionInstanceIdKHR %4 %40 %72 +%76 = OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR %4 %40 %72 +%77 = OpRayQueryGetIntersectionGeometryIndexKHR %4 %40 %72 +%78 = OpRayQueryGetIntersectionPrimitiveIndexKHR %4 %40 %72 +%79 = OpRayQueryGetIntersectionTKHR %6 %40 %72 +%80 = OpRayQueryGetIntersectionBarycentricsKHR %8 %40 %72 +%81 = OpRayQueryGetIntersectionFrontFaceKHR %9 %40 %72 +%82 = OpRayQueryGetIntersectionObjectToWorldKHR %10 %40 %72 +%83 = OpRayQueryGetIntersectionWorldToObjectKHR %10 %40 %72 +%84 = OpCompositeConstruct %11 %73 %79 %74 %75 %76 %77 %78 %80 %81 %82 %83 +%86 = OpCompositeExtract %4 %84 0 +%87 = OpIEqual %9 %86 %47 +%88 = OpSelect %4 %87 %72 %47 +%89 = OpAccessChain %85 %48 %47 OpStore %89 %88 -%91 = OpCompositeExtract %4 %84 1 -%92 = OpVectorTimesScalar %14 %54 %91 -%93 = OpFunctionCall %14 %31 %92 %84 -%94 = OpAccessChain %90 %52 %72 +%91 = OpCompositeExtract %6 %84 1 +%92 = OpVectorTimesScalar %5 %54 %91 +%93 = OpFunctionCall %5 %23 %92 %84 +%94 = OpAccessChain %90 %48 %72 OpStore %94 %93 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/shadow.spvasm b/tests/out/spv/shadow.spvasm index 15cbf4b918..a1705891cc 100644 --- a/tests/out/spv/shadow.spvasm +++ b/tests/out/spv/shadow.spvasm @@ -6,44 +6,44 @@ OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %90 "vs_main" %80 %83 %85 %87 %89 +OpEntryPoint Vertex %89 "vs_main" %79 %82 %84 %86 %88 OpEntryPoint Fragment %148 "fs_main" %139 %142 %145 %147 OpEntryPoint Fragment %217 "fs_main_without_storage" %210 %212 %214 %216 OpExecutionMode %148 OriginUpperLeft OpExecutionMode %217 OriginUpperLeft OpSource GLSL 450 -OpName %11 "c_max_lights" -OpMemberName %18 0 "view_proj" -OpMemberName %18 1 "num_lights" -OpName %18 "Globals" -OpMemberName %19 0 "world" -OpMemberName %19 1 "color" -OpName %19 "Entity" -OpMemberName %21 0 "proj_position" -OpMemberName %21 1 "world_normal" -OpMemberName %21 2 "world_position" -OpName %21 "VertexOutput" -OpMemberName %24 0 "proj" -OpMemberName %24 1 "pos" -OpMemberName %24 2 "color" -OpName %24 "Light" -OpName %30 "c_ambient" -OpName %31 "u_globals" -OpName %34 "u_entity" -OpName %37 "s_lights" -OpName %40 "u_lights" -OpName %43 "t_shadow" -OpName %45 "sampler_shadow" -OpName %48 "light_id" -OpName %49 "homogeneous_coords" -OpName %50 "fetch_shadow" -OpName %76 "out" -OpName %80 "position" -OpName %83 "normal" -OpName %85 "proj_position" -OpName %87 "world_normal" -OpName %89 "world_position" -OpName %90 "vs_main" +OpName %7 "c_max_lights" +OpMemberName %13 0 "view_proj" +OpMemberName %13 1 "num_lights" +OpName %13 "Globals" +OpMemberName %14 0 "world" +OpMemberName %14 1 "color" +OpName %14 "Entity" +OpMemberName %16 0 "proj_position" +OpMemberName %16 1 "world_normal" +OpMemberName %16 2 "world_position" +OpName %16 "VertexOutput" +OpMemberName %19 0 "proj" +OpMemberName %19 1 "pos" +OpMemberName %19 2 "color" +OpName %19 "Light" +OpName %25 "c_ambient" +OpName %26 "u_globals" +OpName %29 "u_entity" +OpName %32 "s_lights" +OpName %35 "u_lights" +OpName %38 "t_shadow" +OpName %40 "sampler_shadow" +OpName %43 "light_id" +OpName %44 "homogeneous_coords" +OpName %45 "fetch_shadow" +OpName %75 "out" +OpName %79 "position" +OpName %82 "normal" +OpName %84 "proj_position" +OpName %86 "world_normal" +OpName %88 "world_position" +OpName %89 "vs_main" OpName %132 "color" OpName %134 "i" OpName %139 "proj_position" @@ -56,50 +56,50 @@ OpName %210 "proj_position" OpName %212 "world_normal" OpName %214 "world_position" OpName %217 "fs_main_without_storage" -OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %18 0 ColMajor -OpMemberDecorate %18 0 MatrixStride 16 -OpMemberDecorate %18 1 Offset 64 +OpMemberDecorate %13 0 Offset 0 +OpMemberDecorate %13 0 ColMajor +OpMemberDecorate %13 0 MatrixStride 16 +OpMemberDecorate %13 1 Offset 64 +OpMemberDecorate %14 0 Offset 0 +OpMemberDecorate %14 0 ColMajor +OpMemberDecorate %14 0 MatrixStride 16 +OpMemberDecorate %14 1 Offset 64 +OpMemberDecorate %16 0 Offset 0 +OpMemberDecorate %16 1 Offset 16 +OpMemberDecorate %16 2 Offset 32 OpMemberDecorate %19 0 Offset 0 OpMemberDecorate %19 0 ColMajor OpMemberDecorate %19 0 MatrixStride 16 OpMemberDecorate %19 1 Offset 64 -OpMemberDecorate %21 0 Offset 0 -OpMemberDecorate %21 1 Offset 16 -OpMemberDecorate %21 2 Offset 32 -OpMemberDecorate %24 0 Offset 0 -OpMemberDecorate %24 0 ColMajor -OpMemberDecorate %24 0 MatrixStride 16 -OpMemberDecorate %24 1 Offset 64 -OpMemberDecorate %24 2 Offset 80 -OpDecorate %25 ArrayStride 96 -OpDecorate %26 ArrayStride 96 -OpDecorate %31 DescriptorSet 0 -OpDecorate %31 Binding 0 -OpDecorate %32 Block -OpMemberDecorate %32 0 Offset 0 -OpDecorate %34 DescriptorSet 1 -OpDecorate %34 Binding 0 -OpDecorate %35 Block -OpMemberDecorate %35 0 Offset 0 -OpDecorate %37 NonWritable -OpDecorate %37 DescriptorSet 0 -OpDecorate %37 Binding 1 -OpDecorate %38 Block -OpMemberDecorate %38 0 Offset 0 +OpMemberDecorate %19 2 Offset 80 +OpDecorate %20 ArrayStride 96 +OpDecorate %21 ArrayStride 96 +OpDecorate %26 DescriptorSet 0 +OpDecorate %26 Binding 0 +OpDecorate %27 Block +OpMemberDecorate %27 0 Offset 0 +OpDecorate %29 DescriptorSet 1 +OpDecorate %29 Binding 0 +OpDecorate %30 Block +OpMemberDecorate %30 0 Offset 0 +OpDecorate %32 NonWritable +OpDecorate %32 DescriptorSet 0 +OpDecorate %32 Binding 1 +OpDecorate %33 Block +OpMemberDecorate %33 0 Offset 0 +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 1 +OpDecorate %36 Block +OpMemberDecorate %36 0 Offset 0 +OpDecorate %38 DescriptorSet 0 +OpDecorate %38 Binding 2 OpDecorate %40 DescriptorSet 0 -OpDecorate %40 Binding 1 -OpDecorate %41 Block -OpMemberDecorate %41 0 Offset 0 -OpDecorate %43 DescriptorSet 0 -OpDecorate %43 Binding 2 -OpDecorate %45 DescriptorSet 0 -OpDecorate %45 Binding 3 -OpDecorate %80 Location 0 -OpDecorate %83 Location 1 -OpDecorate %85 BuiltIn Position -OpDecorate %87 Location 0 -OpDecorate %89 Location 1 +OpDecorate %40 Binding 3 +OpDecorate %79 Location 0 +OpDecorate %82 Location 1 +OpDecorate %84 BuiltIn Position +OpDecorate %86 Location 0 +OpDecorate %88 Location 1 OpDecorate %139 BuiltIn FragCoord OpDecorate %142 Location 0 OpDecorate %145 Location 1 @@ -112,199 +112,199 @@ OpDecorate %216 Location 0 %4 = OpTypeInt 32 1 %3 = OpConstant %4 10 %6 = OpTypeFloat 32 -%5 = OpConstant %6 0.0 -%7 = OpConstant %6 1.0 -%8 = OpConstant %6 0.5 -%9 = OpConstant %6 -0.5 -%10 = OpConstant %6 0.05 -%12 = OpTypeInt 32 0 -%11 = OpConstant %12 10 -%13 = OpConstant %12 0 -%14 = OpConstant %12 1 -%16 = OpTypeVector %6 4 -%15 = OpTypeMatrix %16 4 -%17 = OpTypeVector %12 4 -%18 = OpTypeStruct %15 %17 -%19 = OpTypeStruct %15 %16 -%20 = OpTypeVector %6 3 -%21 = OpTypeStruct %16 %20 %16 -%22 = OpTypeVector %4 4 -%23 = OpTypeMatrix %20 3 -%24 = OpTypeStruct %15 %16 %16 -%25 = OpTypeRuntimeArray %24 -%26 = OpTypeArray %24 %3 -%27 = OpTypeImage %6 2D 1 1 0 1 Unknown -%28 = OpTypeSampler -%29 = OpTypeVector %6 2 -%30 = OpConstantComposite %20 %10 %10 %10 -%32 = OpTypeStruct %18 -%33 = OpTypePointer Uniform %32 -%31 = OpVariable %33 Uniform -%35 = OpTypeStruct %19 -%36 = OpTypePointer Uniform %35 -%34 = OpVariable %36 Uniform -%38 = OpTypeStruct %25 -%39 = OpTypePointer StorageBuffer %38 -%37 = OpVariable %39 StorageBuffer -%41 = OpTypeStruct %26 -%42 = OpTypePointer Uniform %41 -%40 = OpVariable %42 Uniform -%44 = OpTypePointer UniformConstant %27 -%43 = OpVariable %44 UniformConstant -%46 = OpTypePointer UniformConstant %28 -%45 = OpVariable %46 UniformConstant -%51 = OpTypeFunction %6 %12 %16 -%56 = OpTypeBool -%71 = OpTypeSampledImage %27 -%77 = OpTypePointer Function %21 -%78 = OpConstantNull %21 -%81 = OpTypePointer Input %22 -%80 = OpVariable %81 Input -%83 = OpVariable %81 Input -%86 = OpTypePointer Output %16 -%85 = OpVariable %86 Output -%88 = OpTypePointer Output %20 -%87 = OpVariable %88 Output -%89 = OpVariable %86 Output -%91 = OpTypeFunction %2 -%92 = OpTypePointer Uniform %18 -%94 = OpTypePointer Uniform %19 -%97 = OpTypePointer Uniform %15 -%104 = OpTypePointer Function %20 +%5 = OpConstant %6 0.05 +%8 = OpTypeInt 32 0 +%7 = OpConstant %8 10 +%9 = OpConstant %8 1 +%11 = OpTypeVector %6 4 +%10 = OpTypeMatrix %11 4 +%12 = OpTypeVector %8 4 +%13 = OpTypeStruct %10 %12 +%14 = OpTypeStruct %10 %11 +%15 = OpTypeVector %6 3 +%16 = OpTypeStruct %11 %15 %11 +%17 = OpTypeVector %4 4 +%18 = OpTypeMatrix %15 3 +%19 = OpTypeStruct %10 %11 %11 +%20 = OpTypeRuntimeArray %19 +%21 = OpTypeArray %19 %3 +%22 = OpTypeImage %6 2D 1 1 0 1 Unknown +%23 = OpTypeSampler +%24 = OpTypeVector %6 2 +%25 = OpConstantComposite %15 %5 %5 %5 +%27 = OpTypeStruct %13 +%28 = OpTypePointer Uniform %27 +%26 = OpVariable %28 Uniform +%30 = OpTypeStruct %14 +%31 = OpTypePointer Uniform %30 +%29 = OpVariable %31 Uniform +%33 = OpTypeStruct %20 +%34 = OpTypePointer StorageBuffer %33 +%32 = OpVariable %34 StorageBuffer +%36 = OpTypeStruct %21 +%37 = OpTypePointer Uniform %36 +%35 = OpVariable %37 Uniform +%39 = OpTypePointer UniformConstant %22 +%38 = OpVariable %39 UniformConstant +%41 = OpTypePointer UniformConstant %23 +%40 = OpVariable %41 UniformConstant +%46 = OpTypeFunction %6 %8 %11 +%49 = OpConstant %6 0.0 +%50 = OpConstant %6 1.0 +%51 = OpConstant %6 0.5 +%52 = OpConstant %6 -0.5 +%55 = OpTypeBool +%70 = OpTypeSampledImage %22 +%76 = OpTypePointer Function %16 +%77 = OpConstantNull %16 +%80 = OpTypePointer Input %17 +%79 = OpVariable %80 Input +%82 = OpVariable %80 Input +%85 = OpTypePointer Output %11 +%84 = OpVariable %85 Output +%87 = OpTypePointer Output %15 +%86 = OpVariable %87 Output +%88 = OpVariable %85 Output +%90 = OpTypeFunction %2 +%91 = OpTypePointer Uniform %13 +%92 = OpConstant %8 0 +%94 = OpTypePointer Uniform %14 +%97 = OpTypePointer Uniform %10 +%104 = OpTypePointer Function %15 %112 = OpTypeVector %4 3 -%117 = OpTypePointer Function %16 -%118 = OpConstant %12 2 +%117 = OpTypePointer Function %11 +%118 = OpConstant %8 2 %126 = OpTypePointer Output %6 -%133 = OpConstantNull %20 -%135 = OpTypePointer Function %12 -%136 = OpConstantNull %12 -%140 = OpTypePointer Input %16 +%133 = OpConstantNull %15 +%135 = OpTypePointer Function %8 +%136 = OpConstantNull %8 +%140 = OpTypePointer Input %11 %139 = OpVariable %140 Input -%143 = OpTypePointer Input %20 +%143 = OpTypePointer Input %15 %142 = OpVariable %143 Input %145 = OpVariable %140 Input -%147 = OpVariable %86 Output -%151 = OpTypePointer StorageBuffer %25 -%163 = OpTypePointer Uniform %17 -%164 = OpTypePointer Uniform %12 -%174 = OpTypePointer StorageBuffer %24 -%200 = OpTypePointer Uniform %16 -%205 = OpConstantNull %20 -%207 = OpConstantNull %12 +%147 = OpVariable %85 Output +%151 = OpTypePointer StorageBuffer %20 +%163 = OpTypePointer Uniform %12 +%164 = OpTypePointer Uniform %8 +%174 = OpTypePointer StorageBuffer %19 +%200 = OpTypePointer Uniform %11 +%205 = OpConstantNull %15 +%207 = OpConstantNull %8 %210 = OpVariable %140 Input %212 = OpVariable %143 Input %214 = OpVariable %140 Input -%216 = OpVariable %86 Output -%220 = OpTypePointer Uniform %26 -%241 = OpTypePointer Uniform %24 -%50 = OpFunction %6 None %51 -%48 = OpFunctionParameter %12 -%49 = OpFunctionParameter %16 -%47 = OpLabel -%52 = OpLoad %27 %43 -%53 = OpLoad %28 %45 -OpBranch %54 -%54 = OpLabel -%55 = OpCompositeExtract %6 %49 3 -%57 = OpFOrdLessThanEqual %56 %55 %5 -OpSelectionMerge %58 None -OpBranchConditional %57 %59 %58 -%59 = OpLabel -OpReturnValue %7 +%216 = OpVariable %85 Output +%220 = OpTypePointer Uniform %21 +%241 = OpTypePointer Uniform %19 +%45 = OpFunction %6 None %46 +%43 = OpFunctionParameter %8 +%44 = OpFunctionParameter %11 +%42 = OpLabel +%47 = OpLoad %22 %38 +%48 = OpLoad %23 %40 +OpBranch %53 +%53 = OpLabel +%54 = OpCompositeExtract %6 %44 3 +%56 = OpFOrdLessThanEqual %55 %54 %49 +OpSelectionMerge %57 None +OpBranchConditional %56 %58 %57 %58 = OpLabel -%60 = OpCompositeConstruct %29 %8 %9 -%61 = OpCompositeExtract %6 %49 3 -%62 = OpFDiv %6 %7 %61 -%63 = OpVectorShuffle %29 %49 %49 0 1 -%64 = OpFMul %29 %63 %60 -%65 = OpVectorTimesScalar %29 %64 %62 -%66 = OpCompositeConstruct %29 %8 %8 -%67 = OpFAdd %29 %65 %66 -%68 = OpBitcast %4 %48 -%69 = OpCompositeExtract %6 %49 2 -%70 = OpFMul %6 %69 %62 -%72 = OpConvertSToF %6 %68 -%73 = OpCompositeConstruct %20 %67 %72 -%74 = OpSampledImage %71 %52 %53 -%75 = OpImageSampleDrefExplicitLod %6 %74 %73 %70 Lod %5 -OpReturnValue %75 +OpReturnValue %50 +%57 = OpLabel +%59 = OpCompositeConstruct %24 %51 %52 +%60 = OpCompositeExtract %6 %44 3 +%61 = OpFDiv %6 %50 %60 +%62 = OpVectorShuffle %24 %44 %44 0 1 +%63 = OpFMul %24 %62 %59 +%64 = OpVectorTimesScalar %24 %63 %61 +%65 = OpCompositeConstruct %24 %51 %51 +%66 = OpFAdd %24 %64 %65 +%67 = OpBitcast %4 %43 +%68 = OpCompositeExtract %6 %44 2 +%69 = OpFMul %6 %68 %61 +%71 = OpConvertSToF %6 %67 +%72 = OpCompositeConstruct %15 %66 %71 +%73 = OpSampledImage %70 %47 %48 +%74 = OpImageSampleDrefExplicitLod %6 %73 %72 %69 Lod %49 +OpReturnValue %74 OpFunctionEnd -%90 = OpFunction %2 None %91 -%79 = OpLabel -%76 = OpVariable %77 Function %78 -%82 = OpLoad %22 %80 -%84 = OpLoad %22 %83 -%93 = OpAccessChain %92 %31 %13 -%95 = OpAccessChain %94 %34 %13 +%89 = OpFunction %2 None %90 +%78 = OpLabel +%75 = OpVariable %76 Function %77 +%81 = OpLoad %17 %79 +%83 = OpLoad %17 %82 +%93 = OpAccessChain %91 %26 %92 +%95 = OpAccessChain %94 %29 %92 OpBranch %96 %96 = OpLabel -%98 = OpAccessChain %97 %95 %13 -%99 = OpLoad %15 %98 -%100 = OpAccessChain %97 %95 %13 -%101 = OpLoad %15 %100 -%102 = OpConvertSToF %16 %82 -%103 = OpMatrixTimesVector %16 %101 %102 -%105 = OpCompositeExtract %16 %99 0 -%106 = OpVectorShuffle %20 %105 %105 0 1 2 -%107 = OpCompositeExtract %16 %99 1 -%108 = OpVectorShuffle %20 %107 %107 0 1 2 -%109 = OpCompositeExtract %16 %99 2 -%110 = OpVectorShuffle %20 %109 %109 0 1 2 -%111 = OpCompositeConstruct %23 %106 %108 %110 -%113 = OpVectorShuffle %112 %84 %84 0 1 2 -%114 = OpConvertSToF %20 %113 -%115 = OpMatrixTimesVector %20 %111 %114 -%116 = OpAccessChain %104 %76 %14 +%98 = OpAccessChain %97 %95 %92 +%99 = OpLoad %10 %98 +%100 = OpAccessChain %97 %95 %92 +%101 = OpLoad %10 %100 +%102 = OpConvertSToF %11 %81 +%103 = OpMatrixTimesVector %11 %101 %102 +%105 = OpCompositeExtract %11 %99 0 +%106 = OpVectorShuffle %15 %105 %105 0 1 2 +%107 = OpCompositeExtract %11 %99 1 +%108 = OpVectorShuffle %15 %107 %107 0 1 2 +%109 = OpCompositeExtract %11 %99 2 +%110 = OpVectorShuffle %15 %109 %109 0 1 2 +%111 = OpCompositeConstruct %18 %106 %108 %110 +%113 = OpVectorShuffle %112 %83 %83 0 1 2 +%114 = OpConvertSToF %15 %113 +%115 = OpMatrixTimesVector %15 %111 %114 +%116 = OpAccessChain %104 %75 %9 OpStore %116 %115 -%119 = OpAccessChain %117 %76 %118 +%119 = OpAccessChain %117 %75 %118 OpStore %119 %103 -%120 = OpAccessChain %97 %93 %13 -%121 = OpLoad %15 %120 -%122 = OpMatrixTimesVector %16 %121 %103 -%123 = OpAccessChain %117 %76 %13 +%120 = OpAccessChain %97 %93 %92 +%121 = OpLoad %10 %120 +%122 = OpMatrixTimesVector %11 %121 %103 +%123 = OpAccessChain %117 %75 %92 OpStore %123 %122 -%124 = OpLoad %21 %76 -%125 = OpCompositeExtract %16 %124 0 -OpStore %85 %125 -%127 = OpAccessChain %126 %85 %14 +%124 = OpLoad %16 %75 +%125 = OpCompositeExtract %11 %124 0 +OpStore %84 %125 +%127 = OpAccessChain %126 %84 %9 %128 = OpLoad %6 %127 %129 = OpFNegate %6 %128 OpStore %127 %129 -%130 = OpCompositeExtract %20 %124 1 -OpStore %87 %130 -%131 = OpCompositeExtract %16 %124 2 -OpStore %89 %131 +%130 = OpCompositeExtract %15 %124 1 +OpStore %86 %130 +%131 = OpCompositeExtract %11 %124 2 +OpStore %88 %131 OpReturn OpFunctionEnd -%148 = OpFunction %2 None %91 +%148 = OpFunction %2 None %90 %137 = OpLabel %132 = OpVariable %104 Function %133 %134 = OpVariable %135 Function %136 -%141 = OpLoad %16 %139 -%144 = OpLoad %20 %142 -%146 = OpLoad %16 %145 -%138 = OpCompositeConstruct %21 %141 %144 %146 -%149 = OpAccessChain %92 %31 %13 -%150 = OpAccessChain %94 %34 %13 -%152 = OpAccessChain %151 %37 %13 -%153 = OpLoad %27 %43 -%154 = OpLoad %28 %45 +%141 = OpLoad %11 %139 +%144 = OpLoad %15 %142 +%146 = OpLoad %11 %145 +%138 = OpCompositeConstruct %16 %141 %144 %146 +%149 = OpAccessChain %91 %26 %92 +%150 = OpAccessChain %94 %29 %92 +%152 = OpAccessChain %151 %32 %92 +%153 = OpLoad %22 %38 +%154 = OpLoad %23 %40 OpBranch %155 %155 = OpLabel -%156 = OpCompositeExtract %20 %138 1 -%157 = OpExtInst %20 %1 Normalize %156 -OpStore %132 %30 -OpStore %134 %13 +%156 = OpCompositeExtract %15 %138 1 +%157 = OpExtInst %15 %1 Normalize %156 +OpStore %132 %25 +OpStore %134 %92 OpBranch %158 %158 = OpLabel OpLoopMerge %159 %161 None OpBranch %160 %160 = OpLabel -%162 = OpLoad %12 %134 -%165 = OpAccessChain %164 %149 %14 %13 -%166 = OpLoad %12 %165 -%167 = OpExtInst %12 %1 UMin %166 %11 -%168 = OpULessThan %56 %162 %167 +%162 = OpLoad %8 %134 +%165 = OpAccessChain %164 %149 %9 %92 +%166 = OpLoad %8 %165 +%167 = OpExtInst %8 %1 UMin %166 %7 +%168 = OpULessThan %55 %162 %167 OpSelectionMerge %169 None OpBranchConditional %168 %169 %170 %170 = OpLabel @@ -312,75 +312,75 @@ OpBranch %159 %169 = OpLabel OpBranch %171 %171 = OpLabel -%173 = OpLoad %12 %134 +%173 = OpLoad %8 %134 %175 = OpAccessChain %174 %152 %173 -%176 = OpLoad %24 %175 -%177 = OpLoad %12 %134 -%178 = OpCompositeExtract %15 %176 0 -%179 = OpCompositeExtract %16 %138 2 -%180 = OpMatrixTimesVector %16 %178 %179 -%181 = OpFunctionCall %6 %50 %177 %180 -%182 = OpCompositeExtract %16 %176 1 -%183 = OpVectorShuffle %20 %182 %182 0 1 2 -%184 = OpCompositeExtract %16 %138 2 -%185 = OpVectorShuffle %20 %184 %184 0 1 2 -%186 = OpFSub %20 %183 %185 -%187 = OpExtInst %20 %1 Normalize %186 +%176 = OpLoad %19 %175 +%177 = OpLoad %8 %134 +%178 = OpCompositeExtract %10 %176 0 +%179 = OpCompositeExtract %11 %138 2 +%180 = OpMatrixTimesVector %11 %178 %179 +%181 = OpFunctionCall %6 %45 %177 %180 +%182 = OpCompositeExtract %11 %176 1 +%183 = OpVectorShuffle %15 %182 %182 0 1 2 +%184 = OpCompositeExtract %11 %138 2 +%185 = OpVectorShuffle %15 %184 %184 0 1 2 +%186 = OpFSub %15 %183 %185 +%187 = OpExtInst %15 %1 Normalize %186 %188 = OpDot %6 %157 %187 -%189 = OpExtInst %6 %1 FMax %5 %188 +%189 = OpExtInst %6 %1 FMax %49 %188 %190 = OpFMul %6 %181 %189 -%191 = OpCompositeExtract %16 %176 2 -%192 = OpVectorShuffle %20 %191 %191 0 1 2 -%193 = OpVectorTimesScalar %20 %192 %190 -%194 = OpLoad %20 %132 -%195 = OpFAdd %20 %194 %193 +%191 = OpCompositeExtract %11 %176 2 +%192 = OpVectorShuffle %15 %191 %191 0 1 2 +%193 = OpVectorTimesScalar %15 %192 %190 +%194 = OpLoad %15 %132 +%195 = OpFAdd %15 %194 %193 OpStore %132 %195 OpBranch %172 %172 = OpLabel OpBranch %161 %161 = OpLabel -%196 = OpLoad %12 %134 -%197 = OpIAdd %12 %196 %14 +%196 = OpLoad %8 %134 +%197 = OpIAdd %8 %196 %9 OpStore %134 %197 OpBranch %158 %159 = OpLabel -%198 = OpLoad %20 %132 -%199 = OpCompositeConstruct %16 %198 %7 -%201 = OpAccessChain %200 %150 %14 -%202 = OpLoad %16 %201 -%203 = OpFMul %16 %199 %202 +%198 = OpLoad %15 %132 +%199 = OpCompositeConstruct %11 %198 %50 +%201 = OpAccessChain %200 %150 %9 +%202 = OpLoad %11 %201 +%203 = OpFMul %11 %199 %202 OpStore %147 %203 OpReturn OpFunctionEnd -%217 = OpFunction %2 None %91 +%217 = OpFunction %2 None %90 %208 = OpLabel %204 = OpVariable %104 Function %205 %206 = OpVariable %135 Function %207 -%211 = OpLoad %16 %210 -%213 = OpLoad %20 %212 -%215 = OpLoad %16 %214 -%209 = OpCompositeConstruct %21 %211 %213 %215 -%218 = OpAccessChain %92 %31 %13 -%219 = OpAccessChain %94 %34 %13 -%221 = OpAccessChain %220 %40 %13 -%222 = OpLoad %27 %43 -%223 = OpLoad %28 %45 +%211 = OpLoad %11 %210 +%213 = OpLoad %15 %212 +%215 = OpLoad %11 %214 +%209 = OpCompositeConstruct %16 %211 %213 %215 +%218 = OpAccessChain %91 %26 %92 +%219 = OpAccessChain %94 %29 %92 +%221 = OpAccessChain %220 %35 %92 +%222 = OpLoad %22 %38 +%223 = OpLoad %23 %40 OpBranch %224 %224 = OpLabel -%225 = OpCompositeExtract %20 %209 1 -%226 = OpExtInst %20 %1 Normalize %225 -OpStore %204 %30 -OpStore %206 %13 +%225 = OpCompositeExtract %15 %209 1 +%226 = OpExtInst %15 %1 Normalize %225 +OpStore %204 %25 +OpStore %206 %92 OpBranch %227 %227 = OpLabel OpLoopMerge %228 %230 None OpBranch %229 %229 = OpLabel -%231 = OpLoad %12 %206 -%232 = OpAccessChain %164 %218 %14 %13 -%233 = OpLoad %12 %232 -%234 = OpExtInst %12 %1 UMin %233 %11 -%235 = OpULessThan %56 %231 %234 +%231 = OpLoad %8 %206 +%232 = OpAccessChain %164 %218 %9 %92 +%233 = OpLoad %8 %232 +%234 = OpExtInst %8 %1 UMin %233 %7 +%235 = OpULessThan %55 %231 %234 OpSelectionMerge %236 None OpBranchConditional %235 %236 %237 %237 = OpLabel @@ -388,43 +388,43 @@ OpBranch %228 %236 = OpLabel OpBranch %238 %238 = OpLabel -%240 = OpLoad %12 %206 +%240 = OpLoad %8 %206 %242 = OpAccessChain %241 %221 %240 -%243 = OpLoad %24 %242 -%244 = OpLoad %12 %206 -%245 = OpCompositeExtract %15 %243 0 -%246 = OpCompositeExtract %16 %209 2 -%247 = OpMatrixTimesVector %16 %245 %246 -%248 = OpFunctionCall %6 %50 %244 %247 -%249 = OpCompositeExtract %16 %243 1 -%250 = OpVectorShuffle %20 %249 %249 0 1 2 -%251 = OpCompositeExtract %16 %209 2 -%252 = OpVectorShuffle %20 %251 %251 0 1 2 -%253 = OpFSub %20 %250 %252 -%254 = OpExtInst %20 %1 Normalize %253 +%243 = OpLoad %19 %242 +%244 = OpLoad %8 %206 +%245 = OpCompositeExtract %10 %243 0 +%246 = OpCompositeExtract %11 %209 2 +%247 = OpMatrixTimesVector %11 %245 %246 +%248 = OpFunctionCall %6 %45 %244 %247 +%249 = OpCompositeExtract %11 %243 1 +%250 = OpVectorShuffle %15 %249 %249 0 1 2 +%251 = OpCompositeExtract %11 %209 2 +%252 = OpVectorShuffle %15 %251 %251 0 1 2 +%253 = OpFSub %15 %250 %252 +%254 = OpExtInst %15 %1 Normalize %253 %255 = OpDot %6 %226 %254 -%256 = OpExtInst %6 %1 FMax %5 %255 +%256 = OpExtInst %6 %1 FMax %49 %255 %257 = OpFMul %6 %248 %256 -%258 = OpCompositeExtract %16 %243 2 -%259 = OpVectorShuffle %20 %258 %258 0 1 2 -%260 = OpVectorTimesScalar %20 %259 %257 -%261 = OpLoad %20 %204 -%262 = OpFAdd %20 %261 %260 +%258 = OpCompositeExtract %11 %243 2 +%259 = OpVectorShuffle %15 %258 %258 0 1 2 +%260 = OpVectorTimesScalar %15 %259 %257 +%261 = OpLoad %15 %204 +%262 = OpFAdd %15 %261 %260 OpStore %204 %262 OpBranch %239 %239 = OpLabel OpBranch %230 %230 = OpLabel -%263 = OpLoad %12 %206 -%264 = OpIAdd %12 %263 %14 +%263 = OpLoad %8 %206 +%264 = OpIAdd %8 %263 %9 OpStore %206 %264 OpBranch %227 %228 = OpLabel -%265 = OpLoad %20 %204 -%266 = OpCompositeConstruct %16 %265 %7 -%267 = OpAccessChain %200 %219 %14 -%268 = OpLoad %16 %267 -%269 = OpFMul %16 %266 %268 +%265 = OpLoad %15 %204 +%266 = OpCompositeConstruct %11 %265 %50 +%267 = OpAccessChain %200 %219 %9 +%268 = OpLoad %11 %267 +%269 = OpFMul %11 %266 %268 OpStore %216 %269 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/skybox.spvasm b/tests/out/spv/skybox.spvasm index ca51a06dd8..3c3ed8ba78 100644 --- a/tests/out/spv/skybox.spvasm +++ b/tests/out/spv/skybox.spvasm @@ -5,135 +5,135 @@ OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %39 "vs_main" %32 %35 %37 +OpEntryPoint Vertex %34 "vs_main" %27 %30 %32 OpEntryPoint Fragment %90 "fs_main" %83 %86 %89 OpExecutionMode %90 OriginUpperLeft -OpMemberDecorate %12 0 Offset 0 -OpMemberDecorate %12 1 Offset 16 -OpMemberDecorate %14 0 Offset 0 -OpMemberDecorate %14 0 ColMajor -OpMemberDecorate %14 0 MatrixStride 16 -OpMemberDecorate %14 1 Offset 64 -OpMemberDecorate %14 1 ColMajor -OpMemberDecorate %14 1 MatrixStride 16 +OpMemberDecorate %6 0 Offset 0 +OpMemberDecorate %6 1 Offset 16 +OpMemberDecorate %8 0 Offset 0 +OpMemberDecorate %8 0 ColMajor +OpMemberDecorate %8 0 MatrixStride 16 +OpMemberDecorate %8 1 Offset 64 +OpMemberDecorate %8 1 ColMajor +OpMemberDecorate %8 1 MatrixStride 16 +OpDecorate %14 DescriptorSet 0 +OpDecorate %14 Binding 0 +OpDecorate %15 Block +OpMemberDecorate %15 0 Offset 0 +OpDecorate %17 DescriptorSet 0 +OpDecorate %17 Binding 1 OpDecorate %19 DescriptorSet 0 -OpDecorate %19 Binding 0 -OpDecorate %20 Block -OpMemberDecorate %20 0 Offset 0 -OpDecorate %22 DescriptorSet 0 -OpDecorate %22 Binding 1 -OpDecorate %24 DescriptorSet 0 -OpDecorate %24 Binding 2 -OpDecorate %32 BuiltIn VertexIndex -OpDecorate %35 BuiltIn Position -OpDecorate %37 Location 0 +OpDecorate %19 Binding 2 +OpDecorate %27 BuiltIn VertexIndex +OpDecorate %30 BuiltIn Position +OpDecorate %32 Location 0 OpDecorate %83 BuiltIn FragCoord OpDecorate %86 Location 0 OpDecorate %89 Location 0 %2 = OpTypeVoid -%4 = OpTypeInt 32 1 -%3 = OpConstant %4 2 -%5 = OpConstant %4 1 -%7 = OpTypeFloat 32 -%6 = OpConstant %7 4.0 -%8 = OpConstant %7 1.0 -%9 = OpConstant %7 0.0 -%10 = OpTypeVector %7 4 -%11 = OpTypeVector %7 3 -%12 = OpTypeStruct %10 %11 -%13 = OpTypeMatrix %10 4 -%14 = OpTypeStruct %13 %13 -%15 = OpTypeInt 32 0 -%16 = OpTypeMatrix %11 3 -%17 = OpTypeImage %7 Cube 0 0 0 1 Unknown -%18 = OpTypeSampler -%20 = OpTypeStruct %14 -%21 = OpTypePointer Uniform %20 -%19 = OpVariable %21 Uniform -%23 = OpTypePointer UniformConstant %17 -%22 = OpVariable %23 UniformConstant -%25 = OpTypePointer UniformConstant %18 -%24 = OpVariable %25 UniformConstant -%27 = OpTypePointer Function %4 -%28 = OpConstantNull %4 -%30 = OpConstantNull %4 -%33 = OpTypePointer Input %15 -%32 = OpVariable %33 Input -%36 = OpTypePointer Output %10 -%35 = OpVariable %36 Output -%38 = OpTypePointer Output %11 -%37 = OpVariable %38 Output -%40 = OpTypeFunction %2 -%41 = OpTypePointer Uniform %14 -%42 = OpConstant %15 0 -%58 = OpTypePointer Uniform %13 -%59 = OpTypePointer Uniform %10 -%60 = OpConstant %15 1 -%67 = OpConstant %15 2 -%84 = OpTypePointer Input %10 +%4 = OpTypeFloat 32 +%3 = OpTypeVector %4 4 +%5 = OpTypeVector %4 3 +%6 = OpTypeStruct %3 %5 +%7 = OpTypeMatrix %3 4 +%8 = OpTypeStruct %7 %7 +%9 = OpTypeInt 32 0 +%10 = OpTypeInt 32 1 +%11 = OpTypeMatrix %5 3 +%12 = OpTypeImage %4 Cube 0 0 0 1 Unknown +%13 = OpTypeSampler +%15 = OpTypeStruct %8 +%16 = OpTypePointer Uniform %15 +%14 = OpVariable %16 Uniform +%18 = OpTypePointer UniformConstant %12 +%17 = OpVariable %18 UniformConstant +%20 = OpTypePointer UniformConstant %13 +%19 = OpVariable %20 UniformConstant +%22 = OpTypePointer Function %10 +%23 = OpConstantNull %10 +%25 = OpConstantNull %10 +%28 = OpTypePointer Input %9 +%27 = OpVariable %28 Input +%31 = OpTypePointer Output %3 +%30 = OpVariable %31 Output +%33 = OpTypePointer Output %5 +%32 = OpVariable %33 Output +%35 = OpTypeFunction %2 +%36 = OpTypePointer Uniform %8 +%37 = OpConstant %9 0 +%39 = OpConstant %10 2 +%40 = OpConstant %10 1 +%41 = OpConstant %4 4.0 +%42 = OpConstant %4 1.0 +%43 = OpConstant %4 0.0 +%58 = OpTypePointer Uniform %7 +%59 = OpTypePointer Uniform %3 +%60 = OpConstant %9 1 +%67 = OpConstant %9 2 +%84 = OpTypePointer Input %3 %83 = OpVariable %84 Input -%87 = OpTypePointer Input %11 +%87 = OpTypePointer Input %5 %86 = OpVariable %87 Input -%89 = OpVariable %36 Output -%95 = OpTypeSampledImage %17 -%39 = OpFunction %2 None %40 -%31 = OpLabel -%26 = OpVariable %27 Function %28 -%29 = OpVariable %27 Function %30 -%34 = OpLoad %15 %32 -%43 = OpAccessChain %41 %19 %42 +%89 = OpVariable %31 Output +%95 = OpTypeSampledImage %12 +%34 = OpFunction %2 None %35 +%26 = OpLabel +%21 = OpVariable %22 Function %23 +%24 = OpVariable %22 Function %25 +%29 = OpLoad %9 %27 +%38 = OpAccessChain %36 %14 %37 OpBranch %44 %44 = OpLabel -%45 = OpBitcast %4 %34 -%46 = OpSDiv %4 %45 %3 -OpStore %26 %46 -%47 = OpBitcast %4 %34 -%48 = OpBitwiseAnd %4 %47 %5 -OpStore %29 %48 -%49 = OpLoad %4 %26 -%50 = OpConvertSToF %7 %49 -%51 = OpFMul %7 %50 %6 -%52 = OpFSub %7 %51 %8 -%53 = OpLoad %4 %29 -%54 = OpConvertSToF %7 %53 -%55 = OpFMul %7 %54 %6 -%56 = OpFSub %7 %55 %8 -%57 = OpCompositeConstruct %10 %52 %56 %9 %8 -%61 = OpAccessChain %59 %43 %60 %42 -%62 = OpLoad %10 %61 -%63 = OpVectorShuffle %11 %62 %62 0 1 2 -%64 = OpAccessChain %59 %43 %60 %60 -%65 = OpLoad %10 %64 -%66 = OpVectorShuffle %11 %65 %65 0 1 2 -%68 = OpAccessChain %59 %43 %60 %67 -%69 = OpLoad %10 %68 -%70 = OpVectorShuffle %11 %69 %69 0 1 2 -%71 = OpCompositeConstruct %16 %63 %66 %70 -%72 = OpTranspose %16 %71 -%73 = OpAccessChain %58 %43 %42 -%74 = OpLoad %13 %73 -%75 = OpMatrixTimesVector %10 %74 %57 -%76 = OpVectorShuffle %11 %75 %75 0 1 2 -%77 = OpMatrixTimesVector %11 %72 %76 -%78 = OpCompositeConstruct %12 %57 %77 -%79 = OpCompositeExtract %10 %78 0 -OpStore %35 %79 -%80 = OpCompositeExtract %11 %78 1 -OpStore %37 %80 +%45 = OpBitcast %10 %29 +%46 = OpSDiv %10 %45 %39 +OpStore %21 %46 +%47 = OpBitcast %10 %29 +%48 = OpBitwiseAnd %10 %47 %40 +OpStore %24 %48 +%49 = OpLoad %10 %21 +%50 = OpConvertSToF %4 %49 +%51 = OpFMul %4 %50 %41 +%52 = OpFSub %4 %51 %42 +%53 = OpLoad %10 %24 +%54 = OpConvertSToF %4 %53 +%55 = OpFMul %4 %54 %41 +%56 = OpFSub %4 %55 %42 +%57 = OpCompositeConstruct %3 %52 %56 %43 %42 +%61 = OpAccessChain %59 %38 %60 %37 +%62 = OpLoad %3 %61 +%63 = OpVectorShuffle %5 %62 %62 0 1 2 +%64 = OpAccessChain %59 %38 %60 %60 +%65 = OpLoad %3 %64 +%66 = OpVectorShuffle %5 %65 %65 0 1 2 +%68 = OpAccessChain %59 %38 %60 %67 +%69 = OpLoad %3 %68 +%70 = OpVectorShuffle %5 %69 %69 0 1 2 +%71 = OpCompositeConstruct %11 %63 %66 %70 +%72 = OpTranspose %11 %71 +%73 = OpAccessChain %58 %38 %37 +%74 = OpLoad %7 %73 +%75 = OpMatrixTimesVector %3 %74 %57 +%76 = OpVectorShuffle %5 %75 %75 0 1 2 +%77 = OpMatrixTimesVector %5 %72 %76 +%78 = OpCompositeConstruct %6 %57 %77 +%79 = OpCompositeExtract %3 %78 0 +OpStore %30 %79 +%80 = OpCompositeExtract %5 %78 1 +OpStore %32 %80 OpReturn OpFunctionEnd -%90 = OpFunction %2 None %40 +%90 = OpFunction %2 None %35 %81 = OpLabel -%85 = OpLoad %10 %83 -%88 = OpLoad %11 %86 -%82 = OpCompositeConstruct %12 %85 %88 -%91 = OpLoad %17 %22 -%92 = OpLoad %18 %24 +%85 = OpLoad %3 %83 +%88 = OpLoad %5 %86 +%82 = OpCompositeConstruct %6 %85 %88 +%91 = OpLoad %12 %17 +%92 = OpLoad %13 %19 OpBranch %93 %93 = OpLabel -%94 = OpCompositeExtract %11 %82 1 +%94 = OpCompositeExtract %5 %82 1 %96 = OpSampledImage %95 %91 %92 -%97 = OpImageSampleImplicitLod %10 %96 %94 +%97 = OpImageSampleImplicitLod %3 %96 %94 OpStore %89 %97 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/spv/texture-arg.spvasm b/tests/out/spv/texture-arg.spvasm index eca3f80c61..f761edf70d 100644 --- a/tests/out/spv/texture-arg.spvasm +++ b/tests/out/spv/texture-arg.spvasm @@ -8,53 +8,53 @@ OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %28 "main" %26 OpExecutionMode %28 OriginUpperLeft OpSource GLSL 450 -OpName %9 "Texture" -OpName %11 "Sampler" -OpName %14 "Passed_Texture" -OpName %16 "Passed_Sampler" -OpName %18 "test" +OpName %8 "Texture" +OpName %10 "Sampler" +OpName %13 "Passed_Texture" +OpName %15 "Passed_Sampler" +OpName %17 "test" OpName %28 "main" -OpDecorate %9 DescriptorSet 0 -OpDecorate %9 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %11 Binding 1 +OpDecorate %8 DescriptorSet 0 +OpDecorate %8 Binding 0 +OpDecorate %10 DescriptorSet 0 +OpDecorate %10 Binding 1 OpDecorate %26 Location 0 %2 = OpTypeVoid %4 = OpTypeFloat 32 -%3 = OpConstant %4 0.0 -%5 = OpTypeImage %4 2D 0 0 0 1 Unknown -%6 = OpTypeSampler -%7 = OpTypeVector %4 4 -%8 = OpTypeVector %4 2 -%10 = OpTypePointer UniformConstant %5 -%9 = OpVariable %10 UniformConstant -%12 = OpTypePointer UniformConstant %6 -%11 = OpVariable %12 UniformConstant -%19 = OpTypeFunction %7 %10 %12 -%22 = OpTypeSampledImage %5 -%27 = OpTypePointer Output %7 +%3 = OpTypeImage %4 2D 0 0 0 1 Unknown +%5 = OpTypeSampler +%6 = OpTypeVector %4 4 +%7 = OpTypeVector %4 2 +%9 = OpTypePointer UniformConstant %3 +%8 = OpVariable %9 UniformConstant +%11 = OpTypePointer UniformConstant %5 +%10 = OpVariable %11 UniformConstant +%18 = OpTypeFunction %6 %9 %11 +%19 = OpConstant %4 0.0 +%22 = OpTypeSampledImage %3 +%27 = OpTypePointer Output %6 %26 = OpVariable %27 Output %29 = OpTypeFunction %2 -%18 = OpFunction %7 None %19 -%14 = OpFunctionParameter %10 -%16 = OpFunctionParameter %12 -%13 = OpLabel -%15 = OpLoad %5 %14 -%17 = OpLoad %6 %16 +%17 = OpFunction %6 None %18 +%13 = OpFunctionParameter %9 +%15 = OpFunctionParameter %11 +%12 = OpLabel +%14 = OpLoad %3 %13 +%16 = OpLoad %5 %15 OpBranch %20 %20 = OpLabel -%21 = OpCompositeConstruct %8 %3 %3 -%23 = OpSampledImage %22 %15 %17 -%24 = OpImageSampleImplicitLod %7 %23 %21 +%21 = OpCompositeConstruct %7 %19 %19 +%23 = OpSampledImage %22 %14 %16 +%24 = OpImageSampleImplicitLod %6 %23 %21 OpReturnValue %24 OpFunctionEnd %28 = OpFunction %2 None %29 %25 = OpLabel -%30 = OpLoad %5 %9 -%31 = OpLoad %6 %11 +%30 = OpLoad %3 %8 +%31 = OpLoad %5 %10 OpBranch %32 %32 = OpLabel -%33 = OpFunctionCall %7 %18 %9 %11 +%33 = OpFunctionCall %6 %17 %8 %10 OpStore %26 %33 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/wgsl/boids.wgsl b/tests/out/wgsl/boids.wgsl index a3f03dd2df..26502a9e6c 100644 --- a/tests/out/wgsl/boids.wgsl +++ b/tests/out/wgsl/boids.wgsl @@ -125,7 +125,7 @@ fn main(@builtin(global_invocation_id) global_invocation_id: vec3) { vVel = (((_e112 + (_e113 * _e116)) + (_e119 * _e122)) + (_e125 * _e128)); let _e131 = vVel; let _e133 = vVel; - vVel = (normalize(_e131) * clamp(length(_e133), 0.0, 0.10000000149011612)); + vVel = (normalize(_e131) * clamp(length(_e133), 0.0, 0.1)); let _e139 = vPos; let _e140 = vVel; let _e143 = params.deltaT; diff --git a/tests/out/wgsl/image.wgsl b/tests/out/wgsl/image.wgsl index 3409712bc7..ddfd0b2168 100644 --- a/tests/out/wgsl/image.wgsl +++ b/tests/out/wgsl/image.wgsl @@ -121,10 +121,10 @@ fn texture_sample() -> @location(0) vec4 { let _e19 = textureSample(image_2d, sampler_reg, tc, vec2(3, 1)); let _e20 = a; a = (_e20 + _e19); - let _e24 = textureSampleLevel(image_2d, sampler_reg, tc, 2.299999952316284); + let _e24 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3); let _e25 = a; a = (_e25 + _e24); - let _e29 = textureSampleLevel(image_2d, sampler_reg, tc, 2.299999952316284, vec2(3, 1)); + let _e29 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3, vec2(3, 1)); let _e30 = a; a = (_e30 + _e29); let _e35 = textureSampleBias(image_2d, sampler_reg, tc, 2.0, vec2(3, 1)); @@ -136,10 +136,10 @@ fn texture_sample() -> @location(0) vec4 { let _e47 = textureSample(image_2d_array, sampler_reg, tc, 0u, vec2(3, 1)); let _e48 = a; a = (_e48 + _e47); - let _e53 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.299999952316284); + let _e53 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3); let _e54 = a; a = (_e54 + _e53); - let _e59 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.299999952316284, vec2(3, 1)); + let _e59 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3, vec2(3, 1)); let _e60 = a; a = (_e60 + _e59); let _e66 = textureSampleBias(image_2d_array, sampler_reg, tc, 0u, 2.0, vec2(3, 1)); @@ -151,10 +151,10 @@ fn texture_sample() -> @location(0) vec4 { let _e78 = textureSample(image_2d_array, sampler_reg, tc, 0, vec2(3, 1)); let _e79 = a; a = (_e79 + _e78); - let _e84 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0, 2.299999952316284); + let _e84 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0, 2.3); let _e85 = a; a = (_e85 + _e84); - let _e90 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0, 2.299999952316284, vec2(3, 1)); + let _e90 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0, 2.3, vec2(3, 1)); let _e91 = a; a = (_e91 + _e90); let _e97 = textureSampleBias(image_2d_array, sampler_reg, tc, 0, 2.0, vec2(3, 1)); @@ -163,7 +163,7 @@ fn texture_sample() -> @location(0) vec4 { let _e103 = textureSample(image_cube_array, sampler_reg, tc3_, 0u); let _e104 = a; a = (_e104 + _e103); - let _e109 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0u, 2.299999952316284); + let _e109 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0u, 2.3); let _e110 = a; a = (_e110 + _e109); let _e116 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0u, 2.0); @@ -172,7 +172,7 @@ fn texture_sample() -> @location(0) vec4 { let _e122 = textureSample(image_cube_array, sampler_reg, tc3_, 0); let _e123 = a; a = (_e123 + _e122); - let _e128 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0, 2.299999952316284); + let _e128 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0, 2.3); let _e129 = a; a = (_e129 + _e128); let _e135 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0, 2.0); diff --git a/tests/out/wgsl/operators.wgsl b/tests/out/wgsl/operators.wgsl index 11e7fd92da..d2fb888d72 100644 --- a/tests/out/wgsl/operators.wgsl +++ b/tests/out/wgsl/operators.wgsl @@ -12,7 +12,7 @@ fn builtins() -> vec4 { let s2_ = select(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), true); let s3_ = select(vec4(1.0, 1.0, 1.0, 1.0), vec4(0.0, 0.0, 0.0, 0.0), vec4(false, false, false, false)); let m1_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), vec4(0.5, 0.5, 0.5, 0.5)); - let m2_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612); + let m2_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.1); let b1_ = bitcast(vec4(1, 1, 1, 1).x); let b2_ = bitcast>(vec4(1, 1, 1, 1)); let v_i32_zero = vec4(vec4(0.0, 0.0, 0.0, 0.0));