diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bd63fc35..31bf739eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,16 @@ Bottom level categories: ## Unreleased +### Bug Fixes + +#### Vulkan + +- Retain shader-side storage-buffer bounds checks on proprietary Qualcomm drivers, including internal indirect validation, to avoid zeroed valid dependent reads. + +#### naga + +- Keep accesses to wrapped buffer globals rooted at their storage block in SPIR-V, fixing corrupted matrix reads on affected Vulkan devices without changing shader source or buffer layouts. + ## v30.0.1 (2026-08-21) ### Bug Fixes diff --git a/naga/src/back/spv/block.rs b/naga/src/back/spv/block.rs index bb977e81f..8acc4e2cf 100644 --- a/naga/src/back/spv/block.rs +++ b/naga/src/back/spv/block.rs @@ -8,9 +8,11 @@ use arrayvec::ArrayVec; use spirv::Word; use super::{ - helpers::map_storage_class, index::BoundsCheckResult, selection::Selection, Block, - BlockContext, Dimension, Error, IdGenerator, Instruction, LocalType, LookupType, NumericType, - ResultMember, WrappedFunction, Writer, WriterFlags, + helpers::{global_needs_wrapper, map_storage_class}, + index::BoundsCheckResult, + selection::Selection, + Block, BlockContext, Dimension, Error, IdGenerator, Instruction, LocalType, LookupType, + NumericType, ResultMember, WrappedFunction, Writer, WriterFlags, }; use crate::{ arena::Handle, back::spv::helpers::is_uniform_matcx2_struct_member_access, @@ -2617,6 +2619,16 @@ impl BlockContext<'_> { } crate::Expression::GlobalVariable(handle) => { let gv = &self.writer.global_variables[handle]; + if global_needs_wrapper( + self.ir_module, + &self.ir_module.global_variables[handle], + ) { + // Preserve block-rooted matrix layout through the full access chain. + let var_id = gv.var_id; + let zero = self.get_index_constant(0); + self.temp_list.push(zero); + break var_id; + } break gv.access_id; } crate::Expression::LocalVariable(variable) => { diff --git a/naga/src/back/spv/mod.rs b/naga/src/back/spv/mod.rs index c5c817fcd..1ead41621 100644 --- a/naga/src/back/spv/mod.rs +++ b/naga/src/back/spv/mod.rs @@ -108,6 +108,8 @@ mod ray; mod reclaimable; mod selection; mod subgroup; +#[cfg(all(test, feature = "wgsl-in"))] +mod wrapped_globals; mod writer; pub use nt::spv::*; diff --git a/naga/src/back/spv/wrapped_globals.rs b/naga/src/back/spv/wrapped_globals.rs new file mode 100644 index 000000000..e5d0e243e --- /dev/null +++ b/naga/src/back/spv/wrapped_globals.rs @@ -0,0 +1,66 @@ +use crate::proc::{BoundsCheckPolicies, BoundsCheckPolicy}; +use alloc::collections::BTreeSet; + +#[test] +fn wrapped_global_matrix_accesses_remain_rooted_at_the_block() { + let source = include_str!("../../../tests/in/wgsl/global-matrix-access.wgsl"); + let module = crate::front::wgsl::parse_str(source).unwrap(); + let info = crate::valid::Validator::new( + crate::valid::ValidationFlags::all(), + crate::valid::Capabilities::all(), + ) + .validate(&module) + .unwrap(); + + for policy in [ + BoundsCheckPolicy::Unchecked, + BoundsCheckPolicy::Restrict, + BoundsCheckPolicy::ReadZeroSkipWrite, + ] { + let options = super::Options { + bounds_check_policies: BoundsCheckPolicies { + index: policy, + buffer: policy, + ..Default::default() + }, + ..Default::default() + }; + let words = super::write_vec( + &module, + &info, + &options, + Some(&super::PipelineOptions { + shader_stage: crate::ShaderStage::Compute, + entry_point: "main".into(), + }), + ) + .unwrap(); + let parsed = rspirv::dr::load_words(words).unwrap(); + let variables: BTreeSet<_> = parsed + .all_inst_iter() + .filter(|instruction| instruction.class.opcode == spirv::Op::Variable) + .map(|instruction| instruction.result_id.unwrap()) + .collect(); + let accesses: alloc::vec::Vec<_> = parsed + .all_inst_iter() + .filter(|instruction| instruction.class.opcode == spirv::Op::AccessChain) + .collect(); + assert!(!accesses.is_empty()); + for instruction in accesses { + let result = instruction.result_id.unwrap(); + let rspirv::dr::Operand::IdRef(base) = instruction.operands[0] else { + panic!("access-chain base is not an ID"); + }; + assert!( + variables.contains(&base), + "{policy:?}: access %{result} is rooted at an intermediate pointer %{base}" + ); + } + assert!( + parsed + .all_inst_iter() + .any(|instruction| instruction.class.opcode == spirv::Op::ArrayLength), + "runtime array lengths must remain available" + ); + } +} diff --git a/naga/tests/in/wgsl/global-matrix-access.toml b/naga/tests/in/wgsl/global-matrix-access.toml new file mode 100644 index 000000000..4883dbbd8 --- /dev/null +++ b/naga/tests/in/wgsl/global-matrix-access.toml @@ -0,0 +1 @@ +targets = "SPIRV" diff --git a/naga/tests/in/wgsl/global-matrix-access.wgsl b/naga/tests/in/wgsl/global-matrix-access.wgsl new file mode 100644 index 000000000..8a4508f89 --- /dev/null +++ b/naga/tests/in/wgsl/global-matrix-access.wgsl @@ -0,0 +1,30 @@ +struct MatrixBlock { + data: array>, +} + +@group(0) @binding(0) var dynamic_matrices: array>; +@group(0) @binding(1) var writable_matrices: array>; +@group(0) @binding(2) var fixed_matrices: array, 2>; +@group(0) @binding(3) var nested_matrices: array, 2>, 2>; +@group(0) @binding(4) var direct_matrix: mat4x4; +@group(0) @binding(5) var uniform_matrix: mat4x4; +@group(0) @binding(6) var explicit_block: MatrixBlock; +@group(0) @binding(7) var result: array>; + +@compute @workgroup_size(1) +fn main(@builtin(global_invocation_id) id: vec3) { + let i = id.x; + let column = id.y % 4u; + let sum = dynamic_matrices[i][column] + + fixed_matrices[i % 2u][column] + + nested_matrices[i % 2u][(i + 1u) % 2u][column] + + direct_matrix[column] + + uniform_matrix[column] + + explicit_block.data[i][column]; + writable_matrices[i][column] = sum; + result[i * 4u + column] = sum; + if i == 0u && column == 0u { + result[8u] = vec4(f32(arrayLength(&dynamic_matrices)), + f32(arrayLength(&explicit_block.data)), dynamic_matrices[0][3].x, direct_matrix[3].y); + } +} diff --git a/naga/tests/out/spv/spv-fetch_depth.spvasm b/naga/tests/out/spv/spv-fetch_depth.spvasm index 54aa5eb1c..482796909 100644 --- a/naga/tests/out/spv/spv-fetch_depth.spvasm +++ b/naga/tests/out/spv/spv-fetch_depth.spvasm @@ -52,13 +52,13 @@ OpDecorate %17 Binding 2 %27 = OpLoad %9 %17 OpBranch %28 %28 = OpLabel -%31 = OpAccessChain %30 %26 %23 +%31 = OpAccessChain %30 %14 %23 %23 %32 = OpLoad %6 %31 %34 = OpImageFetch %33 %27 %32 Lod %10 %35 = OpCompositeExtract %3 %34 0 %36 = OpCompositeConstruct %33 %35 %35 %35 %35 %37 = OpCompositeExtract %3 %36 0 -%38 = OpAccessChain %29 %24 %23 +%38 = OpAccessChain %29 %11 %23 %23 OpStore %38 %37 OpReturn OpFunctionEnd diff --git a/naga/tests/out/spv/wgsl-7995-unicode-idents.spvasm b/naga/tests/out/spv/wgsl-7995-unicode-idents.spvasm index a051e436a..7e5604bb9 100644 --- a/naga/tests/out/spv/wgsl-7995-unicode-idents.spvasm +++ b/naga/tests/out/spv/wgsl-7995-unicode-idents.spvasm @@ -1,13 +1,13 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 24 +; Bound: 25 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %19 "main" -OpExecutionMode %19 LocalSize 1 1 1 +OpEntryPoint GLCompute %20 "main" +OpExecutionMode %20 LocalSize 1 1 1 OpDecorate %4 NonWritable OpDecorate %4 DescriptorSet 0 OpDecorate %4 Binding 0 @@ -23,21 +23,22 @@ OpMemberDecorate %5 0 Offset 0 %12 = OpTypeInt 32 0 %11 = OpConstant %12 0 %14 = OpConstant %3 9001 -%20 = OpTypeFunction %2 +%21 = OpTypeFunction %2 %8 = OpFunction %3 None %9 %7 = OpLabel %13 = OpAccessChain %10 %4 %11 OpBranch %15 %15 = OpLabel -%16 = OpLoad %3 %13 -%17 = OpFAdd %3 %16 %14 -OpReturnValue %17 +%16 = OpAccessChain %10 %4 %11 +%17 = OpLoad %3 %16 +%18 = OpFAdd %3 %17 %14 +OpReturnValue %18 OpFunctionEnd -%19 = OpFunction %2 None %20 -%18 = OpLabel -%21 = OpAccessChain %10 %4 %11 -OpBranch %22 -%22 = OpLabel -%23 = OpFunctionCall %3 %8 +%20 = OpFunction %2 None %21 +%19 = OpLabel +%22 = OpAccessChain %10 %4 %11 +OpBranch %23 +%23 = OpLabel +%24 = OpFunctionCall %3 %8 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-9489-loop-local-var-init.spvasm b/naga/tests/out/spv/wgsl-9489-loop-local-var-init.spvasm index 7b8a1c7dc..f36691dc1 100644 --- a/naga/tests/out/spv/wgsl-9489-loop-local-var-init.spvasm +++ b/naga/tests/out/spv/wgsl-9489-loop-local-var-init.spvasm @@ -131,7 +131,7 @@ OpBranch %86 %89 = OpIMul %6 %88 %26 %90 = OpLoad %6 %36 %91 = OpIAdd %6 %89 %90 -%93 = OpAccessChain %92 %21 %91 +%93 = OpAccessChain %92 %10 %20 %91 %94 = OpLoad %3 %93 %95 = OpCompositeConstruct %9 %94 %94 %94 %94 %96 = OpLoad %9 %31 @@ -153,14 +153,14 @@ OpBranch %67 %103 = OpIMul %6 %102 %28 %105 = OpAccessChain %104 %31 %20 %106 = OpLoad %3 %105 -%107 = OpAccessChain %92 %23 %103 +%107 = OpAccessChain %92 %13 %20 %103 OpStore %107 %106 %108 = OpLoad %6 %29 %109 = OpIMul %6 %108 %28 %110 = OpIAdd %6 %109 %27 %111 = OpAccessChain %104 %34 %20 %112 = OpLoad %3 %111 -%113 = OpAccessChain %92 %23 %110 +%113 = OpAccessChain %92 %13 %20 %110 OpStore %113 %112 OpBranch %66 %66 = OpLabel diff --git a/naga/tests/out/spv/wgsl-access.spvasm b/naga/tests/out/spv/wgsl-access.spvasm index 1678c50d4..f155ba0a1 100644 --- a/naga/tests/out/spv/wgsl-access.spvasm +++ b/naga/tests/out/spv/wgsl-access.spvasm @@ -1,16 +1,16 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 511 +; Bound: 517 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %428 "foo_vert" %423 %426 -OpEntryPoint Fragment %484 "foo_frag" %483 -OpEntryPoint GLCompute %502 "foo_compute" -OpExecutionMode %484 OriginUpperLeft -OpExecutionMode %502 LocalSize 1 1 1 +OpEntryPoint Vertex %432 "foo_vert" %427 %430 +OpEntryPoint Fragment %489 "foo_frag" %488 +OpEntryPoint GLCompute %508 "foo_compute" +OpExecutionMode %489 OriginUpperLeft +OpExecutionMode %508 LocalSize 1 1 1 %3 = OpString "access.wgsl" OpSource Unknown 0 %3 "// This snapshot tests accessing various containers, dereferencing pointers. @@ -316,50 +316,50 @@ OpName %69 "mat3x2_get_column" OpName %84 "test_matrix_within_struct_accesses" OpName %113 "idx" OpName %115 "t" -OpName %186 "array, 2>_from_std140" -OpName %190 "mat4x2_from_std140" -OpName %204 "mat4x2_get_column" -OpName %221 "test_matrix_within_array_within_struct_accesses" -OpName %232 "idx" -OpName %233 "t" -OpName %294 "foo" -OpName %295 "read_from_private" -OpName %300 "a" -OpName %301 "test_arr_as_arg" -OpName %307 "p" -OpName %308 "assign_through_ptr_fn" -OpName %313 "foo" -OpName %314 "assign_array_through_ptr_fn" -OpName %321 "assign_through_ptr" -OpName %326 "val" -OpName %327 "arr" -OpName %332 "p" -OpName %333 "fetch_arg_ptr_member" -OpName %339 "p" -OpName %340 "assign_to_arg_ptr_member" -OpName %345 "p" -OpName %346 "fetch_arg_ptr_array_element" -OpName %352 "p" -OpName %353 "assign_to_arg_ptr_array_element" -OpName %358 "assign_to_ptr_components" -OpName %359 "s1" -OpName %361 "a1" -OpName %369 "value" -OpName %370 "index_ptr" -OpName %372 "a" -OpName %381 "member_ptr" -OpName %385 "s" -OpName %391 "let_members_of_members" -OpName %402 "var_members_of_members" -OpName %403 "thing" -OpName %405 "inner" -OpName %408 "delishus" -OpName %423 "vi" -OpName %428 "foo_vert" -OpName %439 "foo" -OpName %440 "c2" -OpName %484 "foo_frag" -OpName %502 "foo_compute" +OpName %190 "array, 2>_from_std140" +OpName %194 "mat4x2_from_std140" +OpName %208 "mat4x2_get_column" +OpName %225 "test_matrix_within_array_within_struct_accesses" +OpName %236 "idx" +OpName %237 "t" +OpName %298 "foo" +OpName %299 "read_from_private" +OpName %304 "a" +OpName %305 "test_arr_as_arg" +OpName %311 "p" +OpName %312 "assign_through_ptr_fn" +OpName %317 "foo" +OpName %318 "assign_array_through_ptr_fn" +OpName %325 "assign_through_ptr" +OpName %330 "val" +OpName %331 "arr" +OpName %336 "p" +OpName %337 "fetch_arg_ptr_member" +OpName %343 "p" +OpName %344 "assign_to_arg_ptr_member" +OpName %349 "p" +OpName %350 "fetch_arg_ptr_array_element" +OpName %356 "p" +OpName %357 "assign_to_arg_ptr_array_element" +OpName %362 "assign_to_ptr_components" +OpName %363 "s1" +OpName %365 "a1" +OpName %373 "value" +OpName %374 "index_ptr" +OpName %376 "a" +OpName %385 "member_ptr" +OpName %389 "s" +OpName %395 "let_members_of_members" +OpName %406 "var_members_of_members" +OpName %407 "thing" +OpName %409 "inner" +OpName %412 "delishus" +OpName %427 "vi" +OpName %432 "foo_vert" +OpName %443 "foo" +OpName %444 "c2" +OpName %489 "foo_frag" +OpName %508 "foo_compute" OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %7 1 Offset 16 OpMemberDecorate %7 2 Offset 28 @@ -420,9 +420,9 @@ OpDecorate %66 DescriptorSet 0 OpDecorate %66 Binding 3 OpDecorate %67 Block OpMemberDecorate %67 0 Offset 0 -OpDecorate %423 BuiltIn VertexIndex -OpDecorate %426 BuiltIn Position -OpDecorate %483 Location 0 +OpDecorate %427 BuiltIn VertexIndex +OpDecorate %430 BuiltIn Position +OpDecorate %488 Location 0 %2 = OpTypeVoid %4 = OpTypeInt 32 0 %5 = OpTypeVector %4 3 @@ -521,94 +521,94 @@ OpDecorate %483 Location 0 %116 = OpTypePointer Function %23 %120 = OpTypePointer Uniform %22 %121 = OpTypePointer Uniform %13 -%141 = OpTypePointer Uniform %9 -%172 = OpTypePointer Function %22 -%174 = OpTypePointer Function %13 -%187 = OpTypeFunction %26 %50 -%191 = OpTypeFunction %25 %49 -%207 = OpTypeFunction %13 %25 %4 -%222 = OpTypePointer Uniform %51 -%224 = OpTypePointer Uniform %27 -%225 = OpConstantNull %26 -%226 = OpConstantComposite %27 %225 -%227 = OpConstant %9 8 -%228 = OpConstantComposite %13 %227 %227 -%229 = OpConstant %9 7 -%230 = OpConstantComposite %13 %229 %229 -%231 = OpConstantComposite %25 %228 %230 %99 %101 -%234 = OpTypePointer Function %27 -%238 = OpTypePointer Uniform %26 -%239 = OpTypePointer Uniform %50 -%243 = OpTypePointer Uniform %25 -%244 = OpTypePointer Uniform %49 -%278 = OpTypePointer Function %26 -%280 = OpTypePointer Function %25 -%296 = OpTypeFunction %9 %28 -%302 = OpTypeFunction %9 %30 -%309 = OpTypeFunction %2 %34 -%310 = OpConstant %4 42 -%315 = OpTypeFunction %2 %36 -%316 = OpConstantComposite %32 %90 %90 %90 %90 -%317 = OpConstantComposite %32 %92 %92 %92 %92 -%318 = OpConstantComposite %35 %316 %317 -%322 = OpConstant %4 33 -%323 = OpConstantComposite %32 %98 %98 %98 %98 -%324 = OpConstantComposite %32 %229 %229 %229 %229 -%325 = OpConstantComposite %35 %323 %324 -%334 = OpTypeFunction %4 %38 -%341 = OpTypeFunction %2 %38 -%347 = OpTypeFunction %4 %41 -%354 = OpTypeFunction %2 %41 -%360 = OpConstantNull %37 -%362 = OpConstantNull %39 -%371 = OpTypeFunction %42 %42 -%373 = OpTypePointer Function %43 -%374 = OpConstantNull %43 -%377 = OpTypePointer Function %42 -%382 = OpTypeFunction %6 -%383 = OpConstant %6 42 -%384 = OpConstantComposite %45 %383 -%386 = OpTypePointer Function %45 -%392 = OpConstantNull %47 -%404 = OpTypePointer Function %47 -%406 = OpTypePointer Function %46 -%407 = OpConstantNull %46 -%409 = OpConstantNull %6 -%424 = OpTypePointer Input %4 -%423 = OpVariable %424 Input -%427 = OpTypePointer Output %32 -%426 = OpVariable %427 Output -%430 = OpTypePointer StorageBuffer %24 -%433 = OpConstant %9 0 -%434 = OpConstant %4 3 -%435 = OpConstant %6 3 -%436 = OpConstant %6 4 -%437 = OpConstant %6 5 -%438 = OpConstantNull %30 -%441 = OpTypePointer Function %33 -%442 = OpConstantNull %33 -%448 = OpTypePointer StorageBuffer %10 -%451 = OpTypePointer StorageBuffer %19 -%454 = OpTypePointer StorageBuffer %11 -%455 = OpTypePointer StorageBuffer %9 -%458 = OpTypePointer StorageBuffer %20 -%461 = OpTypePointer StorageBuffer %8 -%462 = OpTypePointer StorageBuffer %6 -%467 = OpConstant %9 -2147483600 -%468 = OpConstant %9 2147483500 -%477 = OpTypeVector %6 4 -%483 = OpVariable %427 Output -%486 = OpConstantComposite %11 %433 %433 %433 -%487 = OpConstantComposite %11 %90 %90 %90 -%488 = OpConstantComposite %11 %92 %92 %92 -%489 = OpConstantComposite %11 %94 %94 %94 -%490 = OpConstantComposite %10 %486 %487 %488 %489 -%491 = OpConstantComposite %18 %52 %52 -%492 = OpConstantComposite %18 %44 %44 -%493 = OpConstantComposite %19 %491 %492 -%494 = OpConstantNull %24 -%495 = OpConstantComposite %32 %433 %433 %433 %433 -%503 = OpConstantTrue %42 +%143 = OpTypePointer Uniform %9 +%176 = OpTypePointer Function %22 +%178 = OpTypePointer Function %13 +%191 = OpTypeFunction %26 %50 +%195 = OpTypeFunction %25 %49 +%211 = OpTypeFunction %13 %25 %4 +%226 = OpTypePointer Uniform %51 +%228 = OpTypePointer Uniform %27 +%229 = OpConstantNull %26 +%230 = OpConstantComposite %27 %229 +%231 = OpConstant %9 8 +%232 = OpConstantComposite %13 %231 %231 +%233 = OpConstant %9 7 +%234 = OpConstantComposite %13 %233 %233 +%235 = OpConstantComposite %25 %232 %234 %99 %101 +%238 = OpTypePointer Function %27 +%242 = OpTypePointer Uniform %26 +%243 = OpTypePointer Uniform %50 +%247 = OpTypePointer Uniform %25 +%248 = OpTypePointer Uniform %49 +%282 = OpTypePointer Function %26 +%284 = OpTypePointer Function %25 +%300 = OpTypeFunction %9 %28 +%306 = OpTypeFunction %9 %30 +%313 = OpTypeFunction %2 %34 +%314 = OpConstant %4 42 +%319 = OpTypeFunction %2 %36 +%320 = OpConstantComposite %32 %90 %90 %90 %90 +%321 = OpConstantComposite %32 %92 %92 %92 %92 +%322 = OpConstantComposite %35 %320 %321 +%326 = OpConstant %4 33 +%327 = OpConstantComposite %32 %98 %98 %98 %98 +%328 = OpConstantComposite %32 %233 %233 %233 %233 +%329 = OpConstantComposite %35 %327 %328 +%338 = OpTypeFunction %4 %38 +%345 = OpTypeFunction %2 %38 +%351 = OpTypeFunction %4 %41 +%358 = OpTypeFunction %2 %41 +%364 = OpConstantNull %37 +%366 = OpConstantNull %39 +%375 = OpTypeFunction %42 %42 +%377 = OpTypePointer Function %43 +%378 = OpConstantNull %43 +%381 = OpTypePointer Function %42 +%386 = OpTypeFunction %6 +%387 = OpConstant %6 42 +%388 = OpConstantComposite %45 %387 +%390 = OpTypePointer Function %45 +%396 = OpConstantNull %47 +%408 = OpTypePointer Function %47 +%410 = OpTypePointer Function %46 +%411 = OpConstantNull %46 +%413 = OpConstantNull %6 +%428 = OpTypePointer Input %4 +%427 = OpVariable %428 Input +%431 = OpTypePointer Output %32 +%430 = OpVariable %431 Output +%434 = OpTypePointer StorageBuffer %24 +%437 = OpConstant %9 0 +%438 = OpConstant %4 3 +%439 = OpConstant %6 3 +%440 = OpConstant %6 4 +%441 = OpConstant %6 5 +%442 = OpConstantNull %30 +%445 = OpTypePointer Function %33 +%446 = OpConstantNull %33 +%452 = OpTypePointer StorageBuffer %10 +%455 = OpTypePointer StorageBuffer %19 +%458 = OpTypePointer StorageBuffer %11 +%459 = OpTypePointer StorageBuffer %9 +%462 = OpTypePointer StorageBuffer %20 +%465 = OpTypePointer StorageBuffer %8 +%466 = OpTypePointer StorageBuffer %6 +%472 = OpConstant %9 -2147483600 +%473 = OpConstant %9 2147483500 +%482 = OpTypeVector %6 4 +%488 = OpVariable %431 Output +%491 = OpConstantComposite %11 %437 %437 %437 +%492 = OpConstantComposite %11 %90 %90 %90 +%493 = OpConstantComposite %11 %92 %92 %92 +%494 = OpConstantComposite %11 %94 %94 %94 +%495 = OpConstantComposite %10 %491 %492 %493 %494 +%496 = OpConstantComposite %18 %52 %52 +%497 = OpConstantComposite %18 %44 %44 +%498 = OpConstantComposite %19 %496 %497 +%499 = OpConstantNull %24 +%500 = OpConstantComposite %32 %437 %437 %437 %437 +%509 = OpConstantTrue %42 %69 = OpFunction %13 None %72 %70 = OpFunctionParameter %22 %71 = OpFunctionParameter %4 @@ -643,237 +643,241 @@ OpLine %3 43 5 OpLine %3 43 5 OpStore %113 %119 OpLine %3 46 14 -%122 = OpAccessChain %121 %87 %52 -%123 = OpLoad %13 %122 -%124 = OpAccessChain %121 %87 %44 -%125 = OpLoad %13 %124 -%126 = OpAccessChain %121 %87 %15 -%127 = OpLoad %13 %126 -%128 = OpCompositeConstruct %22 %123 %125 %127 +%122 = OpAccessChain %86 %60 %52 +%123 = OpAccessChain %121 %122 %52 +%124 = OpLoad %13 %123 +%125 = OpAccessChain %121 %122 %44 +%126 = OpLoad %13 %125 +%127 = OpAccessChain %121 %122 %15 +%128 = OpLoad %13 %127 +%129 = OpCompositeConstruct %22 %124 %126 %128 OpLine %3 47 14 OpLine %3 47 14 -%129 = OpAccessChain %121 %87 %52 -%130 = OpLoad %13 %129 +%130 = OpAccessChain %121 %60 %52 %52 +%131 = OpLoad %13 %130 OpLine %3 48 14 -%131 = OpLoad %6 %113 -%132 = OpAccessChain %121 %87 %52 -%133 = OpLoad %13 %132 -%134 = OpAccessChain %121 %87 %44 +%132 = OpLoad %6 %113 +%133 = OpAccessChain %86 %60 %52 +%134 = OpAccessChain %121 %133 %52 %135 = OpLoad %13 %134 -%136 = OpAccessChain %121 %87 %15 +%136 = OpAccessChain %121 %133 %44 %137 = OpLoad %13 %136 -%138 = OpCompositeConstruct %22 %133 %135 %137 -%139 = OpBitcast %4 %131 -%140 = OpFunctionCall %13 %69 %138 %139 +%138 = OpAccessChain %121 %133 %15 +%139 = OpLoad %13 %138 +%140 = OpCompositeConstruct %22 %135 %137 %139 +%141 = OpBitcast %4 %132 +%142 = OpFunctionCall %13 %69 %140 %141 OpLine %3 49 14 OpLine %3 49 14 OpLine %3 49 14 -%142 = OpAccessChain %141 %87 %52 %44 -%143 = OpLoad %9 %142 +%144 = OpAccessChain %143 %60 %52 %52 %44 +%145 = OpLoad %9 %144 OpLine %3 50 14 OpLine %3 50 14 -%144 = OpLoad %6 %113 -%145 = OpAccessChain %141 %87 %52 %144 -%146 = OpLoad %9 %145 +%146 = OpLoad %6 %113 +%147 = OpAccessChain %143 %60 %52 %52 %146 +%148 = OpLoad %9 %147 OpLine %3 51 14 -%147 = OpLoad %6 %113 +%149 = OpLoad %6 %113 OpLine %3 51 14 -%148 = OpAccessChain %121 %87 %52 -%149 = OpLoad %13 %148 -%150 = OpAccessChain %121 %87 %44 -%151 = OpLoad %13 %150 -%152 = OpAccessChain %121 %87 %15 -%153 = OpLoad %13 %152 -%154 = OpCompositeConstruct %22 %149 %151 %153 -%155 = OpBitcast %4 %147 -%156 = OpFunctionCall %13 %69 %154 %155 -%157 = OpCompositeExtract %9 %156 1 +%150 = OpAccessChain %86 %60 %52 +%151 = OpAccessChain %121 %150 %52 +%152 = OpLoad %13 %151 +%153 = OpAccessChain %121 %150 %44 +%154 = OpLoad %13 %153 +%155 = OpAccessChain %121 %150 %15 +%156 = OpLoad %13 %155 +%157 = OpCompositeConstruct %22 %152 %154 %156 +%158 = OpBitcast %4 %149 +%159 = OpFunctionCall %13 %69 %157 %158 +%160 = OpCompositeExtract %9 %159 1 OpLine %3 52 14 -%158 = OpLoad %6 %113 -%159 = OpLoad %6 %113 -%160 = OpAccessChain %121 %87 %52 -%161 = OpLoad %13 %160 -%162 = OpAccessChain %121 %87 %44 -%163 = OpLoad %13 %162 -%164 = OpAccessChain %121 %87 %15 +%161 = OpLoad %6 %113 +%162 = OpLoad %6 %113 +%163 = OpAccessChain %86 %60 %52 +%164 = OpAccessChain %121 %163 %52 %165 = OpLoad %13 %164 -%166 = OpCompositeConstruct %22 %161 %163 %165 -%167 = OpBitcast %4 %158 -%168 = OpFunctionCall %13 %69 %166 %167 -%169 = OpVectorExtractDynamic %9 %168 %159 +%166 = OpAccessChain %121 %163 %44 +%167 = OpLoad %13 %166 +%168 = OpAccessChain %121 %163 %15 +%169 = OpLoad %13 %168 +%170 = OpCompositeConstruct %22 %165 %167 %169 +%171 = OpBitcast %4 %161 +%172 = OpFunctionCall %13 %69 %170 %171 +%173 = OpVectorExtractDynamic %9 %172 %162 OpLine %3 54 29 OpLine %3 54 45 OpLine %3 54 13 OpLine %3 56 5 -%170 = OpLoad %6 %113 -%171 = OpIAdd %6 %170 %88 +%174 = OpLoad %6 %113 +%175 = OpIAdd %6 %174 %88 OpLine %3 56 5 -OpStore %113 %171 +OpStore %113 %175 OpLine %3 59 5 OpLine %3 59 23 OpLine %3 59 39 OpLine %3 59 11 OpLine %3 59 5 -%173 = OpAccessChain %172 %115 %52 -OpStore %173 %104 +%177 = OpAccessChain %176 %115 %52 +OpStore %177 %104 OpLine %3 60 5 OpLine %3 60 5 OpLine %3 60 14 OpLine %3 60 5 -%175 = OpAccessChain %174 %115 %52 %52 -OpStore %175 %106 +%179 = OpAccessChain %178 %115 %52 %52 +OpStore %179 %106 OpLine %3 61 5 -%176 = OpLoad %6 %113 +%180 = OpLoad %6 %113 OpLine %3 61 16 OpLine %3 61 5 -%177 = OpAccessChain %174 %115 %52 %176 -OpStore %177 %108 +%181 = OpAccessChain %178 %115 %52 %180 +OpStore %181 %108 OpLine %3 62 5 OpLine %3 62 5 OpLine %3 62 5 OpLine %3 62 5 -%178 = OpAccessChain %28 %115 %52 %52 %44 -OpStore %178 %109 +%182 = OpAccessChain %28 %115 %52 %52 %44 +OpStore %182 %109 OpLine %3 63 5 OpLine %3 63 5 -%179 = OpLoad %6 %113 +%183 = OpLoad %6 %113 OpLine %3 63 5 -%180 = OpAccessChain %28 %115 %52 %52 %179 -OpStore %180 %110 +%184 = OpAccessChain %28 %115 %52 %52 %183 +OpStore %184 %110 OpLine %3 64 5 -%181 = OpLoad %6 %113 +%185 = OpLoad %6 %113 OpLine %3 64 5 OpLine %3 64 5 -%182 = OpAccessChain %28 %115 %52 %181 %44 -OpStore %182 %111 +%186 = OpAccessChain %28 %115 %52 %185 %44 +OpStore %186 %111 OpLine %3 65 5 -%183 = OpLoad %6 %113 -%184 = OpLoad %6 %113 +%187 = OpLoad %6 %113 +%188 = OpLoad %6 %113 OpLine %3 65 5 -%185 = OpAccessChain %28 %115 %52 %183 %184 -OpStore %185 %112 +%189 = OpAccessChain %28 %115 %52 %187 %188 +OpStore %189 %112 OpReturn OpFunctionEnd -%190 = OpFunction %25 None %191 -%192 = OpFunctionParameter %49 -%193 = OpLabel -%194 = OpCompositeExtract %13 %192 0 -%195 = OpCompositeExtract %13 %192 1 -%196 = OpCompositeExtract %13 %192 2 -%197 = OpCompositeExtract %13 %192 3 -%198 = OpCompositeConstruct %25 %194 %195 %196 %197 -OpReturnValue %198 +%194 = OpFunction %25 None %195 +%196 = OpFunctionParameter %49 +%197 = OpLabel +%198 = OpCompositeExtract %13 %196 0 +%199 = OpCompositeExtract %13 %196 1 +%200 = OpCompositeExtract %13 %196 2 +%201 = OpCompositeExtract %13 %196 3 +%202 = OpCompositeConstruct %25 %198 %199 %200 %201 +OpReturnValue %202 OpFunctionEnd -%186 = OpFunction %26 None %187 -%188 = OpFunctionParameter %50 -%189 = OpLabel -%199 = OpCompositeExtract %49 %188 0 -%200 = OpFunctionCall %25 %190 %199 -%201 = OpCompositeExtract %49 %188 1 -%202 = OpFunctionCall %25 %190 %201 -%203 = OpCompositeConstruct %26 %200 %202 -OpReturnValue %203 +%190 = OpFunction %26 None %191 +%192 = OpFunctionParameter %50 +%193 = OpLabel +%203 = OpCompositeExtract %49 %192 0 +%204 = OpFunctionCall %25 %194 %203 +%205 = OpCompositeExtract %49 %192 1 +%206 = OpFunctionCall %25 %194 %205 +%207 = OpCompositeConstruct %26 %204 %206 +OpReturnValue %207 OpFunctionEnd -%204 = OpFunction %13 None %207 -%205 = OpFunctionParameter %25 -%206 = OpFunctionParameter %4 -%208 = OpLabel -OpSelectionMerge %209 None -OpSwitch %206 %214 0 %210 1 %211 2 %212 3 %213 -%210 = OpLabel -%215 = OpCompositeExtract %13 %205 0 -OpBranch %209 -%211 = OpLabel -%216 = OpCompositeExtract %13 %205 1 -OpBranch %209 +%208 = OpFunction %13 None %211 +%209 = OpFunctionParameter %25 +%210 = OpFunctionParameter %4 %212 = OpLabel -%217 = OpCompositeExtract %13 %205 2 -OpBranch %209 -%213 = OpLabel -%218 = OpCompositeExtract %13 %205 3 -OpBranch %209 +OpSelectionMerge %213 None +OpSwitch %210 %218 0 %214 1 %215 2 %216 3 %217 %214 = OpLabel +%219 = OpCompositeExtract %13 %209 0 +OpBranch %213 +%215 = OpLabel +%220 = OpCompositeExtract %13 %209 1 +OpBranch %213 +%216 = OpLabel +%221 = OpCompositeExtract %13 %209 2 +OpBranch %213 +%217 = OpLabel +%222 = OpCompositeExtract %13 %209 3 +OpBranch %213 +%218 = OpLabel OpUnreachable -%209 = OpLabel -%219 = OpPhi %13 %215 %210 %216 %211 %217 %212 %218 %213 -OpReturnValue %219 +%213 = OpLabel +%223 = OpPhi %13 %219 %214 %220 %215 %221 %216 %222 %217 +OpReturnValue %223 OpFunctionEnd -%221 = OpFunction %2 None %85 -%220 = OpLabel -%232 = OpVariable %114 Function %88 -%233 = OpVariable %234 Function %226 -%223 = OpAccessChain %222 %66 %52 -OpBranch %235 -%235 = OpLabel +%225 = OpFunction %2 None %85 +%224 = OpLabel +%236 = OpVariable %114 Function %88 +%237 = OpVariable %238 Function %230 +%227 = OpAccessChain %226 %66 %52 +OpBranch %239 +%239 = OpLabel OpLine %3 78 5 -%236 = OpLoad %6 %232 -%237 = OpISub %6 %236 %88 +%240 = OpLoad %6 %236 +%241 = OpISub %6 %240 %88 OpLine %3 78 5 -OpStore %232 %237 +OpStore %236 %241 OpLine %3 81 14 -%240 = OpAccessChain %239 %223 %52 -%241 = OpLoad %50 %240 -%242 = OpFunctionCall %26 %186 %241 +%244 = OpAccessChain %243 %66 %52 %52 +%245 = OpLoad %50 %244 +%246 = OpFunctionCall %26 %190 %245 OpLine %3 82 14 OpLine %3 82 14 -%245 = OpAccessChain %244 %223 %52 %52 -%246 = OpLoad %49 %245 -%247 = OpFunctionCall %25 %190 %246 +%249 = OpAccessChain %248 %66 %52 %52 %52 +%250 = OpLoad %49 %249 +%251 = OpFunctionCall %25 %194 %250 OpLine %3 83 14 OpLine %3 83 14 OpLine %3 83 14 -%248 = OpAccessChain %121 %223 %52 %52 %52 -%249 = OpLoad %13 %248 +%252 = OpAccessChain %121 %66 %52 %52 %52 %52 +%253 = OpLoad %13 %252 OpLine %3 84 14 OpLine %3 84 14 -%250 = OpLoad %6 %232 -%251 = OpAccessChain %244 %223 %52 %52 -%252 = OpLoad %49 %251 -%253 = OpFunctionCall %25 %190 %252 -%254 = OpBitcast %4 %250 -%255 = OpFunctionCall %13 %204 %253 %254 +%254 = OpLoad %6 %236 +%255 = OpAccessChain %248 %66 %52 %52 %52 +%256 = OpLoad %49 %255 +%257 = OpFunctionCall %25 %194 %256 +%258 = OpBitcast %4 %254 +%259 = OpFunctionCall %13 %208 %257 %258 OpLine %3 85 14 OpLine %3 85 14 OpLine %3 85 14 OpLine %3 85 14 -%256 = OpAccessChain %141 %223 %52 %52 %52 %44 -%257 = OpLoad %9 %256 +%260 = OpAccessChain %143 %66 %52 %52 %52 %52 %44 +%261 = OpLoad %9 %260 OpLine %3 86 14 OpLine %3 86 14 OpLine %3 86 14 -%258 = OpLoad %6 %232 -%259 = OpAccessChain %141 %223 %52 %52 %52 %258 -%260 = OpLoad %9 %259 +%262 = OpLoad %6 %236 +%263 = OpAccessChain %143 %66 %52 %52 %52 %52 %262 +%264 = OpLoad %9 %263 OpLine %3 87 14 OpLine %3 87 14 -%261 = OpLoad %6 %232 +%265 = OpLoad %6 %236 OpLine %3 87 14 -%262 = OpAccessChain %244 %223 %52 %52 -%263 = OpLoad %49 %262 -%264 = OpFunctionCall %25 %190 %263 -%265 = OpBitcast %4 %261 -%266 = OpFunctionCall %13 %204 %264 %265 -%267 = OpCompositeExtract %9 %266 1 +%266 = OpAccessChain %248 %66 %52 %52 %52 +%267 = OpLoad %49 %266 +%268 = OpFunctionCall %25 %194 %267 +%269 = OpBitcast %4 %265 +%270 = OpFunctionCall %13 %208 %268 %269 +%271 = OpCompositeExtract %9 %270 1 OpLine %3 88 14 OpLine %3 88 14 -%268 = OpLoad %6 %232 -%269 = OpLoad %6 %232 -%270 = OpAccessChain %244 %223 %52 %52 -%271 = OpLoad %49 %270 -%272 = OpFunctionCall %25 %190 %271 -%273 = OpBitcast %4 %268 -%274 = OpFunctionCall %13 %204 %272 %273 -%275 = OpVectorExtractDynamic %9 %274 %269 +%272 = OpLoad %6 %236 +%273 = OpLoad %6 %236 +%274 = OpAccessChain %248 %66 %52 %52 %52 +%275 = OpLoad %49 %274 +%276 = OpFunctionCall %25 %194 %275 +%277 = OpBitcast %4 %272 +%278 = OpFunctionCall %13 %208 %276 %277 +%279 = OpVectorExtractDynamic %9 %278 %273 OpLine %3 90 13 OpLine %3 92 5 -%276 = OpLoad %6 %232 -%277 = OpIAdd %6 %276 %88 +%280 = OpLoad %6 %236 +%281 = OpIAdd %6 %280 %88 OpLine %3 92 5 -OpStore %232 %277 +OpStore %236 %281 OpLine %3 95 5 OpLine %3 95 5 -%279 = OpAccessChain %278 %233 %52 -OpStore %279 %225 +%283 = OpAccessChain %282 %237 %52 +OpStore %283 %229 OpLine %3 96 5 OpLine %3 96 5 OpLine %3 96 27 @@ -881,359 +885,361 @@ OpLine %3 96 43 OpLine %3 96 59 OpLine %3 96 15 OpLine %3 96 5 -%281 = OpAccessChain %280 %233 %52 %52 -OpStore %281 %231 +%285 = OpAccessChain %284 %237 %52 %52 +OpStore %285 %235 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 18 OpLine %3 97 5 -%282 = OpAccessChain %174 %233 %52 %52 %52 -OpStore %282 %106 +%286 = OpAccessChain %178 %237 %52 %52 %52 +OpStore %286 %106 OpLine %3 98 5 OpLine %3 98 5 -%283 = OpLoad %6 %232 +%287 = OpLoad %6 %236 OpLine %3 98 20 OpLine %3 98 5 -%284 = OpAccessChain %174 %233 %52 %52 %283 -OpStore %284 %108 +%288 = OpAccessChain %178 %237 %52 %52 %287 +OpStore %288 %108 OpLine %3 99 5 OpLine %3 99 5 OpLine %3 99 5 OpLine %3 99 5 OpLine %3 99 5 -%285 = OpAccessChain %28 %233 %52 %52 %52 %44 -OpStore %285 %109 +%289 = OpAccessChain %28 %237 %52 %52 %52 %44 +OpStore %289 %109 OpLine %3 100 5 OpLine %3 100 5 OpLine %3 100 5 -%286 = OpLoad %6 %232 +%290 = OpLoad %6 %236 OpLine %3 100 5 -%287 = OpAccessChain %28 %233 %52 %52 %52 %286 -OpStore %287 %110 +%291 = OpAccessChain %28 %237 %52 %52 %52 %290 +OpStore %291 %110 OpLine %3 101 5 OpLine %3 101 5 -%288 = OpLoad %6 %232 +%292 = OpLoad %6 %236 OpLine %3 101 5 OpLine %3 101 5 -%289 = OpAccessChain %28 %233 %52 %52 %288 %44 -OpStore %289 %111 +%293 = OpAccessChain %28 %237 %52 %52 %292 %44 +OpStore %293 %111 OpLine %3 102 5 OpLine %3 102 5 -%290 = OpLoad %6 %232 -%291 = OpLoad %6 %232 +%294 = OpLoad %6 %236 +%295 = OpLoad %6 %236 OpLine %3 102 5 -%292 = OpAccessChain %28 %233 %52 %52 %290 %291 -OpStore %292 %112 +%296 = OpAccessChain %28 %237 %52 %52 %294 %295 +OpStore %296 %112 OpReturn OpFunctionEnd -%295 = OpFunction %9 None %296 -%294 = OpFunctionParameter %28 -%293 = OpLabel -OpBranch %297 +%299 = OpFunction %9 None %300 +%298 = OpFunctionParameter %28 %297 = OpLabel +OpBranch %301 +%301 = OpLabel OpLine %3 105 22 -%298 = OpLoad %9 %294 -OpReturnValue %298 +%302 = OpLoad %9 %298 +OpReturnValue %302 OpFunctionEnd -%301 = OpFunction %9 None %302 -%300 = OpFunctionParameter %30 -%299 = OpLabel -OpBranch %303 +%305 = OpFunction %9 None %306 +%304 = OpFunctionParameter %30 %303 = OpLabel +OpBranch %307 +%307 = OpLabel OpLine %3 110 12 -%304 = OpCompositeExtract %29 %300 4 +%308 = OpCompositeExtract %29 %304 4 OpLine %3 110 12 -%305 = OpCompositeExtract %9 %304 9 -OpReturnValue %305 +%309 = OpCompositeExtract %9 %308 9 +OpReturnValue %309 OpFunctionEnd -%308 = OpFunction %2 None %309 -%307 = OpFunctionParameter %34 -%306 = OpLabel -OpBranch %311 -%311 = OpLabel +%312 = OpFunction %2 None %313 +%311 = OpFunctionParameter %34 +%310 = OpLabel +OpBranch %315 +%315 = OpLabel OpLine %3 159 5 -OpStore %307 %310 +OpStore %311 %314 OpReturn OpFunctionEnd -%314 = OpFunction %2 None %315 -%313 = OpFunctionParameter %36 -%312 = OpLabel -OpBranch %319 -%319 = OpLabel +%318 = OpFunction %2 None %319 +%317 = OpFunctionParameter %36 +%316 = OpLabel +OpBranch %323 +%323 = OpLabel OpLine %3 163 32 OpLine %3 163 43 OpLine %3 163 32 OpLine %3 163 12 OpLine %3 163 5 -OpStore %313 %318 +OpStore %317 %322 OpReturn OpFunctionEnd -%321 = OpFunction %2 None %85 -%320 = OpLabel -%326 = OpVariable %34 Function %322 -%327 = OpVariable %36 Function %325 -OpBranch %328 -%328 = OpLabel +%325 = OpFunction %2 None %85 +%324 = OpLabel +%330 = OpVariable %34 Function %326 +%331 = OpVariable %36 Function %329 +OpBranch %332 +%332 = OpLabel OpLine %3 168 5 -%329 = OpFunctionCall %2 %308 %326 +%333 = OpFunctionCall %2 %312 %330 OpLine %3 170 35 OpLine %3 170 46 OpLine %3 170 35 OpLine %3 170 15 OpLine %3 171 5 -%330 = OpFunctionCall %2 %314 %327 +%334 = OpFunctionCall %2 %318 %331 OpReturn OpFunctionEnd -%333 = OpFunction %4 None %334 -%332 = OpFunctionParameter %38 -%331 = OpLabel -OpBranch %335 +%337 = OpFunction %4 None %338 +%336 = OpFunctionParameter %38 %335 = OpLabel +OpBranch %339 +%339 = OpLabel OpLine %3 179 10 -%336 = OpAccessChain %34 %332 %52 -%337 = OpLoad %4 %336 -OpReturnValue %337 +%340 = OpAccessChain %34 %336 %52 +%341 = OpLoad %4 %340 +OpReturnValue %341 OpFunctionEnd -%340 = OpFunction %2 None %341 -%339 = OpFunctionParameter %38 -%338 = OpLabel -OpBranch %342 +%344 = OpFunction %2 None %345 +%343 = OpFunctionParameter %38 %342 = OpLabel +OpBranch %346 +%346 = OpLabel OpLine %3 183 3 OpLine %3 183 3 -%343 = OpAccessChain %34 %339 %52 -OpStore %343 %17 +%347 = OpAccessChain %34 %343 %52 +OpStore %347 %17 OpReturn OpFunctionEnd -%346 = OpFunction %4 None %347 -%345 = OpFunctionParameter %41 -%344 = OpLabel -OpBranch %348 +%350 = OpFunction %4 None %351 +%349 = OpFunctionParameter %41 %348 = OpLabel +OpBranch %352 +%352 = OpLabel OpLine %3 187 10 -%349 = OpAccessChain %34 %345 %44 -%350 = OpLoad %4 %349 -OpReturnValue %350 +%353 = OpAccessChain %34 %349 %44 +%354 = OpLoad %4 %353 +OpReturnValue %354 OpFunctionEnd -%353 = OpFunction %2 None %354 -%352 = OpFunctionParameter %41 -%351 = OpLabel -OpBranch %355 +%357 = OpFunction %2 None %358 +%356 = OpFunctionParameter %41 %355 = OpLabel +OpBranch %359 +%359 = OpLabel OpLine %3 191 3 OpLine %3 191 3 -%356 = OpAccessChain %34 %352 %44 -OpStore %356 %17 +%360 = OpAccessChain %34 %356 %44 +OpStore %360 %17 OpReturn OpFunctionEnd -%358 = OpFunction %2 None %85 -%357 = OpLabel -%359 = OpVariable %38 Function %360 -%361 = OpVariable %41 Function %362 -OpBranch %363 -%363 = OpLabel +%362 = OpFunction %2 None %85 +%361 = OpLabel +%363 = OpVariable %38 Function %364 +%365 = OpVariable %41 Function %366 +OpBranch %367 +%367 = OpLabel OpLine %3 196 4 -%364 = OpFunctionCall %2 %340 %359 +%368 = OpFunctionCall %2 %344 %363 OpLine %3 197 4 -%365 = OpFunctionCall %4 %333 %359 +%369 = OpFunctionCall %4 %337 %363 OpLine %3 200 4 -%366 = OpFunctionCall %2 %353 %361 +%370 = OpFunctionCall %2 %357 %365 OpLine %3 201 4 -%367 = OpFunctionCall %4 %346 %361 +%371 = OpFunctionCall %4 %350 %365 OpReturn OpFunctionEnd -%370 = OpFunction %42 None %371 -%369 = OpFunctionParameter %42 -%368 = OpLabel -%372 = OpVariable %373 Function %374 -OpBranch %375 -%375 = OpLabel +%374 = OpFunction %42 None %375 +%373 = OpFunctionParameter %42 +%372 = OpLabel +%376 = OpVariable %377 Function %378 +OpBranch %379 +%379 = OpLabel OpLine %3 205 13 -%376 = OpCompositeConstruct %43 %369 +%380 = OpCompositeConstruct %43 %373 OpLine %3 205 5 -OpStore %372 %376 +OpStore %376 %380 OpLine %3 207 12 -%378 = OpAccessChain %377 %372 %52 -%379 = OpLoad %42 %378 -OpReturnValue %379 +%382 = OpAccessChain %381 %376 %52 +%383 = OpLoad %42 %382 +OpReturnValue %383 OpFunctionEnd -%381 = OpFunction %6 None %382 -%380 = OpLabel -%385 = OpVariable %386 Function %384 -OpBranch %387 -%387 = OpLabel +%385 = OpFunction %6 None %386 +%384 = OpLabel +%389 = OpVariable %390 Function %388 +OpBranch %391 +%391 = OpLabel OpLine %3 213 16 OpLine %3 215 12 -%388 = OpAccessChain %114 %385 %52 -%389 = OpLoad %6 %388 -OpReturnValue %389 +%392 = OpAccessChain %114 %389 %52 +%393 = OpLoad %6 %392 +OpReturnValue %393 OpFunctionEnd -%391 = OpFunction %6 None %382 -%390 = OpLabel -OpBranch %393 -%393 = OpLabel +%395 = OpFunction %6 None %386 +%394 = OpLabel +OpBranch %397 +%397 = OpLabel OpLine %3 225 17 -%394 = OpCompositeExtract %46 %392 0 +%398 = OpCompositeExtract %46 %396 0 OpLine %3 226 20 -%395 = OpCompositeExtract %6 %394 0 +%399 = OpCompositeExtract %6 %398 0 OpLine %3 228 9 -%396 = OpCompositeExtract %4 %392 1 -%397 = OpBitcast %4 %395 -%398 = OpINotEqual %42 %396 %397 +%400 = OpCompositeExtract %4 %396 1 +%401 = OpBitcast %4 %399 +%402 = OpINotEqual %42 %400 %401 OpLine %3 228 5 OpLine %3 232 12 -%399 = OpCompositeExtract %46 %392 0 -%400 = OpCompositeExtract %6 %399 0 -OpReturnValue %400 +%403 = OpCompositeExtract %46 %396 0 +%404 = OpCompositeExtract %6 %403 0 +OpReturnValue %404 OpFunctionEnd -%402 = OpFunction %6 None %382 -%401 = OpLabel -%403 = OpVariable %404 Function %392 -%405 = OpVariable %406 Function %407 -%408 = OpVariable %114 Function %409 -OpBranch %410 -%410 = OpLabel +%406 = OpFunction %6 None %386 +%405 = OpLabel +%407 = OpVariable %408 Function %396 +%409 = OpVariable %410 Function %411 +%412 = OpVariable %114 Function %413 +OpBranch %414 +%414 = OpLabel OpLine %3 238 17 -%411 = OpAccessChain %406 %403 %52 -%412 = OpLoad %46 %411 +%415 = OpAccessChain %410 %407 %52 +%416 = OpLoad %46 %415 OpLine %3 238 5 -OpStore %405 %412 +OpStore %409 %416 OpLine %3 239 20 -%413 = OpAccessChain %114 %405 %52 -%414 = OpLoad %6 %413 +%417 = OpAccessChain %114 %409 %52 +%418 = OpLoad %6 %417 OpLine %3 239 5 -OpStore %408 %414 +OpStore %412 %418 OpLine %3 241 9 -%415 = OpAccessChain %34 %403 %44 -%416 = OpLoad %4 %415 -%417 = OpLoad %6 %408 -%418 = OpBitcast %4 %417 -%419 = OpINotEqual %42 %416 %418 +%419 = OpAccessChain %34 %407 %44 +%420 = OpLoad %4 %419 +%421 = OpLoad %6 %412 +%422 = OpBitcast %4 %421 +%423 = OpINotEqual %42 %420 %422 OpLine %3 241 5 OpLine %3 245 12 -%420 = OpAccessChain %114 %403 %52 %52 -%421 = OpLoad %6 %420 -OpReturnValue %421 +%424 = OpAccessChain %114 %407 %52 %52 +%425 = OpLoad %6 %424 +OpReturnValue %425 OpFunctionEnd -%428 = OpFunction %2 None %85 -%422 = OpLabel -%439 = OpVariable %28 Function %433 -%440 = OpVariable %441 Function %442 -%425 = OpLoad %4 %423 -%429 = OpAccessChain %86 %60 %52 -%431 = OpAccessChain %430 %63 %52 -%432 = OpAccessChain %222 %66 %52 -OpBranch %443 -%443 = OpLabel +%432 = OpFunction %2 None %85 +%426 = OpLabel +%443 = OpVariable %28 Function %437 +%444 = OpVariable %445 Function %446 +%429 = OpLoad %4 %427 +%433 = OpAccessChain %86 %60 %52 +%435 = OpAccessChain %434 %63 %52 +%436 = OpAccessChain %226 %66 %52 +OpBranch %447 +%447 = OpLabel OpLine %3 1 1 -%444 = OpLoad %9 %439 +%448 = OpLoad %9 %443 OpLine %3 118 5 -OpStore %439 %90 +OpStore %443 %90 OpLine %3 120 9 -%445 = OpLoad %7 %56 +%449 = OpLoad %7 %56 OpLine %3 121 5 -%446 = OpFunctionCall %2 %84 +%450 = OpFunctionCall %2 %84 OpLine %3 122 5 -%447 = OpFunctionCall %2 %221 +%451 = OpFunctionCall %2 %225 OpLine %3 125 19 -%449 = OpAccessChain %448 %58 %52 -%450 = OpLoad %10 %449 +%453 = OpAccessChain %452 %58 %52 +%454 = OpLoad %10 %453 OpLine %3 126 15 -%452 = OpAccessChain %451 %58 %40 -%453 = OpLoad %19 %452 +%456 = OpAccessChain %455 %58 %40 +%457 = OpLoad %19 %456 OpLine %3 128 13 -%456 = OpAccessChain %455 %58 %52 %434 %52 -%457 = OpLoad %9 %456 +%460 = OpAccessChain %459 %58 %52 %438 %52 +%461 = OpLoad %9 %460 OpLine %3 129 13 OpLine %3 129 22 -%459 = OpArrayLength %4 %58 5 +%463 = OpArrayLength %4 %58 5 OpLine %3 129 13 -%460 = OpISub %4 %459 %15 -%463 = OpAccessChain %462 %58 %31 %460 %52 -%464 = OpLoad %6 %463 +%464 = OpISub %4 %463 %15 +%467 = OpAccessChain %466 %58 %31 %464 %52 +%468 = OpLoad %6 %467 OpLine %3 130 13 -%465 = OpLoad %24 %431 +%469 = OpAccessChain %434 %63 %52 +%470 = OpLoad %24 %469 OpLine %3 133 56 OpLine %3 133 56 OpLine %3 134 21 -%466 = OpFunctionCall %9 %295 %439 +%471 = OpFunctionCall %9 %299 %443 OpLine %3 137 31 -%469 = OpExtInst %9 %1 FClamp %457 %467 %468 -%470 = OpConvertFToS %6 %469 +%474 = OpExtInst %9 %1 FClamp %461 %472 %473 +%475 = OpConvertFToS %6 %474 OpLine %3 137 14 -%471 = OpCompositeConstruct %33 %464 %470 %435 %436 %437 +%476 = OpCompositeConstruct %33 %468 %475 %439 %440 %441 OpLine %3 137 5 -OpStore %440 %471 +OpStore %444 %476 OpLine %3 138 5 -%472 = OpIAdd %4 %425 %44 +%477 = OpIAdd %4 %429 %44 OpLine %3 138 5 -%473 = OpAccessChain %114 %440 %472 -OpStore %473 %383 +%478 = OpAccessChain %114 %444 %477 +OpStore %478 %387 OpLine %3 139 17 -%474 = OpAccessChain %114 %440 %425 -%475 = OpLoad %6 %474 +%479 = OpAccessChain %114 %444 %429 +%480 = OpLoad %6 %479 OpLine %3 141 5 -%476 = OpFunctionCall %9 %301 %438 +%481 = OpFunctionCall %9 %305 %442 OpLine %3 143 22 -%478 = OpCompositeConstruct %477 %475 %475 %475 %475 -%479 = OpConvertSToF %32 %478 -%480 = OpMatrixTimesVector %11 %450 %479 +%483 = OpCompositeConstruct %482 %480 %480 %480 %480 +%484 = OpConvertSToF %32 %483 +%485 = OpMatrixTimesVector %11 %454 %484 OpLine %3 143 12 -%481 = OpCompositeConstruct %32 %480 %92 -OpStore %426 %481 +%486 = OpCompositeConstruct %32 %485 %92 +OpStore %430 %486 OpReturn OpFunctionEnd -%484 = OpFunction %2 None %85 -%482 = OpLabel -%485 = OpAccessChain %430 %63 %52 -OpBranch %496 -%496 = OpLabel +%489 = OpFunction %2 None %85 +%487 = OpLabel +%490 = OpAccessChain %434 %63 %52 +OpBranch %501 +%501 = OpLabel OpLine %3 149 5 OpLine %3 149 5 OpLine %3 149 5 -%497 = OpAccessChain %455 %58 %52 %44 %15 -OpStore %497 %90 +%502 = OpAccessChain %459 %58 %52 %44 %15 +OpStore %502 %90 OpLine %3 150 5 OpLine %3 150 31 OpLine %3 150 47 OpLine %3 150 63 OpLine %3 150 19 OpLine %3 150 5 -%498 = OpAccessChain %448 %58 %52 -OpStore %498 %490 +%503 = OpAccessChain %452 %58 %52 +OpStore %503 %495 OpLine %3 151 5 OpLine %3 151 35 OpLine %3 151 15 OpLine %3 151 5 -%499 = OpAccessChain %451 %58 %40 -OpStore %499 %493 +%504 = OpAccessChain %455 %58 %40 +OpStore %504 %498 OpLine %3 152 5 OpLine %3 152 5 OpLine %3 152 5 -%500 = OpAccessChain %462 %58 %31 %44 %52 -OpStore %500 %88 +%505 = OpAccessChain %466 %58 %31 %44 %52 +OpStore %505 %88 OpLine %3 153 5 -OpStore %485 %494 +%506 = OpAccessChain %434 %63 %52 +OpStore %506 %499 OpLine %3 155 12 -OpStore %483 %495 +OpStore %488 %500 OpReturn OpFunctionEnd -%502 = OpFunction %2 None %85 -%501 = OpLabel -OpBranch %504 -%504 = OpLabel +%508 = OpFunction %2 None %85 +%507 = OpLabel +OpBranch %510 +%510 = OpLabel OpLine %3 250 5 -%505 = OpFunctionCall %2 %321 +%511 = OpFunctionCall %2 %325 OpLine %3 251 5 -%506 = OpFunctionCall %2 %358 +%512 = OpFunctionCall %2 %362 OpLine %3 252 5 -%507 = OpFunctionCall %42 %370 %503 +%513 = OpFunctionCall %42 %374 %509 OpLine %3 253 5 -%508 = OpFunctionCall %6 %381 +%514 = OpFunctionCall %6 %385 OpLine %3 254 5 -%509 = OpFunctionCall %6 %391 +%515 = OpFunctionCall %6 %395 OpLine %3 255 5 -%510 = OpFunctionCall %6 %402 +%516 = OpFunctionCall %6 %406 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-array-in-ctor.spvasm b/naga/tests/out/spv/wgsl-array-in-ctor.spvasm index aca4ee682..caf9cf865 100644 --- a/naga/tests/out/spv/wgsl-array-in-ctor.spvasm +++ b/naga/tests/out/spv/wgsl-array-in-ctor.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 19 +; Bound: 20 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" @@ -32,6 +32,7 @@ OpMemberDecorate %9 0 Offset 0 %16 = OpAccessChain %14 %8 %15 OpBranch %17 %17 = OpLabel -%18 = OpLoad %7 %16 +%18 = OpAccessChain %14 %8 %15 +%19 = OpLoad %7 %18 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-atomicCompareExchange-int64.spvasm b/naga/tests/out/spv/wgsl-atomicCompareExchange-int64.spvasm index 95992b86d..7e10a9739 100644 --- a/naga/tests/out/spv/wgsl-atomicCompareExchange-int64.spvasm +++ b/naga/tests/out/spv/wgsl-atomicCompareExchange-int64.spvasm @@ -107,7 +107,7 @@ OpBranch %37 OpBranch %61 %61 = OpLabel %63 = OpLoad %3 %27 -%65 = OpAccessChain %64 %23 %63 +%65 = OpAccessChain %64 %12 %22 %63 %66 = OpAtomicLoad %4 %65 %67 %22 OpStore %29 %66 OpStore %32 %24 @@ -143,7 +143,7 @@ OpBranch %88 %91 = OpIAdd %4 %90 %25 %92 = OpLoad %3 %27 %93 = OpLoad %4 %29 -%95 = OpAccessChain %64 %23 %92 +%95 = OpAccessChain %64 %12 %22 %92 %96 = OpAtomicCompareExchange %4 %95 %67 %22 %22 %91 %93 %97 = OpIEqual %9 %96 %93 %94 = OpCompositeConstruct %10 %96 %97 @@ -207,7 +207,7 @@ OpBranch %115 OpBranch %133 %133 = OpLabel %135 = OpLoad %3 %107 -%137 = OpAccessChain %136 %105 %135 +%137 = OpAccessChain %136 %15 %22 %135 %138 = OpAtomicLoad %7 %137 %67 %22 OpStore %108 %138 OpStore %111 %24 @@ -243,7 +243,7 @@ OpBranch %158 %161 = OpIAdd %7 %160 %106 %162 = OpLoad %3 %107 %163 = OpLoad %7 %108 -%165 = OpAccessChain %136 %105 %162 +%165 = OpAccessChain %136 %15 %22 %162 %166 = OpAtomicCompareExchange %7 %165 %67 %22 %22 %161 %163 %167 = OpIEqual %9 %166 %163 %164 = OpCompositeConstruct %11 %166 %167 diff --git a/naga/tests/out/spv/wgsl-atomicCompareExchange.spvasm b/naga/tests/out/spv/wgsl-atomicCompareExchange.spvasm index 17feb7de6..5b5cd4ca6 100644 --- a/naga/tests/out/spv/wgsl-atomicCompareExchange.spvasm +++ b/naga/tests/out/spv/wgsl-atomicCompareExchange.spvasm @@ -102,7 +102,7 @@ OpBranch %37 OpBranch %61 %61 = OpLabel %63 = OpLoad %3 %27 -%65 = OpAccessChain %64 %22 %63 +%65 = OpAccessChain %64 %11 %21 %63 %66 = OpAtomicLoad %4 %65 %67 %21 OpStore %29 %66 OpStore %32 %23 @@ -140,7 +140,7 @@ OpBranch %87 %92 = OpBitcast %4 %91 %93 = OpLoad %3 %27 %94 = OpLoad %4 %29 -%96 = OpAccessChain %64 %22 %93 +%96 = OpAccessChain %64 %11 %21 %93 %97 = OpAtomicCompareExchange %4 %96 %67 %21 %21 %92 %94 %98 = OpIEqual %8 %97 %94 %95 = OpCompositeConstruct %9 %97 %98 @@ -204,7 +204,7 @@ OpBranch %114 OpBranch %132 %132 = OpLabel %134 = OpLoad %3 %107 -%136 = OpAccessChain %135 %106 %134 +%136 = OpAccessChain %135 %14 %21 %134 %137 = OpAtomicLoad %3 %136 %67 %21 OpStore %108 %137 OpStore %110 %23 @@ -242,7 +242,7 @@ OpBranch %157 %162 = OpBitcast %3 %161 %163 = OpLoad %3 %107 %164 = OpLoad %3 %108 -%166 = OpAccessChain %135 %106 %163 +%166 = OpAccessChain %135 %14 %21 %163 %167 = OpAtomicCompareExchange %3 %166 %67 %21 %21 %162 %164 %168 = OpIEqual %8 %167 %164 %165 = OpCompositeConstruct %10 %167 %168 diff --git a/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm b/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm index 340416a2a..e62b2c035 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm +++ b/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 61 +; Bound: 65 OpCapability Shader OpCapability AtomicFloat32AddEXT OpExtension "SPV_KHR_storage_buffer_storage_class" @@ -50,10 +50,10 @@ OpDecorate %19 BuiltIn LocalInvocationId %27 = OpTypePointer StorageBuffer %4 %29 = OpTypePointer StorageBuffer %7 %31 = OpConstant %3 1.5 -%34 = OpTypeInt 32 1 -%33 = OpConstant %34 1 -%35 = OpConstant %6 1 -%39 = OpConstant %6 264 +%35 = OpTypeInt 32 1 +%34 = OpConstant %35 1 +%36 = OpConstant %6 1 +%40 = OpConstant %6 264 %22 = OpFunction %2 None %23 %18 = OpLabel %21 = OpLoad %8 %19 @@ -62,36 +62,40 @@ OpDecorate %19 BuiltIn LocalInvocationId %30 = OpAccessChain %29 %15 %25 OpBranch %32 %32 = OpLabel -OpAtomicStore %26 %33 %25 %31 -%36 = OpAccessChain %24 %28 %35 -OpAtomicStore %36 %33 %25 %31 -%37 = OpAccessChain %24 %30 %25 -OpAtomicStore %37 %33 %25 %31 -%38 = OpAccessChain %24 %30 %35 %35 -OpAtomicStore %38 %33 %25 %31 -OpControlBarrier %5 %5 %39 -%40 = OpAtomicLoad %3 %26 %33 %25 -%41 = OpAccessChain %24 %28 %35 -%42 = OpAtomicLoad %3 %41 %33 %25 -%43 = OpAccessChain %24 %30 %25 -%44 = OpAtomicLoad %3 %43 %33 %25 -%45 = OpAccessChain %24 %30 %35 %35 -%46 = OpAtomicLoad %3 %45 %33 %25 -OpControlBarrier %5 %5 %39 -%47 = OpAtomicFAddEXT %3 %26 %33 %25 %31 -%49 = OpAccessChain %24 %28 %35 -%48 = OpAtomicFAddEXT %3 %49 %33 %25 %31 -%51 = OpAccessChain %24 %30 %25 -%50 = OpAtomicFAddEXT %3 %51 %33 %25 %31 -%53 = OpAccessChain %24 %30 %35 %35 -%52 = OpAtomicFAddEXT %3 %53 %33 %25 %31 -OpControlBarrier %5 %5 %39 -%54 = OpAtomicExchange %3 %26 %33 %25 %31 -%56 = OpAccessChain %24 %28 %35 -%55 = OpAtomicExchange %3 %56 %33 %25 %31 -%58 = OpAccessChain %24 %30 %25 -%57 = OpAtomicExchange %3 %58 %33 %25 %31 -%60 = OpAccessChain %24 %30 %35 %35 -%59 = OpAtomicExchange %3 %60 %33 %25 %31 +%33 = OpAccessChain %24 %9 %25 +OpAtomicStore %33 %34 %25 %31 +%37 = OpAccessChain %24 %12 %25 %36 +OpAtomicStore %37 %34 %25 %31 +%38 = OpAccessChain %24 %15 %25 %25 +OpAtomicStore %38 %34 %25 %31 +%39 = OpAccessChain %24 %15 %25 %36 %36 +OpAtomicStore %39 %34 %25 %31 +OpControlBarrier %5 %5 %40 +%41 = OpAccessChain %24 %9 %25 +%42 = OpAtomicLoad %3 %41 %34 %25 +%43 = OpAccessChain %24 %12 %25 %36 +%44 = OpAtomicLoad %3 %43 %34 %25 +%45 = OpAccessChain %24 %15 %25 %25 +%46 = OpAtomicLoad %3 %45 %34 %25 +%47 = OpAccessChain %24 %15 %25 %36 %36 +%48 = OpAtomicLoad %3 %47 %34 %25 +OpControlBarrier %5 %5 %40 +%50 = OpAccessChain %24 %9 %25 +%49 = OpAtomicFAddEXT %3 %50 %34 %25 %31 +%52 = OpAccessChain %24 %12 %25 %36 +%51 = OpAtomicFAddEXT %3 %52 %34 %25 %31 +%54 = OpAccessChain %24 %15 %25 %25 +%53 = OpAtomicFAddEXT %3 %54 %34 %25 %31 +%56 = OpAccessChain %24 %15 %25 %36 %36 +%55 = OpAtomicFAddEXT %3 %56 %34 %25 %31 +OpControlBarrier %5 %5 %40 +%58 = OpAccessChain %24 %9 %25 +%57 = OpAtomicExchange %3 %58 %34 %25 %31 +%60 = OpAccessChain %24 %12 %25 %36 +%59 = OpAtomicExchange %3 %60 %34 %25 %31 +%62 = OpAccessChain %24 %15 %25 %25 +%61 = OpAtomicExchange %3 %62 %34 %25 %31 +%64 = OpAccessChain %24 %15 %25 %36 %36 +%63 = OpAtomicExchange %3 %64 %34 %25 %31 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm.glsl b/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm.glsl index e704a9fb8..0a370878e 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-atomicOps-float32.spvasm.glsl @@ -30,19 +30,19 @@ void main() atomicExchange(_15._m0._m0, 1.5); atomicExchange(_15._m0._m1[1u], 1.5); barrier(); - float _40 = atomicAdd(_9._m0, 0); - float _42 = atomicAdd(_12._m0[1u], 0); - float _44 = atomicAdd(_15._m0._m0, 0); - float _46 = atomicAdd(_15._m0._m1[1u], 0); + float _42 = atomicAdd(_9._m0, 0); + float _44 = atomicAdd(_12._m0[1u], 0); + float _46 = atomicAdd(_15._m0._m0, 0); + float _48 = atomicAdd(_15._m0._m1[1u], 0); barrier(); - float _47 = atomicAdd(_9._m0, 1.5); - float _48 = atomicAdd(_12._m0[1u], 1.5); - float _50 = atomicAdd(_15._m0._m0, 1.5); - float _52 = atomicAdd(_15._m0._m1[1u], 1.5); + float _49 = atomicAdd(_9._m0, 1.5); + float _51 = atomicAdd(_12._m0[1u], 1.5); + float _53 = atomicAdd(_15._m0._m0, 1.5); + float _55 = atomicAdd(_15._m0._m1[1u], 1.5); barrier(); - float _54 = atomicExchange(_9._m0, 1.5); - float _55 = atomicExchange(_12._m0[1u], 1.5); - float _57 = atomicExchange(_15._m0._m0, 1.5); - float _59 = atomicExchange(_15._m0._m1[1u], 1.5); + float _57 = atomicExchange(_9._m0, 1.5); + float _59 = atomicExchange(_12._m0[1u], 1.5); + float _61 = atomicExchange(_15._m0._m0, 1.5); + float _63 = atomicExchange(_15._m0._m1[1u], 1.5); } diff --git a/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm b/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm index be00b79dd..91f82a7ea 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm +++ b/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 66 +; Bound: 72 OpCapability Shader OpCapability Int64 OpCapability Int64Atomics @@ -58,10 +58,10 @@ OpDecorate %22 BuiltIn LocalInvocationId %32 = OpTypePointer StorageBuffer %7 %34 = OpTypePointer Uniform %3 %36 = OpConstant %3 1 -%41 = OpTypeInt 32 1 -%40 = OpConstant %41 1 -%45 = OpConstant %6 1 -%53 = OpConstant %6 264 +%43 = OpTypeInt 32 1 +%42 = OpConstant %43 1 +%48 = OpConstant %6 1 +%56 = OpConstant %6 264 %25 = OpFunction %2 None %26 %21 = OpLabel %24 = OpLoad %8 %22 @@ -71,30 +71,36 @@ OpDecorate %22 BuiltIn LocalInvocationId %35 = OpAccessChain %34 %18 %28 OpBranch %37 %37 = OpLabel -%38 = OpLoad %3 %35 -%39 = OpAtomicUMax %3 %29 %40 %28 %38 -%42 = OpLoad %3 %35 -%43 = OpIAdd %3 %36 %42 -%46 = OpAccessChain %27 %31 %45 -%44 = OpAtomicUMax %3 %46 %40 %28 %43 -%48 = OpAccessChain %27 %33 %28 -%47 = OpAtomicUMax %3 %48 %40 %28 %36 -%49 = OpCompositeExtract %6 %24 0 -%50 = OpUConvert %3 %49 -%52 = OpAccessChain %27 %33 %45 %45 -%51 = OpAtomicUMax %3 %52 %40 %28 %50 -OpControlBarrier %5 %5 %53 -%54 = OpLoad %3 %35 -%55 = OpAtomicUMin %3 %29 %40 %28 %54 -%56 = OpLoad %3 %35 -%57 = OpIAdd %3 %36 %56 -%59 = OpAccessChain %27 %31 %45 -%58 = OpAtomicUMin %3 %59 %40 %28 %57 -%61 = OpAccessChain %27 %33 %28 -%60 = OpAtomicUMin %3 %61 %40 %28 %36 -%62 = OpCompositeExtract %6 %24 0 -%63 = OpUConvert %3 %62 -%65 = OpAccessChain %27 %33 %45 %45 -%64 = OpAtomicUMin %3 %65 %40 %28 %63 +%38 = OpAccessChain %34 %18 %28 +%39 = OpLoad %3 %38 +%41 = OpAccessChain %27 %9 %28 +%40 = OpAtomicUMax %3 %41 %42 %28 %39 +%44 = OpAccessChain %34 %18 %28 +%45 = OpLoad %3 %44 +%46 = OpIAdd %3 %36 %45 +%49 = OpAccessChain %27 %12 %28 %48 +%47 = OpAtomicUMax %3 %49 %42 %28 %46 +%51 = OpAccessChain %27 %15 %28 %28 +%50 = OpAtomicUMax %3 %51 %42 %28 %36 +%52 = OpCompositeExtract %6 %24 0 +%53 = OpUConvert %3 %52 +%55 = OpAccessChain %27 %15 %28 %48 %48 +%54 = OpAtomicUMax %3 %55 %42 %28 %53 +OpControlBarrier %5 %5 %56 +%57 = OpAccessChain %34 %18 %28 +%58 = OpLoad %3 %57 +%60 = OpAccessChain %27 %9 %28 +%59 = OpAtomicUMin %3 %60 %42 %28 %58 +%61 = OpAccessChain %34 %18 %28 +%62 = OpLoad %3 %61 +%63 = OpIAdd %3 %36 %62 +%65 = OpAccessChain %27 %12 %28 %48 +%64 = OpAtomicUMin %3 %65 %42 %28 %63 +%67 = OpAccessChain %27 %15 %28 %28 +%66 = OpAtomicUMin %3 %67 %42 %28 %36 +%68 = OpCompositeExtract %6 %24 0 +%69 = OpUConvert %3 %68 +%71 = OpAccessChain %27 %15 %28 %48 %48 +%70 = OpAtomicUMin %3 %71 %42 %28 %69 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm.glsl b/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm.glsl index c2926e805..0dc8b0a32 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-atomicOps-int64-min-max.spvasm.glsl @@ -35,14 +35,14 @@ layout(set = 0, binding = 3, std140) uniform _19_18 void main() { - uint64_t _39 = atomicMax(_9._m0, _18._m0); - uint64_t _44 = atomicMax(_12._m0[1u], 1ul + _18._m0); - uint64_t _47 = atomicMax(_15._m0._m0, 1ul); - uint64_t _51 = atomicMax(_15._m0._m1[1u], uint64_t(gl_LocalInvocationID.x)); + uint64_t _40 = atomicMax(_9._m0, _18._m0); + uint64_t _47 = atomicMax(_12._m0[1u], 1ul + _18._m0); + uint64_t _50 = atomicMax(_15._m0._m0, 1ul); + uint64_t _54 = atomicMax(_15._m0._m1[1u], uint64_t(gl_LocalInvocationID.x)); barrier(); - uint64_t _55 = atomicMin(_9._m0, _18._m0); - uint64_t _58 = atomicMin(_12._m0[1u], 1ul + _18._m0); - uint64_t _60 = atomicMin(_15._m0._m0, 1ul); - uint64_t _64 = atomicMin(_15._m0._m1[1u], uint64_t(gl_LocalInvocationID.x)); + uint64_t _59 = atomicMin(_9._m0, _18._m0); + uint64_t _64 = atomicMin(_12._m0[1u], 1ul + _18._m0); + uint64_t _66 = atomicMin(_15._m0._m0, 1ul); + uint64_t _70 = atomicMin(_15._m0._m1[1u], uint64_t(gl_LocalInvocationID.x)); } diff --git a/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm b/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm index 678c70a71..8061c2ea3 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm +++ b/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 225 +; Bound: 236 OpCapability Shader OpCapability Int64 OpCapability Int64Atomics @@ -74,12 +74,12 @@ OpDecorate %49 BuiltIn LocalInvocationIndex %50 = OpTypePointer Input %7 %49 = OpVariable %50 Input %55 = OpConstant %7 264 -%58 = OpTypeInt 32 1 -%57 = OpConstant %58 1 -%59 = OpTypePointer StorageBuffer %4 -%60 = OpConstant %7 1 -%64 = OpConstant %58 2 -%65 = OpTypePointer Workgroup %4 +%59 = OpTypeInt 32 1 +%58 = OpConstant %59 1 +%60 = OpTypePointer StorageBuffer %4 +%61 = OpConstant %7 1 +%65 = OpConstant %59 2 +%66 = OpTypePointer Workgroup %4 %32 = OpFunction %2 None %33 %28 = OpLabel %31 = OpLoad %9 %29 @@ -101,183 +101,194 @@ OpBranch %53 OpControlBarrier %6 %6 %55 OpBranch %56 %56 = OpLabel -OpAtomicStore %36 %57 %35 %41 -%61 = OpAccessChain %59 %38 %60 -OpAtomicStore %61 %57 %35 %42 -%62 = OpAccessChain %34 %40 %35 -OpAtomicStore %62 %57 %35 %41 -%63 = OpAccessChain %59 %40 %60 %60 -OpAtomicStore %63 %57 %35 %42 -OpAtomicStore %22 %64 %35 %41 -%66 = OpAccessChain %65 %24 %60 -OpAtomicStore %66 %64 %35 %42 -%67 = OpAccessChain %23 %26 %35 -OpAtomicStore %67 %64 %35 %41 -%68 = OpAccessChain %65 %26 %60 %60 -OpAtomicStore %68 %64 %35 %42 +%57 = OpAccessChain %34 %13 %35 +OpAtomicStore %57 %58 %35 %41 +%62 = OpAccessChain %60 %16 %35 %61 +OpAtomicStore %62 %58 %35 %42 +%63 = OpAccessChain %34 %19 %35 %35 +OpAtomicStore %63 %58 %35 %41 +%64 = OpAccessChain %60 %19 %35 %61 %61 +OpAtomicStore %64 %58 %35 %42 +OpAtomicStore %22 %65 %35 %41 +%67 = OpAccessChain %66 %24 %61 +OpAtomicStore %67 %65 %35 %42 +%68 = OpAccessChain %23 %26 %35 +OpAtomicStore %68 %65 %35 %41 +%69 = OpAccessChain %66 %26 %61 %61 +OpAtomicStore %69 %65 %35 %42 OpControlBarrier %6 %6 %55 -%69 = OpAtomicLoad %3 %36 %57 %35 -%70 = OpAccessChain %59 %38 %60 -%71 = OpAtomicLoad %4 %70 %57 %35 -%72 = OpAccessChain %34 %40 %35 -%73 = OpAtomicLoad %3 %72 %57 %35 -%74 = OpAccessChain %59 %40 %60 %60 -%75 = OpAtomicLoad %4 %74 %57 %35 -%76 = OpAtomicLoad %3 %22 %64 %35 -%77 = OpAccessChain %65 %24 %60 -%78 = OpAtomicLoad %4 %77 %64 %35 -%79 = OpAccessChain %23 %26 %35 -%80 = OpAtomicLoad %3 %79 %64 %35 -%81 = OpAccessChain %65 %26 %60 %60 -%82 = OpAtomicLoad %4 %81 %64 %35 +%70 = OpAccessChain %34 %13 %35 +%71 = OpAtomicLoad %3 %70 %58 %35 +%72 = OpAccessChain %60 %16 %35 %61 +%73 = OpAtomicLoad %4 %72 %58 %35 +%74 = OpAccessChain %34 %19 %35 %35 +%75 = OpAtomicLoad %3 %74 %58 %35 +%76 = OpAccessChain %60 %19 %35 %61 %61 +%77 = OpAtomicLoad %4 %76 %58 %35 +%78 = OpAtomicLoad %3 %22 %65 %35 +%79 = OpAccessChain %66 %24 %61 +%80 = OpAtomicLoad %4 %79 %65 %35 +%81 = OpAccessChain %23 %26 %35 +%82 = OpAtomicLoad %3 %81 %65 %35 +%83 = OpAccessChain %66 %26 %61 %61 +%84 = OpAtomicLoad %4 %83 %65 %35 OpControlBarrier %6 %6 %55 -%83 = OpAtomicIAdd %3 %36 %57 %35 %41 -%85 = OpAccessChain %59 %38 %60 -%84 = OpAtomicIAdd %4 %85 %57 %35 %42 -%87 = OpAccessChain %34 %40 %35 -%86 = OpAtomicIAdd %3 %87 %57 %35 %41 -%89 = OpAccessChain %59 %40 %60 %60 -%88 = OpAtomicIAdd %4 %89 %57 %35 %42 -%90 = OpAtomicIAdd %3 %22 %64 %35 %41 -%92 = OpAccessChain %65 %24 %60 -%91 = OpAtomicIAdd %4 %92 %64 %35 %42 -%94 = OpAccessChain %23 %26 %35 -%93 = OpAtomicIAdd %3 %94 %64 %35 %41 -%96 = OpAccessChain %65 %26 %60 %60 -%95 = OpAtomicIAdd %4 %96 %64 %35 %42 +%86 = OpAccessChain %34 %13 %35 +%85 = OpAtomicIAdd %3 %86 %58 %35 %41 +%88 = OpAccessChain %60 %16 %35 %61 +%87 = OpAtomicIAdd %4 %88 %58 %35 %42 +%90 = OpAccessChain %34 %19 %35 %35 +%89 = OpAtomicIAdd %3 %90 %58 %35 %41 +%92 = OpAccessChain %60 %19 %35 %61 %61 +%91 = OpAtomicIAdd %4 %92 %58 %35 %42 +%93 = OpAtomicIAdd %3 %22 %65 %35 %41 +%95 = OpAccessChain %66 %24 %61 +%94 = OpAtomicIAdd %4 %95 %65 %35 %42 +%97 = OpAccessChain %23 %26 %35 +%96 = OpAtomicIAdd %3 %97 %65 %35 %41 +%99 = OpAccessChain %66 %26 %61 %61 +%98 = OpAtomicIAdd %4 %99 %65 %35 %42 OpControlBarrier %6 %6 %55 -%97 = OpAtomicISub %3 %36 %57 %35 %41 -%99 = OpAccessChain %59 %38 %60 -%98 = OpAtomicISub %4 %99 %57 %35 %42 -%101 = OpAccessChain %34 %40 %35 -%100 = OpAtomicISub %3 %101 %57 %35 %41 -%103 = OpAccessChain %59 %40 %60 %60 -%102 = OpAtomicISub %4 %103 %57 %35 %42 -%104 = OpAtomicISub %3 %22 %64 %35 %41 -%106 = OpAccessChain %65 %24 %60 -%105 = OpAtomicISub %4 %106 %64 %35 %42 -%108 = OpAccessChain %23 %26 %35 -%107 = OpAtomicISub %3 %108 %64 %35 %41 -%110 = OpAccessChain %65 %26 %60 %60 -%109 = OpAtomicISub %4 %110 %64 %35 %42 +%101 = OpAccessChain %34 %13 %35 +%100 = OpAtomicISub %3 %101 %58 %35 %41 +%103 = OpAccessChain %60 %16 %35 %61 +%102 = OpAtomicISub %4 %103 %58 %35 %42 +%105 = OpAccessChain %34 %19 %35 %35 +%104 = OpAtomicISub %3 %105 %58 %35 %41 +%107 = OpAccessChain %60 %19 %35 %61 %61 +%106 = OpAtomicISub %4 %107 %58 %35 %42 +%108 = OpAtomicISub %3 %22 %65 %35 %41 +%110 = OpAccessChain %66 %24 %61 +%109 = OpAtomicISub %4 %110 %65 %35 %42 +%112 = OpAccessChain %23 %26 %35 +%111 = OpAtomicISub %3 %112 %65 %35 %41 +%114 = OpAccessChain %66 %26 %61 %61 +%113 = OpAtomicISub %4 %114 %65 %35 %42 OpControlBarrier %6 %6 %55 -%111 = OpAtomicUMax %3 %36 %57 %35 %41 -%113 = OpAccessChain %59 %38 %60 -%112 = OpAtomicSMax %4 %113 %57 %35 %42 -%115 = OpAccessChain %34 %40 %35 -%114 = OpAtomicUMax %3 %115 %57 %35 %41 -%117 = OpAccessChain %59 %40 %60 %60 -%116 = OpAtomicSMax %4 %117 %57 %35 %42 -%118 = OpAtomicUMax %3 %22 %64 %35 %41 -%120 = OpAccessChain %65 %24 %60 -%119 = OpAtomicSMax %4 %120 %64 %35 %42 -%122 = OpAccessChain %23 %26 %35 -%121 = OpAtomicUMax %3 %122 %64 %35 %41 -%124 = OpAccessChain %65 %26 %60 %60 -%123 = OpAtomicSMax %4 %124 %64 %35 %42 +%116 = OpAccessChain %34 %13 %35 +%115 = OpAtomicUMax %3 %116 %58 %35 %41 +%118 = OpAccessChain %60 %16 %35 %61 +%117 = OpAtomicSMax %4 %118 %58 %35 %42 +%120 = OpAccessChain %34 %19 %35 %35 +%119 = OpAtomicUMax %3 %120 %58 %35 %41 +%122 = OpAccessChain %60 %19 %35 %61 %61 +%121 = OpAtomicSMax %4 %122 %58 %35 %42 +%123 = OpAtomicUMax %3 %22 %65 %35 %41 +%125 = OpAccessChain %66 %24 %61 +%124 = OpAtomicSMax %4 %125 %65 %35 %42 +%127 = OpAccessChain %23 %26 %35 +%126 = OpAtomicUMax %3 %127 %65 %35 %41 +%129 = OpAccessChain %66 %26 %61 %61 +%128 = OpAtomicSMax %4 %129 %65 %35 %42 OpControlBarrier %6 %6 %55 -%125 = OpAtomicUMin %3 %36 %57 %35 %41 -%127 = OpAccessChain %59 %38 %60 -%126 = OpAtomicSMin %4 %127 %57 %35 %42 -%129 = OpAccessChain %34 %40 %35 -%128 = OpAtomicUMin %3 %129 %57 %35 %41 -%131 = OpAccessChain %59 %40 %60 %60 -%130 = OpAtomicSMin %4 %131 %57 %35 %42 -%132 = OpAtomicUMin %3 %22 %64 %35 %41 -%134 = OpAccessChain %65 %24 %60 -%133 = OpAtomicSMin %4 %134 %64 %35 %42 -%136 = OpAccessChain %23 %26 %35 -%135 = OpAtomicUMin %3 %136 %64 %35 %41 -%138 = OpAccessChain %65 %26 %60 %60 -%137 = OpAtomicSMin %4 %138 %64 %35 %42 +%131 = OpAccessChain %34 %13 %35 +%130 = OpAtomicUMin %3 %131 %58 %35 %41 +%133 = OpAccessChain %60 %16 %35 %61 +%132 = OpAtomicSMin %4 %133 %58 %35 %42 +%135 = OpAccessChain %34 %19 %35 %35 +%134 = OpAtomicUMin %3 %135 %58 %35 %41 +%137 = OpAccessChain %60 %19 %35 %61 %61 +%136 = OpAtomicSMin %4 %137 %58 %35 %42 +%138 = OpAtomicUMin %3 %22 %65 %35 %41 +%140 = OpAccessChain %66 %24 %61 +%139 = OpAtomicSMin %4 %140 %65 %35 %42 +%142 = OpAccessChain %23 %26 %35 +%141 = OpAtomicUMin %3 %142 %65 %35 %41 +%144 = OpAccessChain %66 %26 %61 %61 +%143 = OpAtomicSMin %4 %144 %65 %35 %42 OpControlBarrier %6 %6 %55 -%139 = OpAtomicAnd %3 %36 %57 %35 %41 -%141 = OpAccessChain %59 %38 %60 -%140 = OpAtomicAnd %4 %141 %57 %35 %42 -%143 = OpAccessChain %34 %40 %35 -%142 = OpAtomicAnd %3 %143 %57 %35 %41 -%145 = OpAccessChain %59 %40 %60 %60 -%144 = OpAtomicAnd %4 %145 %57 %35 %42 -%146 = OpAtomicAnd %3 %22 %64 %35 %41 -%148 = OpAccessChain %65 %24 %60 -%147 = OpAtomicAnd %4 %148 %64 %35 %42 -%150 = OpAccessChain %23 %26 %35 -%149 = OpAtomicAnd %3 %150 %64 %35 %41 -%152 = OpAccessChain %65 %26 %60 %60 -%151 = OpAtomicAnd %4 %152 %64 %35 %42 +%146 = OpAccessChain %34 %13 %35 +%145 = OpAtomicAnd %3 %146 %58 %35 %41 +%148 = OpAccessChain %60 %16 %35 %61 +%147 = OpAtomicAnd %4 %148 %58 %35 %42 +%150 = OpAccessChain %34 %19 %35 %35 +%149 = OpAtomicAnd %3 %150 %58 %35 %41 +%152 = OpAccessChain %60 %19 %35 %61 %61 +%151 = OpAtomicAnd %4 %152 %58 %35 %42 +%153 = OpAtomicAnd %3 %22 %65 %35 %41 +%155 = OpAccessChain %66 %24 %61 +%154 = OpAtomicAnd %4 %155 %65 %35 %42 +%157 = OpAccessChain %23 %26 %35 +%156 = OpAtomicAnd %3 %157 %65 %35 %41 +%159 = OpAccessChain %66 %26 %61 %61 +%158 = OpAtomicAnd %4 %159 %65 %35 %42 OpControlBarrier %6 %6 %55 -%153 = OpAtomicOr %3 %36 %57 %35 %41 -%155 = OpAccessChain %59 %38 %60 -%154 = OpAtomicOr %4 %155 %57 %35 %42 -%157 = OpAccessChain %34 %40 %35 -%156 = OpAtomicOr %3 %157 %57 %35 %41 -%159 = OpAccessChain %59 %40 %60 %60 -%158 = OpAtomicOr %4 %159 %57 %35 %42 -%160 = OpAtomicOr %3 %22 %64 %35 %41 -%162 = OpAccessChain %65 %24 %60 -%161 = OpAtomicOr %4 %162 %64 %35 %42 -%164 = OpAccessChain %23 %26 %35 -%163 = OpAtomicOr %3 %164 %64 %35 %41 -%166 = OpAccessChain %65 %26 %60 %60 -%165 = OpAtomicOr %4 %166 %64 %35 %42 +%161 = OpAccessChain %34 %13 %35 +%160 = OpAtomicOr %3 %161 %58 %35 %41 +%163 = OpAccessChain %60 %16 %35 %61 +%162 = OpAtomicOr %4 %163 %58 %35 %42 +%165 = OpAccessChain %34 %19 %35 %35 +%164 = OpAtomicOr %3 %165 %58 %35 %41 +%167 = OpAccessChain %60 %19 %35 %61 %61 +%166 = OpAtomicOr %4 %167 %58 %35 %42 +%168 = OpAtomicOr %3 %22 %65 %35 %41 +%170 = OpAccessChain %66 %24 %61 +%169 = OpAtomicOr %4 %170 %65 %35 %42 +%172 = OpAccessChain %23 %26 %35 +%171 = OpAtomicOr %3 %172 %65 %35 %41 +%174 = OpAccessChain %66 %26 %61 %61 +%173 = OpAtomicOr %4 %174 %65 %35 %42 OpControlBarrier %6 %6 %55 -%167 = OpAtomicXor %3 %36 %57 %35 %41 -%169 = OpAccessChain %59 %38 %60 -%168 = OpAtomicXor %4 %169 %57 %35 %42 -%171 = OpAccessChain %34 %40 %35 -%170 = OpAtomicXor %3 %171 %57 %35 %41 -%173 = OpAccessChain %59 %40 %60 %60 -%172 = OpAtomicXor %4 %173 %57 %35 %42 -%174 = OpAtomicXor %3 %22 %64 %35 %41 -%176 = OpAccessChain %65 %24 %60 -%175 = OpAtomicXor %4 %176 %64 %35 %42 -%178 = OpAccessChain %23 %26 %35 -%177 = OpAtomicXor %3 %178 %64 %35 %41 -%180 = OpAccessChain %65 %26 %60 %60 -%179 = OpAtomicXor %4 %180 %64 %35 %42 -%181 = OpAtomicExchange %3 %36 %57 %35 %41 -%183 = OpAccessChain %59 %38 %60 -%182 = OpAtomicExchange %4 %183 %57 %35 %42 -%185 = OpAccessChain %34 %40 %35 -%184 = OpAtomicExchange %3 %185 %57 %35 %41 -%187 = OpAccessChain %59 %40 %60 %60 -%186 = OpAtomicExchange %4 %187 %57 %35 %42 -%188 = OpAtomicExchange %3 %22 %64 %35 %41 -%190 = OpAccessChain %65 %24 %60 -%189 = OpAtomicExchange %4 %190 %64 %35 %42 -%192 = OpAccessChain %23 %26 %35 -%191 = OpAtomicExchange %3 %192 %64 %35 %41 -%194 = OpAccessChain %65 %26 %60 %60 -%193 = OpAtomicExchange %4 %194 %64 %35 %42 -%196 = OpAtomicCompareExchange %3 %36 %57 %35 %35 %43 %41 -%197 = OpIEqual %10 %196 %41 -%195 = OpCompositeConstruct %11 %196 %197 -%199 = OpAccessChain %59 %38 %60 -%200 = OpAtomicCompareExchange %4 %199 %57 %35 %35 %44 %42 -%201 = OpIEqual %10 %200 %42 -%198 = OpCompositeConstruct %12 %200 %201 -%203 = OpAccessChain %34 %40 %35 -%204 = OpAtomicCompareExchange %3 %203 %57 %35 %35 %43 %41 -%205 = OpIEqual %10 %204 %41 -%202 = OpCompositeConstruct %11 %204 %205 -%207 = OpAccessChain %59 %40 %60 %60 -%208 = OpAtomicCompareExchange %4 %207 %57 %35 %35 %44 %42 -%209 = OpIEqual %10 %208 %42 -%206 = OpCompositeConstruct %12 %208 %209 -%211 = OpAtomicCompareExchange %3 %22 %64 %35 %35 %43 %41 -%212 = OpIEqual %10 %211 %41 -%210 = OpCompositeConstruct %11 %211 %212 -%214 = OpAccessChain %65 %24 %60 -%215 = OpAtomicCompareExchange %4 %214 %64 %35 %35 %44 %42 -%216 = OpIEqual %10 %215 %42 -%213 = OpCompositeConstruct %12 %215 %216 -%218 = OpAccessChain %23 %26 %35 -%219 = OpAtomicCompareExchange %3 %218 %64 %35 %35 %43 %41 -%220 = OpIEqual %10 %219 %41 -%217 = OpCompositeConstruct %11 %219 %220 -%222 = OpAccessChain %65 %26 %60 %60 -%223 = OpAtomicCompareExchange %4 %222 %64 %35 %35 %44 %42 -%224 = OpIEqual %10 %223 %42 -%221 = OpCompositeConstruct %12 %223 %224 +%176 = OpAccessChain %34 %13 %35 +%175 = OpAtomicXor %3 %176 %58 %35 %41 +%178 = OpAccessChain %60 %16 %35 %61 +%177 = OpAtomicXor %4 %178 %58 %35 %42 +%180 = OpAccessChain %34 %19 %35 %35 +%179 = OpAtomicXor %3 %180 %58 %35 %41 +%182 = OpAccessChain %60 %19 %35 %61 %61 +%181 = OpAtomicXor %4 %182 %58 %35 %42 +%183 = OpAtomicXor %3 %22 %65 %35 %41 +%185 = OpAccessChain %66 %24 %61 +%184 = OpAtomicXor %4 %185 %65 %35 %42 +%187 = OpAccessChain %23 %26 %35 +%186 = OpAtomicXor %3 %187 %65 %35 %41 +%189 = OpAccessChain %66 %26 %61 %61 +%188 = OpAtomicXor %4 %189 %65 %35 %42 +%191 = OpAccessChain %34 %13 %35 +%190 = OpAtomicExchange %3 %191 %58 %35 %41 +%193 = OpAccessChain %60 %16 %35 %61 +%192 = OpAtomicExchange %4 %193 %58 %35 %42 +%195 = OpAccessChain %34 %19 %35 %35 +%194 = OpAtomicExchange %3 %195 %58 %35 %41 +%197 = OpAccessChain %60 %19 %35 %61 %61 +%196 = OpAtomicExchange %4 %197 %58 %35 %42 +%198 = OpAtomicExchange %3 %22 %65 %35 %41 +%200 = OpAccessChain %66 %24 %61 +%199 = OpAtomicExchange %4 %200 %65 %35 %42 +%202 = OpAccessChain %23 %26 %35 +%201 = OpAtomicExchange %3 %202 %65 %35 %41 +%204 = OpAccessChain %66 %26 %61 %61 +%203 = OpAtomicExchange %4 %204 %65 %35 %42 +%206 = OpAccessChain %34 %13 %35 +%207 = OpAtomicCompareExchange %3 %206 %58 %35 %35 %43 %41 +%208 = OpIEqual %10 %207 %41 +%205 = OpCompositeConstruct %11 %207 %208 +%210 = OpAccessChain %60 %16 %35 %61 +%211 = OpAtomicCompareExchange %4 %210 %58 %35 %35 %44 %42 +%212 = OpIEqual %10 %211 %42 +%209 = OpCompositeConstruct %12 %211 %212 +%214 = OpAccessChain %34 %19 %35 %35 +%215 = OpAtomicCompareExchange %3 %214 %58 %35 %35 %43 %41 +%216 = OpIEqual %10 %215 %41 +%213 = OpCompositeConstruct %11 %215 %216 +%218 = OpAccessChain %60 %19 %35 %61 %61 +%219 = OpAtomicCompareExchange %4 %218 %58 %35 %35 %44 %42 +%220 = OpIEqual %10 %219 %42 +%217 = OpCompositeConstruct %12 %219 %220 +%222 = OpAtomicCompareExchange %3 %22 %65 %35 %35 %43 %41 +%223 = OpIEqual %10 %222 %41 +%221 = OpCompositeConstruct %11 %222 %223 +%225 = OpAccessChain %66 %24 %61 +%226 = OpAtomicCompareExchange %4 %225 %65 %35 %35 %44 %42 +%227 = OpIEqual %10 %226 %42 +%224 = OpCompositeConstruct %12 %226 %227 +%229 = OpAccessChain %23 %26 %35 +%230 = OpAtomicCompareExchange %3 %229 %65 %35 %35 %43 %41 +%231 = OpIEqual %10 %230 %41 +%228 = OpCompositeConstruct %11 %230 %231 +%233 = OpAccessChain %66 %26 %61 %61 +%234 = OpAtomicCompareExchange %4 %233 %65 %35 %35 %44 %42 +%235 = OpIEqual %10 %234 %42 +%232 = OpCompositeConstruct %12 %234 %235 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm.glsl b/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm.glsl index 6380cebc2..d31d88ca1 100644 --- a/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-atomicOps-int64.spvasm.glsl @@ -62,92 +62,92 @@ void main() atomicExchange(_26._m0, 1ul); atomicExchange(_26._m1[1u], 1l); barrier(); - uint64_t _69 = atomicAdd(_13._m0, 0); - int64_t _71 = atomicAdd(_16._m0[1u], 0); - uint64_t _73 = atomicAdd(_19._m0._m0, 0); - int64_t _75 = atomicAdd(_19._m0._m1[1u], 0); - uint64_t _76 = atomicAdd(_22, 0); - int64_t _78 = atomicAdd(_24[1u], 0); - uint64_t _80 = atomicAdd(_26._m0, 0); - int64_t _82 = atomicAdd(_26._m1[1u], 0); + uint64_t _71 = atomicAdd(_13._m0, 0); + int64_t _73 = atomicAdd(_16._m0[1u], 0); + uint64_t _75 = atomicAdd(_19._m0._m0, 0); + int64_t _77 = atomicAdd(_19._m0._m1[1u], 0); + uint64_t _78 = atomicAdd(_22, 0); + int64_t _80 = atomicAdd(_24[1u], 0); + uint64_t _82 = atomicAdd(_26._m0, 0); + int64_t _84 = atomicAdd(_26._m1[1u], 0); barrier(); - uint64_t _83 = atomicAdd(_13._m0, 1ul); - int64_t _84 = atomicAdd(_16._m0[1u], 1l); - uint64_t _86 = atomicAdd(_19._m0._m0, 1ul); - int64_t _88 = atomicAdd(_19._m0._m1[1u], 1l); - uint64_t _90 = atomicAdd(_22, 1ul); - int64_t _91 = atomicAdd(_24[1u], 1l); - uint64_t _93 = atomicAdd(_26._m0, 1ul); - int64_t _95 = atomicAdd(_26._m1[1u], 1l); + uint64_t _85 = atomicAdd(_13._m0, 1ul); + int64_t _87 = atomicAdd(_16._m0[1u], 1l); + uint64_t _89 = atomicAdd(_19._m0._m0, 1ul); + int64_t _91 = atomicAdd(_19._m0._m1[1u], 1l); + uint64_t _93 = atomicAdd(_22, 1ul); + int64_t _94 = atomicAdd(_24[1u], 1l); + uint64_t _96 = atomicAdd(_26._m0, 1ul); + int64_t _98 = atomicAdd(_26._m1[1u], 1l); barrier(); - uint64_t _97 = atomicAdd(_13._m0, -1ul); - int64_t _98 = atomicAdd(_16._m0[1u], -1l); - uint64_t _100 = atomicAdd(_19._m0._m0, -1ul); - int64_t _102 = atomicAdd(_19._m0._m1[1u], -1l); - uint64_t _104 = atomicAdd(_22, -1ul); - int64_t _105 = atomicAdd(_24[1u], -1l); - uint64_t _107 = atomicAdd(_26._m0, -1ul); - int64_t _109 = atomicAdd(_26._m1[1u], -1l); + uint64_t _100 = atomicAdd(_13._m0, -1ul); + int64_t _102 = atomicAdd(_16._m0[1u], -1l); + uint64_t _104 = atomicAdd(_19._m0._m0, -1ul); + int64_t _106 = atomicAdd(_19._m0._m1[1u], -1l); + uint64_t _108 = atomicAdd(_22, -1ul); + int64_t _109 = atomicAdd(_24[1u], -1l); + uint64_t _111 = atomicAdd(_26._m0, -1ul); + int64_t _113 = atomicAdd(_26._m1[1u], -1l); barrier(); - uint64_t _111 = atomicMax(_13._m0, 1ul); - int64_t _112 = atomicMax(_16._m0[1u], 1l); - uint64_t _114 = atomicMax(_19._m0._m0, 1ul); - int64_t _116 = atomicMax(_19._m0._m1[1u], 1l); - uint64_t _118 = atomicMax(_22, 1ul); - int64_t _119 = atomicMax(_24[1u], 1l); - uint64_t _121 = atomicMax(_26._m0, 1ul); - int64_t _123 = atomicMax(_26._m1[1u], 1l); + uint64_t _115 = atomicMax(_13._m0, 1ul); + int64_t _117 = atomicMax(_16._m0[1u], 1l); + uint64_t _119 = atomicMax(_19._m0._m0, 1ul); + int64_t _121 = atomicMax(_19._m0._m1[1u], 1l); + uint64_t _123 = atomicMax(_22, 1ul); + int64_t _124 = atomicMax(_24[1u], 1l); + uint64_t _126 = atomicMax(_26._m0, 1ul); + int64_t _128 = atomicMax(_26._m1[1u], 1l); barrier(); - uint64_t _125 = atomicMin(_13._m0, 1ul); - int64_t _126 = atomicMin(_16._m0[1u], 1l); - uint64_t _128 = atomicMin(_19._m0._m0, 1ul); - int64_t _130 = atomicMin(_19._m0._m1[1u], 1l); - uint64_t _132 = atomicMin(_22, 1ul); - int64_t _133 = atomicMin(_24[1u], 1l); - uint64_t _135 = atomicMin(_26._m0, 1ul); - int64_t _137 = atomicMin(_26._m1[1u], 1l); + uint64_t _130 = atomicMin(_13._m0, 1ul); + int64_t _132 = atomicMin(_16._m0[1u], 1l); + uint64_t _134 = atomicMin(_19._m0._m0, 1ul); + int64_t _136 = atomicMin(_19._m0._m1[1u], 1l); + uint64_t _138 = atomicMin(_22, 1ul); + int64_t _139 = atomicMin(_24[1u], 1l); + uint64_t _141 = atomicMin(_26._m0, 1ul); + int64_t _143 = atomicMin(_26._m1[1u], 1l); barrier(); - uint64_t _139 = atomicAnd(_13._m0, 1ul); - int64_t _140 = atomicAnd(_16._m0[1u], 1l); - uint64_t _142 = atomicAnd(_19._m0._m0, 1ul); - int64_t _144 = atomicAnd(_19._m0._m1[1u], 1l); - uint64_t _146 = atomicAnd(_22, 1ul); - int64_t _147 = atomicAnd(_24[1u], 1l); - uint64_t _149 = atomicAnd(_26._m0, 1ul); - int64_t _151 = atomicAnd(_26._m1[1u], 1l); + uint64_t _145 = atomicAnd(_13._m0, 1ul); + int64_t _147 = atomicAnd(_16._m0[1u], 1l); + uint64_t _149 = atomicAnd(_19._m0._m0, 1ul); + int64_t _151 = atomicAnd(_19._m0._m1[1u], 1l); + uint64_t _153 = atomicAnd(_22, 1ul); + int64_t _154 = atomicAnd(_24[1u], 1l); + uint64_t _156 = atomicAnd(_26._m0, 1ul); + int64_t _158 = atomicAnd(_26._m1[1u], 1l); barrier(); - uint64_t _153 = atomicOr(_13._m0, 1ul); - int64_t _154 = atomicOr(_16._m0[1u], 1l); - uint64_t _156 = atomicOr(_19._m0._m0, 1ul); - int64_t _158 = atomicOr(_19._m0._m1[1u], 1l); - uint64_t _160 = atomicOr(_22, 1ul); - int64_t _161 = atomicOr(_24[1u], 1l); - uint64_t _163 = atomicOr(_26._m0, 1ul); - int64_t _165 = atomicOr(_26._m1[1u], 1l); + uint64_t _160 = atomicOr(_13._m0, 1ul); + int64_t _162 = atomicOr(_16._m0[1u], 1l); + uint64_t _164 = atomicOr(_19._m0._m0, 1ul); + int64_t _166 = atomicOr(_19._m0._m1[1u], 1l); + uint64_t _168 = atomicOr(_22, 1ul); + int64_t _169 = atomicOr(_24[1u], 1l); + uint64_t _171 = atomicOr(_26._m0, 1ul); + int64_t _173 = atomicOr(_26._m1[1u], 1l); barrier(); - uint64_t _167 = atomicXor(_13._m0, 1ul); - int64_t _168 = atomicXor(_16._m0[1u], 1l); - uint64_t _170 = atomicXor(_19._m0._m0, 1ul); - int64_t _172 = atomicXor(_19._m0._m1[1u], 1l); - uint64_t _174 = atomicXor(_22, 1ul); - int64_t _175 = atomicXor(_24[1u], 1l); - uint64_t _177 = atomicXor(_26._m0, 1ul); - int64_t _179 = atomicXor(_26._m1[1u], 1l); - uint64_t _181 = atomicExchange(_13._m0, 1ul); - int64_t _182 = atomicExchange(_16._m0[1u], 1l); - uint64_t _184 = atomicExchange(_19._m0._m0, 1ul); - int64_t _186 = atomicExchange(_19._m0._m1[1u], 1l); - uint64_t _188 = atomicExchange(_22, 1ul); - int64_t _189 = atomicExchange(_24[1u], 1l); - uint64_t _191 = atomicExchange(_26._m0, 1ul); - int64_t _193 = atomicExchange(_26._m1[1u], 1l); - uint64_t _196 = atomicCompSwap(_13._m0, 1ul, 2ul); - int64_t _200 = atomicCompSwap(_16._m0[1u], 1l, 2l); - uint64_t _204 = atomicCompSwap(_19._m0._m0, 1ul, 2ul); - int64_t _208 = atomicCompSwap(_19._m0._m1[1u], 1l, 2l); - uint64_t _211 = atomicCompSwap(_22, 1ul, 2ul); - int64_t _215 = atomicCompSwap(_24[1u], 1l, 2l); - uint64_t _219 = atomicCompSwap(_26._m0, 1ul, 2ul); - int64_t _223 = atomicCompSwap(_26._m1[1u], 1l, 2l); + uint64_t _175 = atomicXor(_13._m0, 1ul); + int64_t _177 = atomicXor(_16._m0[1u], 1l); + uint64_t _179 = atomicXor(_19._m0._m0, 1ul); + int64_t _181 = atomicXor(_19._m0._m1[1u], 1l); + uint64_t _183 = atomicXor(_22, 1ul); + int64_t _184 = atomicXor(_24[1u], 1l); + uint64_t _186 = atomicXor(_26._m0, 1ul); + int64_t _188 = atomicXor(_26._m1[1u], 1l); + uint64_t _190 = atomicExchange(_13._m0, 1ul); + int64_t _192 = atomicExchange(_16._m0[1u], 1l); + uint64_t _194 = atomicExchange(_19._m0._m0, 1ul); + int64_t _196 = atomicExchange(_19._m0._m1[1u], 1l); + uint64_t _198 = atomicExchange(_22, 1ul); + int64_t _199 = atomicExchange(_24[1u], 1l); + uint64_t _201 = atomicExchange(_26._m0, 1ul); + int64_t _203 = atomicExchange(_26._m1[1u], 1l); + uint64_t _207 = atomicCompSwap(_13._m0, 1ul, 2ul); + int64_t _211 = atomicCompSwap(_16._m0[1u], 1l, 2l); + uint64_t _215 = atomicCompSwap(_19._m0._m0, 1ul, 2ul); + int64_t _219 = atomicCompSwap(_19._m0._m1[1u], 1l, 2l); + uint64_t _222 = atomicCompSwap(_22, 1ul, 2ul); + int64_t _226 = atomicCompSwap(_24[1u], 1l, 2l); + uint64_t _230 = atomicCompSwap(_26._m0, 1ul, 2ul); + int64_t _234 = atomicCompSwap(_26._m1[1u], 1l, 2l); } diff --git a/naga/tests/out/spv/wgsl-atomicOps.spvasm b/naga/tests/out/spv/wgsl-atomicOps.spvasm index 70f07928d..fd7c9a494 100644 --- a/naga/tests/out/spv/wgsl-atomicOps.spvasm +++ b/naga/tests/out/spv/wgsl-atomicOps.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 219 +; Bound: 230 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" @@ -70,8 +70,8 @@ OpDecorate %47 BuiltIn LocalInvocationIndex %48 = OpTypePointer Input %3 %47 = OpVariable %48 Input %53 = OpConstant %3 264 -%55 = OpTypePointer StorageBuffer %4 -%59 = OpTypePointer Workgroup %4 +%56 = OpTypePointer StorageBuffer %4 +%60 = OpTypePointer Workgroup %4 %31 = OpFunction %2 None %32 %27 = OpLabel %30 = OpLoad %8 %28 @@ -93,183 +93,194 @@ OpBranch %51 OpControlBarrier %6 %6 %53 OpBranch %54 %54 = OpLabel -OpAtomicStore %35 %41 %34 %40 -%56 = OpAccessChain %55 %37 %40 -OpAtomicStore %56 %41 %34 %41 -%57 = OpAccessChain %33 %39 %34 -OpAtomicStore %57 %41 %34 %40 -%58 = OpAccessChain %55 %39 %40 %40 -OpAtomicStore %58 %41 %34 %41 +%55 = OpAccessChain %33 %12 %34 +OpAtomicStore %55 %41 %34 %40 +%57 = OpAccessChain %56 %15 %34 %40 +OpAtomicStore %57 %41 %34 %41 +%58 = OpAccessChain %33 %18 %34 %34 +OpAtomicStore %58 %41 %34 %40 +%59 = OpAccessChain %56 %18 %34 %40 %40 +OpAtomicStore %59 %41 %34 %41 OpAtomicStore %21 %42 %34 %40 -%60 = OpAccessChain %59 %23 %40 -OpAtomicStore %60 %42 %34 %41 -%61 = OpAccessChain %22 %25 %34 -OpAtomicStore %61 %42 %34 %40 -%62 = OpAccessChain %59 %25 %40 %40 -OpAtomicStore %62 %42 %34 %41 +%61 = OpAccessChain %60 %23 %40 +OpAtomicStore %61 %42 %34 %41 +%62 = OpAccessChain %22 %25 %34 +OpAtomicStore %62 %42 %34 %40 +%63 = OpAccessChain %60 %25 %40 %40 +OpAtomicStore %63 %42 %34 %41 OpControlBarrier %6 %6 %53 -%63 = OpAtomicLoad %3 %35 %41 %34 -%64 = OpAccessChain %55 %37 %40 -%65 = OpAtomicLoad %4 %64 %41 %34 -%66 = OpAccessChain %33 %39 %34 -%67 = OpAtomicLoad %3 %66 %41 %34 -%68 = OpAccessChain %55 %39 %40 %40 -%69 = OpAtomicLoad %4 %68 %41 %34 -%70 = OpAtomicLoad %3 %21 %42 %34 -%71 = OpAccessChain %59 %23 %40 -%72 = OpAtomicLoad %4 %71 %42 %34 -%73 = OpAccessChain %22 %25 %34 -%74 = OpAtomicLoad %3 %73 %42 %34 -%75 = OpAccessChain %59 %25 %40 %40 -%76 = OpAtomicLoad %4 %75 %42 %34 +%64 = OpAccessChain %33 %12 %34 +%65 = OpAtomicLoad %3 %64 %41 %34 +%66 = OpAccessChain %56 %15 %34 %40 +%67 = OpAtomicLoad %4 %66 %41 %34 +%68 = OpAccessChain %33 %18 %34 %34 +%69 = OpAtomicLoad %3 %68 %41 %34 +%70 = OpAccessChain %56 %18 %34 %40 %40 +%71 = OpAtomicLoad %4 %70 %41 %34 +%72 = OpAtomicLoad %3 %21 %42 %34 +%73 = OpAccessChain %60 %23 %40 +%74 = OpAtomicLoad %4 %73 %42 %34 +%75 = OpAccessChain %22 %25 %34 +%76 = OpAtomicLoad %3 %75 %42 %34 +%77 = OpAccessChain %60 %25 %40 %40 +%78 = OpAtomicLoad %4 %77 %42 %34 OpControlBarrier %6 %6 %53 -%77 = OpAtomicIAdd %3 %35 %41 %34 %40 -%79 = OpAccessChain %55 %37 %40 -%78 = OpAtomicIAdd %4 %79 %41 %34 %41 -%81 = OpAccessChain %33 %39 %34 -%80 = OpAtomicIAdd %3 %81 %41 %34 %40 -%83 = OpAccessChain %55 %39 %40 %40 -%82 = OpAtomicIAdd %4 %83 %41 %34 %41 -%84 = OpAtomicIAdd %3 %21 %42 %34 %40 -%86 = OpAccessChain %59 %23 %40 -%85 = OpAtomicIAdd %4 %86 %42 %34 %41 -%88 = OpAccessChain %22 %25 %34 -%87 = OpAtomicIAdd %3 %88 %42 %34 %40 -%90 = OpAccessChain %59 %25 %40 %40 -%89 = OpAtomicIAdd %4 %90 %42 %34 %41 +%80 = OpAccessChain %33 %12 %34 +%79 = OpAtomicIAdd %3 %80 %41 %34 %40 +%82 = OpAccessChain %56 %15 %34 %40 +%81 = OpAtomicIAdd %4 %82 %41 %34 %41 +%84 = OpAccessChain %33 %18 %34 %34 +%83 = OpAtomicIAdd %3 %84 %41 %34 %40 +%86 = OpAccessChain %56 %18 %34 %40 %40 +%85 = OpAtomicIAdd %4 %86 %41 %34 %41 +%87 = OpAtomicIAdd %3 %21 %42 %34 %40 +%89 = OpAccessChain %60 %23 %40 +%88 = OpAtomicIAdd %4 %89 %42 %34 %41 +%91 = OpAccessChain %22 %25 %34 +%90 = OpAtomicIAdd %3 %91 %42 %34 %40 +%93 = OpAccessChain %60 %25 %40 %40 +%92 = OpAtomicIAdd %4 %93 %42 %34 %41 OpControlBarrier %6 %6 %53 -%91 = OpAtomicISub %3 %35 %41 %34 %40 -%93 = OpAccessChain %55 %37 %40 -%92 = OpAtomicISub %4 %93 %41 %34 %41 -%95 = OpAccessChain %33 %39 %34 +%95 = OpAccessChain %33 %12 %34 %94 = OpAtomicISub %3 %95 %41 %34 %40 -%97 = OpAccessChain %55 %39 %40 %40 +%97 = OpAccessChain %56 %15 %34 %40 %96 = OpAtomicISub %4 %97 %41 %34 %41 -%98 = OpAtomicISub %3 %21 %42 %34 %40 -%100 = OpAccessChain %59 %23 %40 -%99 = OpAtomicISub %4 %100 %42 %34 %41 -%102 = OpAccessChain %22 %25 %34 -%101 = OpAtomicISub %3 %102 %42 %34 %40 -%104 = OpAccessChain %59 %25 %40 %40 +%99 = OpAccessChain %33 %18 %34 %34 +%98 = OpAtomicISub %3 %99 %41 %34 %40 +%101 = OpAccessChain %56 %18 %34 %40 %40 +%100 = OpAtomicISub %4 %101 %41 %34 %41 +%102 = OpAtomicISub %3 %21 %42 %34 %40 +%104 = OpAccessChain %60 %23 %40 %103 = OpAtomicISub %4 %104 %42 %34 %41 +%106 = OpAccessChain %22 %25 %34 +%105 = OpAtomicISub %3 %106 %42 %34 %40 +%108 = OpAccessChain %60 %25 %40 %40 +%107 = OpAtomicISub %4 %108 %42 %34 %41 OpControlBarrier %6 %6 %53 -%105 = OpAtomicUMax %3 %35 %41 %34 %40 -%107 = OpAccessChain %55 %37 %40 -%106 = OpAtomicSMax %4 %107 %41 %34 %41 -%109 = OpAccessChain %33 %39 %34 -%108 = OpAtomicUMax %3 %109 %41 %34 %40 -%111 = OpAccessChain %55 %39 %40 %40 -%110 = OpAtomicSMax %4 %111 %41 %34 %41 -%112 = OpAtomicUMax %3 %21 %42 %34 %40 -%114 = OpAccessChain %59 %23 %40 -%113 = OpAtomicSMax %4 %114 %42 %34 %41 -%116 = OpAccessChain %22 %25 %34 -%115 = OpAtomicUMax %3 %116 %42 %34 %40 -%118 = OpAccessChain %59 %25 %40 %40 -%117 = OpAtomicSMax %4 %118 %42 %34 %41 +%110 = OpAccessChain %33 %12 %34 +%109 = OpAtomicUMax %3 %110 %41 %34 %40 +%112 = OpAccessChain %56 %15 %34 %40 +%111 = OpAtomicSMax %4 %112 %41 %34 %41 +%114 = OpAccessChain %33 %18 %34 %34 +%113 = OpAtomicUMax %3 %114 %41 %34 %40 +%116 = OpAccessChain %56 %18 %34 %40 %40 +%115 = OpAtomicSMax %4 %116 %41 %34 %41 +%117 = OpAtomicUMax %3 %21 %42 %34 %40 +%119 = OpAccessChain %60 %23 %40 +%118 = OpAtomicSMax %4 %119 %42 %34 %41 +%121 = OpAccessChain %22 %25 %34 +%120 = OpAtomicUMax %3 %121 %42 %34 %40 +%123 = OpAccessChain %60 %25 %40 %40 +%122 = OpAtomicSMax %4 %123 %42 %34 %41 OpControlBarrier %6 %6 %53 -%119 = OpAtomicUMin %3 %35 %41 %34 %40 -%121 = OpAccessChain %55 %37 %40 -%120 = OpAtomicSMin %4 %121 %41 %34 %41 -%123 = OpAccessChain %33 %39 %34 -%122 = OpAtomicUMin %3 %123 %41 %34 %40 -%125 = OpAccessChain %55 %39 %40 %40 -%124 = OpAtomicSMin %4 %125 %41 %34 %41 -%126 = OpAtomicUMin %3 %21 %42 %34 %40 -%128 = OpAccessChain %59 %23 %40 -%127 = OpAtomicSMin %4 %128 %42 %34 %41 -%130 = OpAccessChain %22 %25 %34 -%129 = OpAtomicUMin %3 %130 %42 %34 %40 -%132 = OpAccessChain %59 %25 %40 %40 -%131 = OpAtomicSMin %4 %132 %42 %34 %41 +%125 = OpAccessChain %33 %12 %34 +%124 = OpAtomicUMin %3 %125 %41 %34 %40 +%127 = OpAccessChain %56 %15 %34 %40 +%126 = OpAtomicSMin %4 %127 %41 %34 %41 +%129 = OpAccessChain %33 %18 %34 %34 +%128 = OpAtomicUMin %3 %129 %41 %34 %40 +%131 = OpAccessChain %56 %18 %34 %40 %40 +%130 = OpAtomicSMin %4 %131 %41 %34 %41 +%132 = OpAtomicUMin %3 %21 %42 %34 %40 +%134 = OpAccessChain %60 %23 %40 +%133 = OpAtomicSMin %4 %134 %42 %34 %41 +%136 = OpAccessChain %22 %25 %34 +%135 = OpAtomicUMin %3 %136 %42 %34 %40 +%138 = OpAccessChain %60 %25 %40 %40 +%137 = OpAtomicSMin %4 %138 %42 %34 %41 OpControlBarrier %6 %6 %53 -%133 = OpAtomicAnd %3 %35 %41 %34 %40 -%135 = OpAccessChain %55 %37 %40 -%134 = OpAtomicAnd %4 %135 %41 %34 %41 -%137 = OpAccessChain %33 %39 %34 -%136 = OpAtomicAnd %3 %137 %41 %34 %40 -%139 = OpAccessChain %55 %39 %40 %40 -%138 = OpAtomicAnd %4 %139 %41 %34 %41 -%140 = OpAtomicAnd %3 %21 %42 %34 %40 -%142 = OpAccessChain %59 %23 %40 -%141 = OpAtomicAnd %4 %142 %42 %34 %41 -%144 = OpAccessChain %22 %25 %34 -%143 = OpAtomicAnd %3 %144 %42 %34 %40 -%146 = OpAccessChain %59 %25 %40 %40 -%145 = OpAtomicAnd %4 %146 %42 %34 %41 +%140 = OpAccessChain %33 %12 %34 +%139 = OpAtomicAnd %3 %140 %41 %34 %40 +%142 = OpAccessChain %56 %15 %34 %40 +%141 = OpAtomicAnd %4 %142 %41 %34 %41 +%144 = OpAccessChain %33 %18 %34 %34 +%143 = OpAtomicAnd %3 %144 %41 %34 %40 +%146 = OpAccessChain %56 %18 %34 %40 %40 +%145 = OpAtomicAnd %4 %146 %41 %34 %41 +%147 = OpAtomicAnd %3 %21 %42 %34 %40 +%149 = OpAccessChain %60 %23 %40 +%148 = OpAtomicAnd %4 %149 %42 %34 %41 +%151 = OpAccessChain %22 %25 %34 +%150 = OpAtomicAnd %3 %151 %42 %34 %40 +%153 = OpAccessChain %60 %25 %40 %40 +%152 = OpAtomicAnd %4 %153 %42 %34 %41 OpControlBarrier %6 %6 %53 -%147 = OpAtomicOr %3 %35 %41 %34 %40 -%149 = OpAccessChain %55 %37 %40 -%148 = OpAtomicOr %4 %149 %41 %34 %41 -%151 = OpAccessChain %33 %39 %34 -%150 = OpAtomicOr %3 %151 %41 %34 %40 -%153 = OpAccessChain %55 %39 %40 %40 -%152 = OpAtomicOr %4 %153 %41 %34 %41 -%154 = OpAtomicOr %3 %21 %42 %34 %40 -%156 = OpAccessChain %59 %23 %40 -%155 = OpAtomicOr %4 %156 %42 %34 %41 -%158 = OpAccessChain %22 %25 %34 -%157 = OpAtomicOr %3 %158 %42 %34 %40 -%160 = OpAccessChain %59 %25 %40 %40 -%159 = OpAtomicOr %4 %160 %42 %34 %41 +%155 = OpAccessChain %33 %12 %34 +%154 = OpAtomicOr %3 %155 %41 %34 %40 +%157 = OpAccessChain %56 %15 %34 %40 +%156 = OpAtomicOr %4 %157 %41 %34 %41 +%159 = OpAccessChain %33 %18 %34 %34 +%158 = OpAtomicOr %3 %159 %41 %34 %40 +%161 = OpAccessChain %56 %18 %34 %40 %40 +%160 = OpAtomicOr %4 %161 %41 %34 %41 +%162 = OpAtomicOr %3 %21 %42 %34 %40 +%164 = OpAccessChain %60 %23 %40 +%163 = OpAtomicOr %4 %164 %42 %34 %41 +%166 = OpAccessChain %22 %25 %34 +%165 = OpAtomicOr %3 %166 %42 %34 %40 +%168 = OpAccessChain %60 %25 %40 %40 +%167 = OpAtomicOr %4 %168 %42 %34 %41 OpControlBarrier %6 %6 %53 -%161 = OpAtomicXor %3 %35 %41 %34 %40 -%163 = OpAccessChain %55 %37 %40 -%162 = OpAtomicXor %4 %163 %41 %34 %41 -%165 = OpAccessChain %33 %39 %34 -%164 = OpAtomicXor %3 %165 %41 %34 %40 -%167 = OpAccessChain %55 %39 %40 %40 -%166 = OpAtomicXor %4 %167 %41 %34 %41 -%168 = OpAtomicXor %3 %21 %42 %34 %40 -%170 = OpAccessChain %59 %23 %40 -%169 = OpAtomicXor %4 %170 %42 %34 %41 -%172 = OpAccessChain %22 %25 %34 -%171 = OpAtomicXor %3 %172 %42 %34 %40 -%174 = OpAccessChain %59 %25 %40 %40 -%173 = OpAtomicXor %4 %174 %42 %34 %41 -%175 = OpAtomicExchange %3 %35 %41 %34 %40 -%177 = OpAccessChain %55 %37 %40 -%176 = OpAtomicExchange %4 %177 %41 %34 %41 -%179 = OpAccessChain %33 %39 %34 -%178 = OpAtomicExchange %3 %179 %41 %34 %40 -%181 = OpAccessChain %55 %39 %40 %40 -%180 = OpAtomicExchange %4 %181 %41 %34 %41 -%182 = OpAtomicExchange %3 %21 %42 %34 %40 -%184 = OpAccessChain %59 %23 %40 -%183 = OpAtomicExchange %4 %184 %42 %34 %41 -%186 = OpAccessChain %22 %25 %34 -%185 = OpAtomicExchange %3 %186 %42 %34 %40 -%188 = OpAccessChain %59 %25 %40 %40 -%187 = OpAtomicExchange %4 %188 %42 %34 %41 -%190 = OpAtomicCompareExchange %3 %35 %41 %34 %34 %6 %40 -%191 = OpIEqual %9 %190 %40 -%189 = OpCompositeConstruct %10 %190 %191 -%193 = OpAccessChain %55 %37 %40 -%194 = OpAtomicCompareExchange %4 %193 %41 %34 %34 %42 %41 -%195 = OpIEqual %9 %194 %41 -%192 = OpCompositeConstruct %11 %194 %195 -%197 = OpAccessChain %33 %39 %34 -%198 = OpAtomicCompareExchange %3 %197 %41 %34 %34 %6 %40 -%199 = OpIEqual %9 %198 %40 -%196 = OpCompositeConstruct %10 %198 %199 -%201 = OpAccessChain %55 %39 %40 %40 -%202 = OpAtomicCompareExchange %4 %201 %41 %34 %34 %42 %41 -%203 = OpIEqual %9 %202 %41 -%200 = OpCompositeConstruct %11 %202 %203 -%205 = OpAtomicCompareExchange %3 %21 %42 %34 %34 %6 %40 -%206 = OpIEqual %9 %205 %40 -%204 = OpCompositeConstruct %10 %205 %206 -%208 = OpAccessChain %59 %23 %40 -%209 = OpAtomicCompareExchange %4 %208 %42 %34 %34 %42 %41 -%210 = OpIEqual %9 %209 %41 -%207 = OpCompositeConstruct %11 %209 %210 -%212 = OpAccessChain %22 %25 %34 -%213 = OpAtomicCompareExchange %3 %212 %42 %34 %34 %6 %40 -%214 = OpIEqual %9 %213 %40 -%211 = OpCompositeConstruct %10 %213 %214 -%216 = OpAccessChain %59 %25 %40 %40 -%217 = OpAtomicCompareExchange %4 %216 %42 %34 %34 %42 %41 -%218 = OpIEqual %9 %217 %41 -%215 = OpCompositeConstruct %11 %217 %218 +%170 = OpAccessChain %33 %12 %34 +%169 = OpAtomicXor %3 %170 %41 %34 %40 +%172 = OpAccessChain %56 %15 %34 %40 +%171 = OpAtomicXor %4 %172 %41 %34 %41 +%174 = OpAccessChain %33 %18 %34 %34 +%173 = OpAtomicXor %3 %174 %41 %34 %40 +%176 = OpAccessChain %56 %18 %34 %40 %40 +%175 = OpAtomicXor %4 %176 %41 %34 %41 +%177 = OpAtomicXor %3 %21 %42 %34 %40 +%179 = OpAccessChain %60 %23 %40 +%178 = OpAtomicXor %4 %179 %42 %34 %41 +%181 = OpAccessChain %22 %25 %34 +%180 = OpAtomicXor %3 %181 %42 %34 %40 +%183 = OpAccessChain %60 %25 %40 %40 +%182 = OpAtomicXor %4 %183 %42 %34 %41 +%185 = OpAccessChain %33 %12 %34 +%184 = OpAtomicExchange %3 %185 %41 %34 %40 +%187 = OpAccessChain %56 %15 %34 %40 +%186 = OpAtomicExchange %4 %187 %41 %34 %41 +%189 = OpAccessChain %33 %18 %34 %34 +%188 = OpAtomicExchange %3 %189 %41 %34 %40 +%191 = OpAccessChain %56 %18 %34 %40 %40 +%190 = OpAtomicExchange %4 %191 %41 %34 %41 +%192 = OpAtomicExchange %3 %21 %42 %34 %40 +%194 = OpAccessChain %60 %23 %40 +%193 = OpAtomicExchange %4 %194 %42 %34 %41 +%196 = OpAccessChain %22 %25 %34 +%195 = OpAtomicExchange %3 %196 %42 %34 %40 +%198 = OpAccessChain %60 %25 %40 %40 +%197 = OpAtomicExchange %4 %198 %42 %34 %41 +%200 = OpAccessChain %33 %12 %34 +%201 = OpAtomicCompareExchange %3 %200 %41 %34 %34 %6 %40 +%202 = OpIEqual %9 %201 %40 +%199 = OpCompositeConstruct %10 %201 %202 +%204 = OpAccessChain %56 %15 %34 %40 +%205 = OpAtomicCompareExchange %4 %204 %41 %34 %34 %42 %41 +%206 = OpIEqual %9 %205 %41 +%203 = OpCompositeConstruct %11 %205 %206 +%208 = OpAccessChain %33 %18 %34 %34 +%209 = OpAtomicCompareExchange %3 %208 %41 %34 %34 %6 %40 +%210 = OpIEqual %9 %209 %40 +%207 = OpCompositeConstruct %10 %209 %210 +%212 = OpAccessChain %56 %18 %34 %40 %40 +%213 = OpAtomicCompareExchange %4 %212 %41 %34 %34 %42 %41 +%214 = OpIEqual %9 %213 %41 +%211 = OpCompositeConstruct %11 %213 %214 +%216 = OpAtomicCompareExchange %3 %21 %42 %34 %34 %6 %40 +%217 = OpIEqual %9 %216 %40 +%215 = OpCompositeConstruct %10 %216 %217 +%219 = OpAccessChain %60 %23 %40 +%220 = OpAtomicCompareExchange %4 %219 %42 %34 %34 %42 %41 +%221 = OpIEqual %9 %220 %41 +%218 = OpCompositeConstruct %11 %220 %221 +%223 = OpAccessChain %22 %25 %34 +%224 = OpAtomicCompareExchange %3 %223 %42 %34 %34 %6 %40 +%225 = OpIEqual %9 %224 %40 +%222 = OpCompositeConstruct %10 %224 %225 +%227 = OpAccessChain %60 %25 %40 %40 +%228 = OpAtomicCompareExchange %4 %227 %42 %34 %34 %42 %41 +%229 = OpIEqual %9 %228 %41 +%226 = OpCompositeConstruct %11 %228 %229 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-atomicOps.spvasm.glsl b/naga/tests/out/spv/wgsl-atomicOps.spvasm.glsl index 5f93264d5..0d56db26d 100644 --- a/naga/tests/out/spv/wgsl-atomicOps.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-atomicOps.spvasm.glsl @@ -56,92 +56,92 @@ void main() atomicExchange(_25._m0, 1u); atomicExchange(_25._m1[1u], 1); barrier(); - uint _63 = atomicAdd(_12._m0, 0u); - int _65 = atomicAdd(_15._m0[1u], 0); - uint _67 = atomicAdd(_18._m0._m0, 0u); - int _69 = atomicAdd(_18._m0._m1[1u], 0); - uint _70 = atomicAdd(_21, 0u); - int _72 = atomicAdd(_23[1u], 0); - uint _74 = atomicAdd(_25._m0, 0u); - int _76 = atomicAdd(_25._m1[1u], 0); + uint _65 = atomicAdd(_12._m0, 0u); + int _67 = atomicAdd(_15._m0[1u], 0); + uint _69 = atomicAdd(_18._m0._m0, 0u); + int _71 = atomicAdd(_18._m0._m1[1u], 0); + uint _72 = atomicAdd(_21, 0u); + int _74 = atomicAdd(_23[1u], 0); + uint _76 = atomicAdd(_25._m0, 0u); + int _78 = atomicAdd(_25._m1[1u], 0); barrier(); - uint _77 = atomicAdd(_12._m0, 1u); - int _78 = atomicAdd(_15._m0[1u], 1); - uint _80 = atomicAdd(_18._m0._m0, 1u); - int _82 = atomicAdd(_18._m0._m1[1u], 1); - uint _84 = atomicAdd(_21, 1u); - int _85 = atomicAdd(_23[1u], 1); - uint _87 = atomicAdd(_25._m0, 1u); - int _89 = atomicAdd(_25._m1[1u], 1); + uint _79 = atomicAdd(_12._m0, 1u); + int _81 = atomicAdd(_15._m0[1u], 1); + uint _83 = atomicAdd(_18._m0._m0, 1u); + int _85 = atomicAdd(_18._m0._m1[1u], 1); + uint _87 = atomicAdd(_21, 1u); + int _88 = atomicAdd(_23[1u], 1); + uint _90 = atomicAdd(_25._m0, 1u); + int _92 = atomicAdd(_25._m1[1u], 1); barrier(); - uint _91 = atomicAdd(_12._m0, -1u); - int _92 = atomicAdd(_15._m0[1u], -1); - uint _94 = atomicAdd(_18._m0._m0, -1u); - int _96 = atomicAdd(_18._m0._m1[1u], -1); - uint _98 = atomicAdd(_21, -1u); - int _99 = atomicAdd(_23[1u], -1); - uint _101 = atomicAdd(_25._m0, -1u); - int _103 = atomicAdd(_25._m1[1u], -1); + uint _94 = atomicAdd(_12._m0, -1u); + int _96 = atomicAdd(_15._m0[1u], -1); + uint _98 = atomicAdd(_18._m0._m0, -1u); + int _100 = atomicAdd(_18._m0._m1[1u], -1); + uint _102 = atomicAdd(_21, -1u); + int _103 = atomicAdd(_23[1u], -1); + uint _105 = atomicAdd(_25._m0, -1u); + int _107 = atomicAdd(_25._m1[1u], -1); barrier(); - uint _105 = atomicMax(_12._m0, 1u); - int _106 = atomicMax(_15._m0[1u], 1); - uint _108 = atomicMax(_18._m0._m0, 1u); - int _110 = atomicMax(_18._m0._m1[1u], 1); - uint _112 = atomicMax(_21, 1u); - int _113 = atomicMax(_23[1u], 1); - uint _115 = atomicMax(_25._m0, 1u); - int _117 = atomicMax(_25._m1[1u], 1); + uint _109 = atomicMax(_12._m0, 1u); + int _111 = atomicMax(_15._m0[1u], 1); + uint _113 = atomicMax(_18._m0._m0, 1u); + int _115 = atomicMax(_18._m0._m1[1u], 1); + uint _117 = atomicMax(_21, 1u); + int _118 = atomicMax(_23[1u], 1); + uint _120 = atomicMax(_25._m0, 1u); + int _122 = atomicMax(_25._m1[1u], 1); barrier(); - uint _119 = atomicMin(_12._m0, 1u); - int _120 = atomicMin(_15._m0[1u], 1); - uint _122 = atomicMin(_18._m0._m0, 1u); - int _124 = atomicMin(_18._m0._m1[1u], 1); - uint _126 = atomicMin(_21, 1u); - int _127 = atomicMin(_23[1u], 1); - uint _129 = atomicMin(_25._m0, 1u); - int _131 = atomicMin(_25._m1[1u], 1); + uint _124 = atomicMin(_12._m0, 1u); + int _126 = atomicMin(_15._m0[1u], 1); + uint _128 = atomicMin(_18._m0._m0, 1u); + int _130 = atomicMin(_18._m0._m1[1u], 1); + uint _132 = atomicMin(_21, 1u); + int _133 = atomicMin(_23[1u], 1); + uint _135 = atomicMin(_25._m0, 1u); + int _137 = atomicMin(_25._m1[1u], 1); barrier(); - uint _133 = atomicAnd(_12._m0, 1u); - int _134 = atomicAnd(_15._m0[1u], 1); - uint _136 = atomicAnd(_18._m0._m0, 1u); - int _138 = atomicAnd(_18._m0._m1[1u], 1); - uint _140 = atomicAnd(_21, 1u); - int _141 = atomicAnd(_23[1u], 1); - uint _143 = atomicAnd(_25._m0, 1u); - int _145 = atomicAnd(_25._m1[1u], 1); + uint _139 = atomicAnd(_12._m0, 1u); + int _141 = atomicAnd(_15._m0[1u], 1); + uint _143 = atomicAnd(_18._m0._m0, 1u); + int _145 = atomicAnd(_18._m0._m1[1u], 1); + uint _147 = atomicAnd(_21, 1u); + int _148 = atomicAnd(_23[1u], 1); + uint _150 = atomicAnd(_25._m0, 1u); + int _152 = atomicAnd(_25._m1[1u], 1); barrier(); - uint _147 = atomicOr(_12._m0, 1u); - int _148 = atomicOr(_15._m0[1u], 1); - uint _150 = atomicOr(_18._m0._m0, 1u); - int _152 = atomicOr(_18._m0._m1[1u], 1); - uint _154 = atomicOr(_21, 1u); - int _155 = atomicOr(_23[1u], 1); - uint _157 = atomicOr(_25._m0, 1u); - int _159 = atomicOr(_25._m1[1u], 1); + uint _154 = atomicOr(_12._m0, 1u); + int _156 = atomicOr(_15._m0[1u], 1); + uint _158 = atomicOr(_18._m0._m0, 1u); + int _160 = atomicOr(_18._m0._m1[1u], 1); + uint _162 = atomicOr(_21, 1u); + int _163 = atomicOr(_23[1u], 1); + uint _165 = atomicOr(_25._m0, 1u); + int _167 = atomicOr(_25._m1[1u], 1); barrier(); - uint _161 = atomicXor(_12._m0, 1u); - int _162 = atomicXor(_15._m0[1u], 1); - uint _164 = atomicXor(_18._m0._m0, 1u); - int _166 = atomicXor(_18._m0._m1[1u], 1); - uint _168 = atomicXor(_21, 1u); - int _169 = atomicXor(_23[1u], 1); - uint _171 = atomicXor(_25._m0, 1u); - int _173 = atomicXor(_25._m1[1u], 1); - uint _175 = atomicExchange(_12._m0, 1u); - int _176 = atomicExchange(_15._m0[1u], 1); - uint _178 = atomicExchange(_18._m0._m0, 1u); - int _180 = atomicExchange(_18._m0._m1[1u], 1); - uint _182 = atomicExchange(_21, 1u); - int _183 = atomicExchange(_23[1u], 1); - uint _185 = atomicExchange(_25._m0, 1u); - int _187 = atomicExchange(_25._m1[1u], 1); - uint _190 = atomicCompSwap(_12._m0, 1u, 2u); - int _194 = atomicCompSwap(_15._m0[1u], 1, 2); - uint _198 = atomicCompSwap(_18._m0._m0, 1u, 2u); - int _202 = atomicCompSwap(_18._m0._m1[1u], 1, 2); - uint _205 = atomicCompSwap(_21, 1u, 2u); - int _209 = atomicCompSwap(_23[1u], 1, 2); - uint _213 = atomicCompSwap(_25._m0, 1u, 2u); - int _217 = atomicCompSwap(_25._m1[1u], 1, 2); + uint _169 = atomicXor(_12._m0, 1u); + int _171 = atomicXor(_15._m0[1u], 1); + uint _173 = atomicXor(_18._m0._m0, 1u); + int _175 = atomicXor(_18._m0._m1[1u], 1); + uint _177 = atomicXor(_21, 1u); + int _178 = atomicXor(_23[1u], 1); + uint _180 = atomicXor(_25._m0, 1u); + int _182 = atomicXor(_25._m1[1u], 1); + uint _184 = atomicExchange(_12._m0, 1u); + int _186 = atomicExchange(_15._m0[1u], 1); + uint _188 = atomicExchange(_18._m0._m0, 1u); + int _190 = atomicExchange(_18._m0._m1[1u], 1); + uint _192 = atomicExchange(_21, 1u); + int _193 = atomicExchange(_23[1u], 1); + uint _195 = atomicExchange(_25._m0, 1u); + int _197 = atomicExchange(_25._m1[1u], 1); + uint _201 = atomicCompSwap(_12._m0, 1u, 2u); + int _205 = atomicCompSwap(_15._m0[1u], 1, 2); + uint _209 = atomicCompSwap(_18._m0._m0, 1u, 2u); + int _213 = atomicCompSwap(_18._m0._m1[1u], 1, 2); + uint _216 = atomicCompSwap(_21, 1u, 2u); + int _220 = atomicCompSwap(_23[1u], 1, 2); + uint _224 = atomicCompSwap(_25._m0, 1u, 2u); + int _228 = atomicCompSwap(_25._m1[1u], 1, 2); } diff --git a/naga/tests/out/spv/wgsl-binding-arrays.spvasm b/naga/tests/out/spv/wgsl-binding-arrays.spvasm index 5fce471de..b957f21b4 100644 --- a/naga/tests/out/spv/wgsl-binding-arrays.spvasm +++ b/naga/tests/out/spv/wgsl-binding-arrays.spvasm @@ -166,7 +166,7 @@ OpDecorate %395 NonUniform %56 = OpAccessChain %54 %42 %55 OpBranch %74 %74 = OpLabel -%76 = OpAccessChain %75 %56 %55 +%76 = OpAccessChain %75 %42 %55 %55 %77 = OpLoad %3 %76 %78 = OpCompositeExtract %3 %46 0 %79 = OpLoad %23 %68 diff --git a/naga/tests/out/spv/wgsl-binding-buffer-arrays.spvasm b/naga/tests/out/spv/wgsl-binding-buffer-arrays.spvasm index 71f5b548e..54e8d8e31 100644 --- a/naga/tests/out/spv/wgsl-binding-buffer-arrays.spvasm +++ b/naga/tests/out/spv/wgsl-binding-buffer-arrays.spvasm @@ -87,7 +87,7 @@ OpDecorate %133 NonUniform %33 = OpAccessChain %31 %19 %32 OpBranch %37 %37 = OpLabel -%39 = OpAccessChain %38 %33 %32 +%39 = OpAccessChain %38 %19 %32 %32 %40 = OpLoad %3 %39 %41 = OpCompositeExtract %3 %23 0 %42 = OpLoad %3 %35 diff --git a/naga/tests/out/spv/wgsl-boids.spvasm b/naga/tests/out/spv/wgsl-boids.spvasm index 837d9326c..9d2fe005c 100644 --- a/naga/tests/out/spv/wgsl-boids.spvasm +++ b/naga/tests/out/spv/wgsl-boids.spvasm @@ -319,7 +319,7 @@ OpLine %3 57 8 %103 = OpLoad %6 %37 %104 = OpExtInst %5 %1 Distance %102 %103 OpLine %3 57 8 -%106 = OpAccessChain %105 %28 %33 +%106 = OpAccessChain %105 %14 %27 %33 %107 = OpLoad %5 %106 %108 = OpFOrdLessThan %56 %104 %107 OpLine %3 57 5 @@ -345,7 +345,7 @@ OpLine %3 61 8 %117 = OpLoad %6 %37 %118 = OpExtInst %5 %1 Distance %116 %117 OpLine %3 61 8 -%120 = OpAccessChain %105 %28 %119 +%120 = OpAccessChain %105 %14 %27 %119 %121 = OpLoad %5 %120 %122 = OpFOrdLessThan %56 %118 %121 OpLine %3 61 5 @@ -367,7 +367,7 @@ OpLine %3 64 8 %131 = OpLoad %6 %37 %132 = OpExtInst %5 %1 Distance %130 %131 OpLine %3 64 8 -%134 = OpAccessChain %105 %28 %133 +%134 = OpAccessChain %105 %14 %27 %133 %135 = OpLoad %5 %134 %136 = OpFOrdLessThan %56 %132 %135 OpLine %3 64 5 @@ -440,19 +440,19 @@ OpLine %3 1 1 %166 = OpLoad %6 %40 %167 = OpLoad %6 %42 OpLine %3 80 10 -%169 = OpAccessChain %105 %28 %168 +%169 = OpAccessChain %105 %14 %27 %168 %170 = OpLoad %5 %169 %171 = OpVectorTimesScalar %6 %167 %170 %172 = OpFAdd %6 %166 %171 %173 = OpLoad %6 %44 OpLine %3 80 10 -%175 = OpAccessChain %105 %28 %174 +%175 = OpAccessChain %105 %14 %27 %174 %176 = OpLoad %5 %175 %177 = OpVectorTimesScalar %6 %173 %176 %178 = OpFAdd %6 %172 %177 %179 = OpLoad %6 %43 OpLine %3 80 10 -%181 = OpAccessChain %105 %28 %180 +%181 = OpAccessChain %105 %14 %27 %180 %182 = OpLoad %5 %181 %183 = OpVectorTimesScalar %6 %179 %182 %184 = OpFAdd %6 %178 %183 @@ -472,7 +472,7 @@ OpLine %3 1 1 %191 = OpLoad %6 %37 %192 = OpLoad %6 %40 OpLine %3 88 10 -%193 = OpAccessChain %105 %28 %27 +%193 = OpAccessChain %105 %14 %27 %27 %194 = OpLoad %5 %193 %195 = OpVectorTimesScalar %6 %192 %194 %196 = OpFAdd %6 %191 %195 diff --git a/naga/tests/out/spv/wgsl-cooperative-matrix-mixed-accumulator.spvasm b/naga/tests/out/spv/wgsl-cooperative-matrix-mixed-accumulator.spvasm index 369ac62b3..6624e385c 100644 --- a/naga/tests/out/spv/wgsl-cooperative-matrix-mixed-accumulator.spvasm +++ b/naga/tests/out/spv/wgsl-cooperative-matrix-mixed-accumulator.spvasm @@ -60,18 +60,18 @@ OpMemberDecorate %16 0 Offset 0 %25 = OpAccessChain %24 %15 %22 OpBranch %29 %29 = OpLabel -%33 = OpAccessChain %30 %23 %22 +%33 = OpAccessChain %30 %12 %22 %22 %34 = OpCooperativeMatrixLoadKHR %31 %33 %32 %10 -%36 = OpAccessChain %30 %23 %22 +%36 = OpAccessChain %30 %12 %22 %22 %37 = OpCooperativeMatrixLoadKHR %35 %36 %32 %10 -%39 = OpAccessChain %38 %25 %22 +%39 = OpAccessChain %38 %15 %22 %22 %40 = OpCooperativeMatrixLoadKHR %7 %39 %32 %10 OpStore %26 %40 %41 = OpLoad %7 %26 %42 = OpCooperativeMatrixMulAddKHR %7 %34 %37 %41 OpStore %26 %42 %43 = OpLoad %7 %26 -%44 = OpAccessChain %38 %25 %22 +%44 = OpAccessChain %38 %15 %22 %22 OpCooperativeMatrixStoreKHR %44 %43 %32 %10 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-cooperative-matrix.spvasm b/naga/tests/out/spv/wgsl-cooperative-matrix.spvasm index 093e50cc0..74e4059ce 100644 --- a/naga/tests/out/spv/wgsl-cooperative-matrix.spvasm +++ b/naga/tests/out/spv/wgsl-cooperative-matrix.spvasm @@ -51,7 +51,7 @@ OpMemberDecorate %21 0 Offset 0 %27 = OpAccessChain %26 %20 %8 OpBranch %33 %33 = OpLabel -%36 = OpAccessChain %34 %27 %35 +%36 = OpAccessChain %34 %20 %8 %35 %37 = OpCooperativeMatrixLoadKHR %12 %36 %10 %7 OpStore %28 %37 %38 = OpLoad %4 %14 @@ -60,7 +60,7 @@ OpStore %28 %37 %41 = OpCooperativeMatrixMulAddKHR %12 %38 %39 %40 OpStore %31 %41 %42 = OpLoad %12 %31 -%43 = OpAccessChain %34 %27 %8 +%43 = OpAccessChain %34 %20 %8 %8 OpCooperativeMatrixStoreKHR %43 %42 %10 %7 %44 = OpLoad %12 %31 OpStore %28 %44 diff --git a/naga/tests/out/spv/wgsl-debug-symbol-large-source.spvasm b/naga/tests/out/spv/wgsl-debug-symbol-large-source.spvasm index cde846a4b..08cef4979 100644 --- a/naga/tests/out/spv/wgsl-debug-symbol-large-source.spvasm +++ b/naga/tests/out/spv/wgsl-debug-symbol-large-source.spvasm @@ -8253,16 +8253,16 @@ OpBranch %375 OpLine %3 7254 22 %376 = OpCompositeExtract %8 %366 0 OpLine %3 7256 36 -%378 = OpAccessChain %377 %370 %135 +%378 = OpAccessChain %377 %29 %135 %135 %379 = OpLoad %10 %378 OpLine %3 7256 59 -%381 = OpAccessChain %380 %370 %126 +%381 = OpAccessChain %380 %29 %135 %126 %382 = OpLoad %11 %381 OpLine %3 7256 13 %383 = OpFunctionCall %6 %325 %376 %379 %382 OpLine %3 7258 5 OpLine %3 7258 51 -%387 = OpAccessChain %386 %370 %372 +%387 = OpAccessChain %386 %29 %135 %372 %388 = OpLoad %6 %387 OpLine %3 7258 33 %389 = OpFunctionCall %14 %284 %383 %388 @@ -8274,10 +8274,10 @@ OpLine %3 7261 23 OpLine %3 7261 23 %392 = OpIMul %8 %391 %371 OpLine %3 7263 24 -%394 = OpAccessChain %393 %370 %135 %135 +%394 = OpAccessChain %393 %29 %135 %135 %135 %395 = OpLoad %8 %394 OpLine %3 7263 24 -%396 = OpAccessChain %393 %370 %135 %126 +%396 = OpAccessChain %393 %29 %135 %135 %126 %397 = OpLoad %8 %396 %398 = OpIMul %8 %395 %397 OpLine %3 7263 8 @@ -8292,14 +8292,14 @@ OpReturn OpLine %3 7265 28 %403 = OpCompositeExtract %8 %366 0 OpLine %3 7265 15 -%404 = OpAccessChain %393 %370 %135 %135 +%404 = OpAccessChain %393 %29 %135 %135 %135 %405 = OpLoad %8 %404 %406 = OpFunctionCall %8 %313 %403 %405 %407 = OpIAdd %8 %376 %406 OpLine %3 7266 15 %408 = OpIAdd %8 %407 %126 OpLine %3 7267 15 -%409 = OpAccessChain %393 %370 %135 %135 +%409 = OpAccessChain %393 %29 %135 %135 %135 %410 = OpLoad %8 %409 %411 = OpIAdd %8 %407 %410 OpLine %3 7267 15 @@ -8382,13 +8382,13 @@ OpLine %3 7308 20 OpLine %3 7311 21 %462 = OpCompositeExtract %4 %458 0 OpLine %3 7311 21 -%463 = OpAccessChain %393 %446 %373 +%463 = OpAccessChain %393 %36 %135 %373 %464 = OpLoad %8 %463 %465 = OpConvertUToF %4 %464 %466 = OpFMul %4 %462 %465 %467 = OpCompositeExtract %4 %458 1 OpLine %3 7311 17 -%468 = OpAccessChain %393 %446 %373 +%468 = OpAccessChain %393 %36 %135 %373 %469 = OpLoad %8 %468 %470 = OpConvertUToF %4 %469 %471 = OpFMul %4 %467 %470 @@ -8396,7 +8396,7 @@ OpLine %3 7311 17 %474 = OpExtInst %4 %1 FClamp %472 %74 %473 %475 = OpConvertFToU %8 %474 OpLine %3 7311 17 -%476 = OpAccessChain %393 %446 %374 +%476 = OpAccessChain %393 %36 %135 %374 %477 = OpLoad %8 %476 %478 = OpIAdd %8 %475 %477 OpLine %3 7313 12 @@ -8424,17 +8424,17 @@ OpLine %3 7324 17 %501 = OpCompositeExtract %6 %484 2 %502 = OpCompositeExtract %4 %501 0 OpLine %3 7324 17 -%503 = OpAccessChain %393 %496 %373 +%503 = OpAccessChain %393 %36 %135 %373 %504 = OpLoad %8 %503 %505 = OpConvertUToF %4 %504 %506 = OpFMul %4 %502 %505 %507 = OpCompositeExtract %6 %484 2 %508 = OpCompositeExtract %4 %507 1 OpLine %3 7324 70 -%509 = OpAccessChain %393 %496 %373 +%509 = OpAccessChain %393 %36 %135 %373 %510 = OpLoad %8 %509 OpLine %3 7324 13 -%511 = OpAccessChain %393 %496 %373 +%511 = OpAccessChain %393 %36 %135 %373 %512 = OpLoad %8 %511 %513 = OpIMul %8 %510 %512 %514 = OpConvertUToF %4 %513 @@ -8443,7 +8443,7 @@ OpLine %3 7324 13 %517 = OpExtInst %4 %1 FClamp %516 %74 %473 %518 = OpConvertFToU %8 %517 OpLine %3 7324 13 -%519 = OpAccessChain %393 %496 %374 +%519 = OpAccessChain %393 %36 %135 %374 %520 = OpLoad %8 %519 %521 = OpIAdd %8 %518 %520 OpLine %3 7325 32 @@ -8456,15 +8456,15 @@ OpLine %3 7325 22 OpLine %3 7326 22 %527 = OpFunctionCall %8 %427 %521 %371 OpLine %3 7328 36 -%528 = OpAccessChain %377 %496 %135 +%528 = OpAccessChain %377 %36 %135 %135 %529 = OpLoad %10 %528 OpLine %3 7328 57 -%530 = OpAccessChain %380 %496 %126 +%530 = OpAccessChain %380 %36 %135 %126 %531 = OpLoad %11 %530 OpLine %3 7328 13 %532 = OpFunctionCall %6 %325 %526 %529 %531 OpLine %3 7329 31 -%533 = OpAccessChain %386 %496 %372 +%533 = OpAccessChain %386 %36 %135 %372 %534 = OpLoad %6 %533 OpLine %3 7329 13 %535 = OpFunctionCall %14 %284 %532 %534 @@ -8517,14 +8517,14 @@ OpBranch %536 OpBranch %536 %536 = OpLabel OpLine %3 7343 15 -%556 = OpAccessChain %393 %496 %135 %135 +%556 = OpAccessChain %393 %36 %135 %135 %135 %557 = OpLoad %8 %556 %558 = OpFunctionCall %8 %313 %526 %557 %559 = OpIAdd %8 %526 %558 OpLine %3 7344 15 %560 = OpIAdd %8 %559 %126 OpLine %3 7345 15 -%561 = OpAccessChain %393 %496 %135 %135 +%561 = OpAccessChain %393 %36 %135 %135 %135 %562 = OpLoad %8 %561 %563 = OpIAdd %8 %559 %562 OpLine %3 7345 15 @@ -8578,7 +8578,7 @@ OpFunctionEnd OpBranch %593 %593 = OpLabel OpLine %3 7397 25 -%595 = OpAccessChain %594 %592 %126 +%595 = OpAccessChain %594 %39 %135 %126 %596 = OpLoad %23 %595 %597 = OpCompositeExtract %5 %580 0 OpLine %3 7397 25 @@ -8638,17 +8638,17 @@ OpLine %3 7429 13 OpLine %3 7429 5 OpStore %629 %645 OpLine %3 7432 25 -%647 = OpAccessChain %646 %618 %126 +%647 = OpAccessChain %646 %42 %135 %126 %648 = OpLoad %5 %647 %649 = OpVectorTimesScalar %5 %648 %286 OpLine %3 7434 21 -%650 = OpAccessChain %646 %618 %135 +%650 = OpAccessChain %646 %42 %135 %135 %651 = OpLoad %5 %650 %652 = OpCompositeExtract %5 %607 2 %653 = OpFSub %5 %651 %652 %654 = OpExtInst %5 %1 Normalize %653 OpLine %3 7435 20 -%656 = OpAccessChain %655 %616 %135 +%656 = OpAccessChain %655 %39 %135 %135 %657 = OpLoad %7 %656 %658 = OpVectorShuffle %5 %657 %657 0 1 2 %659 = OpCompositeExtract %5 %607 2 @@ -8663,7 +8663,7 @@ OpLine %3 7438 32 OpLine %3 7438 28 %666 = OpExtInst %4 %1 FMax %665 %74 OpLine %3 7439 25 -%667 = OpAccessChain %646 %618 %126 +%667 = OpAccessChain %646 %42 %135 %126 %668 = OpLoad %5 %667 %669 = OpVectorTimesScalar %5 %668 %666 OpLine %3 7441 37 @@ -8674,7 +8674,7 @@ OpLine %3 7441 33 OpLine %3 7441 29 %673 = OpExtInst %4 %1 Pow %672 %345 OpLine %3 7442 26 -%674 = OpAccessChain %646 %618 %126 +%674 = OpAccessChain %646 %42 %135 %126 %675 = OpLoad %5 %674 %676 = OpVectorTimesScalar %5 %675 %673 OpLine %3 7444 18 diff --git a/naga/tests/out/spv/wgsl-debug-symbol-terrain.spvasm b/naga/tests/out/spv/wgsl-debug-symbol-terrain.spvasm index a6abe8092..c9ee9017e 100644 --- a/naga/tests/out/spv/wgsl-debug-symbol-terrain.spvasm +++ b/naga/tests/out/spv/wgsl-debug-symbol-terrain.spvasm @@ -1089,16 +1089,16 @@ OpBranch %375 OpLine %3 111 22 %376 = OpCompositeExtract %8 %366 0 OpLine %3 113 36 -%378 = OpAccessChain %377 %370 %135 +%378 = OpAccessChain %377 %29 %135 %135 %379 = OpLoad %10 %378 OpLine %3 113 59 -%381 = OpAccessChain %380 %370 %126 +%381 = OpAccessChain %380 %29 %135 %126 %382 = OpLoad %11 %381 OpLine %3 113 13 %383 = OpFunctionCall %6 %325 %376 %379 %382 OpLine %3 115 5 OpLine %3 115 51 -%387 = OpAccessChain %386 %370 %372 +%387 = OpAccessChain %386 %29 %135 %372 %388 = OpLoad %6 %387 OpLine %3 115 33 %389 = OpFunctionCall %14 %284 %383 %388 @@ -1110,10 +1110,10 @@ OpLine %3 118 23 OpLine %3 118 23 %392 = OpIMul %8 %391 %371 OpLine %3 120 25 -%394 = OpAccessChain %393 %370 %135 %135 +%394 = OpAccessChain %393 %29 %135 %135 %135 %395 = OpLoad %8 %394 OpLine %3 120 25 -%396 = OpAccessChain %393 %370 %135 %126 +%396 = OpAccessChain %393 %29 %135 %135 %126 %397 = OpLoad %8 %396 %398 = OpIMul %8 %395 %397 OpLine %3 120 9 @@ -1128,14 +1128,14 @@ OpReturn OpLine %3 122 28 %403 = OpCompositeExtract %8 %366 0 OpLine %3 122 15 -%404 = OpAccessChain %393 %370 %135 %135 +%404 = OpAccessChain %393 %29 %135 %135 %135 %405 = OpLoad %8 %404 %406 = OpFunctionCall %8 %313 %403 %405 %407 = OpIAdd %8 %376 %406 OpLine %3 123 15 %408 = OpIAdd %8 %407 %126 OpLine %3 124 15 -%409 = OpAccessChain %393 %370 %135 %135 +%409 = OpAccessChain %393 %29 %135 %135 %135 %410 = OpLoad %8 %409 %411 = OpIAdd %8 %407 %410 OpLine %3 124 15 @@ -1218,13 +1218,13 @@ OpLine %3 166 20 OpLine %3 169 21 %462 = OpCompositeExtract %4 %458 0 OpLine %3 169 21 -%463 = OpAccessChain %393 %446 %373 +%463 = OpAccessChain %393 %36 %135 %373 %464 = OpLoad %8 %463 %465 = OpConvertUToF %4 %464 %466 = OpFMul %4 %462 %465 %467 = OpCompositeExtract %4 %458 1 OpLine %3 169 17 -%468 = OpAccessChain %393 %446 %373 +%468 = OpAccessChain %393 %36 %135 %373 %469 = OpLoad %8 %468 %470 = OpConvertUToF %4 %469 %471 = OpFMul %4 %467 %470 @@ -1232,7 +1232,7 @@ OpLine %3 169 17 %474 = OpExtInst %4 %1 FClamp %472 %74 %473 %475 = OpConvertFToU %8 %474 OpLine %3 169 17 -%476 = OpAccessChain %393 %446 %374 +%476 = OpAccessChain %393 %36 %135 %374 %477 = OpLoad %8 %476 %478 = OpIAdd %8 %475 %477 OpLine %3 171 12 @@ -1260,17 +1260,17 @@ OpLine %3 182 17 %501 = OpCompositeExtract %6 %484 2 %502 = OpCompositeExtract %4 %501 0 OpLine %3 182 17 -%503 = OpAccessChain %393 %496 %373 +%503 = OpAccessChain %393 %36 %135 %373 %504 = OpLoad %8 %503 %505 = OpConvertUToF %4 %504 %506 = OpFMul %4 %502 %505 %507 = OpCompositeExtract %6 %484 2 %508 = OpCompositeExtract %4 %507 1 OpLine %3 182 70 -%509 = OpAccessChain %393 %496 %373 +%509 = OpAccessChain %393 %36 %135 %373 %510 = OpLoad %8 %509 OpLine %3 182 13 -%511 = OpAccessChain %393 %496 %373 +%511 = OpAccessChain %393 %36 %135 %373 %512 = OpLoad %8 %511 %513 = OpIMul %8 %510 %512 %514 = OpConvertUToF %4 %513 @@ -1279,7 +1279,7 @@ OpLine %3 182 13 %517 = OpExtInst %4 %1 FClamp %516 %74 %473 %518 = OpConvertFToU %8 %517 OpLine %3 182 13 -%519 = OpAccessChain %393 %496 %374 +%519 = OpAccessChain %393 %36 %135 %374 %520 = OpLoad %8 %519 %521 = OpIAdd %8 %518 %520 OpLine %3 183 32 @@ -1292,15 +1292,15 @@ OpLine %3 183 22 OpLine %3 184 22 %527 = OpFunctionCall %8 %427 %521 %371 OpLine %3 186 36 -%528 = OpAccessChain %377 %496 %135 +%528 = OpAccessChain %377 %36 %135 %135 %529 = OpLoad %10 %528 OpLine %3 186 57 -%530 = OpAccessChain %380 %496 %126 +%530 = OpAccessChain %380 %36 %135 %126 %531 = OpLoad %11 %530 OpLine %3 186 13 %532 = OpFunctionCall %6 %325 %526 %529 %531 OpLine %3 187 31 -%533 = OpAccessChain %386 %496 %372 +%533 = OpAccessChain %386 %36 %135 %372 %534 = OpLoad %6 %533 OpLine %3 187 13 %535 = OpFunctionCall %14 %284 %532 %534 @@ -1353,14 +1353,14 @@ OpBranch %536 OpBranch %536 %536 = OpLabel OpLine %3 201 15 -%556 = OpAccessChain %393 %496 %135 %135 +%556 = OpAccessChain %393 %36 %135 %135 %135 %557 = OpLoad %8 %556 %558 = OpFunctionCall %8 %313 %526 %557 %559 = OpIAdd %8 %526 %558 OpLine %3 202 15 %560 = OpIAdd %8 %559 %126 OpLine %3 203 15 -%561 = OpAccessChain %393 %496 %135 %135 +%561 = OpAccessChain %393 %36 %135 %135 %135 %562 = OpLoad %8 %561 %563 = OpIAdd %8 %559 %562 OpLine %3 203 15 @@ -1414,7 +1414,7 @@ OpFunctionEnd OpBranch %593 %593 = OpLabel OpLine %3 255 25 -%595 = OpAccessChain %594 %592 %126 +%595 = OpAccessChain %594 %39 %135 %126 %596 = OpLoad %23 %595 %597 = OpCompositeExtract %5 %580 0 OpLine %3 255 25 @@ -1474,17 +1474,17 @@ OpLine %3 287 13 OpLine %3 287 5 OpStore %629 %645 OpLine %3 290 25 -%647 = OpAccessChain %646 %618 %126 +%647 = OpAccessChain %646 %42 %135 %126 %648 = OpLoad %5 %647 %649 = OpVectorTimesScalar %5 %648 %286 OpLine %3 292 21 -%650 = OpAccessChain %646 %618 %135 +%650 = OpAccessChain %646 %42 %135 %135 %651 = OpLoad %5 %650 %652 = OpCompositeExtract %5 %607 2 %653 = OpFSub %5 %651 %652 %654 = OpExtInst %5 %1 Normalize %653 OpLine %3 293 20 -%656 = OpAccessChain %655 %616 %135 +%656 = OpAccessChain %655 %39 %135 %135 %657 = OpLoad %7 %656 %658 = OpVectorShuffle %5 %657 %657 0 1 2 %659 = OpCompositeExtract %5 %607 2 @@ -1499,7 +1499,7 @@ OpLine %3 296 32 OpLine %3 296 28 %666 = OpExtInst %4 %1 FMax %665 %74 OpLine %3 297 25 -%667 = OpAccessChain %646 %618 %126 +%667 = OpAccessChain %646 %42 %135 %126 %668 = OpLoad %5 %667 %669 = OpVectorTimesScalar %5 %668 %666 OpLine %3 299 37 @@ -1510,7 +1510,7 @@ OpLine %3 299 33 OpLine %3 299 29 %673 = OpExtInst %4 %1 Pow %672 %345 OpLine %3 300 26 -%674 = OpAccessChain %646 %618 %126 +%674 = OpAccessChain %646 %42 %135 %126 %675 = OpLoad %5 %674 %676 = OpVectorTimesScalar %5 %675 %673 OpLine %3 302 18 diff --git a/naga/tests/out/spv/wgsl-extra.spvasm b/naga/tests/out/spv/wgsl-extra.spvasm index 0d091ae1f..5cd39f1e9 100644 --- a/naga/tests/out/spv/wgsl-extra.spvasm +++ b/naga/tests/out/spv/wgsl-extra.spvasm @@ -51,7 +51,7 @@ OpDecorate %20 Location 0 OpBranch %30 %30 = OpLabel %31 = OpCompositeExtract %3 %13 1 -%33 = OpAccessChain %32 %26 %25 +%33 = OpAccessChain %32 %9 %25 %25 %34 = OpLoad %3 %33 %36 = OpIEqual %35 %31 %34 OpSelectionMerge %37 None diff --git a/naga/tests/out/spv/wgsl-f16.spvasm b/naga/tests/out/spv/wgsl-f16.spvasm index f256316e9..d62b9a4ad 100644 --- a/naga/tests/out/spv/wgsl-f16.spvasm +++ b/naga/tests/out/spv/wgsl-f16.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.0 ; Generator: rspirv -; Bound: 568 +; Bound: 574 OpCapability Shader OpCapability Float16 OpCapability StorageBuffer16BitAccess @@ -11,8 +11,8 @@ OpExtension "SPV_KHR_storage_buffer_storage_class" OpExtension "SPV_KHR_16bit_storage" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %556 "main" -OpExecutionMode %556 LocalSize 1 1 1 +OpEntryPoint GLCompute %562 "main" +OpExecutionMode %562 LocalSize 1 1 1 OpMemberDecorate %19 0 Offset 0 OpMemberDecorate %19 1 Offset 4 OpMemberDecorate %19 2 Offset 8 @@ -192,51 +192,51 @@ OpMemberDecorate %42 0 Offset 0 %140 = OpTypePointer Uniform %10 %141 = OpConstant %4 8 %142 = OpConstant %4 9 -%158 = OpTypePointer StorageBuffer %11 -%159 = OpTypePointer Uniform %11 -%160 = OpConstant %4 10 -%173 = OpTypePointer StorageBuffer %12 -%174 = OpTypePointer Uniform %12 -%175 = OpConstant %4 11 -%188 = OpTypePointer StorageBuffer %13 -%189 = OpTypePointer Uniform %13 -%190 = OpConstant %4 12 -%191 = OpConstant %4 13 -%192 = OpConstant %4 14 -%213 = OpTypePointer StorageBuffer %14 -%214 = OpTypePointer Uniform %14 -%215 = OpConstant %4 15 -%231 = OpTypePointer StorageBuffer %15 -%232 = OpTypePointer Uniform %15 -%233 = OpConstant %4 16 -%249 = OpTypePointer StorageBuffer %16 -%250 = OpTypePointer Uniform %16 -%251 = OpConstant %4 17 -%252 = OpConstant %4 18 -%253 = OpConstant %4 19 -%254 = OpConstant %4 20 -%280 = OpTypePointer StorageBuffer %17 -%281 = OpTypePointer Uniform %17 -%282 = OpConstant %4 21 -%301 = OpTypePointer StorageBuffer %18 -%302 = OpTypePointer Uniform %18 -%303 = OpConstant %4 22 -%322 = OpTypePointer StorageBuffer %20 -%361 = OpTypeVector %6 2 -%367 = OpTypeVector %6 3 -%373 = OpTypeVector %6 4 -%382 = OpTypeMatrix %361 2 -%396 = OpTypeMatrix %367 2 -%410 = OpTypeMatrix %373 2 -%429 = OpTypeMatrix %361 3 -%447 = OpTypeMatrix %367 3 -%465 = OpTypeMatrix %373 3 -%490 = OpTypeMatrix %361 4 -%512 = OpTypeMatrix %367 4 -%534 = OpTypeMatrix %373 4 -%557 = OpTypeFunction %2 -%563 = OpConstant %3 0.000000000000000000000000000000000000000022959 -%566 = OpConstant %4 7 +%159 = OpTypePointer StorageBuffer %11 +%160 = OpTypePointer Uniform %11 +%161 = OpConstant %4 10 +%174 = OpTypePointer StorageBuffer %12 +%175 = OpTypePointer Uniform %12 +%176 = OpConstant %4 11 +%189 = OpTypePointer StorageBuffer %13 +%190 = OpTypePointer Uniform %13 +%191 = OpConstant %4 12 +%192 = OpConstant %4 13 +%193 = OpConstant %4 14 +%215 = OpTypePointer StorageBuffer %14 +%216 = OpTypePointer Uniform %14 +%217 = OpConstant %4 15 +%233 = OpTypePointer StorageBuffer %15 +%234 = OpTypePointer Uniform %15 +%235 = OpConstant %4 16 +%251 = OpTypePointer StorageBuffer %16 +%252 = OpTypePointer Uniform %16 +%253 = OpConstant %4 17 +%254 = OpConstant %4 18 +%255 = OpConstant %4 19 +%256 = OpConstant %4 20 +%283 = OpTypePointer StorageBuffer %17 +%284 = OpTypePointer Uniform %17 +%285 = OpConstant %4 21 +%304 = OpTypePointer StorageBuffer %18 +%305 = OpTypePointer Uniform %18 +%306 = OpConstant %4 22 +%325 = OpTypePointer StorageBuffer %20 +%364 = OpTypeVector %6 2 +%370 = OpTypeVector %6 3 +%376 = OpTypeVector %6 4 +%386 = OpTypeMatrix %364 2 +%400 = OpTypeMatrix %370 2 +%414 = OpTypeMatrix %376 2 +%434 = OpTypeMatrix %364 3 +%452 = OpTypeMatrix %370 3 +%470 = OpTypeMatrix %376 3 +%496 = OpTypeMatrix %364 4 +%518 = OpTypeMatrix %370 4 +%540 = OpTypeMatrix %376 4 +%563 = OpTypeFunction %2 +%569 = OpConstant %3 0.000000000000000000000000000000000000000022959 +%572 = OpConstant %4 7 %46 = OpFunction %3 None %47 %45 = OpFunctionParameter %3 %44 = OpLabel @@ -259,7 +259,7 @@ OpStore %68 %73 %77 = OpFAdd %3 %74 %76 OpStore %68 %77 %78 = OpLoad %3 %68 -%80 = OpAccessChain %79 %50 %21 +%80 = OpAccessChain %79 %29 %49 %21 %81 = OpLoad %6 %80 %82 = OpLoad %3 %68 %83 = OpFConvert %6 %82 @@ -268,464 +268,470 @@ OpStore %68 %77 %86 = OpFAdd %3 %78 %85 OpStore %68 %86 %87 = OpLoad %3 %68 -%90 = OpAccessChain %88 %50 %89 +%90 = OpAccessChain %88 %29 %49 %89 %91 = OpLoad %3 %90 %92 = OpCompositeConstruct %8 %91 %91 %91 %93 = OpCompositeExtract %3 %92 2 %94 = OpFAdd %3 %87 %93 OpStore %68 %94 -%97 = OpAccessChain %95 %55 %96 +%97 = OpAccessChain %95 %38 %49 %96 OpStore %97 %60 -%98 = OpAccessChain %95 %55 %96 +%98 = OpAccessChain %95 %38 %49 %96 OpStore %98 %61 -%100 = OpAccessChain %99 %55 %49 +%100 = OpAccessChain %99 %38 %49 %49 OpStore %100 %62 -%101 = OpAccessChain %99 %55 %49 +%101 = OpAccessChain %99 %38 %49 %49 OpStore %101 %49 -%103 = OpAccessChain %102 %55 %21 +%103 = OpAccessChain %102 %38 %49 %21 OpStore %103 %63 -%104 = OpAccessChain %102 %55 %21 +%104 = OpAccessChain %102 %38 %49 %21 OpStore %104 %64 -%106 = OpAccessChain %88 %50 %89 +%106 = OpAccessChain %88 %29 %49 %89 %107 = OpLoad %3 %106 -%108 = OpAccessChain %105 %52 %89 +%108 = OpAccessChain %105 %32 %49 %89 %109 = OpLoad %3 %108 %110 = OpFAdd %3 %107 %109 -%111 = OpAccessChain %105 %55 %89 +%111 = OpAccessChain %105 %38 %49 %89 OpStore %111 %110 -%115 = OpAccessChain %113 %50 %114 +%115 = OpAccessChain %113 %29 %49 %114 %116 = OpLoad %7 %115 -%117 = OpAccessChain %112 %52 %114 +%117 = OpAccessChain %112 %32 %49 %114 %118 = OpLoad %7 %117 %119 = OpFAdd %7 %116 %118 -%120 = OpAccessChain %112 %55 %114 +%120 = OpAccessChain %112 %38 %49 %114 OpStore %120 %119 -%124 = OpAccessChain %122 %50 %123 +%124 = OpAccessChain %122 %29 %49 %123 %125 = OpLoad %8 %124 -%126 = OpAccessChain %121 %52 %123 +%126 = OpAccessChain %121 %32 %49 %123 %127 = OpLoad %8 %126 %128 = OpFAdd %8 %125 %127 -%129 = OpAccessChain %121 %55 %123 +%129 = OpAccessChain %121 %38 %49 %123 OpStore %129 %128 -%133 = OpAccessChain %131 %50 %132 +%133 = OpAccessChain %131 %29 %49 %132 %134 = OpLoad %9 %133 -%135 = OpAccessChain %130 %52 %132 +%135 = OpAccessChain %130 %32 %49 %132 %136 = OpLoad %9 %135 %137 = OpFAdd %9 %134 %136 -%138 = OpAccessChain %130 %55 %132 +%138 = OpAccessChain %130 %38 %49 %132 OpStore %138 %137 -%143 = OpAccessChain %113 %50 %141 -%144 = OpLoad %7 %143 -%145 = OpAccessChain %113 %50 %142 -%146 = OpLoad %7 %145 -%147 = OpCompositeConstruct %10 %144 %146 -%148 = OpAccessChain %139 %52 %141 -%149 = OpLoad %10 %148 -%151 = OpCompositeExtract %7 %147 0 -%152 = OpCompositeExtract %7 %149 0 -%153 = OpFAdd %7 %151 %152 -%154 = OpCompositeExtract %7 %147 1 -%155 = OpCompositeExtract %7 %149 1 -%156 = OpFAdd %7 %154 %155 -%150 = OpCompositeConstruct %10 %153 %156 -%157 = OpAccessChain %139 %55 %141 -OpStore %157 %150 -%161 = OpAccessChain %159 %50 %160 -%162 = OpLoad %11 %161 -%163 = OpAccessChain %158 %52 %142 -%164 = OpLoad %11 %163 -%166 = OpCompositeExtract %8 %162 0 -%167 = OpCompositeExtract %8 %164 0 -%168 = OpFAdd %8 %166 %167 -%169 = OpCompositeExtract %8 %162 1 -%170 = OpCompositeExtract %8 %164 1 -%171 = OpFAdd %8 %169 %170 -%165 = OpCompositeConstruct %11 %168 %171 -%172 = OpAccessChain %158 %55 %142 -OpStore %172 %165 -%176 = OpAccessChain %174 %50 %175 -%177 = OpLoad %12 %176 -%178 = OpAccessChain %173 %52 %160 -%179 = OpLoad %12 %178 -%181 = OpCompositeExtract %9 %177 0 -%182 = OpCompositeExtract %9 %179 0 -%183 = OpFAdd %9 %181 %182 -%184 = OpCompositeExtract %9 %177 1 -%185 = OpCompositeExtract %9 %179 1 -%186 = OpFAdd %9 %184 %185 -%180 = OpCompositeConstruct %12 %183 %186 -%187 = OpAccessChain %173 %55 %160 -OpStore %187 %180 -%193 = OpAccessChain %113 %50 %190 -%194 = OpLoad %7 %193 -%195 = OpAccessChain %113 %50 %191 +%143 = OpAccessChain %48 %29 %49 +%144 = OpAccessChain %113 %143 %141 +%145 = OpLoad %7 %144 +%146 = OpAccessChain %113 %143 %142 +%147 = OpLoad %7 %146 +%148 = OpCompositeConstruct %10 %145 %147 +%149 = OpAccessChain %139 %32 %49 %141 +%150 = OpLoad %10 %149 +%152 = OpCompositeExtract %7 %148 0 +%153 = OpCompositeExtract %7 %150 0 +%154 = OpFAdd %7 %152 %153 +%155 = OpCompositeExtract %7 %148 1 +%156 = OpCompositeExtract %7 %150 1 +%157 = OpFAdd %7 %155 %156 +%151 = OpCompositeConstruct %10 %154 %157 +%158 = OpAccessChain %139 %38 %49 %141 +OpStore %158 %151 +%162 = OpAccessChain %160 %29 %49 %161 +%163 = OpLoad %11 %162 +%164 = OpAccessChain %159 %32 %49 %142 +%165 = OpLoad %11 %164 +%167 = OpCompositeExtract %8 %163 0 +%168 = OpCompositeExtract %8 %165 0 +%169 = OpFAdd %8 %167 %168 +%170 = OpCompositeExtract %8 %163 1 +%171 = OpCompositeExtract %8 %165 1 +%172 = OpFAdd %8 %170 %171 +%166 = OpCompositeConstruct %11 %169 %172 +%173 = OpAccessChain %159 %38 %49 %142 +OpStore %173 %166 +%177 = OpAccessChain %175 %29 %49 %176 +%178 = OpLoad %12 %177 +%179 = OpAccessChain %174 %32 %49 %161 +%180 = OpLoad %12 %179 +%182 = OpCompositeExtract %9 %178 0 +%183 = OpCompositeExtract %9 %180 0 +%184 = OpFAdd %9 %182 %183 +%185 = OpCompositeExtract %9 %178 1 +%186 = OpCompositeExtract %9 %180 1 +%187 = OpFAdd %9 %185 %186 +%181 = OpCompositeConstruct %12 %184 %187 +%188 = OpAccessChain %174 %38 %49 %161 +OpStore %188 %181 +%194 = OpAccessChain %48 %29 %49 +%195 = OpAccessChain %113 %194 %191 %196 = OpLoad %7 %195 -%197 = OpAccessChain %113 %50 %192 +%197 = OpAccessChain %113 %194 %192 %198 = OpLoad %7 %197 -%199 = OpCompositeConstruct %13 %194 %196 %198 -%200 = OpAccessChain %188 %52 %175 -%201 = OpLoad %13 %200 -%203 = OpCompositeExtract %7 %199 0 -%204 = OpCompositeExtract %7 %201 0 -%205 = OpFAdd %7 %203 %204 -%206 = OpCompositeExtract %7 %199 1 -%207 = OpCompositeExtract %7 %201 1 -%208 = OpFAdd %7 %206 %207 -%209 = OpCompositeExtract %7 %199 2 -%210 = OpCompositeExtract %7 %201 2 -%211 = OpFAdd %7 %209 %210 -%202 = OpCompositeConstruct %13 %205 %208 %211 -%212 = OpAccessChain %188 %55 %175 -OpStore %212 %202 -%216 = OpAccessChain %214 %50 %215 -%217 = OpLoad %14 %216 -%218 = OpAccessChain %213 %52 %190 +%199 = OpAccessChain %113 %194 %193 +%200 = OpLoad %7 %199 +%201 = OpCompositeConstruct %13 %196 %198 %200 +%202 = OpAccessChain %189 %32 %49 %176 +%203 = OpLoad %13 %202 +%205 = OpCompositeExtract %7 %201 0 +%206 = OpCompositeExtract %7 %203 0 +%207 = OpFAdd %7 %205 %206 +%208 = OpCompositeExtract %7 %201 1 +%209 = OpCompositeExtract %7 %203 1 +%210 = OpFAdd %7 %208 %209 +%211 = OpCompositeExtract %7 %201 2 +%212 = OpCompositeExtract %7 %203 2 +%213 = OpFAdd %7 %211 %212 +%204 = OpCompositeConstruct %13 %207 %210 %213 +%214 = OpAccessChain %189 %38 %49 %176 +OpStore %214 %204 +%218 = OpAccessChain %216 %29 %49 %217 %219 = OpLoad %14 %218 -%221 = OpCompositeExtract %8 %217 0 -%222 = OpCompositeExtract %8 %219 0 -%223 = OpFAdd %8 %221 %222 -%224 = OpCompositeExtract %8 %217 1 -%225 = OpCompositeExtract %8 %219 1 -%226 = OpFAdd %8 %224 %225 -%227 = OpCompositeExtract %8 %217 2 -%228 = OpCompositeExtract %8 %219 2 -%229 = OpFAdd %8 %227 %228 -%220 = OpCompositeConstruct %14 %223 %226 %229 -%230 = OpAccessChain %213 %55 %190 -OpStore %230 %220 -%234 = OpAccessChain %232 %50 %233 -%235 = OpLoad %15 %234 -%236 = OpAccessChain %231 %52 %191 +%220 = OpAccessChain %215 %32 %49 %191 +%221 = OpLoad %14 %220 +%223 = OpCompositeExtract %8 %219 0 +%224 = OpCompositeExtract %8 %221 0 +%225 = OpFAdd %8 %223 %224 +%226 = OpCompositeExtract %8 %219 1 +%227 = OpCompositeExtract %8 %221 1 +%228 = OpFAdd %8 %226 %227 +%229 = OpCompositeExtract %8 %219 2 +%230 = OpCompositeExtract %8 %221 2 +%231 = OpFAdd %8 %229 %230 +%222 = OpCompositeConstruct %14 %225 %228 %231 +%232 = OpAccessChain %215 %38 %49 %191 +OpStore %232 %222 +%236 = OpAccessChain %234 %29 %49 %235 %237 = OpLoad %15 %236 -%239 = OpCompositeExtract %9 %235 0 -%240 = OpCompositeExtract %9 %237 0 -%241 = OpFAdd %9 %239 %240 -%242 = OpCompositeExtract %9 %235 1 -%243 = OpCompositeExtract %9 %237 1 -%244 = OpFAdd %9 %242 %243 -%245 = OpCompositeExtract %9 %235 2 -%246 = OpCompositeExtract %9 %237 2 -%247 = OpFAdd %9 %245 %246 -%238 = OpCompositeConstruct %15 %241 %244 %247 -%248 = OpAccessChain %231 %55 %191 -OpStore %248 %238 -%255 = OpAccessChain %113 %50 %251 -%256 = OpLoad %7 %255 -%257 = OpAccessChain %113 %50 %252 -%258 = OpLoad %7 %257 -%259 = OpAccessChain %113 %50 %253 -%260 = OpLoad %7 %259 -%261 = OpAccessChain %113 %50 %254 -%262 = OpLoad %7 %261 -%263 = OpCompositeConstruct %16 %256 %258 %260 %262 -%264 = OpAccessChain %249 %52 %192 -%265 = OpLoad %16 %264 -%267 = OpCompositeExtract %7 %263 0 -%268 = OpCompositeExtract %7 %265 0 -%269 = OpFAdd %7 %267 %268 -%270 = OpCompositeExtract %7 %263 1 -%271 = OpCompositeExtract %7 %265 1 +%238 = OpAccessChain %233 %32 %49 %192 +%239 = OpLoad %15 %238 +%241 = OpCompositeExtract %9 %237 0 +%242 = OpCompositeExtract %9 %239 0 +%243 = OpFAdd %9 %241 %242 +%244 = OpCompositeExtract %9 %237 1 +%245 = OpCompositeExtract %9 %239 1 +%246 = OpFAdd %9 %244 %245 +%247 = OpCompositeExtract %9 %237 2 +%248 = OpCompositeExtract %9 %239 2 +%249 = OpFAdd %9 %247 %248 +%240 = OpCompositeConstruct %15 %243 %246 %249 +%250 = OpAccessChain %233 %38 %49 %192 +OpStore %250 %240 +%257 = OpAccessChain %48 %29 %49 +%258 = OpAccessChain %113 %257 %253 +%259 = OpLoad %7 %258 +%260 = OpAccessChain %113 %257 %254 +%261 = OpLoad %7 %260 +%262 = OpAccessChain %113 %257 %255 +%263 = OpLoad %7 %262 +%264 = OpAccessChain %113 %257 %256 +%265 = OpLoad %7 %264 +%266 = OpCompositeConstruct %16 %259 %261 %263 %265 +%267 = OpAccessChain %251 %32 %49 %193 +%268 = OpLoad %16 %267 +%270 = OpCompositeExtract %7 %266 0 +%271 = OpCompositeExtract %7 %268 0 %272 = OpFAdd %7 %270 %271 -%273 = OpCompositeExtract %7 %263 2 -%274 = OpCompositeExtract %7 %265 2 +%273 = OpCompositeExtract %7 %266 1 +%274 = OpCompositeExtract %7 %268 1 %275 = OpFAdd %7 %273 %274 -%276 = OpCompositeExtract %7 %263 3 -%277 = OpCompositeExtract %7 %265 3 +%276 = OpCompositeExtract %7 %266 2 +%277 = OpCompositeExtract %7 %268 2 %278 = OpFAdd %7 %276 %277 -%266 = OpCompositeConstruct %16 %269 %272 %275 %278 -%279 = OpAccessChain %249 %55 %192 -OpStore %279 %266 -%283 = OpAccessChain %281 %50 %282 -%284 = OpLoad %17 %283 -%285 = OpAccessChain %280 %52 %215 -%286 = OpLoad %17 %285 -%288 = OpCompositeExtract %8 %284 0 -%289 = OpCompositeExtract %8 %286 0 -%290 = OpFAdd %8 %288 %289 -%291 = OpCompositeExtract %8 %284 1 -%292 = OpCompositeExtract %8 %286 1 +%279 = OpCompositeExtract %7 %266 3 +%280 = OpCompositeExtract %7 %268 3 +%281 = OpFAdd %7 %279 %280 +%269 = OpCompositeConstruct %16 %272 %275 %278 %281 +%282 = OpAccessChain %251 %38 %49 %193 +OpStore %282 %269 +%286 = OpAccessChain %284 %29 %49 %285 +%287 = OpLoad %17 %286 +%288 = OpAccessChain %283 %32 %49 %217 +%289 = OpLoad %17 %288 +%291 = OpCompositeExtract %8 %287 0 +%292 = OpCompositeExtract %8 %289 0 %293 = OpFAdd %8 %291 %292 -%294 = OpCompositeExtract %8 %284 2 -%295 = OpCompositeExtract %8 %286 2 +%294 = OpCompositeExtract %8 %287 1 +%295 = OpCompositeExtract %8 %289 1 %296 = OpFAdd %8 %294 %295 -%297 = OpCompositeExtract %8 %284 3 -%298 = OpCompositeExtract %8 %286 3 +%297 = OpCompositeExtract %8 %287 2 +%298 = OpCompositeExtract %8 %289 2 %299 = OpFAdd %8 %297 %298 -%287 = OpCompositeConstruct %17 %290 %293 %296 %299 -%300 = OpAccessChain %280 %55 %215 -OpStore %300 %287 -%304 = OpAccessChain %302 %50 %303 -%305 = OpLoad %18 %304 -%306 = OpAccessChain %301 %52 %233 -%307 = OpLoad %18 %306 -%309 = OpCompositeExtract %9 %305 0 -%310 = OpCompositeExtract %9 %307 0 -%311 = OpFAdd %9 %309 %310 -%312 = OpCompositeExtract %9 %305 1 -%313 = OpCompositeExtract %9 %307 1 +%300 = OpCompositeExtract %8 %287 3 +%301 = OpCompositeExtract %8 %289 3 +%302 = OpFAdd %8 %300 %301 +%290 = OpCompositeConstruct %17 %293 %296 %299 %302 +%303 = OpAccessChain %283 %38 %49 %217 +OpStore %303 %290 +%307 = OpAccessChain %305 %29 %49 %306 +%308 = OpLoad %18 %307 +%309 = OpAccessChain %304 %32 %49 %235 +%310 = OpLoad %18 %309 +%312 = OpCompositeExtract %9 %308 0 +%313 = OpCompositeExtract %9 %310 0 %314 = OpFAdd %9 %312 %313 -%315 = OpCompositeExtract %9 %305 2 -%316 = OpCompositeExtract %9 %307 2 +%315 = OpCompositeExtract %9 %308 1 +%316 = OpCompositeExtract %9 %310 1 %317 = OpFAdd %9 %315 %316 -%318 = OpCompositeExtract %9 %305 3 -%319 = OpCompositeExtract %9 %307 3 +%318 = OpCompositeExtract %9 %308 2 +%319 = OpCompositeExtract %9 %310 2 %320 = OpFAdd %9 %318 %319 -%308 = OpCompositeConstruct %18 %311 %314 %317 %320 -%321 = OpAccessChain %301 %55 %233 -OpStore %321 %308 -%323 = OpAccessChain %322 %54 %49 -%324 = OpLoad %20 %323 -%325 = OpAccessChain %322 %56 %49 -OpStore %325 %324 -%326 = OpLoad %3 %68 -%327 = OpLoad %3 %68 -%328 = OpExtInst %3 %1 FAbs %327 -%329 = OpFAdd %3 %326 %328 -OpStore %68 %329 +%321 = OpCompositeExtract %9 %308 3 +%322 = OpCompositeExtract %9 %310 3 +%323 = OpFAdd %9 %321 %322 +%311 = OpCompositeConstruct %18 %314 %317 %320 %323 +%324 = OpAccessChain %304 %38 %49 %235 +OpStore %324 %311 +%326 = OpAccessChain %325 %35 %49 %49 +%327 = OpLoad %20 %326 +%328 = OpAccessChain %325 %41 %49 %49 +OpStore %328 %327 +%329 = OpLoad %3 %68 %330 = OpLoad %3 %68 -%331 = OpLoad %3 %68 -%332 = OpLoad %3 %68 +%331 = OpExtInst %3 %1 FAbs %330 +%332 = OpFAdd %3 %329 %331 +OpStore %68 %332 %333 = OpLoad %3 %68 -%334 = OpExtInst %3 %1 FClamp %331 %332 %333 -%335 = OpFAdd %3 %330 %334 -OpStore %68 %335 +%334 = OpLoad %3 %68 +%335 = OpLoad %3 %68 %336 = OpLoad %3 %68 -%337 = OpLoad %3 %68 -%338 = OpCompositeConstruct %7 %337 %337 +%337 = OpExtInst %3 %1 FClamp %334 %335 %336 +%338 = OpFAdd %3 %333 %337 +OpStore %68 %338 %339 = OpLoad %3 %68 -%340 = OpCompositeConstruct %7 %339 %339 -%341 = OpDot %3 %338 %340 -%342 = OpFAdd %3 %336 %341 -OpStore %68 %342 -%343 = OpLoad %3 %68 -%344 = OpLoad %3 %68 -%345 = OpLoad %3 %68 -%346 = OpExtInst %3 %1 FMax %344 %345 -%347 = OpFAdd %3 %343 %346 -OpStore %68 %347 +%340 = OpLoad %3 %68 +%341 = OpCompositeConstruct %7 %340 %340 +%342 = OpLoad %3 %68 +%343 = OpCompositeConstruct %7 %342 %342 +%344 = OpDot %3 %341 %343 +%345 = OpFAdd %3 %339 %344 +OpStore %68 %345 +%346 = OpLoad %3 %68 +%347 = OpLoad %3 %68 %348 = OpLoad %3 %68 -%349 = OpLoad %3 %68 -%350 = OpLoad %3 %68 -%351 = OpExtInst %3 %1 FMin %349 %350 -%352 = OpFAdd %3 %348 %351 -OpStore %68 %352 +%349 = OpExtInst %3 %1 FMax %347 %348 +%350 = OpFAdd %3 %346 %349 +OpStore %68 %350 +%351 = OpLoad %3 %68 +%352 = OpLoad %3 %68 %353 = OpLoad %3 %68 -%354 = OpLoad %3 %68 -%355 = OpExtInst %3 %1 FSign %354 -%356 = OpFAdd %3 %353 %355 -OpStore %68 %356 +%354 = OpExtInst %3 %1 FMin %352 %353 +%355 = OpFAdd %3 %351 %354 +OpStore %68 %355 +%356 = OpLoad %3 %68 %357 = OpLoad %3 %68 -%358 = OpFAdd %3 %357 %25 -OpStore %68 %358 -%359 = OpAccessChain %113 %50 %114 -%360 = OpLoad %7 %359 -%362 = OpFConvert %361 %360 -%363 = OpFConvert %7 %362 -%364 = OpAccessChain %112 %55 %114 -OpStore %364 %363 -%365 = OpAccessChain %122 %50 %123 -%366 = OpLoad %8 %365 -%368 = OpFConvert %367 %366 -%369 = OpFConvert %8 %368 -%370 = OpAccessChain %121 %55 %123 -OpStore %370 %369 -%371 = OpAccessChain %131 %50 %132 -%372 = OpLoad %9 %371 -%374 = OpFConvert %373 %372 -%375 = OpFConvert %9 %374 -%376 = OpAccessChain %130 %55 %132 -OpStore %376 %375 -%377 = OpAccessChain %113 %50 %141 -%378 = OpLoad %7 %377 -%379 = OpAccessChain %113 %50 %142 -%380 = OpLoad %7 %379 -%381 = OpCompositeConstruct %10 %378 %380 -%383 = OpCompositeExtract %7 %381 0 -%384 = OpFConvert %361 %383 -%385 = OpCompositeExtract %7 %381 1 -%386 = OpFConvert %361 %385 -%387 = OpCompositeConstruct %382 %384 %386 -%388 = OpCompositeExtract %361 %387 0 -%389 = OpFConvert %7 %388 -%390 = OpCompositeExtract %361 %387 1 -%391 = OpFConvert %7 %390 -%392 = OpCompositeConstruct %10 %389 %391 -%393 = OpAccessChain %139 %55 %141 -OpStore %393 %392 -%394 = OpAccessChain %159 %50 %160 -%395 = OpLoad %11 %394 -%397 = OpCompositeExtract %8 %395 0 -%398 = OpFConvert %367 %397 -%399 = OpCompositeExtract %8 %395 1 -%400 = OpFConvert %367 %399 -%401 = OpCompositeConstruct %396 %398 %400 -%402 = OpCompositeExtract %367 %401 0 -%403 = OpFConvert %8 %402 -%404 = OpCompositeExtract %367 %401 1 -%405 = OpFConvert %8 %404 -%406 = OpCompositeConstruct %11 %403 %405 -%407 = OpAccessChain %158 %55 %142 -OpStore %407 %406 -%408 = OpAccessChain %174 %50 %175 -%409 = OpLoad %12 %408 -%411 = OpCompositeExtract %9 %409 0 -%412 = OpFConvert %373 %411 -%413 = OpCompositeExtract %9 %409 1 -%414 = OpFConvert %373 %413 -%415 = OpCompositeConstruct %410 %412 %414 -%416 = OpCompositeExtract %373 %415 0 -%417 = OpFConvert %9 %416 -%418 = OpCompositeExtract %373 %415 1 -%419 = OpFConvert %9 %418 -%420 = OpCompositeConstruct %12 %417 %419 -%421 = OpAccessChain %173 %55 %160 -OpStore %421 %420 -%422 = OpAccessChain %113 %50 %190 -%423 = OpLoad %7 %422 -%424 = OpAccessChain %113 %50 %191 -%425 = OpLoad %7 %424 -%426 = OpAccessChain %113 %50 %192 -%427 = OpLoad %7 %426 -%428 = OpCompositeConstruct %13 %423 %425 %427 -%430 = OpCompositeExtract %7 %428 0 -%431 = OpFConvert %361 %430 -%432 = OpCompositeExtract %7 %428 1 -%433 = OpFConvert %361 %432 -%434 = OpCompositeExtract %7 %428 2 -%435 = OpFConvert %361 %434 -%436 = OpCompositeConstruct %429 %431 %433 %435 -%437 = OpCompositeExtract %361 %436 0 -%438 = OpFConvert %7 %437 -%439 = OpCompositeExtract %361 %436 1 -%440 = OpFConvert %7 %439 -%441 = OpCompositeExtract %361 %436 2 -%442 = OpFConvert %7 %441 -%443 = OpCompositeConstruct %13 %438 %440 %442 -%444 = OpAccessChain %188 %55 %175 -OpStore %444 %443 -%445 = OpAccessChain %214 %50 %215 -%446 = OpLoad %14 %445 -%448 = OpCompositeExtract %8 %446 0 -%449 = OpFConvert %367 %448 -%450 = OpCompositeExtract %8 %446 1 -%451 = OpFConvert %367 %450 -%452 = OpCompositeExtract %8 %446 2 -%453 = OpFConvert %367 %452 -%454 = OpCompositeConstruct %447 %449 %451 %453 -%455 = OpCompositeExtract %367 %454 0 -%456 = OpFConvert %8 %455 -%457 = OpCompositeExtract %367 %454 1 -%458 = OpFConvert %8 %457 -%459 = OpCompositeExtract %367 %454 2 -%460 = OpFConvert %8 %459 -%461 = OpCompositeConstruct %14 %456 %458 %460 -%462 = OpAccessChain %213 %55 %190 -OpStore %462 %461 -%463 = OpAccessChain %232 %50 %233 -%464 = OpLoad %15 %463 -%466 = OpCompositeExtract %9 %464 0 -%467 = OpFConvert %373 %466 -%468 = OpCompositeExtract %9 %464 1 -%469 = OpFConvert %373 %468 -%470 = OpCompositeExtract %9 %464 2 -%471 = OpFConvert %373 %470 -%472 = OpCompositeConstruct %465 %467 %469 %471 -%473 = OpCompositeExtract %373 %472 0 -%474 = OpFConvert %9 %473 -%475 = OpCompositeExtract %373 %472 1 -%476 = OpFConvert %9 %475 -%477 = OpCompositeExtract %373 %472 2 -%478 = OpFConvert %9 %477 -%479 = OpCompositeConstruct %15 %474 %476 %478 -%480 = OpAccessChain %231 %55 %191 -OpStore %480 %479 -%481 = OpAccessChain %113 %50 %251 -%482 = OpLoad %7 %481 -%483 = OpAccessChain %113 %50 %252 -%484 = OpLoad %7 %483 -%485 = OpAccessChain %113 %50 %253 -%486 = OpLoad %7 %485 -%487 = OpAccessChain %113 %50 %254 +%358 = OpExtInst %3 %1 FSign %357 +%359 = OpFAdd %3 %356 %358 +OpStore %68 %359 +%360 = OpLoad %3 %68 +%361 = OpFAdd %3 %360 %25 +OpStore %68 %361 +%362 = OpAccessChain %113 %29 %49 %114 +%363 = OpLoad %7 %362 +%365 = OpFConvert %364 %363 +%366 = OpFConvert %7 %365 +%367 = OpAccessChain %112 %38 %49 %114 +OpStore %367 %366 +%368 = OpAccessChain %122 %29 %49 %123 +%369 = OpLoad %8 %368 +%371 = OpFConvert %370 %369 +%372 = OpFConvert %8 %371 +%373 = OpAccessChain %121 %38 %49 %123 +OpStore %373 %372 +%374 = OpAccessChain %131 %29 %49 %132 +%375 = OpLoad %9 %374 +%377 = OpFConvert %376 %375 +%378 = OpFConvert %9 %377 +%379 = OpAccessChain %130 %38 %49 %132 +OpStore %379 %378 +%380 = OpAccessChain %48 %29 %49 +%381 = OpAccessChain %113 %380 %141 +%382 = OpLoad %7 %381 +%383 = OpAccessChain %113 %380 %142 +%384 = OpLoad %7 %383 +%385 = OpCompositeConstruct %10 %382 %384 +%387 = OpCompositeExtract %7 %385 0 +%388 = OpFConvert %364 %387 +%389 = OpCompositeExtract %7 %385 1 +%390 = OpFConvert %364 %389 +%391 = OpCompositeConstruct %386 %388 %390 +%392 = OpCompositeExtract %364 %391 0 +%393 = OpFConvert %7 %392 +%394 = OpCompositeExtract %364 %391 1 +%395 = OpFConvert %7 %394 +%396 = OpCompositeConstruct %10 %393 %395 +%397 = OpAccessChain %139 %38 %49 %141 +OpStore %397 %396 +%398 = OpAccessChain %160 %29 %49 %161 +%399 = OpLoad %11 %398 +%401 = OpCompositeExtract %8 %399 0 +%402 = OpFConvert %370 %401 +%403 = OpCompositeExtract %8 %399 1 +%404 = OpFConvert %370 %403 +%405 = OpCompositeConstruct %400 %402 %404 +%406 = OpCompositeExtract %370 %405 0 +%407 = OpFConvert %8 %406 +%408 = OpCompositeExtract %370 %405 1 +%409 = OpFConvert %8 %408 +%410 = OpCompositeConstruct %11 %407 %409 +%411 = OpAccessChain %159 %38 %49 %142 +OpStore %411 %410 +%412 = OpAccessChain %175 %29 %49 %176 +%413 = OpLoad %12 %412 +%415 = OpCompositeExtract %9 %413 0 +%416 = OpFConvert %376 %415 +%417 = OpCompositeExtract %9 %413 1 +%418 = OpFConvert %376 %417 +%419 = OpCompositeConstruct %414 %416 %418 +%420 = OpCompositeExtract %376 %419 0 +%421 = OpFConvert %9 %420 +%422 = OpCompositeExtract %376 %419 1 +%423 = OpFConvert %9 %422 +%424 = OpCompositeConstruct %12 %421 %423 +%425 = OpAccessChain %174 %38 %49 %161 +OpStore %425 %424 +%426 = OpAccessChain %48 %29 %49 +%427 = OpAccessChain %113 %426 %191 +%428 = OpLoad %7 %427 +%429 = OpAccessChain %113 %426 %192 +%430 = OpLoad %7 %429 +%431 = OpAccessChain %113 %426 %193 +%432 = OpLoad %7 %431 +%433 = OpCompositeConstruct %13 %428 %430 %432 +%435 = OpCompositeExtract %7 %433 0 +%436 = OpFConvert %364 %435 +%437 = OpCompositeExtract %7 %433 1 +%438 = OpFConvert %364 %437 +%439 = OpCompositeExtract %7 %433 2 +%440 = OpFConvert %364 %439 +%441 = OpCompositeConstruct %434 %436 %438 %440 +%442 = OpCompositeExtract %364 %441 0 +%443 = OpFConvert %7 %442 +%444 = OpCompositeExtract %364 %441 1 +%445 = OpFConvert %7 %444 +%446 = OpCompositeExtract %364 %441 2 +%447 = OpFConvert %7 %446 +%448 = OpCompositeConstruct %13 %443 %445 %447 +%449 = OpAccessChain %189 %38 %49 %176 +OpStore %449 %448 +%450 = OpAccessChain %216 %29 %49 %217 +%451 = OpLoad %14 %450 +%453 = OpCompositeExtract %8 %451 0 +%454 = OpFConvert %370 %453 +%455 = OpCompositeExtract %8 %451 1 +%456 = OpFConvert %370 %455 +%457 = OpCompositeExtract %8 %451 2 +%458 = OpFConvert %370 %457 +%459 = OpCompositeConstruct %452 %454 %456 %458 +%460 = OpCompositeExtract %370 %459 0 +%461 = OpFConvert %8 %460 +%462 = OpCompositeExtract %370 %459 1 +%463 = OpFConvert %8 %462 +%464 = OpCompositeExtract %370 %459 2 +%465 = OpFConvert %8 %464 +%466 = OpCompositeConstruct %14 %461 %463 %465 +%467 = OpAccessChain %215 %38 %49 %191 +OpStore %467 %466 +%468 = OpAccessChain %234 %29 %49 %235 +%469 = OpLoad %15 %468 +%471 = OpCompositeExtract %9 %469 0 +%472 = OpFConvert %376 %471 +%473 = OpCompositeExtract %9 %469 1 +%474 = OpFConvert %376 %473 +%475 = OpCompositeExtract %9 %469 2 +%476 = OpFConvert %376 %475 +%477 = OpCompositeConstruct %470 %472 %474 %476 +%478 = OpCompositeExtract %376 %477 0 +%479 = OpFConvert %9 %478 +%480 = OpCompositeExtract %376 %477 1 +%481 = OpFConvert %9 %480 +%482 = OpCompositeExtract %376 %477 2 +%483 = OpFConvert %9 %482 +%484 = OpCompositeConstruct %15 %479 %481 %483 +%485 = OpAccessChain %233 %38 %49 %192 +OpStore %485 %484 +%486 = OpAccessChain %48 %29 %49 +%487 = OpAccessChain %113 %486 %253 %488 = OpLoad %7 %487 -%489 = OpCompositeConstruct %16 %482 %484 %486 %488 -%491 = OpCompositeExtract %7 %489 0 -%492 = OpFConvert %361 %491 -%493 = OpCompositeExtract %7 %489 1 -%494 = OpFConvert %361 %493 -%495 = OpCompositeExtract %7 %489 2 -%496 = OpFConvert %361 %495 -%497 = OpCompositeExtract %7 %489 3 -%498 = OpFConvert %361 %497 -%499 = OpCompositeConstruct %490 %492 %494 %496 %498 -%500 = OpCompositeExtract %361 %499 0 -%501 = OpFConvert %7 %500 -%502 = OpCompositeExtract %361 %499 1 -%503 = OpFConvert %7 %502 -%504 = OpCompositeExtract %361 %499 2 -%505 = OpFConvert %7 %504 -%506 = OpCompositeExtract %361 %499 3 +%489 = OpAccessChain %113 %486 %254 +%490 = OpLoad %7 %489 +%491 = OpAccessChain %113 %486 %255 +%492 = OpLoad %7 %491 +%493 = OpAccessChain %113 %486 %256 +%494 = OpLoad %7 %493 +%495 = OpCompositeConstruct %16 %488 %490 %492 %494 +%497 = OpCompositeExtract %7 %495 0 +%498 = OpFConvert %364 %497 +%499 = OpCompositeExtract %7 %495 1 +%500 = OpFConvert %364 %499 +%501 = OpCompositeExtract %7 %495 2 +%502 = OpFConvert %364 %501 +%503 = OpCompositeExtract %7 %495 3 +%504 = OpFConvert %364 %503 +%505 = OpCompositeConstruct %496 %498 %500 %502 %504 +%506 = OpCompositeExtract %364 %505 0 %507 = OpFConvert %7 %506 -%508 = OpCompositeConstruct %16 %501 %503 %505 %507 -%509 = OpAccessChain %249 %55 %192 -OpStore %509 %508 -%510 = OpAccessChain %281 %50 %282 -%511 = OpLoad %17 %510 -%513 = OpCompositeExtract %8 %511 0 -%514 = OpFConvert %367 %513 -%515 = OpCompositeExtract %8 %511 1 -%516 = OpFConvert %367 %515 -%517 = OpCompositeExtract %8 %511 2 -%518 = OpFConvert %367 %517 -%519 = OpCompositeExtract %8 %511 3 -%520 = OpFConvert %367 %519 -%521 = OpCompositeConstruct %512 %514 %516 %518 %520 -%522 = OpCompositeExtract %367 %521 0 -%523 = OpFConvert %8 %522 -%524 = OpCompositeExtract %367 %521 1 -%525 = OpFConvert %8 %524 -%526 = OpCompositeExtract %367 %521 2 -%527 = OpFConvert %8 %526 -%528 = OpCompositeExtract %367 %521 3 +%508 = OpCompositeExtract %364 %505 1 +%509 = OpFConvert %7 %508 +%510 = OpCompositeExtract %364 %505 2 +%511 = OpFConvert %7 %510 +%512 = OpCompositeExtract %364 %505 3 +%513 = OpFConvert %7 %512 +%514 = OpCompositeConstruct %16 %507 %509 %511 %513 +%515 = OpAccessChain %251 %38 %49 %193 +OpStore %515 %514 +%516 = OpAccessChain %284 %29 %49 %285 +%517 = OpLoad %17 %516 +%519 = OpCompositeExtract %8 %517 0 +%520 = OpFConvert %370 %519 +%521 = OpCompositeExtract %8 %517 1 +%522 = OpFConvert %370 %521 +%523 = OpCompositeExtract %8 %517 2 +%524 = OpFConvert %370 %523 +%525 = OpCompositeExtract %8 %517 3 +%526 = OpFConvert %370 %525 +%527 = OpCompositeConstruct %518 %520 %522 %524 %526 +%528 = OpCompositeExtract %370 %527 0 %529 = OpFConvert %8 %528 -%530 = OpCompositeConstruct %17 %523 %525 %527 %529 -%531 = OpAccessChain %280 %55 %215 -OpStore %531 %530 -%532 = OpAccessChain %302 %50 %303 -%533 = OpLoad %18 %532 -%535 = OpCompositeExtract %9 %533 0 -%536 = OpFConvert %373 %535 -%537 = OpCompositeExtract %9 %533 1 -%538 = OpFConvert %373 %537 -%539 = OpCompositeExtract %9 %533 2 -%540 = OpFConvert %373 %539 -%541 = OpCompositeExtract %9 %533 3 -%542 = OpFConvert %373 %541 -%543 = OpCompositeConstruct %534 %536 %538 %540 %542 -%544 = OpCompositeExtract %373 %543 0 -%545 = OpFConvert %9 %544 -%546 = OpCompositeExtract %373 %543 1 -%547 = OpFConvert %9 %546 -%548 = OpCompositeExtract %373 %543 2 -%549 = OpFConvert %9 %548 -%550 = OpCompositeExtract %373 %543 3 +%530 = OpCompositeExtract %370 %527 1 +%531 = OpFConvert %8 %530 +%532 = OpCompositeExtract %370 %527 2 +%533 = OpFConvert %8 %532 +%534 = OpCompositeExtract %370 %527 3 +%535 = OpFConvert %8 %534 +%536 = OpCompositeConstruct %17 %529 %531 %533 %535 +%537 = OpAccessChain %283 %38 %49 %217 +OpStore %537 %536 +%538 = OpAccessChain %305 %29 %49 %306 +%539 = OpLoad %18 %538 +%541 = OpCompositeExtract %9 %539 0 +%542 = OpFConvert %376 %541 +%543 = OpCompositeExtract %9 %539 1 +%544 = OpFConvert %376 %543 +%545 = OpCompositeExtract %9 %539 2 +%546 = OpFConvert %376 %545 +%547 = OpCompositeExtract %9 %539 3 +%548 = OpFConvert %376 %547 +%549 = OpCompositeConstruct %540 %542 %544 %546 %548 +%550 = OpCompositeExtract %376 %549 0 %551 = OpFConvert %9 %550 -%552 = OpCompositeConstruct %18 %545 %547 %549 %551 -%553 = OpAccessChain %301 %55 %233 -OpStore %553 %552 -%554 = OpLoad %3 %68 -OpReturnValue %554 +%552 = OpCompositeExtract %376 %549 1 +%553 = OpFConvert %9 %552 +%554 = OpCompositeExtract %376 %549 2 +%555 = OpFConvert %9 %554 +%556 = OpCompositeExtract %376 %549 3 +%557 = OpFConvert %9 %556 +%558 = OpCompositeConstruct %18 %551 %553 %555 %557 +%559 = OpAccessChain %304 %38 %49 %235 +OpStore %559 %558 +%560 = OpLoad %3 %68 +OpReturnValue %560 OpFunctionEnd -%556 = OpFunction %2 None %557 -%555 = OpLabel -%558 = OpAccessChain %48 %29 %49 -%559 = OpAccessChain %51 %32 %49 -%560 = OpAccessChain %53 %35 %49 -%561 = OpAccessChain %51 %38 %49 -%562 = OpAccessChain %53 %41 %49 -OpBranch %564 -%564 = OpLabel -%565 = OpFunctionCall %3 %46 %563 -%567 = OpAccessChain %105 %561 %566 -OpStore %567 %565 +%562 = OpFunction %2 None %563 +%561 = OpLabel +%564 = OpAccessChain %48 %29 %49 +%565 = OpAccessChain %51 %32 %49 +%566 = OpAccessChain %53 %35 %49 +%567 = OpAccessChain %51 %38 %49 +%568 = OpAccessChain %53 %41 %49 +OpBranch %570 +%570 = OpLabel +%571 = OpFunctionCall %3 %46 %569 +%573 = OpAccessChain %105 %38 %49 %572 +OpStore %573 %571 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-f16.spvasm.glsl b/naga/tests/out/spv/wgsl-f16.spvasm.glsl index 690eaa5b9..9e6e2a8e2 100644 --- a/naga/tests/out/spv/wgsl-f16.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-f16.spvasm.glsl @@ -117,16 +117,16 @@ float16_t _46(float16_t _45) _38._m0._m4 = _29._m0._m4 + _32._m0._m4; _38._m0._m5 = _29._m0._m5 + _32._m0._m5; _38._m0._m6 = _29._m0._m6 + _32._m0._m6; - f16mat2 _147 = f16mat2(_29._m0._m8, _29._m0._m9); - _38._m0._m8 = f16mat2(_147[0] + _32._m0._m8[0], _147[1] + _32._m0._m8[1]); + f16mat2 _148 = f16mat2(_29._m0._m8, _29._m0._m9); + _38._m0._m8 = f16mat2(_148[0] + _32._m0._m8[0], _148[1] + _32._m0._m8[1]); _38._m0._m9 = f16mat2x3(_29._m0._m10[0] + _32._m0._m9[0], _29._m0._m10[1] + _32._m0._m9[1]); _38._m0._m10 = f16mat2x4(_29._m0._m11[0] + _32._m0._m10[0], _29._m0._m11[1] + _32._m0._m10[1]); - f16mat3x2 _199 = f16mat3x2(_29._m0._m12, _29._m0._m13, _29._m0._m14); - _38._m0._m11 = f16mat3x2(_199[0] + _32._m0._m11[0], _199[1] + _32._m0._m11[1], _199[2] + _32._m0._m11[2]); + f16mat3x2 _201 = f16mat3x2(_29._m0._m12, _29._m0._m13, _29._m0._m14); + _38._m0._m11 = f16mat3x2(_201[0] + _32._m0._m11[0], _201[1] + _32._m0._m11[1], _201[2] + _32._m0._m11[2]); _38._m0._m12 = f16mat3(_29._m0._m15[0] + _32._m0._m12[0], _29._m0._m15[1] + _32._m0._m12[1], _29._m0._m15[2] + _32._m0._m12[2]); _38._m0._m13 = f16mat3x4(_29._m0._m16[0] + _32._m0._m13[0], _29._m0._m16[1] + _32._m0._m13[1], _29._m0._m16[2] + _32._m0._m13[2]); - f16mat4x2 _263 = f16mat4x2(_29._m0._m17, _29._m0._m18, _29._m0._m19, _29._m0._m20); - _38._m0._m14 = f16mat4x2(_263[0] + _32._m0._m14[0], _263[1] + _32._m0._m14[1], _263[2] + _32._m0._m14[2], _263[3] + _32._m0._m14[3]); + f16mat4x2 _266 = f16mat4x2(_29._m0._m17, _29._m0._m18, _29._m0._m19, _29._m0._m20); + _38._m0._m14 = f16mat4x2(_266[0] + _32._m0._m14[0], _266[1] + _32._m0._m14[1], _266[2] + _32._m0._m14[2], _266[3] + _32._m0._m14[3]); _38._m0._m15 = f16mat4x3(_29._m0._m21[0] + _32._m0._m15[0], _29._m0._m21[1] + _32._m0._m15[1], _29._m0._m21[2] + _32._m0._m15[2], _29._m0._m21[3] + _32._m0._m15[3]); _38._m0._m16 = f16mat4(_29._m0._m22[0] + _32._m0._m16[0], _29._m0._m22[1] + _32._m0._m16[1], _29._m0._m22[2] + _32._m0._m16[2], _29._m0._m22[3] + _32._m0._m16[3]); _41._m0._m0 = _35._m0._m0; @@ -140,33 +140,33 @@ float16_t _46(float16_t _45) _38._m0._m4 = f16vec2(vec2(_29._m0._m4)); _38._m0._m5 = f16vec3(vec3(_29._m0._m5)); _38._m0._m6 = f16vec4(vec4(_29._m0._m6)); - f16mat2 _381 = f16mat2(_29._m0._m8, _29._m0._m9); - mat2 _387 = mat2(vec2(_381[0]), vec2(_381[1])); - _38._m0._m8 = f16mat2(f16vec2(_387[0]), f16vec2(_387[1])); - mat2x3 _401 = mat2x3(vec3(_29._m0._m10[0]), vec3(_29._m0._m10[1])); - _38._m0._m9 = f16mat2x3(f16vec3(_401[0]), f16vec3(_401[1])); - mat2x4 _415 = mat2x4(vec4(_29._m0._m11[0]), vec4(_29._m0._m11[1])); - _38._m0._m10 = f16mat2x4(f16vec4(_415[0]), f16vec4(_415[1])); - f16mat3x2 _428 = f16mat3x2(_29._m0._m12, _29._m0._m13, _29._m0._m14); - mat3x2 _436 = mat3x2(vec2(_428[0]), vec2(_428[1]), vec2(_428[2])); - _38._m0._m11 = f16mat3x2(f16vec2(_436[0]), f16vec2(_436[1]), f16vec2(_436[2])); - mat3 _454 = mat3(vec3(_29._m0._m15[0]), vec3(_29._m0._m15[1]), vec3(_29._m0._m15[2])); - _38._m0._m12 = f16mat3(f16vec3(_454[0]), f16vec3(_454[1]), f16vec3(_454[2])); - mat3x4 _472 = mat3x4(vec4(_29._m0._m16[0]), vec4(_29._m0._m16[1]), vec4(_29._m0._m16[2])); - _38._m0._m13 = f16mat3x4(f16vec4(_472[0]), f16vec4(_472[1]), f16vec4(_472[2])); - f16mat4x2 _489 = f16mat4x2(_29._m0._m17, _29._m0._m18, _29._m0._m19, _29._m0._m20); - mat4x2 _499 = mat4x2(vec2(_489[0]), vec2(_489[1]), vec2(_489[2]), vec2(_489[3])); - _38._m0._m14 = f16mat4x2(f16vec2(_499[0]), f16vec2(_499[1]), f16vec2(_499[2]), f16vec2(_499[3])); - mat4x3 _521 = mat4x3(vec3(_29._m0._m21[0]), vec3(_29._m0._m21[1]), vec3(_29._m0._m21[2]), vec3(_29._m0._m21[3])); - _38._m0._m15 = f16mat4x3(f16vec3(_521[0]), f16vec3(_521[1]), f16vec3(_521[2]), f16vec3(_521[3])); - mat4 _543 = mat4(vec4(_29._m0._m22[0]), vec4(_29._m0._m22[1]), vec4(_29._m0._m22[2]), vec4(_29._m0._m22[3])); - _38._m0._m16 = f16mat4(f16vec4(_543[0]), f16vec4(_543[1]), f16vec4(_543[2]), f16vec4(_543[3])); + f16mat2 _385 = f16mat2(_29._m0._m8, _29._m0._m9); + mat2 _391 = mat2(vec2(_385[0]), vec2(_385[1])); + _38._m0._m8 = f16mat2(f16vec2(_391[0]), f16vec2(_391[1])); + mat2x3 _405 = mat2x3(vec3(_29._m0._m10[0]), vec3(_29._m0._m10[1])); + _38._m0._m9 = f16mat2x3(f16vec3(_405[0]), f16vec3(_405[1])); + mat2x4 _419 = mat2x4(vec4(_29._m0._m11[0]), vec4(_29._m0._m11[1])); + _38._m0._m10 = f16mat2x4(f16vec4(_419[0]), f16vec4(_419[1])); + f16mat3x2 _433 = f16mat3x2(_29._m0._m12, _29._m0._m13, _29._m0._m14); + mat3x2 _441 = mat3x2(vec2(_433[0]), vec2(_433[1]), vec2(_433[2])); + _38._m0._m11 = f16mat3x2(f16vec2(_441[0]), f16vec2(_441[1]), f16vec2(_441[2])); + mat3 _459 = mat3(vec3(_29._m0._m15[0]), vec3(_29._m0._m15[1]), vec3(_29._m0._m15[2])); + _38._m0._m12 = f16mat3(f16vec3(_459[0]), f16vec3(_459[1]), f16vec3(_459[2])); + mat3x4 _477 = mat3x4(vec4(_29._m0._m16[0]), vec4(_29._m0._m16[1]), vec4(_29._m0._m16[2])); + _38._m0._m13 = f16mat3x4(f16vec4(_477[0]), f16vec4(_477[1]), f16vec4(_477[2])); + f16mat4x2 _495 = f16mat4x2(_29._m0._m17, _29._m0._m18, _29._m0._m19, _29._m0._m20); + mat4x2 _505 = mat4x2(vec2(_495[0]), vec2(_495[1]), vec2(_495[2]), vec2(_495[3])); + _38._m0._m14 = f16mat4x2(f16vec2(_505[0]), f16vec2(_505[1]), f16vec2(_505[2]), f16vec2(_505[3])); + mat4x3 _527 = mat4x3(vec3(_29._m0._m21[0]), vec3(_29._m0._m21[1]), vec3(_29._m0._m21[2]), vec3(_29._m0._m21[3])); + _38._m0._m15 = f16mat4x3(f16vec3(_527[0]), f16vec3(_527[1]), f16vec3(_527[2]), f16vec3(_527[3])); + mat4 _549 = mat4(vec4(_29._m0._m22[0]), vec4(_29._m0._m22[1]), vec4(_29._m0._m22[2]), vec4(_29._m0._m22[3])); + _38._m0._m16 = f16mat4(f16vec4(_549[0]), f16vec4(_549[1]), f16vec4(_549[2]), f16vec4(_549[3])); return _68; } void main() { - float16_t _565 = _46(float16_t(2.0)); - _38._m0._m7 = _565; + float16_t _571 = _46(float16_t(2.0)); + _38._m0._m7 = _571; } diff --git a/naga/tests/out/spv/wgsl-global-matrix-access.spvasm b/naga/tests/out/spv/wgsl-global-matrix-access.spvasm new file mode 100644 index 000000000..f6d7393bf --- /dev/null +++ b/naga/tests/out/spv/wgsl-global-matrix-access.spvasm @@ -0,0 +1,207 @@ +; SPIR-V +; Version: 1.1 +; Generator: rspirv +; Bound: 125 +OpCapability Shader +OpExtension "SPV_KHR_storage_buffer_storage_class" +%1 = OpExtInstImport "GLSL.std.450" +OpMemoryModel Logical GLSL450 +OpEntryPoint GLCompute %52 "main" %49 +OpExecutionMode %52 LocalSize 1 1 1 +OpDecorate %6 ArrayStride 64 +OpMemberDecorate %7 0 Offset 0 +OpMemberDecorate %7 0 ColMajor +OpMemberDecorate %7 0 MatrixStride 16 +OpDecorate %7 Block +OpDecorate %8 ArrayStride 64 +OpDecorate %11 ArrayStride 128 +OpDecorate %12 ArrayStride 16 +OpDecorate %15 NonWritable +OpDecorate %15 DescriptorSet 0 +OpDecorate %15 Binding 0 +OpDecorate %16 Block +OpMemberDecorate %16 0 Offset 0 +OpMemberDecorate %16 0 ColMajor +OpMemberDecorate %16 0 MatrixStride 16 +OpDecorate %18 DescriptorSet 0 +OpDecorate %18 Binding 1 +OpDecorate %19 Block +OpMemberDecorate %19 0 Offset 0 +OpMemberDecorate %19 0 ColMajor +OpMemberDecorate %19 0 MatrixStride 16 +OpDecorate %21 NonWritable +OpDecorate %21 DescriptorSet 0 +OpDecorate %21 Binding 2 +OpDecorate %22 Block +OpMemberDecorate %22 0 Offset 0 +OpMemberDecorate %22 0 ColMajor +OpMemberDecorate %22 0 MatrixStride 16 +OpDecorate %24 NonWritable +OpDecorate %24 DescriptorSet 0 +OpDecorate %24 Binding 3 +OpDecorate %25 Block +OpMemberDecorate %25 0 Offset 0 +OpMemberDecorate %25 0 ColMajor +OpMemberDecorate %25 0 MatrixStride 16 +OpDecorate %27 NonWritable +OpDecorate %27 DescriptorSet 0 +OpDecorate %27 Binding 4 +OpDecorate %28 Block +OpMemberDecorate %28 0 Offset 0 +OpMemberDecorate %28 0 ColMajor +OpMemberDecorate %28 0 MatrixStride 16 +OpDecorate %30 DescriptorSet 0 +OpDecorate %30 Binding 5 +OpDecorate %31 Block +OpMemberDecorate %31 0 Offset 0 +OpMemberDecorate %31 0 ColMajor +OpMemberDecorate %31 0 MatrixStride 16 +OpDecorate %33 NonWritable +OpDecorate %33 DescriptorSet 0 +OpDecorate %33 Binding 6 +OpDecorate %35 DescriptorSet 0 +OpDecorate %35 Binding 7 +OpDecorate %36 Block +OpMemberDecorate %36 0 Offset 0 +OpDecorate %49 BuiltIn GlobalInvocationId +%2 = OpTypeVoid +%5 = OpTypeFloat 32 +%4 = OpTypeVector %5 4 +%3 = OpTypeMatrix %4 4 +%6 = OpTypeRuntimeArray %3 +%7 = OpTypeStruct %6 +%10 = OpTypeInt 32 0 +%9 = OpConstant %10 2 +%8 = OpTypeArray %3 %9 +%11 = OpTypeArray %8 %9 +%12 = OpTypeRuntimeArray %4 +%13 = OpTypeVector %10 3 +%14 = OpTypeBool +%16 = OpTypeStruct %6 +%17 = OpTypePointer StorageBuffer %16 +%15 = OpVariable %17 StorageBuffer +%19 = OpTypeStruct %6 +%20 = OpTypePointer StorageBuffer %19 +%18 = OpVariable %20 StorageBuffer +%22 = OpTypeStruct %8 +%23 = OpTypePointer StorageBuffer %22 +%21 = OpVariable %23 StorageBuffer +%25 = OpTypeStruct %11 +%26 = OpTypePointer StorageBuffer %25 +%24 = OpVariable %26 StorageBuffer +%28 = OpTypeStruct %3 +%29 = OpTypePointer StorageBuffer %28 +%27 = OpVariable %29 StorageBuffer +%31 = OpTypeStruct %3 +%32 = OpTypePointer Uniform %31 +%30 = OpVariable %32 Uniform +%34 = OpTypePointer StorageBuffer %7 +%33 = OpVariable %34 StorageBuffer +%36 = OpTypeStruct %12 +%37 = OpTypePointer StorageBuffer %36 +%35 = OpVariable %37 StorageBuffer +%39 = OpTypeFunction %10 %10 %10 +%43 = OpConstant %10 0 +%45 = OpConstant %10 1 +%50 = OpTypePointer Input %13 +%49 = OpVariable %50 Input +%53 = OpTypeFunction %2 +%54 = OpTypePointer StorageBuffer %6 +%57 = OpTypePointer StorageBuffer %8 +%59 = OpTypePointer StorageBuffer %11 +%61 = OpTypePointer StorageBuffer %3 +%63 = OpTypePointer Uniform %3 +%65 = OpTypePointer StorageBuffer %12 +%67 = OpConstant %10 4 +%68 = OpConstantFalse %14 +%70 = OpTypePointer Function %14 +%71 = OpConstantNull %14 +%76 = OpTypePointer StorageBuffer %4 +%92 = OpTypePointer Uniform %4 +%116 = OpTypePointer StorageBuffer %5 +%117 = OpConstant %10 3 +%123 = OpConstant %10 8 +%38 = OpFunction %10 None %39 +%40 = OpFunctionParameter %10 +%41 = OpFunctionParameter %10 +%42 = OpLabel +%44 = OpIEqual %14 %41 %43 +%46 = OpSelect %10 %44 %45 %41 +%47 = OpUMod %10 %40 %46 +OpReturnValue %47 +OpFunctionEnd +%52 = OpFunction %2 None %53 +%48 = OpLabel +%69 = OpVariable %70 Function %71 +%51 = OpLoad %13 %49 +%55 = OpAccessChain %54 %15 %43 +%56 = OpAccessChain %54 %18 %43 +%58 = OpAccessChain %57 %21 %43 +%60 = OpAccessChain %59 %24 %43 +%62 = OpAccessChain %61 %27 %43 +%64 = OpAccessChain %63 %30 %43 +%66 = OpAccessChain %65 %35 %43 +OpBranch %72 +%72 = OpLabel +%73 = OpCompositeExtract %10 %51 0 +%74 = OpCompositeExtract %10 %51 1 +%75 = OpFunctionCall %10 %38 %74 %67 +%77 = OpAccessChain %76 %15 %43 %73 %75 +%78 = OpLoad %4 %77 +%79 = OpFunctionCall %10 %38 %73 %9 +%80 = OpAccessChain %76 %21 %43 %79 %75 +%81 = OpLoad %4 %80 +%82 = OpFAdd %4 %78 %81 +%83 = OpFunctionCall %10 %38 %73 %9 +%84 = OpIAdd %10 %73 %45 +%85 = OpFunctionCall %10 %38 %84 %9 +%86 = OpAccessChain %76 %24 %43 %83 %85 %75 +%87 = OpLoad %4 %86 +%88 = OpFAdd %4 %82 %87 +%89 = OpAccessChain %76 %27 %43 %75 +%90 = OpLoad %4 %89 +%91 = OpFAdd %4 %88 %90 +%93 = OpAccessChain %92 %30 %43 %75 +%94 = OpLoad %4 %93 +%95 = OpFAdd %4 %91 %94 +%96 = OpAccessChain %76 %33 %43 %73 %75 +%97 = OpLoad %4 %96 +%98 = OpFAdd %4 %95 %97 +%99 = OpAccessChain %76 %18 %43 %73 %75 +OpStore %99 %98 +%100 = OpIMul %10 %73 %67 +%101 = OpIAdd %10 %100 %75 +%102 = OpAccessChain %76 %35 %43 %101 +OpStore %102 %98 +%103 = OpIEqual %14 %73 %43 +OpSelectionMerge %104 None +OpBranchConditional %103 %105 %106 +%105 = OpLabel +%107 = OpIEqual %14 %75 %43 +OpStore %69 %107 +OpBranch %104 +%106 = OpLabel +OpStore %69 %68 +OpBranch %104 +%104 = OpLabel +%108 = OpLoad %14 %69 +OpSelectionMerge %109 None +OpBranchConditional %108 %110 %111 +%110 = OpLabel +%112 = OpArrayLength %10 %15 0 +%113 = OpConvertUToF %5 %112 +%114 = OpArrayLength %10 %33 0 +%115 = OpConvertUToF %5 %114 +%118 = OpAccessChain %116 %15 %43 %43 %117 %43 +%119 = OpLoad %5 %118 +%120 = OpAccessChain %116 %27 %43 %117 %45 +%121 = OpLoad %5 %120 +%122 = OpCompositeConstruct %4 %113 %115 %119 %121 +%124 = OpAccessChain %76 %35 %43 %123 +OpStore %124 %122 +OpReturn +%111 = OpLabel +OpReturn +%109 = OpLabel +OpReturn +OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-global-matrix-access.spvasm.glsl b/naga/tests/out/spv/wgsl-global-matrix-access.spvasm.glsl new file mode 100644 index 000000000..abd875d17 --- /dev/null +++ b/naga/tests/out/spv/wgsl-global-matrix-access.spvasm.glsl @@ -0,0 +1,79 @@ +#version 460 +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + +layout(set = 0, binding = 0, std430) readonly buffer _16_15 +{ + mat4 _m0[]; +} _15; + +layout(set = 0, binding = 1, std430) buffer _19_18 +{ + mat4 _m0[]; +} _18; + +layout(set = 0, binding = 2, std430) readonly buffer _22_21 +{ + mat4 _m0[2]; +} _21; + +layout(set = 0, binding = 3, std430) readonly buffer _25_24 +{ + mat4 _m0[2][2]; +} _24; + +layout(set = 0, binding = 4, std430) readonly buffer _28_27 +{ + mat4 _m0; +} _27; + +layout(set = 0, binding = 5, std140) uniform _31_30 +{ + mat4 _m0; +} _30; + +layout(set = 0, binding = 6, std430) readonly buffer _7_33 +{ + mat4 _m0[]; +} _33; + +layout(set = 0, binding = 7, std430) buffer _36_35 +{ + vec4 _m0[]; +} _35; + +uint _38(uint _40, uint _41) +{ + return _40 % ((_41 == 0u) ? 1u : _41); +} + +void main() +{ + bool _69 = false; + uint _75 = _38(gl_GlobalInvocationID.y, 4u); + vec4 _78 = _15._m0[gl_GlobalInvocationID.x][_75]; + vec4 _81 = _21._m0[_38(gl_GlobalInvocationID.x, 2u)][_75]; + vec4 _87 = _24._m0[_38(gl_GlobalInvocationID.x, 2u)][_38(gl_GlobalInvocationID.x + 1u, 2u)][_75]; + vec4 _90 = _27._m0[_75]; + vec4 _97 = _33._m0[gl_GlobalInvocationID.x][_75]; + vec4 _98 = ((((_78 + _81) + _87) + _90) + _30._m0[_75]) + _97; + _18._m0[gl_GlobalInvocationID.x][_75] = _98; + _35._m0[(gl_GlobalInvocationID.x * 4u) + _75] = _98; + if (gl_GlobalInvocationID.x == 0u) + { + _69 = _75 == 0u; + } + else + { + _69 = false; + } + if (_69) + { + _35._m0[8u] = vec4(float(uint(_15._m0.length())), float(uint(_33._m0.length())), _15._m0[0u][3u].x, _27._m0[3u].y); + return; + } + else + { + return; + } +} + diff --git a/naga/tests/out/spv/wgsl-globals.spvasm b/naga/tests/out/spv/wgsl-globals.spvasm index 7253b9aab..f6ddd8afc 100644 --- a/naga/tests/out/spv/wgsl-globals.spvasm +++ b/naga/tests/out/spv/wgsl-globals.spvasm @@ -1,13 +1,13 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 193 +; Bound: 196 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %114 "main" %138 -OpExecutionMode %114 LocalSize 1 1 1 +OpEntryPoint GLCompute %115 "main" %139 +OpExecutionMode %115 LocalSize 1 1 1 OpDecorate %5 ArrayStride 4 OpMemberDecorate %9 0 Offset 0 OpMemberDecorate %9 1 Offset 12 @@ -57,7 +57,7 @@ OpDecorate %52 DescriptorSet 0 OpDecorate %52 Binding 7 OpDecorate %53 Block OpMemberDecorate %53 0 Offset 0 -OpDecorate %138 BuiltIn LocalInvocationIndex +OpDecorate %139 BuiltIn LocalInvocationIndex %2 = OpTypeVoid %3 = OpTypeBool %4 = OpTypeFloat 32 @@ -124,40 +124,40 @@ OpDecorate %138 BuiltIn LocalInvocationIndex %73 = OpTypePointer Function %23 %75 = OpTypePointer StorageBuffer %8 %77 = OpTypePointer StorageBuffer %4 -%97 = OpTypeFunction %20 %26 -%106 = OpTypeFunction %15 %25 -%116 = OpTypePointer StorageBuffer %11 -%118 = OpTypePointer Uniform %13 -%120 = OpTypePointer Uniform %8 -%122 = OpTypePointer Uniform %25 -%124 = OpTypePointer Uniform %19 -%126 = OpTypePointer Uniform %28 -%128 = OpTypePointer Uniform %22 -%129 = OpTypePointer Uniform %15 -%130 = OpConstant %4 4 -%132 = OpTypePointer Function %4 -%134 = OpTypePointer Function %3 -%136 = OpConstantNull %5 -%137 = OpConstantNull %7 -%139 = OpTypePointer Input %7 -%138 = OpVariable %139 Input -%144 = OpConstant %7 264 -%147 = OpTypePointer Workgroup %4 -%148 = OpTypePointer Uniform %21 -%149 = OpTypePointer Uniform %20 -%150 = OpTypePointer Uniform %26 -%154 = OpTypePointer Uniform %17 -%155 = OpTypePointer Uniform %16 -%156 = OpTypePointer Uniform %12 -%161 = OpConstant %7 7 -%168 = OpConstant %7 6 -%170 = OpTypePointer StorageBuffer %10 -%171 = OpConstant %7 1 -%174 = OpConstant %7 5 -%176 = OpTypePointer Uniform %4 -%177 = OpConstant %7 3 -%180 = OpConstant %7 4 -%192 = OpConstant %23 2 +%98 = OpTypeFunction %20 %26 +%107 = OpTypeFunction %15 %25 +%117 = OpTypePointer StorageBuffer %11 +%119 = OpTypePointer Uniform %13 +%121 = OpTypePointer Uniform %8 +%123 = OpTypePointer Uniform %25 +%125 = OpTypePointer Uniform %19 +%127 = OpTypePointer Uniform %28 +%129 = OpTypePointer Uniform %22 +%130 = OpTypePointer Uniform %15 +%131 = OpConstant %4 4 +%133 = OpTypePointer Function %4 +%135 = OpTypePointer Function %3 +%137 = OpConstantNull %5 +%138 = OpConstantNull %7 +%140 = OpTypePointer Input %7 +%139 = OpVariable %140 Input +%145 = OpConstant %7 264 +%148 = OpTypePointer Workgroup %4 +%149 = OpTypePointer Uniform %21 +%150 = OpTypePointer Uniform %20 +%151 = OpTypePointer Uniform %26 +%155 = OpTypePointer Uniform %17 +%156 = OpTypePointer Uniform %16 +%157 = OpTypePointer Uniform %12 +%162 = OpConstant %7 7 +%171 = OpConstant %7 6 +%173 = OpTypePointer StorageBuffer %10 +%174 = OpConstant %7 1 +%177 = OpConstant %7 5 +%179 = OpTypePointer Uniform %4 +%180 = OpConstant %7 3 +%183 = OpConstant %7 4 +%195 = OpConstant %23 2 %57 = OpFunction %2 None %58 %56 = OpFunctionParameter %8 %55 = OpLabel @@ -171,114 +171,117 @@ OpFunctionEnd %65 = OpAccessChain %63 %34 %64 OpBranch %74 %74 = OpLabel -%76 = OpAccessChain %75 %65 %64 +%76 = OpAccessChain %75 %34 %64 %64 OpStore %76 %67 -%78 = OpAccessChain %77 %65 %64 %64 +%78 = OpAccessChain %77 %34 %64 %64 %64 OpStore %78 %66 -%79 = OpAccessChain %77 %65 %64 %64 +%79 = OpAccessChain %77 %34 %64 %64 %64 OpStore %79 %69 %80 = OpLoad %23 %72 -%81 = OpAccessChain %77 %65 %64 %80 +%81 = OpAccessChain %77 %34 %64 %64 %80 OpStore %81 %70 -%82 = OpLoad %9 %65 -%83 = OpCompositeExtract %8 %82 0 -%84 = OpCompositeExtract %8 %82 0 -%85 = OpVectorShuffle %10 %84 %84 2 0 -%86 = OpCompositeExtract %8 %82 0 -%87 = OpFunctionCall %2 %57 %86 -%88 = OpCompositeExtract %8 %82 0 -%89 = OpVectorTimesMatrix %8 %88 %71 -%90 = OpCompositeExtract %8 %82 0 -%91 = OpMatrixTimesVector %8 %71 %90 -%92 = OpCompositeExtract %8 %82 0 -%93 = OpVectorTimesScalar %8 %92 %69 -%94 = OpCompositeExtract %8 %82 0 -%95 = OpVectorTimesScalar %8 %94 %69 +%82 = OpAccessChain %63 %34 %64 +%83 = OpLoad %9 %82 +%84 = OpCompositeExtract %8 %83 0 +%85 = OpCompositeExtract %8 %83 0 +%86 = OpVectorShuffle %10 %85 %85 2 0 +%87 = OpCompositeExtract %8 %83 0 +%88 = OpFunctionCall %2 %57 %87 +%89 = OpCompositeExtract %8 %83 0 +%90 = OpVectorTimesMatrix %8 %89 %71 +%91 = OpCompositeExtract %8 %83 0 +%92 = OpMatrixTimesVector %8 %71 %91 +%93 = OpCompositeExtract %8 %83 0 +%94 = OpVectorTimesScalar %8 %93 %69 +%95 = OpCompositeExtract %8 %83 0 +%96 = OpVectorTimesScalar %8 %95 %69 OpReturn OpFunctionEnd -%96 = OpFunction %20 None %97 -%98 = OpFunctionParameter %26 -%99 = OpLabel -%100 = OpCompositeExtract %10 %98 0 -%101 = OpCompositeExtract %10 %98 1 -%102 = OpCompositeExtract %10 %98 2 -%103 = OpCompositeExtract %10 %98 3 -%104 = OpCompositeConstruct %20 %100 %101 %102 %103 -OpReturnValue %104 +%97 = OpFunction %20 None %98 +%99 = OpFunctionParameter %26 +%100 = OpLabel +%101 = OpCompositeExtract %10 %99 0 +%102 = OpCompositeExtract %10 %99 1 +%103 = OpCompositeExtract %10 %99 2 +%104 = OpCompositeExtract %10 %99 3 +%105 = OpCompositeConstruct %20 %101 %102 %103 %104 +OpReturnValue %105 OpFunctionEnd -%105 = OpFunction %15 None %106 -%107 = OpFunctionParameter %25 -%108 = OpLabel -%109 = OpCompositeExtract %10 %107 0 -%110 = OpCompositeExtract %10 %107 1 -%111 = OpCompositeExtract %10 %107 2 -%112 = OpCompositeConstruct %15 %109 %110 %111 -OpReturnValue %112 +%106 = OpFunction %15 None %107 +%108 = OpFunctionParameter %25 +%109 = OpLabel +%110 = OpCompositeExtract %10 %108 0 +%111 = OpCompositeExtract %10 %108 1 +%112 = OpCompositeExtract %10 %108 2 +%113 = OpCompositeConstruct %15 %110 %111 %112 +OpReturnValue %113 OpFunctionEnd -%114 = OpFunction %2 None %62 -%113 = OpLabel -%131 = OpVariable %132 Function %66 -%133 = OpVariable %134 Function %29 -%115 = OpAccessChain %63 %34 %64 -%117 = OpAccessChain %116 %37 %64 -%119 = OpAccessChain %118 %40 %64 -%121 = OpAccessChain %120 %43 %64 -%123 = OpAccessChain %122 %46 %64 -%125 = OpAccessChain %124 %49 %64 -%127 = OpAccessChain %126 %52 %64 -OpBranch %135 -%135 = OpLabel -%140 = OpLoad %7 %138 -%141 = OpIEqual %3 %140 %64 -OpSelectionMerge %142 None -OpBranchConditional %141 %143 %142 +%115 = OpFunction %2 None %62 +%114 = OpLabel +%132 = OpVariable %133 Function %66 +%134 = OpVariable %135 Function %29 +%116 = OpAccessChain %63 %34 %64 +%118 = OpAccessChain %117 %37 %64 +%120 = OpAccessChain %119 %40 %64 +%122 = OpAccessChain %121 %43 %64 +%124 = OpAccessChain %123 %46 %64 +%126 = OpAccessChain %125 %49 %64 +%128 = OpAccessChain %127 %52 %64 +OpBranch %136 +%136 = OpLabel +%141 = OpLoad %7 %139 +%142 = OpIEqual %3 %141 %64 +OpSelectionMerge %143 None +OpBranchConditional %142 %144 %143 +%144 = OpLabel +OpStore %30 %137 +OpStore %32 %138 +OpBranch %143 %143 = OpLabel -OpStore %30 %136 -OpStore %32 %137 -OpBranch %142 -%142 = OpLabel -OpControlBarrier %18 %18 %144 -OpBranch %145 -%145 = OpLabel -%146 = OpFunctionCall %2 %61 -%151 = OpAccessChain %150 %127 %64 %64 -%152 = OpLoad %26 %151 -%153 = OpFunctionCall %20 %96 %152 -%157 = OpAccessChain %156 %125 %64 %64 %64 -%158 = OpLoad %12 %157 -%159 = OpMatrixTimesVector %10 %153 %158 -%160 = OpCompositeExtract %4 %159 0 -%162 = OpAccessChain %147 %30 %161 -OpStore %162 %160 -%163 = OpLoad %25 %123 -%164 = OpFunctionCall %15 %105 %163 -%165 = OpLoad %8 %121 -%166 = OpMatrixTimesVector %10 %164 %165 -%167 = OpCompositeExtract %4 %166 0 -%169 = OpAccessChain %147 %30 %168 -OpStore %169 %167 -%172 = OpAccessChain %77 %117 %171 %171 -%173 = OpLoad %4 %172 -%175 = OpAccessChain %147 %30 %174 -OpStore %175 %173 -%178 = OpAccessChain %176 %119 %64 %177 -%179 = OpLoad %4 %178 -%181 = OpAccessChain %147 %30 %180 -OpStore %181 %179 -%182 = OpAccessChain %77 %115 %171 -%183 = OpLoad %4 %182 -%184 = OpAccessChain %147 %30 %177 -OpStore %184 %183 -%185 = OpAccessChain %77 %115 %64 %64 +OpControlBarrier %18 %18 %145 +OpBranch %146 +%146 = OpLabel +%147 = OpFunctionCall %2 %61 +%152 = OpAccessChain %151 %52 %64 %64 %64 +%153 = OpLoad %26 %152 +%154 = OpFunctionCall %20 %97 %153 +%158 = OpAccessChain %157 %49 %64 %64 %64 %64 +%159 = OpLoad %12 %158 +%160 = OpMatrixTimesVector %10 %154 %159 +%161 = OpCompositeExtract %4 %160 0 +%163 = OpAccessChain %148 %30 %162 +OpStore %163 %161 +%164 = OpAccessChain %123 %46 %64 +%165 = OpLoad %25 %164 +%166 = OpFunctionCall %15 %106 %165 +%167 = OpAccessChain %121 %43 %64 +%168 = OpLoad %8 %167 +%169 = OpMatrixTimesVector %10 %166 %168 +%170 = OpCompositeExtract %4 %169 0 +%172 = OpAccessChain %148 %30 %171 +OpStore %172 %170 +%175 = OpAccessChain %77 %37 %64 %174 %174 +%176 = OpLoad %4 %175 +%178 = OpAccessChain %148 %30 %177 +OpStore %178 %176 +%181 = OpAccessChain %179 %40 %64 %64 %180 +%182 = OpLoad %4 %181 +%184 = OpAccessChain %148 %30 %183 +OpStore %184 %182 +%185 = OpAccessChain %77 %34 %64 %174 %186 = OpLoad %4 %185 -%187 = OpAccessChain %147 %30 %18 +%187 = OpAccessChain %148 %30 %180 OpStore %187 %186 -%188 = OpAccessChain %77 %115 %171 -OpStore %188 %130 -%189 = OpArrayLength %7 %37 0 -%190 = OpConvertUToF %4 %189 -%191 = OpAccessChain %147 %30 %171 -OpStore %191 %190 -OpAtomicStore %32 %192 %64 %18 +%188 = OpAccessChain %77 %34 %64 %64 %64 +%189 = OpLoad %4 %188 +%190 = OpAccessChain %148 %30 %18 +OpStore %190 %189 +%191 = OpAccessChain %77 %34 %64 %174 +OpStore %191 %131 +%192 = OpArrayLength %7 %37 0 +%193 = OpConvertUToF %4 %192 +%194 = OpAccessChain %148 %30 %174 +OpStore %194 %193 +OpAtomicStore %32 %195 %64 %18 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-globals.spvasm.glsl b/naga/tests/out/spv/wgsl-globals.spvasm.glsl index 2afb98211..4be779dfd 100644 --- a/naga/tests/out/spv/wgsl-globals.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-globals.spvasm.glsl @@ -74,20 +74,20 @@ void _61() _57(_34._m0._m0); } -mat4x2 _96(_26 _98) +mat4x2 _97(_26 _99) { - return mat4x2(_98._m0, _98._m1, _98._m2, _98._m3); + return mat4x2(_99._m0, _99._m1, _99._m2, _99._m3); } -mat3x2 _105(_25 _107) +mat3x2 _106(_25 _108) { - return mat3x2(_107._m0, _107._m1, _107._m2); + return mat3x2(_108._m0, _108._m1, _108._m2); } void main() { - float _131 = 1.0; - bool _133 = true; + float _132 = 1.0; + bool _134 = true; if (gl_LocalInvocationIndex == 0u) { _30 = float[](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); @@ -95,8 +95,8 @@ void main() } barrier(); _61(); - _30[7u] = (_96(_52._m0[0u][0u]) * _49._m0[0u][0u][0u]).x; - _30[6u] = (_105(_46._m0) * _43._m0).x; + _30[7u] = (_97(_52._m0[0u][0u]) * _49._m0[0u][0u][0u]).x; + _30[6u] = (_106(_46._m0) * _43._m0).x; _30[5u] = _37._m0[1u].y; _30[4u] = _40._m0[0u].w; _30[3u] = _34._m0._m1; diff --git a/naga/tests/out/spv/wgsl-int16.spvasm b/naga/tests/out/spv/wgsl-int16.spvasm index 68f90c073..d70c5f170 100644 --- a/naga/tests/out/spv/wgsl-int16.spvasm +++ b/naga/tests/out/spv/wgsl-int16.spvasm @@ -217,55 +217,55 @@ OpBranch %100 %103 = OpIAdd %3 %102 %86 OpStore %96 %103 %104 = OpLoad %3 %96 -%106 = OpAccessChain %105 %78 %77 +%106 = OpAccessChain %105 %26 %77 %77 %107 = OpLoad %5 %106 %108 = OpSConvert %3 %107 %109 = OpIAdd %3 %104 %108 OpStore %96 %109 %110 = OpLoad %3 %96 -%112 = OpAccessChain %111 %78 %92 +%112 = OpAccessChain %111 %26 %77 %92 %113 = OpLoad %6 %112 %114 = OpSConvert %3 %113 %115 = OpIAdd %3 %110 %114 OpStore %96 %115 %116 = OpLoad %3 %96 -%119 = OpAccessChain %117 %78 %118 +%119 = OpAccessChain %117 %26 %77 %118 %120 = OpLoad %3 %119 %121 = OpCompositeConstruct %12 %120 %120 %120 %122 = OpCompositeExtract %3 %121 2 %123 = OpIAdd %3 %116 %122 OpStore %96 %123 -%125 = OpAccessChain %117 %78 %118 +%125 = OpAccessChain %117 %26 %77 %118 %126 = OpLoad %3 %125 -%127 = OpAccessChain %124 %80 %118 +%127 = OpAccessChain %124 %29 %77 %118 %128 = OpLoad %3 %127 %129 = OpIAdd %3 %126 %128 -%130 = OpAccessChain %124 %83 %118 +%130 = OpAccessChain %124 %35 %77 %118 OpStore %130 %129 -%134 = OpAccessChain %132 %78 %133 +%134 = OpAccessChain %132 %26 %77 %133 %135 = OpLoad %11 %134 -%136 = OpAccessChain %131 %80 %133 +%136 = OpAccessChain %131 %29 %77 %133 %137 = OpLoad %11 %136 %138 = OpIAdd %11 %135 %137 -%139 = OpAccessChain %131 %83 %133 +%139 = OpAccessChain %131 %35 %77 %133 OpStore %139 %138 -%143 = OpAccessChain %141 %78 %142 +%143 = OpAccessChain %141 %26 %77 %142 %144 = OpLoad %12 %143 -%145 = OpAccessChain %140 %80 %142 +%145 = OpAccessChain %140 %29 %77 %142 %146 = OpLoad %12 %145 %147 = OpIAdd %12 %144 %146 -%148 = OpAccessChain %140 %83 %142 +%148 = OpAccessChain %140 %35 %77 %142 OpStore %148 %147 -%152 = OpAccessChain %150 %78 %151 +%152 = OpAccessChain %150 %26 %77 %151 %153 = OpLoad %13 %152 -%154 = OpAccessChain %149 %80 %151 +%154 = OpAccessChain %149 %29 %77 %151 %155 = OpLoad %13 %154 %156 = OpIAdd %13 %153 %155 -%157 = OpAccessChain %149 %83 %151 +%157 = OpAccessChain %149 %35 %77 %151 OpStore %157 %156 -%159 = OpAccessChain %158 %82 %92 +%159 = OpAccessChain %158 %32 %77 %92 %160 = OpLoad %17 %159 -%161 = OpAccessChain %158 %84 %92 +%161 = OpAccessChain %158 %38 %77 %92 OpStore %161 %160 %162 = OpLoad %3 %96 %163 = OpExtInst %3 %1 SAbs %162 @@ -342,17 +342,17 @@ OpStore %96 %213 OpStore %96 %215 %217 = OpLoad %3 %96 %218 = OpUConvert %5 %217 -%219 = OpAccessChain %216 %83 %77 +%219 = OpAccessChain %216 %35 %77 %77 OpStore %219 %218 %221 = OpLoad %3 %96 %222 = OpSConvert %6 %221 -%223 = OpAccessChain %220 %83 %92 +%223 = OpAccessChain %220 %35 %77 %92 OpStore %223 %222 %225 = OpLoad %3 %96 %226 = OpConvertSToF %7 %225 -%227 = OpAccessChain %224 %83 %16 +%227 = OpAccessChain %224 %35 %77 %16 OpStore %227 %226 -%228 = OpAccessChain %216 %83 %77 +%228 = OpAccessChain %216 %35 %77 %77 %229 = OpLoad %5 %228 %230 = OpSConvert %3 %229 OpStore %96 %230 @@ -360,13 +360,13 @@ OpStore %96 %230 %232 = OpBitcast %4 %231 %233 = OpBitcast %3 %232 OpStore %96 %233 -%234 = OpAccessChain %132 %78 %133 +%234 = OpAccessChain %132 %26 %77 %133 %235 = OpLoad %11 %234 -%236 = OpAccessChain %132 %78 %133 +%236 = OpAccessChain %132 %26 %77 %133 %237 = OpLoad %11 %236 %238 = OpIAdd %11 %235 %237 %239 = OpIMul %11 %238 %95 -%240 = OpAccessChain %131 %83 %133 +%240 = OpAccessChain %131 %35 %77 %133 OpStore %240 %239 %241 = OpLoad %3 %96 OpReturnValue %241 @@ -404,55 +404,55 @@ OpBranch %275 %277 = OpIAdd %4 %276 %267 OpStore %273 %277 %278 = OpLoad %4 %273 -%279 = OpAccessChain %105 %262 %77 +%279 = OpAccessChain %105 %26 %77 %77 %280 = OpLoad %5 %279 %281 = OpUConvert %4 %280 %282 = OpIAdd %4 %278 %281 OpStore %273 %282 %283 = OpLoad %4 %273 -%284 = OpAccessChain %111 %262 %92 +%284 = OpAccessChain %111 %26 %77 %92 %285 = OpLoad %6 %284 %286 = OpUConvert %4 %285 %287 = OpIAdd %4 %283 %286 OpStore %273 %287 %288 = OpLoad %4 %273 -%291 = OpAccessChain %289 %262 %290 +%291 = OpAccessChain %289 %26 %77 %290 %292 = OpLoad %4 %291 %293 = OpCompositeConstruct %9 %292 %292 %292 %294 = OpCompositeExtract %4 %293 2 %295 = OpIAdd %4 %288 %294 OpStore %273 %295 -%297 = OpAccessChain %289 %262 %290 +%297 = OpAccessChain %289 %26 %77 %290 %298 = OpLoad %4 %297 -%299 = OpAccessChain %296 %263 %290 +%299 = OpAccessChain %296 %29 %77 %290 %300 = OpLoad %4 %299 %301 = OpIAdd %4 %298 %300 -%302 = OpAccessChain %296 %265 %290 +%302 = OpAccessChain %296 %35 %77 %290 OpStore %302 %301 -%305 = OpAccessChain %304 %262 %20 +%305 = OpAccessChain %304 %26 %77 %20 %306 = OpLoad %8 %305 -%307 = OpAccessChain %303 %263 %20 +%307 = OpAccessChain %303 %29 %77 %20 %308 = OpLoad %8 %307 %309 = OpIAdd %8 %306 %308 -%310 = OpAccessChain %303 %265 %20 +%310 = OpAccessChain %303 %35 %77 %20 OpStore %310 %309 -%314 = OpAccessChain %312 %262 %313 +%314 = OpAccessChain %312 %26 %77 %313 %315 = OpLoad %9 %314 -%316 = OpAccessChain %311 %263 %313 +%316 = OpAccessChain %311 %29 %77 %313 %317 = OpLoad %9 %316 %318 = OpIAdd %9 %315 %317 -%319 = OpAccessChain %311 %265 %313 +%319 = OpAccessChain %311 %35 %77 %313 OpStore %319 %318 -%323 = OpAccessChain %321 %262 %322 +%323 = OpAccessChain %321 %26 %77 %322 %324 = OpLoad %10 %323 -%325 = OpAccessChain %320 %263 %322 +%325 = OpAccessChain %320 %29 %77 %322 %326 = OpLoad %10 %325 %327 = OpIAdd %10 %324 %326 -%328 = OpAccessChain %320 %265 %322 +%328 = OpAccessChain %320 %35 %77 %322 OpStore %328 %327 -%330 = OpAccessChain %329 %264 %77 +%330 = OpAccessChain %329 %32 %77 %77 %331 = OpLoad %15 %330 -%332 = OpAccessChain %329 %266 %77 +%332 = OpAccessChain %329 %38 %77 %77 OpStore %332 %331 %333 = OpLoad %4 %273 %334 = OpCopyObject %4 %333 @@ -494,17 +494,17 @@ OpStore %273 %357 OpStore %273 %359 %360 = OpLoad %4 %273 %361 = OpUConvert %5 %360 -%362 = OpAccessChain %216 %265 %77 +%362 = OpAccessChain %216 %35 %77 %77 OpStore %362 %361 %363 = OpLoad %4 %273 %364 = OpSConvert %6 %363 -%365 = OpAccessChain %220 %265 %92 +%365 = OpAccessChain %220 %35 %77 %92 OpStore %365 %364 %366 = OpLoad %4 %273 %367 = OpConvertUToF %7 %366 -%368 = OpAccessChain %224 %265 %16 +%368 = OpAccessChain %224 %35 %77 %16 OpStore %368 %367 -%369 = OpAccessChain %216 %265 %77 +%369 = OpAccessChain %216 %35 %77 %77 %370 = OpLoad %5 %369 %371 = OpUConvert %4 %370 OpStore %273 %371 @@ -539,7 +539,7 @@ OpStore %41 %247 %400 = OpFunctionCall %3 %74 %385 %401 = OpBitcast %4 %400 %402 = OpIAdd %4 %399 %401 -%404 = OpAccessChain %296 %382 %403 +%404 = OpAccessChain %296 %35 %77 %403 OpStore %404 %402 %405 = OpSConvert %3 %376 OpStore %386 %405 @@ -579,10 +579,10 @@ OpStore %388 %426 %428 = OpGroupNonUniformUMax %4 %290 Reduce %427 OpStore %388 %428 %429 = OpLoad %3 %386 -%430 = OpAccessChain %124 %382 %118 +%430 = OpAccessChain %124 %35 %77 %118 OpStore %430 %429 %431 = OpLoad %4 %388 -%432 = OpAccessChain %296 %382 %290 +%432 = OpAccessChain %296 %35 %77 %290 OpStore %432 %431 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-int64.spvasm b/naga/tests/out/spv/wgsl-int64.spvasm index 2a0997d48..d270280cf 100644 --- a/naga/tests/out/spv/wgsl-int64.spvasm +++ b/naga/tests/out/spv/wgsl-int64.spvasm @@ -163,7 +163,7 @@ OpStore %57 %64 %68 = OpIAdd %3 %65 %67 OpStore %57 %68 %69 = OpLoad %3 %57 -%71 = OpAccessChain %70 %44 %43 +%71 = OpAccessChain %70 %23 %43 %43 %72 = OpLoad %5 %71 %73 = OpLoad %3 %57 %74 = OpUConvert %5 %73 @@ -172,7 +172,7 @@ OpStore %57 %68 %77 = OpIAdd %3 %69 %76 OpStore %57 %77 %78 = OpLoad %3 %57 -%81 = OpAccessChain %79 %44 %80 +%81 = OpAccessChain %79 %23 %43 %80 %82 = OpLoad %6 %81 %83 = OpLoad %3 %57 %84 = OpSConvert %6 %83 @@ -181,7 +181,7 @@ OpStore %57 %77 %87 = OpIAdd %3 %78 %86 OpStore %57 %87 %88 = OpLoad %3 %57 -%90 = OpAccessChain %89 %44 %16 +%90 = OpAccessChain %89 %23 %43 %16 %91 = OpLoad %7 %90 %92 = OpLoad %3 %57 %93 = OpConvertSToF %7 %92 @@ -191,34 +191,34 @@ OpStore %57 %87 %99 = OpIAdd %3 %88 %98 OpStore %57 %99 %100 = OpLoad %3 %57 -%103 = OpAccessChain %101 %44 %102 +%103 = OpAccessChain %101 %23 %43 %102 %104 = OpLoad %3 %103 %105 = OpCompositeConstruct %12 %104 %104 %104 %106 = OpCompositeExtract %3 %105 2 %107 = OpIAdd %3 %100 %106 OpStore %57 %107 %108 = OpLoad %3 %57 -%111 = OpAccessChain %109 %44 %110 +%111 = OpAccessChain %109 %23 %43 %110 %112 = OpLoad %4 %111 %113 = OpBitcast %3 %112 %114 = OpIAdd %3 %108 %113 OpStore %57 %114 %115 = OpLoad %3 %57 -%118 = OpAccessChain %116 %44 %117 +%118 = OpAccessChain %116 %23 %43 %117 %119 = OpLoad %8 %118 %120 = OpBitcast %11 %119 %121 = OpCompositeExtract %3 %120 1 %122 = OpIAdd %3 %115 %121 OpStore %57 %122 %123 = OpLoad %3 %57 -%126 = OpAccessChain %124 %44 %125 +%126 = OpAccessChain %124 %23 %43 %125 %127 = OpLoad %9 %126 %128 = OpBitcast %12 %127 %129 = OpCompositeExtract %3 %128 2 %130 = OpIAdd %3 %123 %129 OpStore %57 %130 %131 = OpLoad %3 %57 -%134 = OpAccessChain %132 %44 %133 +%134 = OpAccessChain %132 %23 %43 %133 %135 = OpLoad %10 %134 %136 = OpBitcast %13 %135 %137 = OpCompositeExtract %3 %136 3 @@ -227,37 +227,37 @@ OpStore %57 %138 %139 = OpLoad %3 %57 %140 = OpIAdd %3 %139 %56 OpStore %57 %140 -%142 = OpAccessChain %101 %44 %102 +%142 = OpAccessChain %101 %23 %43 %102 %143 = OpLoad %3 %142 -%144 = OpAccessChain %141 %46 %102 +%144 = OpAccessChain %141 %26 %43 %102 %145 = OpLoad %3 %144 %146 = OpIAdd %3 %143 %145 -%147 = OpAccessChain %141 %49 %102 +%147 = OpAccessChain %141 %32 %43 %102 OpStore %147 %146 -%151 = OpAccessChain %149 %44 %150 +%151 = OpAccessChain %149 %23 %43 %150 %152 = OpLoad %11 %151 -%153 = OpAccessChain %148 %46 %150 +%153 = OpAccessChain %148 %26 %43 %150 %154 = OpLoad %11 %153 %155 = OpIAdd %11 %152 %154 -%156 = OpAccessChain %148 %49 %150 +%156 = OpAccessChain %148 %32 %43 %150 OpStore %156 %155 -%160 = OpAccessChain %158 %44 %159 +%160 = OpAccessChain %158 %23 %43 %159 %161 = OpLoad %12 %160 -%162 = OpAccessChain %157 %46 %159 +%162 = OpAccessChain %157 %26 %43 %159 %163 = OpLoad %12 %162 %164 = OpIAdd %12 %161 %163 -%165 = OpAccessChain %157 %49 %159 +%165 = OpAccessChain %157 %32 %43 %159 OpStore %165 %164 -%169 = OpAccessChain %167 %44 %168 +%169 = OpAccessChain %167 %23 %43 %168 %170 = OpLoad %13 %169 -%171 = OpAccessChain %166 %46 %168 +%171 = OpAccessChain %166 %26 %43 %168 %172 = OpLoad %13 %171 %173 = OpIAdd %13 %170 %172 -%174 = OpAccessChain %166 %49 %168 +%174 = OpAccessChain %166 %32 %43 %168 OpStore %174 %173 -%176 = OpAccessChain %175 %48 %80 +%176 = OpAccessChain %175 %29 %43 %80 %177 = OpLoad %17 %176 -%178 = OpAccessChain %175 %50 %80 +%178 = OpAccessChain %175 %35 %43 %80 OpStore %178 %177 %179 = OpLoad %3 %57 %180 = OpLoad %3 %57 @@ -329,7 +329,7 @@ OpStore %232 %238 %242 = OpIAdd %4 %239 %241 OpStore %232 %242 %243 = OpLoad %4 %232 -%244 = OpAccessChain %70 %224 %43 +%244 = OpAccessChain %70 %23 %43 %43 %245 = OpLoad %5 %244 %246 = OpLoad %4 %232 %247 = OpUConvert %5 %246 @@ -338,7 +338,7 @@ OpStore %232 %242 %250 = OpIAdd %4 %243 %249 OpStore %232 %250 %251 = OpLoad %4 %232 -%252 = OpAccessChain %79 %224 %80 +%252 = OpAccessChain %79 %23 %43 %80 %253 = OpLoad %6 %252 %254 = OpLoad %4 %232 %255 = OpSConvert %6 %254 @@ -347,7 +347,7 @@ OpStore %232 %250 %258 = OpIAdd %4 %251 %257 OpStore %232 %258 %259 = OpLoad %4 %232 -%260 = OpAccessChain %89 %224 %16 +%260 = OpAccessChain %89 %23 %43 %16 %261 = OpLoad %7 %260 %262 = OpLoad %4 %232 %263 = OpConvertUToF %7 %262 @@ -357,70 +357,70 @@ OpStore %232 %258 %269 = OpIAdd %4 %259 %268 OpStore %232 %269 %270 = OpLoad %4 %232 -%271 = OpAccessChain %109 %224 %110 +%271 = OpAccessChain %109 %23 %43 %110 %272 = OpLoad %4 %271 %273 = OpCompositeConstruct %9 %272 %272 %272 %274 = OpCompositeExtract %4 %273 2 %275 = OpIAdd %4 %270 %274 OpStore %232 %275 %276 = OpLoad %4 %232 -%277 = OpAccessChain %101 %224 %102 +%277 = OpAccessChain %101 %23 %43 %102 %278 = OpLoad %3 %277 %279 = OpBitcast %4 %278 %280 = OpIAdd %4 %276 %279 OpStore %232 %280 %281 = OpLoad %4 %232 -%282 = OpAccessChain %149 %224 %150 +%282 = OpAccessChain %149 %23 %43 %150 %283 = OpLoad %11 %282 %284 = OpBitcast %8 %283 %285 = OpCompositeExtract %4 %284 1 %286 = OpIAdd %4 %281 %285 OpStore %232 %286 %287 = OpLoad %4 %232 -%288 = OpAccessChain %158 %224 %159 +%288 = OpAccessChain %158 %23 %43 %159 %289 = OpLoad %12 %288 %290 = OpBitcast %9 %289 %291 = OpCompositeExtract %4 %290 2 %292 = OpIAdd %4 %287 %291 OpStore %232 %292 %293 = OpLoad %4 %232 -%294 = OpAccessChain %167 %224 %168 +%294 = OpAccessChain %167 %23 %43 %168 %295 = OpLoad %13 %294 %296 = OpBitcast %10 %295 %297 = OpCompositeExtract %4 %296 3 %298 = OpIAdd %4 %293 %297 OpStore %232 %298 -%300 = OpAccessChain %109 %224 %110 +%300 = OpAccessChain %109 %23 %43 %110 %301 = OpLoad %4 %300 -%302 = OpAccessChain %299 %225 %110 +%302 = OpAccessChain %299 %26 %43 %110 %303 = OpLoad %4 %302 %304 = OpIAdd %4 %301 %303 -%305 = OpAccessChain %299 %227 %110 +%305 = OpAccessChain %299 %32 %43 %110 OpStore %305 %304 -%307 = OpAccessChain %116 %224 %117 +%307 = OpAccessChain %116 %23 %43 %117 %308 = OpLoad %8 %307 -%309 = OpAccessChain %306 %225 %117 +%309 = OpAccessChain %306 %26 %43 %117 %310 = OpLoad %8 %309 %311 = OpIAdd %8 %308 %310 -%312 = OpAccessChain %306 %227 %117 +%312 = OpAccessChain %306 %32 %43 %117 OpStore %312 %311 -%314 = OpAccessChain %124 %224 %125 +%314 = OpAccessChain %124 %23 %43 %125 %315 = OpLoad %9 %314 -%316 = OpAccessChain %313 %225 %125 +%316 = OpAccessChain %313 %26 %43 %125 %317 = OpLoad %9 %316 %318 = OpIAdd %9 %315 %317 -%319 = OpAccessChain %313 %227 %125 +%319 = OpAccessChain %313 %32 %43 %125 OpStore %319 %318 -%321 = OpAccessChain %132 %224 %133 +%321 = OpAccessChain %132 %23 %43 %133 %322 = OpLoad %10 %321 -%323 = OpAccessChain %320 %225 %133 +%323 = OpAccessChain %320 %26 %43 %133 %324 = OpLoad %10 %323 %325 = OpIAdd %10 %322 %324 -%326 = OpAccessChain %320 %227 %133 +%326 = OpAccessChain %320 %32 %43 %133 OpStore %326 %325 -%328 = OpAccessChain %327 %226 %43 +%328 = OpAccessChain %327 %29 %43 %43 %329 = OpLoad %15 %328 -%330 = OpAccessChain %327 %228 %43 +%330 = OpAccessChain %327 %35 %43 %43 OpStore %330 %329 %331 = OpLoad %4 %232 %332 = OpLoad %4 %232 @@ -478,7 +478,7 @@ OpBranch %378 %380 = OpFunctionCall %3 %40 %377 %381 = OpBitcast %4 %380 %382 = OpIAdd %4 %379 %381 -%384 = OpAccessChain %299 %374 %383 +%384 = OpAccessChain %299 %32 %43 %383 OpStore %384 %382 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat2-uniform-alignment.spvasm b/naga/tests/out/spv/wgsl-mat2-uniform-alignment.spvasm index e0dc13bfe..87adde9a0 100644 --- a/naga/tests/out/spv/wgsl-mat2-uniform-alignment.spvasm +++ b/naga/tests/out/spv/wgsl-mat2-uniform-alignment.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 32 +; Bound: 33 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 @@ -49,7 +49,8 @@ OpFunctionEnd %27 = OpAccessChain %24 %9 %25 OpBranch %29 %29 = OpLabel -%30 = OpLoad %8 %27 -%31 = OpFunctionCall %7 %12 %30 +%30 = OpAccessChain %24 %9 %25 +%31 = OpLoad %8 %30 +%32 = OpFunctionCall %7 %12 %31 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat_cx2.spvasm b/naga/tests/out/spv/wgsl-mat_cx2.spvasm index 10fcb1692..1576fa56e 100644 --- a/naga/tests/out/spv/wgsl-mat_cx2.spvasm +++ b/naga/tests/out/spv/wgsl-mat_cx2.spvasm @@ -1,13 +1,13 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 629 +; Bound: 648 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %615 "main" -OpExecutionMode %615 LocalSize 1 1 1 +OpEntryPoint GLCompute %634 "main" +OpExecutionMode %634 LocalSize 1 1 1 %3 = OpString "mat_cx2.wgsl" OpSource Unknown 0 %3 "// Test handling of N-by-2 matrices. // See the doc comments on `naga::back::hlsl` and `naga::back::spv` for details. @@ -277,17 +277,17 @@ OpName %43 "mat2x2_from_std140" OpName %50 "mat2x2_get_column" OpName %63 "access_m" OpName %72 "idx" -OpName %137 "StructWithMat_from_std140" -OpName %146 "access_sm" -OpName %152 "idx" -OpName %230 "array, 4>_from_std140" -OpName %244 "access_am" -OpName %250 "idx" -OpName %402 "StructWithArrayOfStructOfMat_from_std140" -OpName %407 "array_from_std140" -OpName %423 "access_sasm" -OpName %429 "idx" -OpName %615 "main" +OpName %143 "StructWithMat_from_std140" +OpName %152 "access_sm" +OpName %158 "idx" +OpName %243 "array, 4>_from_std140" +OpName %257 "access_am" +OpName %263 "idx" +OpName %418 "StructWithArrayOfStructOfMat_from_std140" +OpName %423 "array_from_std140" +OpName %439 "access_sasm" +OpName %445 "idx" +OpName %634 "main" OpMemberDecorate %8 0 Offset 0 OpMemberDecorate %8 0 ColMajor OpMemberDecorate %8 0 MatrixStride 8 @@ -386,27 +386,27 @@ OpMemberDecorate %41 0 Offset 0 %70 = OpConstant %7 1 %71 = OpTypePointer Uniform %4 %73 = OpTypePointer Function %7 -%78 = OpTypePointer StorageBuffer %5 -%84 = OpTypePointer StorageBuffer %6 -%99 = OpTypePointer Uniform %5 -%107 = OpTypePointer Uniform %6 -%138 = OpTypeFunction %8 %15 -%147 = OpTypePointer StorageBuffer %8 -%149 = OpTypePointer Uniform %15 -%151 = OpTypePointer Uniform %8 -%178 = OpConstant %11 1 -%231 = OpTypeFunction %9 %16 -%245 = OpTypePointer StorageBuffer %9 -%247 = OpTypePointer Uniform %16 -%249 = OpTypePointer Uniform %9 -%403 = OpTypeFunction %13 %18 -%408 = OpTypeFunction %12 %17 -%424 = OpTypePointer StorageBuffer %13 -%426 = OpTypePointer Uniform %18 -%428 = OpTypePointer Uniform %13 -%434 = OpTypePointer StorageBuffer %12 -%484 = OpTypePointer Uniform %12 -%485 = OpTypePointer Uniform %17 +%79 = OpTypePointer StorageBuffer %5 +%85 = OpTypePointer StorageBuffer %6 +%101 = OpTypePointer Uniform %5 +%110 = OpTypePointer Uniform %6 +%144 = OpTypeFunction %8 %15 +%153 = OpTypePointer StorageBuffer %8 +%155 = OpTypePointer Uniform %15 +%157 = OpTypePointer Uniform %8 +%186 = OpConstant %11 1 +%244 = OpTypeFunction %9 %16 +%258 = OpTypePointer StorageBuffer %9 +%260 = OpTypePointer Uniform %16 +%262 = OpTypePointer Uniform %9 +%419 = OpTypeFunction %13 %18 +%424 = OpTypeFunction %12 %17 +%440 = OpTypePointer StorageBuffer %13 +%442 = OpTypePointer Uniform %18 +%444 = OpTypePointer Uniform %13 +%451 = OpTypePointer StorageBuffer %12 +%502 = OpTypePointer Uniform %12 +%503 = OpTypePointer Uniform %17 %43 = OpFunction %4 None %44 %45 = OpFunctionParameter %14 %46 = OpLabel @@ -446,896 +446,915 @@ OpLine %3 28 5 OpLine %3 28 5 OpStore %72 %76 OpLine %3 31 17 -%77 = OpLoad %4 %67 +%77 = OpAccessChain %65 %19 %66 +%78 = OpLoad %4 %77 OpLine %3 32 19 -%79 = OpAccessChain %78 %67 %66 -%80 = OpLoad %5 %79 +%80 = OpAccessChain %79 %19 %66 %66 +%81 = OpLoad %5 %80 OpLine %3 33 19 -%81 = OpLoad %7 %72 -%82 = OpAccessChain %78 %67 %81 -%83 = OpLoad %5 %82 +%82 = OpLoad %7 %72 +%83 = OpAccessChain %79 %19 %66 %82 +%84 = OpLoad %5 %83 OpLine %3 34 20 OpLine %3 34 20 -%85 = OpAccessChain %84 %67 %66 %66 -%86 = OpLoad %6 %85 +%86 = OpAccessChain %85 %19 %66 %66 %66 +%87 = OpLoad %6 %86 OpLine %3 35 20 -%87 = OpLoad %7 %72 -%88 = OpAccessChain %84 %67 %66 %87 -%89 = OpLoad %6 %88 +%88 = OpLoad %7 %72 +%89 = OpAccessChain %85 %19 %66 %66 %88 +%90 = OpLoad %6 %89 OpLine %3 36 20 -%90 = OpLoad %7 %72 +%91 = OpLoad %7 %72 OpLine %3 36 20 -%91 = OpAccessChain %84 %67 %90 %66 -%92 = OpLoad %6 %91 +%92 = OpAccessChain %85 %19 %66 %91 %66 +%93 = OpLoad %6 %92 OpLine %3 37 20 -%93 = OpLoad %7 %72 %94 = OpLoad %7 %72 -%95 = OpAccessChain %84 %67 %93 %94 -%96 = OpLoad %6 %95 +%95 = OpLoad %7 %72 +%96 = OpAccessChain %85 %19 %66 %94 %95 +%97 = OpLoad %6 %96 OpLine %3 40 17 -%97 = OpLoad %14 %69 -%98 = OpFunctionCall %4 %43 %97 +%98 = OpAccessChain %68 %22 %66 +%99 = OpLoad %14 %98 +%100 = OpFunctionCall %4 %43 %99 OpLine %3 41 19 -%100 = OpAccessChain %99 %69 %66 -%101 = OpLoad %5 %100 +%102 = OpAccessChain %101 %22 %66 %66 +%103 = OpLoad %5 %102 OpLine %3 42 19 -%102 = OpLoad %7 %72 -%103 = OpLoad %14 %69 -%104 = OpFunctionCall %4 %43 %103 -%105 = OpBitcast %11 %102 -%106 = OpFunctionCall %5 %50 %104 %105 +%104 = OpLoad %7 %72 +%105 = OpAccessChain %68 %22 %66 +%106 = OpLoad %14 %105 +%107 = OpFunctionCall %4 %43 %106 +%108 = OpBitcast %11 %104 +%109 = OpFunctionCall %5 %50 %107 %108 OpLine %3 43 20 OpLine %3 43 20 -%108 = OpAccessChain %107 %69 %66 %66 -%109 = OpLoad %6 %108 -OpLine %3 44 20 -%110 = OpLoad %7 %72 -%111 = OpAccessChain %107 %69 %66 %110 +%111 = OpAccessChain %110 %22 %66 %66 %66 %112 = OpLoad %6 %111 -OpLine %3 45 20 +OpLine %3 44 20 %113 = OpLoad %7 %72 +%114 = OpAccessChain %110 %22 %66 %66 %113 +%115 = OpLoad %6 %114 +OpLine %3 45 20 +%116 = OpLoad %7 %72 OpLine %3 45 20 -%114 = OpLoad %14 %69 -%115 = OpFunctionCall %4 %43 %114 -%116 = OpBitcast %11 %113 -%117 = OpFunctionCall %5 %50 %115 %116 -%118 = OpCompositeExtract %6 %117 0 +%117 = OpAccessChain %68 %22 %66 +%118 = OpLoad %14 %117 +%119 = OpFunctionCall %4 %43 %118 +%120 = OpBitcast %11 %116 +%121 = OpFunctionCall %5 %50 %119 %120 +%122 = OpCompositeExtract %6 %121 0 OpLine %3 46 20 -%119 = OpLoad %7 %72 -%120 = OpLoad %7 %72 -%121 = OpLoad %14 %69 -%122 = OpFunctionCall %4 %43 %121 -%123 = OpBitcast %11 %119 -%124 = OpFunctionCall %5 %50 %122 %123 -%125 = OpVectorExtractDynamic %6 %124 %120 +%123 = OpLoad %7 %72 +%124 = OpLoad %7 %72 +%125 = OpAccessChain %68 %22 %66 +%126 = OpLoad %14 %125 +%127 = OpFunctionCall %4 %43 %126 +%128 = OpBitcast %11 %123 +%129 = OpFunctionCall %5 %50 %127 %128 +%130 = OpVectorExtractDynamic %6 %129 %124 OpLine %3 49 5 -OpStore %67 %98 +%131 = OpAccessChain %65 %19 %66 +OpStore %131 %100 OpLine %3 50 5 OpLine %3 50 5 -%126 = OpAccessChain %78 %67 %66 -OpStore %126 %101 +%132 = OpAccessChain %79 %19 %66 %66 +OpStore %132 %103 OpLine %3 51 5 -%127 = OpLoad %7 %72 +%133 = OpLoad %7 %72 OpLine %3 51 5 -%128 = OpAccessChain %78 %67 %127 -OpStore %128 %106 +%134 = OpAccessChain %79 %19 %66 %133 +OpStore %134 %109 OpLine %3 52 5 OpLine %3 52 5 OpLine %3 52 5 -%129 = OpAccessChain %84 %67 %66 %66 -OpStore %129 %109 +%135 = OpAccessChain %85 %19 %66 %66 %66 +OpStore %135 %112 OpLine %3 53 5 -%130 = OpLoad %7 %72 +%136 = OpLoad %7 %72 OpLine %3 53 5 -%131 = OpAccessChain %84 %67 %66 %130 -OpStore %131 %112 +%137 = OpAccessChain %85 %19 %66 %66 %136 +OpStore %137 %115 OpLine %3 54 5 -%132 = OpLoad %7 %72 +%138 = OpLoad %7 %72 OpLine %3 54 5 OpLine %3 54 5 -%133 = OpAccessChain %84 %67 %132 %66 -OpStore %133 %118 +%139 = OpAccessChain %85 %19 %66 %138 %66 +OpStore %139 %122 OpLine %3 55 5 -%134 = OpLoad %7 %72 -%135 = OpLoad %7 %72 +%140 = OpLoad %7 %72 +%141 = OpLoad %7 %72 OpLine %3 55 5 -%136 = OpAccessChain %84 %67 %134 %135 -OpStore %136 %125 +%142 = OpAccessChain %85 %19 %66 %140 %141 +OpStore %142 %130 OpReturn OpFunctionEnd -%137 = OpFunction %8 None %138 -%139 = OpFunctionParameter %15 -%140 = OpLabel -%142 = OpCompositeExtract %5 %139 0 -%143 = OpCompositeExtract %5 %139 1 -%141 = OpCompositeConstruct %4 %142 %143 -%144 = OpCompositeConstruct %8 %141 -OpReturnValue %144 +%143 = OpFunction %8 None %144 +%145 = OpFunctionParameter %15 +%146 = OpLabel +%148 = OpCompositeExtract %5 %145 0 +%149 = OpCompositeExtract %5 %145 1 +%147 = OpCompositeConstruct %4 %148 %149 +%150 = OpCompositeConstruct %8 %147 +OpReturnValue %150 OpFunctionEnd -%146 = OpFunction %2 None %64 -%145 = OpLabel -%152 = OpVariable %73 Function %70 -%148 = OpAccessChain %147 %25 %66 -%150 = OpAccessChain %149 %28 %66 -OpBranch %153 -%153 = OpLabel +%152 = OpFunction %2 None %64 +%151 = OpLabel +%158 = OpVariable %73 Function %70 +%154 = OpAccessChain %153 %25 %66 +%156 = OpAccessChain %155 %28 %66 +OpBranch %159 +%159 = OpLabel OpLine %3 70 5 -%154 = OpLoad %7 %152 -%155 = OpISub %7 %154 %70 +%160 = OpLoad %7 %158 +%161 = OpISub %7 %160 %70 OpLine %3 70 5 -OpStore %152 %155 +OpStore %158 %161 OpLine %3 73 17 -%156 = OpLoad %8 %148 +%162 = OpAccessChain %153 %25 %66 +%163 = OpLoad %8 %162 OpLine %3 74 17 -%157 = OpAccessChain %65 %148 %66 -%158 = OpLoad %4 %157 +%164 = OpAccessChain %65 %25 %66 %66 +%165 = OpLoad %4 %164 OpLine %3 75 19 OpLine %3 75 19 -%159 = OpAccessChain %78 %148 %66 %66 -%160 = OpLoad %5 %159 +%166 = OpAccessChain %79 %25 %66 %66 %66 +%167 = OpLoad %5 %166 OpLine %3 76 19 -%161 = OpLoad %7 %152 -%162 = OpAccessChain %78 %148 %66 %161 -%163 = OpLoad %5 %162 +%168 = OpLoad %7 %158 +%169 = OpAccessChain %79 %25 %66 %66 %168 +%170 = OpLoad %5 %169 OpLine %3 77 20 OpLine %3 77 20 OpLine %3 77 20 -%164 = OpAccessChain %84 %148 %66 %66 %66 -%165 = OpLoad %6 %164 +%171 = OpAccessChain %85 %25 %66 %66 %66 %66 +%172 = OpLoad %6 %171 OpLine %3 78 20 OpLine %3 78 20 -%166 = OpLoad %7 %152 -%167 = OpAccessChain %84 %148 %66 %66 %166 -%168 = OpLoad %6 %167 +%173 = OpLoad %7 %158 +%174 = OpAccessChain %85 %25 %66 %66 %66 %173 +%175 = OpLoad %6 %174 OpLine %3 79 20 -%169 = OpLoad %7 %152 +%176 = OpLoad %7 %158 OpLine %3 79 20 -%170 = OpAccessChain %84 %148 %66 %169 %66 -%171 = OpLoad %6 %170 +%177 = OpAccessChain %85 %25 %66 %66 %176 %66 +%178 = OpLoad %6 %177 OpLine %3 80 20 -%172 = OpLoad %7 %152 -%173 = OpLoad %7 %152 -%174 = OpAccessChain %84 %148 %66 %172 %173 -%175 = OpLoad %6 %174 +%179 = OpLoad %7 %158 +%180 = OpLoad %7 %158 +%181 = OpAccessChain %85 %25 %66 %66 %179 %180 +%182 = OpLoad %6 %181 OpLine %3 83 17 -%176 = OpLoad %15 %150 -%177 = OpFunctionCall %8 %137 %176 +%183 = OpAccessChain %155 %28 %66 +%184 = OpLoad %15 %183 +%185 = OpFunctionCall %8 %143 %184 OpLine %3 84 17 -%179 = OpAccessChain %99 %150 %66 -%180 = OpLoad %5 %179 -%181 = OpAccessChain %99 %150 %178 -%182 = OpLoad %5 %181 -%183 = OpCompositeConstruct %4 %180 %182 +%187 = OpAccessChain %155 %28 %66 +%188 = OpAccessChain %101 %187 %66 +%189 = OpLoad %5 %188 +%190 = OpAccessChain %101 %187 %186 +%191 = OpLoad %5 %190 +%192 = OpCompositeConstruct %4 %189 %191 OpLine %3 85 19 OpLine %3 85 19 -%184 = OpAccessChain %99 %150 %66 -%185 = OpLoad %5 %184 +%193 = OpAccessChain %101 %28 %66 %66 +%194 = OpLoad %5 %193 OpLine %3 86 19 -%186 = OpLoad %7 %152 -%187 = OpAccessChain %99 %150 %66 -%188 = OpLoad %5 %187 -%189 = OpAccessChain %99 %150 %178 -%190 = OpLoad %5 %189 -%191 = OpCompositeConstruct %4 %188 %190 -%192 = OpBitcast %11 %186 -%193 = OpFunctionCall %5 %50 %191 %192 +%195 = OpLoad %7 %158 +%196 = OpAccessChain %155 %28 %66 +%197 = OpAccessChain %101 %196 %66 +%198 = OpLoad %5 %197 +%199 = OpAccessChain %101 %196 %186 +%200 = OpLoad %5 %199 +%201 = OpCompositeConstruct %4 %198 %200 +%202 = OpBitcast %11 %195 +%203 = OpFunctionCall %5 %50 %201 %202 OpLine %3 87 20 OpLine %3 87 20 OpLine %3 87 20 -%194 = OpAccessChain %107 %150 %66 %66 -%195 = OpLoad %6 %194 +%204 = OpAccessChain %110 %28 %66 %66 %66 +%205 = OpLoad %6 %204 OpLine %3 88 20 OpLine %3 88 20 -%196 = OpLoad %7 %152 -%197 = OpAccessChain %107 %150 %66 %196 -%198 = OpLoad %6 %197 +%206 = OpLoad %7 %158 +%207 = OpAccessChain %110 %28 %66 %66 %206 +%208 = OpLoad %6 %207 OpLine %3 89 20 -%199 = OpLoad %7 %152 +%209 = OpLoad %7 %158 OpLine %3 89 20 -%200 = OpAccessChain %99 %150 %66 -%201 = OpLoad %5 %200 -%202 = OpAccessChain %99 %150 %178 -%203 = OpLoad %5 %202 -%204 = OpCompositeConstruct %4 %201 %203 -%205 = OpBitcast %11 %199 -%206 = OpFunctionCall %5 %50 %204 %205 -%207 = OpCompositeExtract %6 %206 0 +%210 = OpAccessChain %155 %28 %66 +%211 = OpAccessChain %101 %210 %66 +%212 = OpLoad %5 %211 +%213 = OpAccessChain %101 %210 %186 +%214 = OpLoad %5 %213 +%215 = OpCompositeConstruct %4 %212 %214 +%216 = OpBitcast %11 %209 +%217 = OpFunctionCall %5 %50 %215 %216 +%218 = OpCompositeExtract %6 %217 0 OpLine %3 90 20 -%208 = OpLoad %7 %152 -%209 = OpLoad %7 %152 -%210 = OpAccessChain %99 %150 %66 -%211 = OpLoad %5 %210 -%212 = OpAccessChain %99 %150 %178 -%213 = OpLoad %5 %212 -%214 = OpCompositeConstruct %4 %211 %213 -%215 = OpBitcast %11 %208 -%216 = OpFunctionCall %5 %50 %214 %215 -%217 = OpVectorExtractDynamic %6 %216 %209 +%219 = OpLoad %7 %158 +%220 = OpLoad %7 %158 +%221 = OpAccessChain %155 %28 %66 +%222 = OpAccessChain %101 %221 %66 +%223 = OpLoad %5 %222 +%224 = OpAccessChain %101 %221 %186 +%225 = OpLoad %5 %224 +%226 = OpCompositeConstruct %4 %223 %225 +%227 = OpBitcast %11 %219 +%228 = OpFunctionCall %5 %50 %226 %227 +%229 = OpVectorExtractDynamic %6 %228 %220 OpLine %3 93 5 -OpStore %148 %177 +%230 = OpAccessChain %153 %25 %66 +OpStore %230 %185 OpLine %3 94 5 OpLine %3 94 5 -%218 = OpAccessChain %65 %148 %66 -OpStore %218 %183 +%231 = OpAccessChain %65 %25 %66 %66 +OpStore %231 %192 OpLine %3 95 5 OpLine %3 95 5 OpLine %3 95 5 -%219 = OpAccessChain %78 %148 %66 %66 -OpStore %219 %185 +%232 = OpAccessChain %79 %25 %66 %66 %66 +OpStore %232 %194 OpLine %3 96 5 -%220 = OpLoad %7 %152 +%233 = OpLoad %7 %158 OpLine %3 96 5 -%221 = OpAccessChain %78 %148 %66 %220 -OpStore %221 %193 +%234 = OpAccessChain %79 %25 %66 %66 %233 +OpStore %234 %203 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 -%222 = OpAccessChain %84 %148 %66 %66 %66 -OpStore %222 %195 +%235 = OpAccessChain %85 %25 %66 %66 %66 %66 +OpStore %235 %205 OpLine %3 98 5 OpLine %3 98 5 -%223 = OpLoad %7 %152 +%236 = OpLoad %7 %158 OpLine %3 98 5 -%224 = OpAccessChain %84 %148 %66 %66 %223 -OpStore %224 %198 +%237 = OpAccessChain %85 %25 %66 %66 %66 %236 +OpStore %237 %208 OpLine %3 99 5 -%225 = OpLoad %7 %152 +%238 = OpLoad %7 %158 OpLine %3 99 5 OpLine %3 99 5 -%226 = OpAccessChain %84 %148 %66 %225 %66 -OpStore %226 %207 +%239 = OpAccessChain %85 %25 %66 %66 %238 %66 +OpStore %239 %218 OpLine %3 100 5 -%227 = OpLoad %7 %152 -%228 = OpLoad %7 %152 +%240 = OpLoad %7 %158 +%241 = OpLoad %7 %158 OpLine %3 100 5 -%229 = OpAccessChain %84 %148 %66 %227 %228 -OpStore %229 %217 +%242 = OpAccessChain %85 %25 %66 %66 %240 %241 +OpStore %242 %229 OpReturn OpFunctionEnd -%230 = OpFunction %9 None %231 -%232 = OpFunctionParameter %16 -%233 = OpLabel -%234 = OpCompositeExtract %14 %232 0 -%235 = OpFunctionCall %4 %43 %234 -%236 = OpCompositeExtract %14 %232 1 -%237 = OpFunctionCall %4 %43 %236 -%238 = OpCompositeExtract %14 %232 2 -%239 = OpFunctionCall %4 %43 %238 -%240 = OpCompositeExtract %14 %232 3 -%241 = OpFunctionCall %4 %43 %240 -%242 = OpCompositeConstruct %9 %235 %237 %239 %241 -OpReturnValue %242 +%243 = OpFunction %9 None %244 +%245 = OpFunctionParameter %16 +%246 = OpLabel +%247 = OpCompositeExtract %14 %245 0 +%248 = OpFunctionCall %4 %43 %247 +%249 = OpCompositeExtract %14 %245 1 +%250 = OpFunctionCall %4 %43 %249 +%251 = OpCompositeExtract %14 %245 2 +%252 = OpFunctionCall %4 %43 %251 +%253 = OpCompositeExtract %14 %245 3 +%254 = OpFunctionCall %4 %43 %253 +%255 = OpCompositeConstruct %9 %248 %250 %252 %254 +OpReturnValue %255 OpFunctionEnd -%244 = OpFunction %2 None %64 -%243 = OpLabel -%250 = OpVariable %73 Function %70 -%246 = OpAccessChain %245 %31 %66 -%248 = OpAccessChain %247 %34 %66 -OpBranch %251 -%251 = OpLabel +%257 = OpFunction %2 None %64 +%256 = OpLabel +%263 = OpVariable %73 Function %70 +%259 = OpAccessChain %258 %31 %66 +%261 = OpAccessChain %260 %34 %66 +OpBranch %264 +%264 = OpLabel OpLine %3 111 5 -%252 = OpLoad %7 %250 -%253 = OpISub %7 %252 %70 +%265 = OpLoad %7 %263 +%266 = OpISub %7 %265 %70 OpLine %3 111 5 -OpStore %250 %253 +OpStore %263 %266 OpLine %3 114 17 -%254 = OpLoad %9 %246 +%267 = OpAccessChain %258 %31 %66 +%268 = OpLoad %9 %267 OpLine %3 115 19 -%255 = OpAccessChain %65 %246 %66 -%256 = OpLoad %4 %255 +%269 = OpAccessChain %65 %31 %66 %66 +%270 = OpLoad %4 %269 OpLine %3 116 19 -%257 = OpLoad %7 %250 -%258 = OpAccessChain %65 %246 %257 -%259 = OpLoad %4 %258 +%271 = OpLoad %7 %263 +%272 = OpAccessChain %65 %31 %66 %271 +%273 = OpLoad %4 %272 OpLine %3 117 20 OpLine %3 117 20 -%260 = OpAccessChain %78 %246 %66 %66 -%261 = OpLoad %5 %260 +%274 = OpAccessChain %79 %31 %66 %66 %66 +%275 = OpLoad %5 %274 OpLine %3 118 20 -%262 = OpLoad %7 %250 -%263 = OpAccessChain %78 %246 %66 %262 -%264 = OpLoad %5 %263 +%276 = OpLoad %7 %263 +%277 = OpAccessChain %79 %31 %66 %66 %276 +%278 = OpLoad %5 %277 OpLine %3 119 20 -%265 = OpLoad %7 %250 +%279 = OpLoad %7 %263 OpLine %3 119 20 -%266 = OpAccessChain %78 %246 %265 %66 -%267 = OpLoad %5 %266 +%280 = OpAccessChain %79 %31 %66 %279 %66 +%281 = OpLoad %5 %280 OpLine %3 120 20 -%268 = OpLoad %7 %250 -%269 = OpLoad %7 %250 -%270 = OpAccessChain %78 %246 %268 %269 -%271 = OpLoad %5 %270 +%282 = OpLoad %7 %263 +%283 = OpLoad %7 %263 +%284 = OpAccessChain %79 %31 %66 %282 %283 +%285 = OpLoad %5 %284 OpLine %3 121 21 OpLine %3 121 21 OpLine %3 121 21 -%272 = OpAccessChain %84 %246 %66 %66 %66 -%273 = OpLoad %6 %272 +%286 = OpAccessChain %85 %31 %66 %66 %66 %66 +%287 = OpLoad %6 %286 OpLine %3 122 21 OpLine %3 122 21 -%274 = OpLoad %7 %250 -%275 = OpAccessChain %84 %246 %66 %66 %274 -%276 = OpLoad %6 %275 +%288 = OpLoad %7 %263 +%289 = OpAccessChain %85 %31 %66 %66 %66 %288 +%290 = OpLoad %6 %289 OpLine %3 123 21 -%277 = OpLoad %7 %250 +%291 = OpLoad %7 %263 OpLine %3 123 21 -%278 = OpAccessChain %84 %246 %66 %277 %66 -%279 = OpLoad %6 %278 +%292 = OpAccessChain %85 %31 %66 %66 %291 %66 +%293 = OpLoad %6 %292 OpLine %3 124 21 -%280 = OpLoad %7 %250 -%281 = OpLoad %7 %250 -%282 = OpAccessChain %84 %246 %66 %280 %281 -%283 = OpLoad %6 %282 +%294 = OpLoad %7 %263 +%295 = OpLoad %7 %263 +%296 = OpAccessChain %85 %31 %66 %66 %294 %295 +%297 = OpLoad %6 %296 OpLine %3 125 21 -%284 = OpLoad %7 %250 +%298 = OpLoad %7 %263 OpLine %3 125 21 OpLine %3 125 21 -%285 = OpAccessChain %84 %246 %284 %66 %66 -%286 = OpLoad %6 %285 +%299 = OpAccessChain %85 %31 %66 %298 %66 %66 +%300 = OpLoad %6 %299 OpLine %3 126 21 -%287 = OpLoad %7 %250 +%301 = OpLoad %7 %263 OpLine %3 126 21 -%288 = OpLoad %7 %250 -%289 = OpAccessChain %84 %246 %287 %66 %288 -%290 = OpLoad %6 %289 +%302 = OpLoad %7 %263 +%303 = OpAccessChain %85 %31 %66 %301 %66 %302 +%304 = OpLoad %6 %303 OpLine %3 127 21 -%291 = OpLoad %7 %250 -%292 = OpLoad %7 %250 +%305 = OpLoad %7 %263 +%306 = OpLoad %7 %263 OpLine %3 127 21 -%293 = OpAccessChain %84 %246 %291 %292 %66 -%294 = OpLoad %6 %293 +%307 = OpAccessChain %85 %31 %66 %305 %306 %66 +%308 = OpLoad %6 %307 OpLine %3 128 21 -%295 = OpLoad %7 %250 -%296 = OpLoad %7 %250 -%297 = OpLoad %7 %250 -%298 = OpAccessChain %84 %246 %295 %296 %297 -%299 = OpLoad %6 %298 +%309 = OpLoad %7 %263 +%310 = OpLoad %7 %263 +%311 = OpLoad %7 %263 +%312 = OpAccessChain %85 %31 %66 %309 %310 %311 +%313 = OpLoad %6 %312 OpLine %3 131 17 -%300 = OpLoad %16 %248 -%301 = OpFunctionCall %9 %230 %300 +%314 = OpAccessChain %260 %34 %66 +%315 = OpLoad %16 %314 +%316 = OpFunctionCall %9 %243 %315 OpLine %3 132 19 -%302 = OpAccessChain %68 %248 %66 -%303 = OpLoad %14 %302 -%304 = OpFunctionCall %4 %43 %303 +%317 = OpAccessChain %68 %34 %66 %66 +%318 = OpLoad %14 %317 +%319 = OpFunctionCall %4 %43 %318 OpLine %3 133 19 -%305 = OpLoad %7 %250 -%306 = OpAccessChain %68 %248 %305 -%307 = OpLoad %14 %306 -%308 = OpFunctionCall %4 %43 %307 +%320 = OpLoad %7 %263 +%321 = OpAccessChain %68 %34 %66 %320 +%322 = OpLoad %14 %321 +%323 = OpFunctionCall %4 %43 %322 OpLine %3 134 20 OpLine %3 134 20 -%309 = OpAccessChain %99 %248 %66 %66 -%310 = OpLoad %5 %309 +%324 = OpAccessChain %101 %34 %66 %66 %66 +%325 = OpLoad %5 %324 OpLine %3 135 20 -%311 = OpLoad %7 %250 -%312 = OpAccessChain %68 %248 %66 -%313 = OpLoad %14 %312 -%314 = OpFunctionCall %4 %43 %313 -%315 = OpBitcast %11 %311 -%316 = OpFunctionCall %5 %50 %314 %315 +%326 = OpLoad %7 %263 +%327 = OpAccessChain %68 %34 %66 %66 +%328 = OpLoad %14 %327 +%329 = OpFunctionCall %4 %43 %328 +%330 = OpBitcast %11 %326 +%331 = OpFunctionCall %5 %50 %329 %330 OpLine %3 136 20 -%317 = OpLoad %7 %250 +%332 = OpLoad %7 %263 OpLine %3 136 20 -%318 = OpAccessChain %99 %248 %317 %66 -%319 = OpLoad %5 %318 +%333 = OpAccessChain %101 %34 %66 %332 %66 +%334 = OpLoad %5 %333 OpLine %3 137 20 -%320 = OpLoad %7 %250 -%321 = OpLoad %7 %250 -%322 = OpAccessChain %68 %248 %320 -%323 = OpLoad %14 %322 -%324 = OpFunctionCall %4 %43 %323 -%325 = OpBitcast %11 %321 -%326 = OpFunctionCall %5 %50 %324 %325 +%335 = OpLoad %7 %263 +%336 = OpLoad %7 %263 +%337 = OpAccessChain %68 %34 %66 %335 +%338 = OpLoad %14 %337 +%339 = OpFunctionCall %4 %43 %338 +%340 = OpBitcast %11 %336 +%341 = OpFunctionCall %5 %50 %339 %340 OpLine %3 138 21 OpLine %3 138 21 OpLine %3 138 21 -%327 = OpAccessChain %107 %248 %66 %66 %66 -%328 = OpLoad %6 %327 +%342 = OpAccessChain %110 %34 %66 %66 %66 %66 +%343 = OpLoad %6 %342 OpLine %3 139 21 OpLine %3 139 21 -%329 = OpLoad %7 %250 -%330 = OpAccessChain %107 %248 %66 %66 %329 -%331 = OpLoad %6 %330 +%344 = OpLoad %7 %263 +%345 = OpAccessChain %110 %34 %66 %66 %66 %344 +%346 = OpLoad %6 %345 OpLine %3 140 21 -%332 = OpLoad %7 %250 +%347 = OpLoad %7 %263 OpLine %3 140 21 -%333 = OpAccessChain %68 %248 %66 -%334 = OpLoad %14 %333 -%335 = OpFunctionCall %4 %43 %334 -%336 = OpBitcast %11 %332 -%337 = OpFunctionCall %5 %50 %335 %336 -%338 = OpCompositeExtract %6 %337 0 +%348 = OpAccessChain %68 %34 %66 %66 +%349 = OpLoad %14 %348 +%350 = OpFunctionCall %4 %43 %349 +%351 = OpBitcast %11 %347 +%352 = OpFunctionCall %5 %50 %350 %351 +%353 = OpCompositeExtract %6 %352 0 OpLine %3 141 21 -%339 = OpLoad %7 %250 -%340 = OpLoad %7 %250 -%341 = OpAccessChain %68 %248 %66 -%342 = OpLoad %14 %341 -%343 = OpFunctionCall %4 %43 %342 -%344 = OpBitcast %11 %339 -%345 = OpFunctionCall %5 %50 %343 %344 -%346 = OpVectorExtractDynamic %6 %345 %340 +%354 = OpLoad %7 %263 +%355 = OpLoad %7 %263 +%356 = OpAccessChain %68 %34 %66 %66 +%357 = OpLoad %14 %356 +%358 = OpFunctionCall %4 %43 %357 +%359 = OpBitcast %11 %354 +%360 = OpFunctionCall %5 %50 %358 %359 +%361 = OpVectorExtractDynamic %6 %360 %355 OpLine %3 142 21 -%347 = OpLoad %7 %250 +%362 = OpLoad %7 %263 OpLine %3 142 21 OpLine %3 142 21 -%348 = OpAccessChain %107 %248 %347 %66 %66 -%349 = OpLoad %6 %348 +%363 = OpAccessChain %110 %34 %66 %362 %66 %66 +%364 = OpLoad %6 %363 OpLine %3 143 21 -%350 = OpLoad %7 %250 +%365 = OpLoad %7 %263 OpLine %3 143 21 -%351 = OpLoad %7 %250 -%352 = OpAccessChain %107 %248 %350 %66 %351 -%353 = OpLoad %6 %352 +%366 = OpLoad %7 %263 +%367 = OpAccessChain %110 %34 %66 %365 %66 %366 +%368 = OpLoad %6 %367 OpLine %3 144 21 -%354 = OpLoad %7 %250 -%355 = OpLoad %7 %250 +%369 = OpLoad %7 %263 +%370 = OpLoad %7 %263 OpLine %3 144 21 -%356 = OpAccessChain %68 %248 %354 -%357 = OpLoad %14 %356 -%358 = OpFunctionCall %4 %43 %357 -%359 = OpBitcast %11 %355 -%360 = OpFunctionCall %5 %50 %358 %359 -%361 = OpCompositeExtract %6 %360 0 +%371 = OpAccessChain %68 %34 %66 %369 +%372 = OpLoad %14 %371 +%373 = OpFunctionCall %4 %43 %372 +%374 = OpBitcast %11 %370 +%375 = OpFunctionCall %5 %50 %373 %374 +%376 = OpCompositeExtract %6 %375 0 OpLine %3 145 21 -%362 = OpLoad %7 %250 -%363 = OpLoad %7 %250 -%364 = OpLoad %7 %250 -%365 = OpAccessChain %68 %248 %362 -%366 = OpLoad %14 %365 -%367 = OpFunctionCall %4 %43 %366 -%368 = OpBitcast %11 %363 -%369 = OpFunctionCall %5 %50 %367 %368 -%370 = OpVectorExtractDynamic %6 %369 %364 +%377 = OpLoad %7 %263 +%378 = OpLoad %7 %263 +%379 = OpLoad %7 %263 +%380 = OpAccessChain %68 %34 %66 %377 +%381 = OpLoad %14 %380 +%382 = OpFunctionCall %4 %43 %381 +%383 = OpBitcast %11 %378 +%384 = OpFunctionCall %5 %50 %382 %383 +%385 = OpVectorExtractDynamic %6 %384 %379 OpLine %3 148 5 -OpStore %246 %301 +%386 = OpAccessChain %258 %31 %66 +OpStore %386 %316 OpLine %3 149 5 OpLine %3 149 5 -%371 = OpAccessChain %65 %246 %66 -OpStore %371 %304 +%387 = OpAccessChain %65 %31 %66 %66 +OpStore %387 %319 OpLine %3 150 5 -%372 = OpLoad %7 %250 +%388 = OpLoad %7 %263 OpLine %3 150 5 -%373 = OpAccessChain %65 %246 %372 -OpStore %373 %308 +%389 = OpAccessChain %65 %31 %66 %388 +OpStore %389 %323 OpLine %3 151 5 OpLine %3 151 5 OpLine %3 151 5 -%374 = OpAccessChain %78 %246 %66 %66 -OpStore %374 %310 +%390 = OpAccessChain %79 %31 %66 %66 %66 +OpStore %390 %325 OpLine %3 152 5 -%375 = OpLoad %7 %250 +%391 = OpLoad %7 %263 OpLine %3 152 5 -%376 = OpAccessChain %78 %246 %66 %375 -OpStore %376 %316 +%392 = OpAccessChain %79 %31 %66 %66 %391 +OpStore %392 %331 OpLine %3 153 5 -%377 = OpLoad %7 %250 +%393 = OpLoad %7 %263 OpLine %3 153 5 OpLine %3 153 5 -%378 = OpAccessChain %78 %246 %377 %66 -OpStore %378 %319 +%394 = OpAccessChain %79 %31 %66 %393 %66 +OpStore %394 %334 OpLine %3 154 5 -%379 = OpLoad %7 %250 -%380 = OpLoad %7 %250 +%395 = OpLoad %7 %263 +%396 = OpLoad %7 %263 OpLine %3 154 5 -%381 = OpAccessChain %78 %246 %379 %380 -OpStore %381 %326 +%397 = OpAccessChain %79 %31 %66 %395 %396 +OpStore %397 %341 OpLine %3 155 5 OpLine %3 155 5 OpLine %3 155 5 OpLine %3 155 5 -%382 = OpAccessChain %84 %246 %66 %66 %66 -OpStore %382 %328 +%398 = OpAccessChain %85 %31 %66 %66 %66 %66 +OpStore %398 %343 OpLine %3 156 5 OpLine %3 156 5 -%383 = OpLoad %7 %250 +%399 = OpLoad %7 %263 OpLine %3 156 5 -%384 = OpAccessChain %84 %246 %66 %66 %383 -OpStore %384 %331 +%400 = OpAccessChain %85 %31 %66 %66 %66 %399 +OpStore %400 %346 OpLine %3 157 5 -%385 = OpLoad %7 %250 +%401 = OpLoad %7 %263 OpLine %3 157 5 OpLine %3 157 5 -%386 = OpAccessChain %84 %246 %66 %385 %66 -OpStore %386 %338 +%402 = OpAccessChain %85 %31 %66 %66 %401 %66 +OpStore %402 %353 OpLine %3 158 5 -%387 = OpLoad %7 %250 -%388 = OpLoad %7 %250 +%403 = OpLoad %7 %263 +%404 = OpLoad %7 %263 OpLine %3 158 5 -%389 = OpAccessChain %84 %246 %66 %387 %388 -OpStore %389 %346 +%405 = OpAccessChain %85 %31 %66 %66 %403 %404 +OpStore %405 %361 OpLine %3 159 5 -%390 = OpLoad %7 %250 +%406 = OpLoad %7 %263 OpLine %3 159 5 OpLine %3 159 5 OpLine %3 159 5 -%391 = OpAccessChain %84 %246 %390 %66 %66 -OpStore %391 %349 +%407 = OpAccessChain %85 %31 %66 %406 %66 %66 +OpStore %407 %364 OpLine %3 160 5 -%392 = OpLoad %7 %250 +%408 = OpLoad %7 %263 OpLine %3 160 5 -%393 = OpLoad %7 %250 +%409 = OpLoad %7 %263 OpLine %3 160 5 -%394 = OpAccessChain %84 %246 %392 %66 %393 -OpStore %394 %353 +%410 = OpAccessChain %85 %31 %66 %408 %66 %409 +OpStore %410 %368 OpLine %3 161 5 -%395 = OpLoad %7 %250 -%396 = OpLoad %7 %250 +%411 = OpLoad %7 %263 +%412 = OpLoad %7 %263 OpLine %3 161 5 OpLine %3 161 5 -%397 = OpAccessChain %84 %246 %395 %396 %66 -OpStore %397 %361 +%413 = OpAccessChain %85 %31 %66 %411 %412 %66 +OpStore %413 %376 OpLine %3 162 5 -%398 = OpLoad %7 %250 -%399 = OpLoad %7 %250 -%400 = OpLoad %7 %250 +%414 = OpLoad %7 %263 +%415 = OpLoad %7 %263 +%416 = OpLoad %7 %263 OpLine %3 162 5 -%401 = OpAccessChain %84 %246 %398 %399 %400 -OpStore %401 %370 +%417 = OpAccessChain %85 %31 %66 %414 %415 %416 +OpStore %417 %385 OpReturn OpFunctionEnd -%407 = OpFunction %12 None %408 -%409 = OpFunctionParameter %17 -%410 = OpLabel -%411 = OpCompositeExtract %15 %409 0 -%412 = OpFunctionCall %8 %137 %411 -%413 = OpCompositeExtract %15 %409 1 -%414 = OpFunctionCall %8 %137 %413 -%415 = OpCompositeExtract %15 %409 2 -%416 = OpFunctionCall %8 %137 %415 -%417 = OpCompositeExtract %15 %409 3 -%418 = OpFunctionCall %8 %137 %417 -%419 = OpCompositeConstruct %12 %412 %414 %416 %418 -OpReturnValue %419 +%423 = OpFunction %12 None %424 +%425 = OpFunctionParameter %17 +%426 = OpLabel +%427 = OpCompositeExtract %15 %425 0 +%428 = OpFunctionCall %8 %143 %427 +%429 = OpCompositeExtract %15 %425 1 +%430 = OpFunctionCall %8 %143 %429 +%431 = OpCompositeExtract %15 %425 2 +%432 = OpFunctionCall %8 %143 %431 +%433 = OpCompositeExtract %15 %425 3 +%434 = OpFunctionCall %8 %143 %433 +%435 = OpCompositeConstruct %12 %428 %430 %432 %434 +OpReturnValue %435 OpFunctionEnd -%402 = OpFunction %13 None %403 -%404 = OpFunctionParameter %18 -%405 = OpLabel -%420 = OpCompositeExtract %17 %404 0 -%406 = OpFunctionCall %12 %407 %420 -%421 = OpCompositeConstruct %13 %406 -OpReturnValue %421 +%418 = OpFunction %13 None %419 +%420 = OpFunctionParameter %18 +%421 = OpLabel +%436 = OpCompositeExtract %17 %420 0 +%422 = OpFunctionCall %12 %423 %436 +%437 = OpCompositeConstruct %13 %422 +OpReturnValue %437 OpFunctionEnd -%423 = OpFunction %2 None %64 -%422 = OpLabel -%429 = OpVariable %73 Function %70 -%425 = OpAccessChain %424 %37 %66 -%427 = OpAccessChain %426 %40 %66 -OpBranch %430 -%430 = OpLabel +%439 = OpFunction %2 None %64 +%438 = OpLabel +%445 = OpVariable %73 Function %70 +%441 = OpAccessChain %440 %37 %66 +%443 = OpAccessChain %442 %40 %66 +OpBranch %446 +%446 = OpLabel OpLine %3 177 5 -%431 = OpLoad %7 %429 -%432 = OpISub %7 %431 %70 +%447 = OpLoad %7 %445 +%448 = OpISub %7 %447 %70 OpLine %3 177 5 -OpStore %429 %432 +OpStore %445 %448 OpLine %3 180 17 -%433 = OpLoad %13 %425 +%449 = OpAccessChain %440 %37 %66 +%450 = OpLoad %13 %449 OpLine %3 181 17 -%435 = OpAccessChain %434 %425 %66 -%436 = OpLoad %12 %435 +%452 = OpAccessChain %451 %37 %66 %66 +%453 = OpLoad %12 %452 OpLine %3 182 19 OpLine %3 182 19 -%437 = OpAccessChain %65 %425 %66 %66 %66 -%438 = OpLoad %4 %437 +%454 = OpAccessChain %65 %37 %66 %66 %66 %66 +%455 = OpLoad %4 %454 OpLine %3 183 19 -%439 = OpLoad %7 %429 -%440 = OpAccessChain %65 %425 %66 %439 %66 -%441 = OpLoad %4 %440 +%456 = OpLoad %7 %445 +%457 = OpAccessChain %65 %37 %66 %66 %456 %66 +%458 = OpLoad %4 %457 OpLine %3 184 20 OpLine %3 184 20 OpLine %3 184 20 -%442 = OpAccessChain %78 %425 %66 %66 %66 %66 -%443 = OpLoad %5 %442 +%459 = OpAccessChain %79 %37 %66 %66 %66 %66 %66 +%460 = OpLoad %5 %459 OpLine %3 185 20 OpLine %3 185 20 -%444 = OpLoad %7 %429 -%445 = OpAccessChain %78 %425 %66 %66 %66 %444 -%446 = OpLoad %5 %445 +%461 = OpLoad %7 %445 +%462 = OpAccessChain %79 %37 %66 %66 %66 %66 %461 +%463 = OpLoad %5 %462 OpLine %3 186 20 -%447 = OpLoad %7 %429 +%464 = OpLoad %7 %445 OpLine %3 186 20 -%448 = OpAccessChain %78 %425 %66 %447 %66 %66 -%449 = OpLoad %5 %448 +%465 = OpAccessChain %79 %37 %66 %66 %464 %66 %66 +%466 = OpLoad %5 %465 OpLine %3 187 20 -%450 = OpLoad %7 %429 -%451 = OpLoad %7 %429 -%452 = OpAccessChain %78 %425 %66 %450 %66 %451 -%453 = OpLoad %5 %452 +%467 = OpLoad %7 %445 +%468 = OpLoad %7 %445 +%469 = OpAccessChain %79 %37 %66 %66 %467 %66 %468 +%470 = OpLoad %5 %469 OpLine %3 188 21 OpLine %3 188 21 OpLine %3 188 21 OpLine %3 188 21 -%454 = OpAccessChain %84 %425 %66 %66 %66 %66 %66 -%455 = OpLoad %6 %454 +%471 = OpAccessChain %85 %37 %66 %66 %66 %66 %66 %66 +%472 = OpLoad %6 %471 OpLine %3 189 21 OpLine %3 189 21 OpLine %3 189 21 -%456 = OpLoad %7 %429 -%457 = OpAccessChain %84 %425 %66 %66 %66 %66 %456 -%458 = OpLoad %6 %457 +%473 = OpLoad %7 %445 +%474 = OpAccessChain %85 %37 %66 %66 %66 %66 %66 %473 +%475 = OpLoad %6 %474 OpLine %3 190 21 OpLine %3 190 21 -%459 = OpLoad %7 %429 +%476 = OpLoad %7 %445 OpLine %3 190 21 -%460 = OpAccessChain %84 %425 %66 %66 %66 %459 %66 -%461 = OpLoad %6 %460 +%477 = OpAccessChain %85 %37 %66 %66 %66 %66 %476 %66 +%478 = OpLoad %6 %477 OpLine %3 191 21 OpLine %3 191 21 -%462 = OpLoad %7 %429 -%463 = OpLoad %7 %429 -%464 = OpAccessChain %84 %425 %66 %66 %66 %462 %463 -%465 = OpLoad %6 %464 +%479 = OpLoad %7 %445 +%480 = OpLoad %7 %445 +%481 = OpAccessChain %85 %37 %66 %66 %66 %66 %479 %480 +%482 = OpLoad %6 %481 OpLine %3 192 21 -%466 = OpLoad %7 %429 +%483 = OpLoad %7 %445 OpLine %3 192 21 OpLine %3 192 21 -%467 = OpAccessChain %84 %425 %66 %466 %66 %66 %66 -%468 = OpLoad %6 %467 +%484 = OpAccessChain %85 %37 %66 %66 %483 %66 %66 %66 +%485 = OpLoad %6 %484 OpLine %3 193 21 -%469 = OpLoad %7 %429 +%486 = OpLoad %7 %445 OpLine %3 193 21 -%470 = OpLoad %7 %429 -%471 = OpAccessChain %84 %425 %66 %469 %66 %66 %470 -%472 = OpLoad %6 %471 +%487 = OpLoad %7 %445 +%488 = OpAccessChain %85 %37 %66 %66 %486 %66 %66 %487 +%489 = OpLoad %6 %488 OpLine %3 194 21 -%473 = OpLoad %7 %429 -%474 = OpLoad %7 %429 +%490 = OpLoad %7 %445 +%491 = OpLoad %7 %445 OpLine %3 194 21 -%475 = OpAccessChain %84 %425 %66 %473 %66 %474 %66 -%476 = OpLoad %6 %475 +%492 = OpAccessChain %85 %37 %66 %66 %490 %66 %491 %66 +%493 = OpLoad %6 %492 OpLine %3 195 21 -%477 = OpLoad %7 %429 -%478 = OpLoad %7 %429 -%479 = OpLoad %7 %429 -%480 = OpAccessChain %84 %425 %66 %477 %66 %478 %479 -%481 = OpLoad %6 %480 +%494 = OpLoad %7 %445 +%495 = OpLoad %7 %445 +%496 = OpLoad %7 %445 +%497 = OpAccessChain %85 %37 %66 %66 %494 %66 %495 %496 +%498 = OpLoad %6 %497 OpLine %3 198 17 -%482 = OpLoad %18 %427 -%483 = OpFunctionCall %13 %402 %482 +%499 = OpAccessChain %442 %40 %66 +%500 = OpLoad %18 %499 +%501 = OpFunctionCall %13 %418 %500 OpLine %3 199 17 -%486 = OpAccessChain %485 %427 %66 -%487 = OpLoad %17 %486 -%488 = OpFunctionCall %12 %407 %487 +%504 = OpAccessChain %503 %40 %66 %66 +%505 = OpLoad %17 %504 +%506 = OpFunctionCall %12 %423 %505 OpLine %3 200 19 OpLine %3 200 19 -%489 = OpAccessChain %149 %427 %66 %66 -%490 = OpAccessChain %99 %489 %66 -%491 = OpLoad %5 %490 -%492 = OpAccessChain %99 %489 %178 -%493 = OpLoad %5 %492 -%494 = OpCompositeConstruct %4 %491 %493 +%507 = OpAccessChain %155 %40 %66 %66 %66 +%508 = OpAccessChain %101 %507 %66 +%509 = OpLoad %5 %508 +%510 = OpAccessChain %101 %507 %186 +%511 = OpLoad %5 %510 +%512 = OpCompositeConstruct %4 %509 %511 OpLine %3 201 19 -%495 = OpLoad %7 %429 -%496 = OpAccessChain %149 %427 %66 %495 -%497 = OpAccessChain %99 %496 %66 -%498 = OpLoad %5 %497 -%499 = OpAccessChain %99 %496 %178 -%500 = OpLoad %5 %499 -%501 = OpCompositeConstruct %4 %498 %500 +%513 = OpLoad %7 %445 +%514 = OpAccessChain %155 %40 %66 %66 %513 +%515 = OpAccessChain %101 %514 %66 +%516 = OpLoad %5 %515 +%517 = OpAccessChain %101 %514 %186 +%518 = OpLoad %5 %517 +%519 = OpCompositeConstruct %4 %516 %518 OpLine %3 202 20 OpLine %3 202 20 OpLine %3 202 20 -%502 = OpAccessChain %99 %427 %66 %66 %66 -%503 = OpLoad %5 %502 +%520 = OpAccessChain %101 %40 %66 %66 %66 %66 +%521 = OpLoad %5 %520 OpLine %3 203 20 OpLine %3 203 20 -%504 = OpLoad %7 %429 -%505 = OpAccessChain %149 %427 %66 %66 -%506 = OpAccessChain %99 %505 %66 -%507 = OpLoad %5 %506 -%508 = OpAccessChain %99 %505 %178 -%509 = OpLoad %5 %508 -%510 = OpCompositeConstruct %4 %507 %509 -%511 = OpBitcast %11 %504 -%512 = OpFunctionCall %5 %50 %510 %511 +%522 = OpLoad %7 %445 +%523 = OpAccessChain %155 %40 %66 %66 %66 +%524 = OpAccessChain %101 %523 %66 +%525 = OpLoad %5 %524 +%526 = OpAccessChain %101 %523 %186 +%527 = OpLoad %5 %526 +%528 = OpCompositeConstruct %4 %525 %527 +%529 = OpBitcast %11 %522 +%530 = OpFunctionCall %5 %50 %528 %529 OpLine %3 204 20 -%513 = OpLoad %7 %429 +%531 = OpLoad %7 %445 OpLine %3 204 20 -%514 = OpAccessChain %99 %427 %66 %513 %66 -%515 = OpLoad %5 %514 +%532 = OpAccessChain %101 %40 %66 %66 %531 %66 +%533 = OpLoad %5 %532 OpLine %3 205 20 -%516 = OpLoad %7 %429 -%517 = OpLoad %7 %429 -%518 = OpAccessChain %149 %427 %66 %516 -%519 = OpAccessChain %99 %518 %66 -%520 = OpLoad %5 %519 -%521 = OpAccessChain %99 %518 %178 -%522 = OpLoad %5 %521 -%523 = OpCompositeConstruct %4 %520 %522 -%524 = OpBitcast %11 %517 -%525 = OpFunctionCall %5 %50 %523 %524 +%534 = OpLoad %7 %445 +%535 = OpLoad %7 %445 +%536 = OpAccessChain %155 %40 %66 %66 %534 +%537 = OpAccessChain %101 %536 %66 +%538 = OpLoad %5 %537 +%539 = OpAccessChain %101 %536 %186 +%540 = OpLoad %5 %539 +%541 = OpCompositeConstruct %4 %538 %540 +%542 = OpBitcast %11 %535 +%543 = OpFunctionCall %5 %50 %541 %542 OpLine %3 206 21 OpLine %3 206 21 OpLine %3 206 21 OpLine %3 206 21 -%526 = OpAccessChain %107 %427 %66 %66 %66 %66 -%527 = OpLoad %6 %526 +%544 = OpAccessChain %110 %40 %66 %66 %66 %66 %66 +%545 = OpLoad %6 %544 OpLine %3 207 21 OpLine %3 207 21 OpLine %3 207 21 -%528 = OpLoad %7 %429 -%529 = OpAccessChain %107 %427 %66 %66 %66 %528 -%530 = OpLoad %6 %529 +%546 = OpLoad %7 %445 +%547 = OpAccessChain %110 %40 %66 %66 %66 %66 %546 +%548 = OpLoad %6 %547 OpLine %3 208 21 OpLine %3 208 21 -%531 = OpLoad %7 %429 +%549 = OpLoad %7 %445 OpLine %3 208 21 -%532 = OpAccessChain %149 %427 %66 %66 -%533 = OpAccessChain %99 %532 %66 -%534 = OpLoad %5 %533 -%535 = OpAccessChain %99 %532 %178 -%536 = OpLoad %5 %535 -%537 = OpCompositeConstruct %4 %534 %536 -%538 = OpBitcast %11 %531 -%539 = OpFunctionCall %5 %50 %537 %538 -%540 = OpCompositeExtract %6 %539 0 +%550 = OpAccessChain %155 %40 %66 %66 %66 +%551 = OpAccessChain %101 %550 %66 +%552 = OpLoad %5 %551 +%553 = OpAccessChain %101 %550 %186 +%554 = OpLoad %5 %553 +%555 = OpCompositeConstruct %4 %552 %554 +%556 = OpBitcast %11 %549 +%557 = OpFunctionCall %5 %50 %555 %556 +%558 = OpCompositeExtract %6 %557 0 OpLine %3 209 21 OpLine %3 209 21 -%541 = OpLoad %7 %429 -%542 = OpLoad %7 %429 -%543 = OpAccessChain %149 %427 %66 %66 -%544 = OpAccessChain %99 %543 %66 -%545 = OpLoad %5 %544 -%546 = OpAccessChain %99 %543 %178 -%547 = OpLoad %5 %546 -%548 = OpCompositeConstruct %4 %545 %547 -%549 = OpBitcast %11 %541 -%550 = OpFunctionCall %5 %50 %548 %549 -%551 = OpVectorExtractDynamic %6 %550 %542 +%559 = OpLoad %7 %445 +%560 = OpLoad %7 %445 +%561 = OpAccessChain %155 %40 %66 %66 %66 +%562 = OpAccessChain %101 %561 %66 +%563 = OpLoad %5 %562 +%564 = OpAccessChain %101 %561 %186 +%565 = OpLoad %5 %564 +%566 = OpCompositeConstruct %4 %563 %565 +%567 = OpBitcast %11 %559 +%568 = OpFunctionCall %5 %50 %566 %567 +%569 = OpVectorExtractDynamic %6 %568 %560 OpLine %3 210 21 -%552 = OpLoad %7 %429 +%570 = OpLoad %7 %445 OpLine %3 210 21 OpLine %3 210 21 -%553 = OpAccessChain %107 %427 %66 %552 %66 %66 -%554 = OpLoad %6 %553 +%571 = OpAccessChain %110 %40 %66 %66 %570 %66 %66 +%572 = OpLoad %6 %571 OpLine %3 211 21 -%555 = OpLoad %7 %429 +%573 = OpLoad %7 %445 OpLine %3 211 21 -%556 = OpLoad %7 %429 -%557 = OpAccessChain %107 %427 %66 %555 %66 %556 -%558 = OpLoad %6 %557 +%574 = OpLoad %7 %445 +%575 = OpAccessChain %110 %40 %66 %66 %573 %66 %574 +%576 = OpLoad %6 %575 OpLine %3 212 21 -%559 = OpLoad %7 %429 -%560 = OpLoad %7 %429 +%577 = OpLoad %7 %445 +%578 = OpLoad %7 %445 OpLine %3 212 21 -%561 = OpAccessChain %149 %427 %66 %559 -%562 = OpAccessChain %99 %561 %66 -%563 = OpLoad %5 %562 -%564 = OpAccessChain %99 %561 %178 -%565 = OpLoad %5 %564 -%566 = OpCompositeConstruct %4 %563 %565 -%567 = OpBitcast %11 %560 -%568 = OpFunctionCall %5 %50 %566 %567 -%569 = OpCompositeExtract %6 %568 0 +%579 = OpAccessChain %155 %40 %66 %66 %577 +%580 = OpAccessChain %101 %579 %66 +%581 = OpLoad %5 %580 +%582 = OpAccessChain %101 %579 %186 +%583 = OpLoad %5 %582 +%584 = OpCompositeConstruct %4 %581 %583 +%585 = OpBitcast %11 %578 +%586 = OpFunctionCall %5 %50 %584 %585 +%587 = OpCompositeExtract %6 %586 0 OpLine %3 213 21 -%570 = OpLoad %7 %429 -%571 = OpLoad %7 %429 -%572 = OpLoad %7 %429 -%573 = OpAccessChain %149 %427 %66 %570 -%574 = OpAccessChain %99 %573 %66 -%575 = OpLoad %5 %574 -%576 = OpAccessChain %99 %573 %178 -%577 = OpLoad %5 %576 -%578 = OpCompositeConstruct %4 %575 %577 -%579 = OpBitcast %11 %571 -%580 = OpFunctionCall %5 %50 %578 %579 -%581 = OpVectorExtractDynamic %6 %580 %572 +%588 = OpLoad %7 %445 +%589 = OpLoad %7 %445 +%590 = OpLoad %7 %445 +%591 = OpAccessChain %155 %40 %66 %66 %588 +%592 = OpAccessChain %101 %591 %66 +%593 = OpLoad %5 %592 +%594 = OpAccessChain %101 %591 %186 +%595 = OpLoad %5 %594 +%596 = OpCompositeConstruct %4 %593 %595 +%597 = OpBitcast %11 %589 +%598 = OpFunctionCall %5 %50 %596 %597 +%599 = OpVectorExtractDynamic %6 %598 %590 OpLine %3 216 5 -OpStore %425 %483 +%600 = OpAccessChain %440 %37 %66 +OpStore %600 %501 OpLine %3 217 5 OpLine %3 217 5 -%582 = OpAccessChain %434 %425 %66 -OpStore %582 %488 +%601 = OpAccessChain %451 %37 %66 %66 +OpStore %601 %506 OpLine %3 218 5 OpLine %3 218 5 OpLine %3 218 5 -%583 = OpAccessChain %65 %425 %66 %66 %66 -OpStore %583 %494 +%602 = OpAccessChain %65 %37 %66 %66 %66 %66 +OpStore %602 %512 OpLine %3 219 5 -%584 = OpLoad %7 %429 +%603 = OpLoad %7 %445 OpLine %3 219 5 -%585 = OpAccessChain %65 %425 %66 %584 %66 -OpStore %585 %501 +%604 = OpAccessChain %65 %37 %66 %66 %603 %66 +OpStore %604 %519 OpLine %3 220 5 OpLine %3 220 5 OpLine %3 220 5 OpLine %3 220 5 -%586 = OpAccessChain %78 %425 %66 %66 %66 %66 -OpStore %586 %503 +%605 = OpAccessChain %79 %37 %66 %66 %66 %66 %66 +OpStore %605 %521 OpLine %3 221 5 OpLine %3 221 5 -%587 = OpLoad %7 %429 +%606 = OpLoad %7 %445 OpLine %3 221 5 -%588 = OpAccessChain %78 %425 %66 %66 %66 %587 -OpStore %588 %512 +%607 = OpAccessChain %79 %37 %66 %66 %66 %66 %606 +OpStore %607 %530 OpLine %3 222 5 -%589 = OpLoad %7 %429 +%608 = OpLoad %7 %445 OpLine %3 222 5 OpLine %3 222 5 -%590 = OpAccessChain %78 %425 %66 %589 %66 %66 -OpStore %590 %515 +%609 = OpAccessChain %79 %37 %66 %66 %608 %66 %66 +OpStore %609 %533 OpLine %3 223 5 -%591 = OpLoad %7 %429 -%592 = OpLoad %7 %429 +%610 = OpLoad %7 %445 +%611 = OpLoad %7 %445 OpLine %3 223 5 -%593 = OpAccessChain %78 %425 %66 %591 %66 %592 -OpStore %593 %525 +%612 = OpAccessChain %79 %37 %66 %66 %610 %66 %611 +OpStore %612 %543 OpLine %3 224 5 OpLine %3 224 5 OpLine %3 224 5 OpLine %3 224 5 OpLine %3 224 5 -%594 = OpAccessChain %84 %425 %66 %66 %66 %66 %66 -OpStore %594 %527 +%613 = OpAccessChain %85 %37 %66 %66 %66 %66 %66 %66 +OpStore %613 %545 OpLine %3 225 5 OpLine %3 225 5 OpLine %3 225 5 -%595 = OpLoad %7 %429 +%614 = OpLoad %7 %445 OpLine %3 225 5 -%596 = OpAccessChain %84 %425 %66 %66 %66 %66 %595 -OpStore %596 %530 +%615 = OpAccessChain %85 %37 %66 %66 %66 %66 %66 %614 +OpStore %615 %548 OpLine %3 226 5 OpLine %3 226 5 -%597 = OpLoad %7 %429 +%616 = OpLoad %7 %445 OpLine %3 226 5 OpLine %3 226 5 -%598 = OpAccessChain %84 %425 %66 %66 %66 %597 %66 -OpStore %598 %540 +%617 = OpAccessChain %85 %37 %66 %66 %66 %66 %616 %66 +OpStore %617 %558 OpLine %3 227 5 OpLine %3 227 5 -%599 = OpLoad %7 %429 -%600 = OpLoad %7 %429 +%618 = OpLoad %7 %445 +%619 = OpLoad %7 %445 OpLine %3 227 5 -%601 = OpAccessChain %84 %425 %66 %66 %66 %599 %600 -OpStore %601 %551 +%620 = OpAccessChain %85 %37 %66 %66 %66 %66 %618 %619 +OpStore %620 %569 OpLine %3 228 5 -%602 = OpLoad %7 %429 +%621 = OpLoad %7 %445 OpLine %3 228 5 OpLine %3 228 5 OpLine %3 228 5 -%603 = OpAccessChain %84 %425 %66 %602 %66 %66 %66 -OpStore %603 %554 +%622 = OpAccessChain %85 %37 %66 %66 %621 %66 %66 %66 +OpStore %622 %572 OpLine %3 229 5 -%604 = OpLoad %7 %429 +%623 = OpLoad %7 %445 OpLine %3 229 5 -%605 = OpLoad %7 %429 +%624 = OpLoad %7 %445 OpLine %3 229 5 -%606 = OpAccessChain %84 %425 %66 %604 %66 %66 %605 -OpStore %606 %558 +%625 = OpAccessChain %85 %37 %66 %66 %623 %66 %66 %624 +OpStore %625 %576 OpLine %3 230 5 -%607 = OpLoad %7 %429 -%608 = OpLoad %7 %429 +%626 = OpLoad %7 %445 +%627 = OpLoad %7 %445 OpLine %3 230 5 OpLine %3 230 5 -%609 = OpAccessChain %84 %425 %66 %607 %66 %608 %66 -OpStore %609 %569 +%628 = OpAccessChain %85 %37 %66 %66 %626 %66 %627 %66 +OpStore %628 %587 OpLine %3 231 5 -%610 = OpLoad %7 %429 -%611 = OpLoad %7 %429 -%612 = OpLoad %7 %429 +%629 = OpLoad %7 %445 +%630 = OpLoad %7 %445 +%631 = OpLoad %7 %445 OpLine %3 231 5 -%613 = OpAccessChain %84 %425 %66 %610 %66 %611 %612 -OpStore %613 %581 +%632 = OpAccessChain %85 %37 %66 %66 %629 %66 %630 %631 +OpStore %632 %599 OpReturn OpFunctionEnd -%615 = OpFunction %2 None %64 -%614 = OpLabel -%616 = OpAccessChain %65 %19 %66 -%617 = OpAccessChain %68 %22 %66 -%618 = OpAccessChain %147 %25 %66 -%619 = OpAccessChain %149 %28 %66 -%620 = OpAccessChain %245 %31 %66 -%621 = OpAccessChain %247 %34 %66 -%622 = OpAccessChain %424 %37 %66 -%623 = OpAccessChain %426 %40 %66 -OpBranch %624 -%624 = OpLabel +%634 = OpFunction %2 None %64 +%633 = OpLabel +%635 = OpAccessChain %65 %19 %66 +%636 = OpAccessChain %68 %22 %66 +%637 = OpAccessChain %153 %25 %66 +%638 = OpAccessChain %155 %28 %66 +%639 = OpAccessChain %258 %31 %66 +%640 = OpAccessChain %260 %34 %66 +%641 = OpAccessChain %440 %37 %66 +%642 = OpAccessChain %442 %40 %66 +OpBranch %643 +%643 = OpLabel OpLine %3 236 5 -%625 = OpFunctionCall %2 %63 +%644 = OpFunctionCall %2 %63 OpLine %3 237 5 -%626 = OpFunctionCall %2 %146 +%645 = OpFunctionCall %2 %152 OpLine %3 238 5 -%627 = OpFunctionCall %2 %244 +%646 = OpFunctionCall %2 %257 OpLine %3 239 5 -%628 = OpFunctionCall %2 %423 +%647 = OpFunctionCall %2 %439 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat_cx2.spvasm.glsl b/naga/tests/out/spv/wgsl-mat_cx2.spvasm.glsl index 1c99510c6..6f30ecba7 100644 --- a/naga/tests/out/spv/wgsl-mat_cx2.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-mat_cx2.spvasm.glsl @@ -109,9 +109,9 @@ void access_m() s_m_1._m0[idx][idx] = mat2x2_f32_get_column(mat2x2_f32_from_std140(u_m_1._m0), uint(idx))[idx]; } -StructWithMat StructWithMat_from_std140(std140_StructWithMat _139) +StructWithMat StructWithMat_from_std140(std140_StructWithMat _145) { - return StructWithMat(mat2(_139.m_col0, _139.m_col1)); + return StructWithMat(mat2(_145.m_col0, _145.m_col1)); } void access_sm() @@ -128,9 +128,9 @@ void access_sm() s_sm_1._m0.m[idx][idx] = mat2x2_f32_get_column(mat2(u_sm_1._m0.m_col0, u_sm_1._m0.m_col1), uint(idx))[idx]; } -mat2[4] array_mat2x2_f32_4_from_std140(std140_mat2x2_f32_ _232[4]) +mat2[4] array_mat2x2_f32_4_from_std140(std140_mat2x2_f32_ _245[4]) { - return mat2[](mat2x2_f32_from_std140(_232[0]), mat2x2_f32_from_std140(_232[1]), mat2x2_f32_from_std140(_232[2]), mat2x2_f32_from_std140(_232[3])); + return mat2[](mat2x2_f32_from_std140(_245[0]), mat2x2_f32_from_std140(_245[1]), mat2x2_f32_from_std140(_245[2]), mat2x2_f32_from_std140(_245[3])); } void access_am() @@ -154,14 +154,14 @@ void access_am() s_am_1._m0[idx][idx][idx] = mat2x2_f32_get_column(mat2x2_f32_from_std140(u_am_1._m0[idx]), uint(idx))[idx]; } -StructWithMat[4] array_StructWithMat_4_from_std140(std140_StructWithMat _409[4]) +StructWithMat[4] array_StructWithMat_4_from_std140(std140_StructWithMat _425[4]) { - return StructWithMat[](StructWithMat_from_std140(_409[0]), StructWithMat_from_std140(_409[1]), StructWithMat_from_std140(_409[2]), StructWithMat_from_std140(_409[3])); + return StructWithMat[](StructWithMat_from_std140(_425[0]), StructWithMat_from_std140(_425[1]), StructWithMat_from_std140(_425[2]), StructWithMat_from_std140(_425[3])); } -StructWithArrayOfStructOfMat StructWithArrayOfStructOfMat_from_std140(std140_StructWithArrayOfStructOfMat _404) +StructWithArrayOfStructOfMat StructWithArrayOfStructOfMat_from_std140(std140_StructWithArrayOfStructOfMat _420) { - return StructWithArrayOfStructOfMat(array_StructWithMat_4_from_std140(_404.a)); + return StructWithArrayOfStructOfMat(array_StructWithMat_4_from_std140(_420.a)); } void access_sasm() diff --git a/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm b/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm index e7cfd366b..5cd39aac3 100644 --- a/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm +++ b/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 687 +; Bound: 706 OpCapability Shader OpCapability Float16 OpCapability StorageBuffer16BitAccess @@ -11,8 +11,8 @@ OpExtension "SPV_KHR_storage_buffer_storage_class" OpExtension "SPV_KHR_16bit_storage" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %673 "main" -OpExecutionMode %673 LocalSize 1 1 1 +OpEntryPoint GLCompute %692 "main" +OpExecutionMode %692 LocalSize 1 1 1 %3 = OpString "mat_cx2_f16.wgsl" OpSource Unknown 0 %3 "// Test handling of N-by-2 matrices. // See the doc comments on `naga::back::hlsl` and `naga::back::spv` for details. @@ -288,17 +288,17 @@ OpName %43 "mat4x2_from_std140" OpName %52 "mat4x2_get_column" OpName %69 "access_m" OpName %78 "idx" -OpName %143 "StructWithMat_from_std140" -OpName %154 "access_sm" -OpName %160 "idx" -OpName %256 "array, 4>_from_std140" -OpName %270 "access_am" -OpName %276 "idx" -OpName %428 "StructWithArrayOfStructOfMat_from_std140" -OpName %433 "array_from_std140" -OpName %449 "access_sasm" -OpName %455 "idx" -OpName %673 "main" +OpName %149 "StructWithMat_from_std140" +OpName %160 "access_sm" +OpName %166 "idx" +OpName %269 "array, 4>_from_std140" +OpName %283 "access_am" +OpName %289 "idx" +OpName %444 "StructWithArrayOfStructOfMat_from_std140" +OpName %449 "array_from_std140" +OpName %465 "access_sasm" +OpName %471 "idx" +OpName %692 "main" OpMemberDecorate %8 0 Offset 0 OpMemberDecorate %8 0 ColMajor OpMemberDecorate %8 0 MatrixStride 4 @@ -401,29 +401,29 @@ OpMemberDecorate %41 0 Offset 0 %76 = OpConstant %7 1 %77 = OpTypePointer Uniform %4 %79 = OpTypePointer Function %7 -%84 = OpTypePointer StorageBuffer %5 -%90 = OpTypePointer StorageBuffer %6 -%105 = OpTypePointer Uniform %5 -%113 = OpTypePointer Uniform %6 -%144 = OpTypeFunction %8 %15 -%155 = OpTypePointer StorageBuffer %8 -%157 = OpTypePointer Uniform %15 -%159 = OpTypePointer Uniform %8 -%186 = OpConstant %11 1 -%187 = OpConstant %11 2 -%188 = OpConstant %11 3 -%257 = OpTypeFunction %9 %16 -%271 = OpTypePointer StorageBuffer %9 -%273 = OpTypePointer Uniform %16 -%275 = OpTypePointer Uniform %9 -%429 = OpTypeFunction %13 %18 -%434 = OpTypeFunction %12 %17 -%450 = OpTypePointer StorageBuffer %13 -%452 = OpTypePointer Uniform %18 -%454 = OpTypePointer Uniform %13 -%460 = OpTypePointer StorageBuffer %12 -%510 = OpTypePointer Uniform %12 -%511 = OpTypePointer Uniform %17 +%85 = OpTypePointer StorageBuffer %5 +%91 = OpTypePointer StorageBuffer %6 +%107 = OpTypePointer Uniform %5 +%116 = OpTypePointer Uniform %6 +%150 = OpTypeFunction %8 %15 +%161 = OpTypePointer StorageBuffer %8 +%163 = OpTypePointer Uniform %15 +%165 = OpTypePointer Uniform %8 +%194 = OpConstant %11 1 +%195 = OpConstant %11 2 +%196 = OpConstant %11 3 +%270 = OpTypeFunction %9 %16 +%284 = OpTypePointer StorageBuffer %9 +%286 = OpTypePointer Uniform %16 +%288 = OpTypePointer Uniform %9 +%445 = OpTypeFunction %13 %18 +%450 = OpTypeFunction %12 %17 +%466 = OpTypePointer StorageBuffer %13 +%468 = OpTypePointer Uniform %18 +%470 = OpTypePointer Uniform %13 +%477 = OpTypePointer StorageBuffer %12 +%528 = OpTypePointer Uniform %12 +%529 = OpTypePointer Uniform %17 %43 = OpFunction %4 None %44 %45 = OpFunctionParameter %14 %46 = OpLabel @@ -471,946 +471,965 @@ OpLine %3 30 5 OpLine %3 30 5 OpStore %78 %82 OpLine %3 33 17 -%83 = OpLoad %4 %73 +%83 = OpAccessChain %71 %19 %72 +%84 = OpLoad %4 %83 OpLine %3 34 19 -%85 = OpAccessChain %84 %73 %72 -%86 = OpLoad %5 %85 +%86 = OpAccessChain %85 %19 %72 %72 +%87 = OpLoad %5 %86 OpLine %3 35 19 -%87 = OpLoad %7 %78 -%88 = OpAccessChain %84 %73 %87 -%89 = OpLoad %5 %88 +%88 = OpLoad %7 %78 +%89 = OpAccessChain %85 %19 %72 %88 +%90 = OpLoad %5 %89 OpLine %3 36 20 OpLine %3 36 20 -%91 = OpAccessChain %90 %73 %72 %72 -%92 = OpLoad %6 %91 +%92 = OpAccessChain %91 %19 %72 %72 %72 +%93 = OpLoad %6 %92 OpLine %3 37 20 -%93 = OpLoad %7 %78 -%94 = OpAccessChain %90 %73 %72 %93 -%95 = OpLoad %6 %94 +%94 = OpLoad %7 %78 +%95 = OpAccessChain %91 %19 %72 %72 %94 +%96 = OpLoad %6 %95 OpLine %3 38 20 -%96 = OpLoad %7 %78 +%97 = OpLoad %7 %78 OpLine %3 38 20 -%97 = OpAccessChain %90 %73 %96 %72 -%98 = OpLoad %6 %97 +%98 = OpAccessChain %91 %19 %72 %97 %72 +%99 = OpLoad %6 %98 OpLine %3 39 20 -%99 = OpLoad %7 %78 %100 = OpLoad %7 %78 -%101 = OpAccessChain %90 %73 %99 %100 -%102 = OpLoad %6 %101 +%101 = OpLoad %7 %78 +%102 = OpAccessChain %91 %19 %72 %100 %101 +%103 = OpLoad %6 %102 OpLine %3 42 17 -%103 = OpLoad %14 %75 -%104 = OpFunctionCall %4 %43 %103 +%104 = OpAccessChain %74 %22 %72 +%105 = OpLoad %14 %104 +%106 = OpFunctionCall %4 %43 %105 OpLine %3 43 19 -%106 = OpAccessChain %105 %75 %72 -%107 = OpLoad %5 %106 +%108 = OpAccessChain %107 %22 %72 %72 +%109 = OpLoad %5 %108 OpLine %3 44 19 -%108 = OpLoad %7 %78 -%109 = OpLoad %14 %75 -%110 = OpFunctionCall %4 %43 %109 -%111 = OpBitcast %11 %108 -%112 = OpFunctionCall %5 %52 %110 %111 +%110 = OpLoad %7 %78 +%111 = OpAccessChain %74 %22 %72 +%112 = OpLoad %14 %111 +%113 = OpFunctionCall %4 %43 %112 +%114 = OpBitcast %11 %110 +%115 = OpFunctionCall %5 %52 %113 %114 OpLine %3 45 20 OpLine %3 45 20 -%114 = OpAccessChain %113 %75 %72 %72 -%115 = OpLoad %6 %114 -OpLine %3 46 20 -%116 = OpLoad %7 %78 -%117 = OpAccessChain %113 %75 %72 %116 +%117 = OpAccessChain %116 %22 %72 %72 %72 %118 = OpLoad %6 %117 -OpLine %3 47 20 +OpLine %3 46 20 %119 = OpLoad %7 %78 +%120 = OpAccessChain %116 %22 %72 %72 %119 +%121 = OpLoad %6 %120 OpLine %3 47 20 -%120 = OpLoad %14 %75 -%121 = OpFunctionCall %4 %43 %120 -%122 = OpBitcast %11 %119 -%123 = OpFunctionCall %5 %52 %121 %122 -%124 = OpCompositeExtract %6 %123 0 +%122 = OpLoad %7 %78 +OpLine %3 47 20 +%123 = OpAccessChain %74 %22 %72 +%124 = OpLoad %14 %123 +%125 = OpFunctionCall %4 %43 %124 +%126 = OpBitcast %11 %122 +%127 = OpFunctionCall %5 %52 %125 %126 +%128 = OpCompositeExtract %6 %127 0 OpLine %3 48 20 -%125 = OpLoad %7 %78 -%126 = OpLoad %7 %78 -%127 = OpLoad %14 %75 -%128 = OpFunctionCall %4 %43 %127 -%129 = OpBitcast %11 %125 -%130 = OpFunctionCall %5 %52 %128 %129 -%131 = OpVectorExtractDynamic %6 %130 %126 +%129 = OpLoad %7 %78 +%130 = OpLoad %7 %78 +%131 = OpAccessChain %74 %22 %72 +%132 = OpLoad %14 %131 +%133 = OpFunctionCall %4 %43 %132 +%134 = OpBitcast %11 %129 +%135 = OpFunctionCall %5 %52 %133 %134 +%136 = OpVectorExtractDynamic %6 %135 %130 OpLine %3 51 5 -OpStore %73 %104 +%137 = OpAccessChain %71 %19 %72 +OpStore %137 %106 OpLine %3 52 5 OpLine %3 52 5 -%132 = OpAccessChain %84 %73 %72 -OpStore %132 %107 +%138 = OpAccessChain %85 %19 %72 %72 +OpStore %138 %109 OpLine %3 53 5 -%133 = OpLoad %7 %78 +%139 = OpLoad %7 %78 OpLine %3 53 5 -%134 = OpAccessChain %84 %73 %133 -OpStore %134 %112 +%140 = OpAccessChain %85 %19 %72 %139 +OpStore %140 %115 OpLine %3 54 5 OpLine %3 54 5 OpLine %3 54 5 -%135 = OpAccessChain %90 %73 %72 %72 -OpStore %135 %115 +%141 = OpAccessChain %91 %19 %72 %72 %72 +OpStore %141 %118 OpLine %3 55 5 -%136 = OpLoad %7 %78 +%142 = OpLoad %7 %78 OpLine %3 55 5 -%137 = OpAccessChain %90 %73 %72 %136 -OpStore %137 %118 +%143 = OpAccessChain %91 %19 %72 %72 %142 +OpStore %143 %121 OpLine %3 56 5 -%138 = OpLoad %7 %78 +%144 = OpLoad %7 %78 OpLine %3 56 5 OpLine %3 56 5 -%139 = OpAccessChain %90 %73 %138 %72 -OpStore %139 %124 +%145 = OpAccessChain %91 %19 %72 %144 %72 +OpStore %145 %128 OpLine %3 57 5 -%140 = OpLoad %7 %78 -%141 = OpLoad %7 %78 +%146 = OpLoad %7 %78 +%147 = OpLoad %7 %78 OpLine %3 57 5 -%142 = OpAccessChain %90 %73 %140 %141 -OpStore %142 %131 +%148 = OpAccessChain %91 %19 %72 %146 %147 +OpStore %148 %136 OpReturn OpFunctionEnd -%143 = OpFunction %8 None %144 -%145 = OpFunctionParameter %15 -%146 = OpLabel -%148 = OpCompositeExtract %5 %145 0 -%149 = OpCompositeExtract %5 %145 1 -%150 = OpCompositeExtract %5 %145 2 -%151 = OpCompositeExtract %5 %145 3 -%147 = OpCompositeConstruct %4 %148 %149 %150 %151 -%152 = OpCompositeConstruct %8 %147 -OpReturnValue %152 +%149 = OpFunction %8 None %150 +%151 = OpFunctionParameter %15 +%152 = OpLabel +%154 = OpCompositeExtract %5 %151 0 +%155 = OpCompositeExtract %5 %151 1 +%156 = OpCompositeExtract %5 %151 2 +%157 = OpCompositeExtract %5 %151 3 +%153 = OpCompositeConstruct %4 %154 %155 %156 %157 +%158 = OpCompositeConstruct %8 %153 +OpReturnValue %158 OpFunctionEnd -%154 = OpFunction %2 None %70 -%153 = OpLabel -%160 = OpVariable %79 Function %76 -%156 = OpAccessChain %155 %25 %72 -%158 = OpAccessChain %157 %28 %72 -OpBranch %161 -%161 = OpLabel +%160 = OpFunction %2 None %70 +%159 = OpLabel +%166 = OpVariable %79 Function %76 +%162 = OpAccessChain %161 %25 %72 +%164 = OpAccessChain %163 %28 %72 +OpBranch %167 +%167 = OpLabel OpLine %3 72 5 -%162 = OpLoad %7 %160 -%163 = OpISub %7 %162 %76 +%168 = OpLoad %7 %166 +%169 = OpISub %7 %168 %76 OpLine %3 72 5 -OpStore %160 %163 +OpStore %166 %169 OpLine %3 75 17 -%164 = OpLoad %8 %156 +%170 = OpAccessChain %161 %25 %72 +%171 = OpLoad %8 %170 OpLine %3 76 17 -%165 = OpAccessChain %71 %156 %72 -%166 = OpLoad %4 %165 +%172 = OpAccessChain %71 %25 %72 %72 +%173 = OpLoad %4 %172 OpLine %3 77 19 OpLine %3 77 19 -%167 = OpAccessChain %84 %156 %72 %72 -%168 = OpLoad %5 %167 +%174 = OpAccessChain %85 %25 %72 %72 %72 +%175 = OpLoad %5 %174 OpLine %3 78 19 -%169 = OpLoad %7 %160 -%170 = OpAccessChain %84 %156 %72 %169 -%171 = OpLoad %5 %170 +%176 = OpLoad %7 %166 +%177 = OpAccessChain %85 %25 %72 %72 %176 +%178 = OpLoad %5 %177 OpLine %3 79 20 OpLine %3 79 20 OpLine %3 79 20 -%172 = OpAccessChain %90 %156 %72 %72 %72 -%173 = OpLoad %6 %172 +%179 = OpAccessChain %91 %25 %72 %72 %72 %72 +%180 = OpLoad %6 %179 OpLine %3 80 20 OpLine %3 80 20 -%174 = OpLoad %7 %160 -%175 = OpAccessChain %90 %156 %72 %72 %174 -%176 = OpLoad %6 %175 +%181 = OpLoad %7 %166 +%182 = OpAccessChain %91 %25 %72 %72 %72 %181 +%183 = OpLoad %6 %182 OpLine %3 81 20 -%177 = OpLoad %7 %160 +%184 = OpLoad %7 %166 OpLine %3 81 20 -%178 = OpAccessChain %90 %156 %72 %177 %72 -%179 = OpLoad %6 %178 +%185 = OpAccessChain %91 %25 %72 %72 %184 %72 +%186 = OpLoad %6 %185 OpLine %3 82 20 -%180 = OpLoad %7 %160 -%181 = OpLoad %7 %160 -%182 = OpAccessChain %90 %156 %72 %180 %181 -%183 = OpLoad %6 %182 +%187 = OpLoad %7 %166 +%188 = OpLoad %7 %166 +%189 = OpAccessChain %91 %25 %72 %72 %187 %188 +%190 = OpLoad %6 %189 OpLine %3 85 17 -%184 = OpLoad %15 %158 -%185 = OpFunctionCall %8 %143 %184 +%191 = OpAccessChain %163 %28 %72 +%192 = OpLoad %15 %191 +%193 = OpFunctionCall %8 %149 %192 OpLine %3 86 17 -%189 = OpAccessChain %105 %158 %72 -%190 = OpLoad %5 %189 -%191 = OpAccessChain %105 %158 %186 -%192 = OpLoad %5 %191 -%193 = OpAccessChain %105 %158 %187 -%194 = OpLoad %5 %193 -%195 = OpAccessChain %105 %158 %188 -%196 = OpLoad %5 %195 -%197 = OpCompositeConstruct %4 %190 %192 %194 %196 +%197 = OpAccessChain %163 %28 %72 +%198 = OpAccessChain %107 %197 %72 +%199 = OpLoad %5 %198 +%200 = OpAccessChain %107 %197 %194 +%201 = OpLoad %5 %200 +%202 = OpAccessChain %107 %197 %195 +%203 = OpLoad %5 %202 +%204 = OpAccessChain %107 %197 %196 +%205 = OpLoad %5 %204 +%206 = OpCompositeConstruct %4 %199 %201 %203 %205 OpLine %3 87 19 OpLine %3 87 19 -%198 = OpAccessChain %105 %158 %72 -%199 = OpLoad %5 %198 -OpLine %3 88 19 -%200 = OpLoad %7 %160 -%201 = OpAccessChain %105 %158 %72 -%202 = OpLoad %5 %201 -%203 = OpAccessChain %105 %158 %186 -%204 = OpLoad %5 %203 -%205 = OpAccessChain %105 %158 %187 -%206 = OpLoad %5 %205 -%207 = OpAccessChain %105 %158 %188 +%207 = OpAccessChain %107 %28 %72 %72 %208 = OpLoad %5 %207 -%209 = OpCompositeConstruct %4 %202 %204 %206 %208 -%210 = OpBitcast %11 %200 -%211 = OpFunctionCall %5 %52 %209 %210 +OpLine %3 88 19 +%209 = OpLoad %7 %166 +%210 = OpAccessChain %163 %28 %72 +%211 = OpAccessChain %107 %210 %72 +%212 = OpLoad %5 %211 +%213 = OpAccessChain %107 %210 %194 +%214 = OpLoad %5 %213 +%215 = OpAccessChain %107 %210 %195 +%216 = OpLoad %5 %215 +%217 = OpAccessChain %107 %210 %196 +%218 = OpLoad %5 %217 +%219 = OpCompositeConstruct %4 %212 %214 %216 %218 +%220 = OpBitcast %11 %209 +%221 = OpFunctionCall %5 %52 %219 %220 OpLine %3 89 20 OpLine %3 89 20 OpLine %3 89 20 -%212 = OpAccessChain %113 %158 %72 %72 -%213 = OpLoad %6 %212 +%222 = OpAccessChain %116 %28 %72 %72 %72 +%223 = OpLoad %6 %222 OpLine %3 90 20 OpLine %3 90 20 -%214 = OpLoad %7 %160 -%215 = OpAccessChain %113 %158 %72 %214 -%216 = OpLoad %6 %215 +%224 = OpLoad %7 %166 +%225 = OpAccessChain %116 %28 %72 %72 %224 +%226 = OpLoad %6 %225 OpLine %3 91 20 -%217 = OpLoad %7 %160 +%227 = OpLoad %7 %166 OpLine %3 91 20 -%218 = OpAccessChain %105 %158 %72 -%219 = OpLoad %5 %218 -%220 = OpAccessChain %105 %158 %186 -%221 = OpLoad %5 %220 -%222 = OpAccessChain %105 %158 %187 -%223 = OpLoad %5 %222 -%224 = OpAccessChain %105 %158 %188 -%225 = OpLoad %5 %224 -%226 = OpCompositeConstruct %4 %219 %221 %223 %225 -%227 = OpBitcast %11 %217 -%228 = OpFunctionCall %5 %52 %226 %227 -%229 = OpCompositeExtract %6 %228 0 +%228 = OpAccessChain %163 %28 %72 +%229 = OpAccessChain %107 %228 %72 +%230 = OpLoad %5 %229 +%231 = OpAccessChain %107 %228 %194 +%232 = OpLoad %5 %231 +%233 = OpAccessChain %107 %228 %195 +%234 = OpLoad %5 %233 +%235 = OpAccessChain %107 %228 %196 +%236 = OpLoad %5 %235 +%237 = OpCompositeConstruct %4 %230 %232 %234 %236 +%238 = OpBitcast %11 %227 +%239 = OpFunctionCall %5 %52 %237 %238 +%240 = OpCompositeExtract %6 %239 0 OpLine %3 92 20 -%230 = OpLoad %7 %160 -%231 = OpLoad %7 %160 -%232 = OpAccessChain %105 %158 %72 -%233 = OpLoad %5 %232 -%234 = OpAccessChain %105 %158 %186 -%235 = OpLoad %5 %234 -%236 = OpAccessChain %105 %158 %187 -%237 = OpLoad %5 %236 -%238 = OpAccessChain %105 %158 %188 -%239 = OpLoad %5 %238 -%240 = OpCompositeConstruct %4 %233 %235 %237 %239 -%241 = OpBitcast %11 %230 -%242 = OpFunctionCall %5 %52 %240 %241 -%243 = OpVectorExtractDynamic %6 %242 %231 +%241 = OpLoad %7 %166 +%242 = OpLoad %7 %166 +%243 = OpAccessChain %163 %28 %72 +%244 = OpAccessChain %107 %243 %72 +%245 = OpLoad %5 %244 +%246 = OpAccessChain %107 %243 %194 +%247 = OpLoad %5 %246 +%248 = OpAccessChain %107 %243 %195 +%249 = OpLoad %5 %248 +%250 = OpAccessChain %107 %243 %196 +%251 = OpLoad %5 %250 +%252 = OpCompositeConstruct %4 %245 %247 %249 %251 +%253 = OpBitcast %11 %241 +%254 = OpFunctionCall %5 %52 %252 %253 +%255 = OpVectorExtractDynamic %6 %254 %242 OpLine %3 95 5 -OpStore %156 %185 +%256 = OpAccessChain %161 %25 %72 +OpStore %256 %193 OpLine %3 96 5 OpLine %3 96 5 -%244 = OpAccessChain %71 %156 %72 -OpStore %244 %197 +%257 = OpAccessChain %71 %25 %72 %72 +OpStore %257 %206 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 -%245 = OpAccessChain %84 %156 %72 %72 -OpStore %245 %199 +%258 = OpAccessChain %85 %25 %72 %72 %72 +OpStore %258 %208 OpLine %3 98 5 -%246 = OpLoad %7 %160 +%259 = OpLoad %7 %166 OpLine %3 98 5 -%247 = OpAccessChain %84 %156 %72 %246 -OpStore %247 %211 +%260 = OpAccessChain %85 %25 %72 %72 %259 +OpStore %260 %221 OpLine %3 99 5 OpLine %3 99 5 OpLine %3 99 5 OpLine %3 99 5 -%248 = OpAccessChain %90 %156 %72 %72 %72 -OpStore %248 %213 +%261 = OpAccessChain %91 %25 %72 %72 %72 %72 +OpStore %261 %223 OpLine %3 100 5 OpLine %3 100 5 -%249 = OpLoad %7 %160 +%262 = OpLoad %7 %166 OpLine %3 100 5 -%250 = OpAccessChain %90 %156 %72 %72 %249 -OpStore %250 %216 +%263 = OpAccessChain %91 %25 %72 %72 %72 %262 +OpStore %263 %226 OpLine %3 101 5 -%251 = OpLoad %7 %160 +%264 = OpLoad %7 %166 OpLine %3 101 5 OpLine %3 101 5 -%252 = OpAccessChain %90 %156 %72 %251 %72 -OpStore %252 %229 +%265 = OpAccessChain %91 %25 %72 %72 %264 %72 +OpStore %265 %240 OpLine %3 102 5 -%253 = OpLoad %7 %160 -%254 = OpLoad %7 %160 +%266 = OpLoad %7 %166 +%267 = OpLoad %7 %166 OpLine %3 102 5 -%255 = OpAccessChain %90 %156 %72 %253 %254 -OpStore %255 %243 +%268 = OpAccessChain %91 %25 %72 %72 %266 %267 +OpStore %268 %255 OpReturn OpFunctionEnd -%256 = OpFunction %9 None %257 -%258 = OpFunctionParameter %16 -%259 = OpLabel -%260 = OpCompositeExtract %14 %258 0 -%261 = OpFunctionCall %4 %43 %260 -%262 = OpCompositeExtract %14 %258 1 -%263 = OpFunctionCall %4 %43 %262 -%264 = OpCompositeExtract %14 %258 2 -%265 = OpFunctionCall %4 %43 %264 -%266 = OpCompositeExtract %14 %258 3 -%267 = OpFunctionCall %4 %43 %266 -%268 = OpCompositeConstruct %9 %261 %263 %265 %267 -OpReturnValue %268 +%269 = OpFunction %9 None %270 +%271 = OpFunctionParameter %16 +%272 = OpLabel +%273 = OpCompositeExtract %14 %271 0 +%274 = OpFunctionCall %4 %43 %273 +%275 = OpCompositeExtract %14 %271 1 +%276 = OpFunctionCall %4 %43 %275 +%277 = OpCompositeExtract %14 %271 2 +%278 = OpFunctionCall %4 %43 %277 +%279 = OpCompositeExtract %14 %271 3 +%280 = OpFunctionCall %4 %43 %279 +%281 = OpCompositeConstruct %9 %274 %276 %278 %280 +OpReturnValue %281 OpFunctionEnd -%270 = OpFunction %2 None %70 -%269 = OpLabel -%276 = OpVariable %79 Function %76 -%272 = OpAccessChain %271 %31 %72 -%274 = OpAccessChain %273 %34 %72 -OpBranch %277 -%277 = OpLabel +%283 = OpFunction %2 None %70 +%282 = OpLabel +%289 = OpVariable %79 Function %76 +%285 = OpAccessChain %284 %31 %72 +%287 = OpAccessChain %286 %34 %72 +OpBranch %290 +%290 = OpLabel OpLine %3 113 5 -%278 = OpLoad %7 %276 -%279 = OpISub %7 %278 %76 +%291 = OpLoad %7 %289 +%292 = OpISub %7 %291 %76 OpLine %3 113 5 -OpStore %276 %279 +OpStore %289 %292 OpLine %3 116 17 -%280 = OpLoad %9 %272 +%293 = OpAccessChain %284 %31 %72 +%294 = OpLoad %9 %293 OpLine %3 117 19 -%281 = OpAccessChain %71 %272 %72 -%282 = OpLoad %4 %281 +%295 = OpAccessChain %71 %31 %72 %72 +%296 = OpLoad %4 %295 OpLine %3 118 19 -%283 = OpLoad %7 %276 -%284 = OpAccessChain %71 %272 %283 -%285 = OpLoad %4 %284 +%297 = OpLoad %7 %289 +%298 = OpAccessChain %71 %31 %72 %297 +%299 = OpLoad %4 %298 OpLine %3 119 20 OpLine %3 119 20 -%286 = OpAccessChain %84 %272 %72 %72 -%287 = OpLoad %5 %286 +%300 = OpAccessChain %85 %31 %72 %72 %72 +%301 = OpLoad %5 %300 OpLine %3 120 20 -%288 = OpLoad %7 %276 -%289 = OpAccessChain %84 %272 %72 %288 -%290 = OpLoad %5 %289 +%302 = OpLoad %7 %289 +%303 = OpAccessChain %85 %31 %72 %72 %302 +%304 = OpLoad %5 %303 OpLine %3 121 20 -%291 = OpLoad %7 %276 +%305 = OpLoad %7 %289 OpLine %3 121 20 -%292 = OpAccessChain %84 %272 %291 %72 -%293 = OpLoad %5 %292 +%306 = OpAccessChain %85 %31 %72 %305 %72 +%307 = OpLoad %5 %306 OpLine %3 122 20 -%294 = OpLoad %7 %276 -%295 = OpLoad %7 %276 -%296 = OpAccessChain %84 %272 %294 %295 -%297 = OpLoad %5 %296 +%308 = OpLoad %7 %289 +%309 = OpLoad %7 %289 +%310 = OpAccessChain %85 %31 %72 %308 %309 +%311 = OpLoad %5 %310 OpLine %3 123 21 OpLine %3 123 21 OpLine %3 123 21 -%298 = OpAccessChain %90 %272 %72 %72 %72 -%299 = OpLoad %6 %298 +%312 = OpAccessChain %91 %31 %72 %72 %72 %72 +%313 = OpLoad %6 %312 OpLine %3 124 21 OpLine %3 124 21 -%300 = OpLoad %7 %276 -%301 = OpAccessChain %90 %272 %72 %72 %300 -%302 = OpLoad %6 %301 +%314 = OpLoad %7 %289 +%315 = OpAccessChain %91 %31 %72 %72 %72 %314 +%316 = OpLoad %6 %315 OpLine %3 125 21 -%303 = OpLoad %7 %276 +%317 = OpLoad %7 %289 OpLine %3 125 21 -%304 = OpAccessChain %90 %272 %72 %303 %72 -%305 = OpLoad %6 %304 +%318 = OpAccessChain %91 %31 %72 %72 %317 %72 +%319 = OpLoad %6 %318 OpLine %3 126 21 -%306 = OpLoad %7 %276 -%307 = OpLoad %7 %276 -%308 = OpAccessChain %90 %272 %72 %306 %307 -%309 = OpLoad %6 %308 +%320 = OpLoad %7 %289 +%321 = OpLoad %7 %289 +%322 = OpAccessChain %91 %31 %72 %72 %320 %321 +%323 = OpLoad %6 %322 OpLine %3 127 21 -%310 = OpLoad %7 %276 +%324 = OpLoad %7 %289 OpLine %3 127 21 OpLine %3 127 21 -%311 = OpAccessChain %90 %272 %310 %72 %72 -%312 = OpLoad %6 %311 +%325 = OpAccessChain %91 %31 %72 %324 %72 %72 +%326 = OpLoad %6 %325 OpLine %3 128 21 -%313 = OpLoad %7 %276 +%327 = OpLoad %7 %289 OpLine %3 128 21 -%314 = OpLoad %7 %276 -%315 = OpAccessChain %90 %272 %313 %72 %314 -%316 = OpLoad %6 %315 +%328 = OpLoad %7 %289 +%329 = OpAccessChain %91 %31 %72 %327 %72 %328 +%330 = OpLoad %6 %329 OpLine %3 129 21 -%317 = OpLoad %7 %276 -%318 = OpLoad %7 %276 +%331 = OpLoad %7 %289 +%332 = OpLoad %7 %289 OpLine %3 129 21 -%319 = OpAccessChain %90 %272 %317 %318 %72 -%320 = OpLoad %6 %319 +%333 = OpAccessChain %91 %31 %72 %331 %332 %72 +%334 = OpLoad %6 %333 OpLine %3 130 21 -%321 = OpLoad %7 %276 -%322 = OpLoad %7 %276 -%323 = OpLoad %7 %276 -%324 = OpAccessChain %90 %272 %321 %322 %323 -%325 = OpLoad %6 %324 +%335 = OpLoad %7 %289 +%336 = OpLoad %7 %289 +%337 = OpLoad %7 %289 +%338 = OpAccessChain %91 %31 %72 %335 %336 %337 +%339 = OpLoad %6 %338 OpLine %3 133 17 -%326 = OpLoad %16 %274 -%327 = OpFunctionCall %9 %256 %326 +%340 = OpAccessChain %286 %34 %72 +%341 = OpLoad %16 %340 +%342 = OpFunctionCall %9 %269 %341 OpLine %3 134 19 -%328 = OpAccessChain %74 %274 %72 -%329 = OpLoad %14 %328 -%330 = OpFunctionCall %4 %43 %329 +%343 = OpAccessChain %74 %34 %72 %72 +%344 = OpLoad %14 %343 +%345 = OpFunctionCall %4 %43 %344 OpLine %3 135 19 -%331 = OpLoad %7 %276 -%332 = OpAccessChain %74 %274 %331 -%333 = OpLoad %14 %332 -%334 = OpFunctionCall %4 %43 %333 +%346 = OpLoad %7 %289 +%347 = OpAccessChain %74 %34 %72 %346 +%348 = OpLoad %14 %347 +%349 = OpFunctionCall %4 %43 %348 OpLine %3 136 20 OpLine %3 136 20 -%335 = OpAccessChain %105 %274 %72 %72 -%336 = OpLoad %5 %335 +%350 = OpAccessChain %107 %34 %72 %72 %72 +%351 = OpLoad %5 %350 OpLine %3 137 20 -%337 = OpLoad %7 %276 -%338 = OpAccessChain %74 %274 %72 -%339 = OpLoad %14 %338 -%340 = OpFunctionCall %4 %43 %339 -%341 = OpBitcast %11 %337 -%342 = OpFunctionCall %5 %52 %340 %341 +%352 = OpLoad %7 %289 +%353 = OpAccessChain %74 %34 %72 %72 +%354 = OpLoad %14 %353 +%355 = OpFunctionCall %4 %43 %354 +%356 = OpBitcast %11 %352 +%357 = OpFunctionCall %5 %52 %355 %356 OpLine %3 138 20 -%343 = OpLoad %7 %276 +%358 = OpLoad %7 %289 OpLine %3 138 20 -%344 = OpAccessChain %105 %274 %343 %72 -%345 = OpLoad %5 %344 +%359 = OpAccessChain %107 %34 %72 %358 %72 +%360 = OpLoad %5 %359 OpLine %3 139 20 -%346 = OpLoad %7 %276 -%347 = OpLoad %7 %276 -%348 = OpAccessChain %74 %274 %346 -%349 = OpLoad %14 %348 -%350 = OpFunctionCall %4 %43 %349 -%351 = OpBitcast %11 %347 -%352 = OpFunctionCall %5 %52 %350 %351 +%361 = OpLoad %7 %289 +%362 = OpLoad %7 %289 +%363 = OpAccessChain %74 %34 %72 %361 +%364 = OpLoad %14 %363 +%365 = OpFunctionCall %4 %43 %364 +%366 = OpBitcast %11 %362 +%367 = OpFunctionCall %5 %52 %365 %366 OpLine %3 140 21 OpLine %3 140 21 OpLine %3 140 21 -%353 = OpAccessChain %113 %274 %72 %72 %72 -%354 = OpLoad %6 %353 +%368 = OpAccessChain %116 %34 %72 %72 %72 %72 +%369 = OpLoad %6 %368 OpLine %3 141 21 OpLine %3 141 21 -%355 = OpLoad %7 %276 -%356 = OpAccessChain %113 %274 %72 %72 %355 -%357 = OpLoad %6 %356 +%370 = OpLoad %7 %289 +%371 = OpAccessChain %116 %34 %72 %72 %72 %370 +%372 = OpLoad %6 %371 OpLine %3 142 21 -%358 = OpLoad %7 %276 +%373 = OpLoad %7 %289 OpLine %3 142 21 -%359 = OpAccessChain %74 %274 %72 -%360 = OpLoad %14 %359 -%361 = OpFunctionCall %4 %43 %360 -%362 = OpBitcast %11 %358 -%363 = OpFunctionCall %5 %52 %361 %362 -%364 = OpCompositeExtract %6 %363 0 +%374 = OpAccessChain %74 %34 %72 %72 +%375 = OpLoad %14 %374 +%376 = OpFunctionCall %4 %43 %375 +%377 = OpBitcast %11 %373 +%378 = OpFunctionCall %5 %52 %376 %377 +%379 = OpCompositeExtract %6 %378 0 OpLine %3 143 21 -%365 = OpLoad %7 %276 -%366 = OpLoad %7 %276 -%367 = OpAccessChain %74 %274 %72 -%368 = OpLoad %14 %367 -%369 = OpFunctionCall %4 %43 %368 -%370 = OpBitcast %11 %365 -%371 = OpFunctionCall %5 %52 %369 %370 -%372 = OpVectorExtractDynamic %6 %371 %366 +%380 = OpLoad %7 %289 +%381 = OpLoad %7 %289 +%382 = OpAccessChain %74 %34 %72 %72 +%383 = OpLoad %14 %382 +%384 = OpFunctionCall %4 %43 %383 +%385 = OpBitcast %11 %380 +%386 = OpFunctionCall %5 %52 %384 %385 +%387 = OpVectorExtractDynamic %6 %386 %381 OpLine %3 144 21 -%373 = OpLoad %7 %276 +%388 = OpLoad %7 %289 OpLine %3 144 21 OpLine %3 144 21 -%374 = OpAccessChain %113 %274 %373 %72 %72 -%375 = OpLoad %6 %374 +%389 = OpAccessChain %116 %34 %72 %388 %72 %72 +%390 = OpLoad %6 %389 OpLine %3 145 21 -%376 = OpLoad %7 %276 +%391 = OpLoad %7 %289 OpLine %3 145 21 -%377 = OpLoad %7 %276 -%378 = OpAccessChain %113 %274 %376 %72 %377 -%379 = OpLoad %6 %378 +%392 = OpLoad %7 %289 +%393 = OpAccessChain %116 %34 %72 %391 %72 %392 +%394 = OpLoad %6 %393 OpLine %3 146 21 -%380 = OpLoad %7 %276 -%381 = OpLoad %7 %276 +%395 = OpLoad %7 %289 +%396 = OpLoad %7 %289 OpLine %3 146 21 -%382 = OpAccessChain %74 %274 %380 -%383 = OpLoad %14 %382 -%384 = OpFunctionCall %4 %43 %383 -%385 = OpBitcast %11 %381 -%386 = OpFunctionCall %5 %52 %384 %385 -%387 = OpCompositeExtract %6 %386 0 +%397 = OpAccessChain %74 %34 %72 %395 +%398 = OpLoad %14 %397 +%399 = OpFunctionCall %4 %43 %398 +%400 = OpBitcast %11 %396 +%401 = OpFunctionCall %5 %52 %399 %400 +%402 = OpCompositeExtract %6 %401 0 OpLine %3 147 21 -%388 = OpLoad %7 %276 -%389 = OpLoad %7 %276 -%390 = OpLoad %7 %276 -%391 = OpAccessChain %74 %274 %388 -%392 = OpLoad %14 %391 -%393 = OpFunctionCall %4 %43 %392 -%394 = OpBitcast %11 %389 -%395 = OpFunctionCall %5 %52 %393 %394 -%396 = OpVectorExtractDynamic %6 %395 %390 +%403 = OpLoad %7 %289 +%404 = OpLoad %7 %289 +%405 = OpLoad %7 %289 +%406 = OpAccessChain %74 %34 %72 %403 +%407 = OpLoad %14 %406 +%408 = OpFunctionCall %4 %43 %407 +%409 = OpBitcast %11 %404 +%410 = OpFunctionCall %5 %52 %408 %409 +%411 = OpVectorExtractDynamic %6 %410 %405 OpLine %3 150 5 -OpStore %272 %327 +%412 = OpAccessChain %284 %31 %72 +OpStore %412 %342 OpLine %3 151 5 OpLine %3 151 5 -%397 = OpAccessChain %71 %272 %72 -OpStore %397 %330 +%413 = OpAccessChain %71 %31 %72 %72 +OpStore %413 %345 OpLine %3 152 5 -%398 = OpLoad %7 %276 +%414 = OpLoad %7 %289 OpLine %3 152 5 -%399 = OpAccessChain %71 %272 %398 -OpStore %399 %334 +%415 = OpAccessChain %71 %31 %72 %414 +OpStore %415 %349 OpLine %3 153 5 OpLine %3 153 5 OpLine %3 153 5 -%400 = OpAccessChain %84 %272 %72 %72 -OpStore %400 %336 +%416 = OpAccessChain %85 %31 %72 %72 %72 +OpStore %416 %351 OpLine %3 154 5 -%401 = OpLoad %7 %276 +%417 = OpLoad %7 %289 OpLine %3 154 5 -%402 = OpAccessChain %84 %272 %72 %401 -OpStore %402 %342 +%418 = OpAccessChain %85 %31 %72 %72 %417 +OpStore %418 %357 OpLine %3 155 5 -%403 = OpLoad %7 %276 +%419 = OpLoad %7 %289 OpLine %3 155 5 OpLine %3 155 5 -%404 = OpAccessChain %84 %272 %403 %72 -OpStore %404 %345 +%420 = OpAccessChain %85 %31 %72 %419 %72 +OpStore %420 %360 OpLine %3 156 5 -%405 = OpLoad %7 %276 -%406 = OpLoad %7 %276 +%421 = OpLoad %7 %289 +%422 = OpLoad %7 %289 OpLine %3 156 5 -%407 = OpAccessChain %84 %272 %405 %406 -OpStore %407 %352 +%423 = OpAccessChain %85 %31 %72 %421 %422 +OpStore %423 %367 OpLine %3 157 5 OpLine %3 157 5 OpLine %3 157 5 OpLine %3 157 5 -%408 = OpAccessChain %90 %272 %72 %72 %72 -OpStore %408 %354 +%424 = OpAccessChain %91 %31 %72 %72 %72 %72 +OpStore %424 %369 OpLine %3 158 5 OpLine %3 158 5 -%409 = OpLoad %7 %276 +%425 = OpLoad %7 %289 OpLine %3 158 5 -%410 = OpAccessChain %90 %272 %72 %72 %409 -OpStore %410 %357 +%426 = OpAccessChain %91 %31 %72 %72 %72 %425 +OpStore %426 %372 OpLine %3 159 5 -%411 = OpLoad %7 %276 +%427 = OpLoad %7 %289 OpLine %3 159 5 OpLine %3 159 5 -%412 = OpAccessChain %90 %272 %72 %411 %72 -OpStore %412 %364 +%428 = OpAccessChain %91 %31 %72 %72 %427 %72 +OpStore %428 %379 OpLine %3 160 5 -%413 = OpLoad %7 %276 -%414 = OpLoad %7 %276 +%429 = OpLoad %7 %289 +%430 = OpLoad %7 %289 OpLine %3 160 5 -%415 = OpAccessChain %90 %272 %72 %413 %414 -OpStore %415 %372 +%431 = OpAccessChain %91 %31 %72 %72 %429 %430 +OpStore %431 %387 OpLine %3 161 5 -%416 = OpLoad %7 %276 +%432 = OpLoad %7 %289 OpLine %3 161 5 OpLine %3 161 5 OpLine %3 161 5 -%417 = OpAccessChain %90 %272 %416 %72 %72 -OpStore %417 %375 +%433 = OpAccessChain %91 %31 %72 %432 %72 %72 +OpStore %433 %390 OpLine %3 162 5 -%418 = OpLoad %7 %276 +%434 = OpLoad %7 %289 OpLine %3 162 5 -%419 = OpLoad %7 %276 +%435 = OpLoad %7 %289 OpLine %3 162 5 -%420 = OpAccessChain %90 %272 %418 %72 %419 -OpStore %420 %379 +%436 = OpAccessChain %91 %31 %72 %434 %72 %435 +OpStore %436 %394 OpLine %3 163 5 -%421 = OpLoad %7 %276 -%422 = OpLoad %7 %276 +%437 = OpLoad %7 %289 +%438 = OpLoad %7 %289 OpLine %3 163 5 OpLine %3 163 5 -%423 = OpAccessChain %90 %272 %421 %422 %72 -OpStore %423 %387 +%439 = OpAccessChain %91 %31 %72 %437 %438 %72 +OpStore %439 %402 OpLine %3 164 5 -%424 = OpLoad %7 %276 -%425 = OpLoad %7 %276 -%426 = OpLoad %7 %276 +%440 = OpLoad %7 %289 +%441 = OpLoad %7 %289 +%442 = OpLoad %7 %289 OpLine %3 164 5 -%427 = OpAccessChain %90 %272 %424 %425 %426 -OpStore %427 %396 +%443 = OpAccessChain %91 %31 %72 %440 %441 %442 +OpStore %443 %411 OpReturn OpFunctionEnd -%433 = OpFunction %12 None %434 -%435 = OpFunctionParameter %17 -%436 = OpLabel -%437 = OpCompositeExtract %15 %435 0 -%438 = OpFunctionCall %8 %143 %437 -%439 = OpCompositeExtract %15 %435 1 -%440 = OpFunctionCall %8 %143 %439 -%441 = OpCompositeExtract %15 %435 2 -%442 = OpFunctionCall %8 %143 %441 -%443 = OpCompositeExtract %15 %435 3 -%444 = OpFunctionCall %8 %143 %443 -%445 = OpCompositeConstruct %12 %438 %440 %442 %444 -OpReturnValue %445 +%449 = OpFunction %12 None %450 +%451 = OpFunctionParameter %17 +%452 = OpLabel +%453 = OpCompositeExtract %15 %451 0 +%454 = OpFunctionCall %8 %149 %453 +%455 = OpCompositeExtract %15 %451 1 +%456 = OpFunctionCall %8 %149 %455 +%457 = OpCompositeExtract %15 %451 2 +%458 = OpFunctionCall %8 %149 %457 +%459 = OpCompositeExtract %15 %451 3 +%460 = OpFunctionCall %8 %149 %459 +%461 = OpCompositeConstruct %12 %454 %456 %458 %460 +OpReturnValue %461 OpFunctionEnd -%428 = OpFunction %13 None %429 -%430 = OpFunctionParameter %18 -%431 = OpLabel -%446 = OpCompositeExtract %17 %430 0 -%432 = OpFunctionCall %12 %433 %446 -%447 = OpCompositeConstruct %13 %432 -OpReturnValue %447 +%444 = OpFunction %13 None %445 +%446 = OpFunctionParameter %18 +%447 = OpLabel +%462 = OpCompositeExtract %17 %446 0 +%448 = OpFunctionCall %12 %449 %462 +%463 = OpCompositeConstruct %13 %448 +OpReturnValue %463 OpFunctionEnd -%449 = OpFunction %2 None %70 -%448 = OpLabel -%455 = OpVariable %79 Function %76 -%451 = OpAccessChain %450 %37 %72 -%453 = OpAccessChain %452 %40 %72 -OpBranch %456 -%456 = OpLabel +%465 = OpFunction %2 None %70 +%464 = OpLabel +%471 = OpVariable %79 Function %76 +%467 = OpAccessChain %466 %37 %72 +%469 = OpAccessChain %468 %40 %72 +OpBranch %472 +%472 = OpLabel OpLine %3 179 5 -%457 = OpLoad %7 %455 -%458 = OpISub %7 %457 %76 +%473 = OpLoad %7 %471 +%474 = OpISub %7 %473 %76 OpLine %3 179 5 -OpStore %455 %458 +OpStore %471 %474 OpLine %3 182 17 -%459 = OpLoad %13 %451 +%475 = OpAccessChain %466 %37 %72 +%476 = OpLoad %13 %475 OpLine %3 183 17 -%461 = OpAccessChain %460 %451 %72 -%462 = OpLoad %12 %461 +%478 = OpAccessChain %477 %37 %72 %72 +%479 = OpLoad %12 %478 OpLine %3 184 19 OpLine %3 184 19 -%463 = OpAccessChain %71 %451 %72 %72 %72 -%464 = OpLoad %4 %463 +%480 = OpAccessChain %71 %37 %72 %72 %72 %72 +%481 = OpLoad %4 %480 OpLine %3 185 19 -%465 = OpLoad %7 %455 -%466 = OpAccessChain %71 %451 %72 %465 %72 -%467 = OpLoad %4 %466 +%482 = OpLoad %7 %471 +%483 = OpAccessChain %71 %37 %72 %72 %482 %72 +%484 = OpLoad %4 %483 OpLine %3 186 20 OpLine %3 186 20 OpLine %3 186 20 -%468 = OpAccessChain %84 %451 %72 %72 %72 %72 -%469 = OpLoad %5 %468 +%485 = OpAccessChain %85 %37 %72 %72 %72 %72 %72 +%486 = OpLoad %5 %485 OpLine %3 187 20 OpLine %3 187 20 -%470 = OpLoad %7 %455 -%471 = OpAccessChain %84 %451 %72 %72 %72 %470 -%472 = OpLoad %5 %471 +%487 = OpLoad %7 %471 +%488 = OpAccessChain %85 %37 %72 %72 %72 %72 %487 +%489 = OpLoad %5 %488 OpLine %3 188 20 -%473 = OpLoad %7 %455 +%490 = OpLoad %7 %471 OpLine %3 188 20 -%474 = OpAccessChain %84 %451 %72 %473 %72 %72 -%475 = OpLoad %5 %474 +%491 = OpAccessChain %85 %37 %72 %72 %490 %72 %72 +%492 = OpLoad %5 %491 OpLine %3 189 20 -%476 = OpLoad %7 %455 -%477 = OpLoad %7 %455 -%478 = OpAccessChain %84 %451 %72 %476 %72 %477 -%479 = OpLoad %5 %478 +%493 = OpLoad %7 %471 +%494 = OpLoad %7 %471 +%495 = OpAccessChain %85 %37 %72 %72 %493 %72 %494 +%496 = OpLoad %5 %495 OpLine %3 190 21 OpLine %3 190 21 OpLine %3 190 21 OpLine %3 190 21 -%480 = OpAccessChain %90 %451 %72 %72 %72 %72 %72 -%481 = OpLoad %6 %480 +%497 = OpAccessChain %91 %37 %72 %72 %72 %72 %72 %72 +%498 = OpLoad %6 %497 OpLine %3 191 21 OpLine %3 191 21 OpLine %3 191 21 -%482 = OpLoad %7 %455 -%483 = OpAccessChain %90 %451 %72 %72 %72 %72 %482 -%484 = OpLoad %6 %483 +%499 = OpLoad %7 %471 +%500 = OpAccessChain %91 %37 %72 %72 %72 %72 %72 %499 +%501 = OpLoad %6 %500 OpLine %3 192 21 OpLine %3 192 21 -%485 = OpLoad %7 %455 +%502 = OpLoad %7 %471 OpLine %3 192 21 -%486 = OpAccessChain %90 %451 %72 %72 %72 %485 %72 -%487 = OpLoad %6 %486 +%503 = OpAccessChain %91 %37 %72 %72 %72 %72 %502 %72 +%504 = OpLoad %6 %503 OpLine %3 193 21 OpLine %3 193 21 -%488 = OpLoad %7 %455 -%489 = OpLoad %7 %455 -%490 = OpAccessChain %90 %451 %72 %72 %72 %488 %489 -%491 = OpLoad %6 %490 +%505 = OpLoad %7 %471 +%506 = OpLoad %7 %471 +%507 = OpAccessChain %91 %37 %72 %72 %72 %72 %505 %506 +%508 = OpLoad %6 %507 OpLine %3 194 21 -%492 = OpLoad %7 %455 +%509 = OpLoad %7 %471 OpLine %3 194 21 OpLine %3 194 21 -%493 = OpAccessChain %90 %451 %72 %492 %72 %72 %72 -%494 = OpLoad %6 %493 +%510 = OpAccessChain %91 %37 %72 %72 %509 %72 %72 %72 +%511 = OpLoad %6 %510 OpLine %3 195 21 -%495 = OpLoad %7 %455 +%512 = OpLoad %7 %471 OpLine %3 195 21 -%496 = OpLoad %7 %455 -%497 = OpAccessChain %90 %451 %72 %495 %72 %72 %496 -%498 = OpLoad %6 %497 +%513 = OpLoad %7 %471 +%514 = OpAccessChain %91 %37 %72 %72 %512 %72 %72 %513 +%515 = OpLoad %6 %514 OpLine %3 196 21 -%499 = OpLoad %7 %455 -%500 = OpLoad %7 %455 +%516 = OpLoad %7 %471 +%517 = OpLoad %7 %471 OpLine %3 196 21 -%501 = OpAccessChain %90 %451 %72 %499 %72 %500 %72 -%502 = OpLoad %6 %501 +%518 = OpAccessChain %91 %37 %72 %72 %516 %72 %517 %72 +%519 = OpLoad %6 %518 OpLine %3 197 21 -%503 = OpLoad %7 %455 -%504 = OpLoad %7 %455 -%505 = OpLoad %7 %455 -%506 = OpAccessChain %90 %451 %72 %503 %72 %504 %505 -%507 = OpLoad %6 %506 +%520 = OpLoad %7 %471 +%521 = OpLoad %7 %471 +%522 = OpLoad %7 %471 +%523 = OpAccessChain %91 %37 %72 %72 %520 %72 %521 %522 +%524 = OpLoad %6 %523 OpLine %3 200 17 -%508 = OpLoad %18 %453 -%509 = OpFunctionCall %13 %428 %508 +%525 = OpAccessChain %468 %40 %72 +%526 = OpLoad %18 %525 +%527 = OpFunctionCall %13 %444 %526 OpLine %3 201 17 -%512 = OpAccessChain %511 %453 %72 -%513 = OpLoad %17 %512 -%514 = OpFunctionCall %12 %433 %513 +%530 = OpAccessChain %529 %40 %72 %72 +%531 = OpLoad %17 %530 +%532 = OpFunctionCall %12 %449 %531 OpLine %3 202 19 OpLine %3 202 19 -%515 = OpAccessChain %157 %453 %72 %72 -%516 = OpAccessChain %105 %515 %72 -%517 = OpLoad %5 %516 -%518 = OpAccessChain %105 %515 %186 -%519 = OpLoad %5 %518 -%520 = OpAccessChain %105 %515 %187 -%521 = OpLoad %5 %520 -%522 = OpAccessChain %105 %515 %188 -%523 = OpLoad %5 %522 -%524 = OpCompositeConstruct %4 %517 %519 %521 %523 +%533 = OpAccessChain %163 %40 %72 %72 %72 +%534 = OpAccessChain %107 %533 %72 +%535 = OpLoad %5 %534 +%536 = OpAccessChain %107 %533 %194 +%537 = OpLoad %5 %536 +%538 = OpAccessChain %107 %533 %195 +%539 = OpLoad %5 %538 +%540 = OpAccessChain %107 %533 %196 +%541 = OpLoad %5 %540 +%542 = OpCompositeConstruct %4 %535 %537 %539 %541 OpLine %3 203 19 -%525 = OpLoad %7 %455 -%526 = OpAccessChain %157 %453 %72 %525 -%527 = OpAccessChain %105 %526 %72 -%528 = OpLoad %5 %527 -%529 = OpAccessChain %105 %526 %186 -%530 = OpLoad %5 %529 -%531 = OpAccessChain %105 %526 %187 -%532 = OpLoad %5 %531 -%533 = OpAccessChain %105 %526 %188 -%534 = OpLoad %5 %533 -%535 = OpCompositeConstruct %4 %528 %530 %532 %534 +%543 = OpLoad %7 %471 +%544 = OpAccessChain %163 %40 %72 %72 %543 +%545 = OpAccessChain %107 %544 %72 +%546 = OpLoad %5 %545 +%547 = OpAccessChain %107 %544 %194 +%548 = OpLoad %5 %547 +%549 = OpAccessChain %107 %544 %195 +%550 = OpLoad %5 %549 +%551 = OpAccessChain %107 %544 %196 +%552 = OpLoad %5 %551 +%553 = OpCompositeConstruct %4 %546 %548 %550 %552 OpLine %3 204 20 OpLine %3 204 20 OpLine %3 204 20 -%536 = OpAccessChain %105 %453 %72 %72 %72 -%537 = OpLoad %5 %536 +%554 = OpAccessChain %107 %40 %72 %72 %72 %72 +%555 = OpLoad %5 %554 OpLine %3 205 20 OpLine %3 205 20 -%538 = OpLoad %7 %455 -%539 = OpAccessChain %157 %453 %72 %72 -%540 = OpAccessChain %105 %539 %72 -%541 = OpLoad %5 %540 -%542 = OpAccessChain %105 %539 %186 -%543 = OpLoad %5 %542 -%544 = OpAccessChain %105 %539 %187 -%545 = OpLoad %5 %544 -%546 = OpAccessChain %105 %539 %188 -%547 = OpLoad %5 %546 -%548 = OpCompositeConstruct %4 %541 %543 %545 %547 -%549 = OpBitcast %11 %538 -%550 = OpFunctionCall %5 %52 %548 %549 +%556 = OpLoad %7 %471 +%557 = OpAccessChain %163 %40 %72 %72 %72 +%558 = OpAccessChain %107 %557 %72 +%559 = OpLoad %5 %558 +%560 = OpAccessChain %107 %557 %194 +%561 = OpLoad %5 %560 +%562 = OpAccessChain %107 %557 %195 +%563 = OpLoad %5 %562 +%564 = OpAccessChain %107 %557 %196 +%565 = OpLoad %5 %564 +%566 = OpCompositeConstruct %4 %559 %561 %563 %565 +%567 = OpBitcast %11 %556 +%568 = OpFunctionCall %5 %52 %566 %567 OpLine %3 206 20 -%551 = OpLoad %7 %455 +%569 = OpLoad %7 %471 OpLine %3 206 20 -%552 = OpAccessChain %105 %453 %72 %551 %72 -%553 = OpLoad %5 %552 +%570 = OpAccessChain %107 %40 %72 %72 %569 %72 +%571 = OpLoad %5 %570 OpLine %3 207 20 -%554 = OpLoad %7 %455 -%555 = OpLoad %7 %455 -%556 = OpAccessChain %157 %453 %72 %554 -%557 = OpAccessChain %105 %556 %72 -%558 = OpLoad %5 %557 -%559 = OpAccessChain %105 %556 %186 -%560 = OpLoad %5 %559 -%561 = OpAccessChain %105 %556 %187 -%562 = OpLoad %5 %561 -%563 = OpAccessChain %105 %556 %188 -%564 = OpLoad %5 %563 -%565 = OpCompositeConstruct %4 %558 %560 %562 %564 -%566 = OpBitcast %11 %555 -%567 = OpFunctionCall %5 %52 %565 %566 +%572 = OpLoad %7 %471 +%573 = OpLoad %7 %471 +%574 = OpAccessChain %163 %40 %72 %72 %572 +%575 = OpAccessChain %107 %574 %72 +%576 = OpLoad %5 %575 +%577 = OpAccessChain %107 %574 %194 +%578 = OpLoad %5 %577 +%579 = OpAccessChain %107 %574 %195 +%580 = OpLoad %5 %579 +%581 = OpAccessChain %107 %574 %196 +%582 = OpLoad %5 %581 +%583 = OpCompositeConstruct %4 %576 %578 %580 %582 +%584 = OpBitcast %11 %573 +%585 = OpFunctionCall %5 %52 %583 %584 OpLine %3 208 21 OpLine %3 208 21 OpLine %3 208 21 OpLine %3 208 21 -%568 = OpAccessChain %113 %453 %72 %72 %72 %72 -%569 = OpLoad %6 %568 +%586 = OpAccessChain %116 %40 %72 %72 %72 %72 %72 +%587 = OpLoad %6 %586 OpLine %3 209 21 OpLine %3 209 21 OpLine %3 209 21 -%570 = OpLoad %7 %455 -%571 = OpAccessChain %113 %453 %72 %72 %72 %570 -%572 = OpLoad %6 %571 +%588 = OpLoad %7 %471 +%589 = OpAccessChain %116 %40 %72 %72 %72 %72 %588 +%590 = OpLoad %6 %589 OpLine %3 210 21 OpLine %3 210 21 -%573 = OpLoad %7 %455 +%591 = OpLoad %7 %471 OpLine %3 210 21 -%574 = OpAccessChain %157 %453 %72 %72 -%575 = OpAccessChain %105 %574 %72 -%576 = OpLoad %5 %575 -%577 = OpAccessChain %105 %574 %186 -%578 = OpLoad %5 %577 -%579 = OpAccessChain %105 %574 %187 -%580 = OpLoad %5 %579 -%581 = OpAccessChain %105 %574 %188 -%582 = OpLoad %5 %581 -%583 = OpCompositeConstruct %4 %576 %578 %580 %582 -%584 = OpBitcast %11 %573 -%585 = OpFunctionCall %5 %52 %583 %584 -%586 = OpCompositeExtract %6 %585 0 +%592 = OpAccessChain %163 %40 %72 %72 %72 +%593 = OpAccessChain %107 %592 %72 +%594 = OpLoad %5 %593 +%595 = OpAccessChain %107 %592 %194 +%596 = OpLoad %5 %595 +%597 = OpAccessChain %107 %592 %195 +%598 = OpLoad %5 %597 +%599 = OpAccessChain %107 %592 %196 +%600 = OpLoad %5 %599 +%601 = OpCompositeConstruct %4 %594 %596 %598 %600 +%602 = OpBitcast %11 %591 +%603 = OpFunctionCall %5 %52 %601 %602 +%604 = OpCompositeExtract %6 %603 0 OpLine %3 211 21 OpLine %3 211 21 -%587 = OpLoad %7 %455 -%588 = OpLoad %7 %455 -%589 = OpAccessChain %157 %453 %72 %72 -%590 = OpAccessChain %105 %589 %72 -%591 = OpLoad %5 %590 -%592 = OpAccessChain %105 %589 %186 -%593 = OpLoad %5 %592 -%594 = OpAccessChain %105 %589 %187 -%595 = OpLoad %5 %594 -%596 = OpAccessChain %105 %589 %188 -%597 = OpLoad %5 %596 -%598 = OpCompositeConstruct %4 %591 %593 %595 %597 -%599 = OpBitcast %11 %587 -%600 = OpFunctionCall %5 %52 %598 %599 -%601 = OpVectorExtractDynamic %6 %600 %588 +%605 = OpLoad %7 %471 +%606 = OpLoad %7 %471 +%607 = OpAccessChain %163 %40 %72 %72 %72 +%608 = OpAccessChain %107 %607 %72 +%609 = OpLoad %5 %608 +%610 = OpAccessChain %107 %607 %194 +%611 = OpLoad %5 %610 +%612 = OpAccessChain %107 %607 %195 +%613 = OpLoad %5 %612 +%614 = OpAccessChain %107 %607 %196 +%615 = OpLoad %5 %614 +%616 = OpCompositeConstruct %4 %609 %611 %613 %615 +%617 = OpBitcast %11 %605 +%618 = OpFunctionCall %5 %52 %616 %617 +%619 = OpVectorExtractDynamic %6 %618 %606 OpLine %3 212 21 -%602 = OpLoad %7 %455 +%620 = OpLoad %7 %471 OpLine %3 212 21 OpLine %3 212 21 -%603 = OpAccessChain %113 %453 %72 %602 %72 %72 -%604 = OpLoad %6 %603 +%621 = OpAccessChain %116 %40 %72 %72 %620 %72 %72 +%622 = OpLoad %6 %621 OpLine %3 213 21 -%605 = OpLoad %7 %455 +%623 = OpLoad %7 %471 OpLine %3 213 21 -%606 = OpLoad %7 %455 -%607 = OpAccessChain %113 %453 %72 %605 %72 %606 -%608 = OpLoad %6 %607 +%624 = OpLoad %7 %471 +%625 = OpAccessChain %116 %40 %72 %72 %623 %72 %624 +%626 = OpLoad %6 %625 OpLine %3 214 21 -%609 = OpLoad %7 %455 -%610 = OpLoad %7 %455 +%627 = OpLoad %7 %471 +%628 = OpLoad %7 %471 OpLine %3 214 21 -%611 = OpAccessChain %157 %453 %72 %609 -%612 = OpAccessChain %105 %611 %72 -%613 = OpLoad %5 %612 -%614 = OpAccessChain %105 %611 %186 -%615 = OpLoad %5 %614 -%616 = OpAccessChain %105 %611 %187 -%617 = OpLoad %5 %616 -%618 = OpAccessChain %105 %611 %188 -%619 = OpLoad %5 %618 -%620 = OpCompositeConstruct %4 %613 %615 %617 %619 -%621 = OpBitcast %11 %610 -%622 = OpFunctionCall %5 %52 %620 %621 -%623 = OpCompositeExtract %6 %622 0 -OpLine %3 215 21 -%624 = OpLoad %7 %455 -%625 = OpLoad %7 %455 -%626 = OpLoad %7 %455 -%627 = OpAccessChain %157 %453 %72 %624 -%628 = OpAccessChain %105 %627 %72 -%629 = OpLoad %5 %628 -%630 = OpAccessChain %105 %627 %186 +%629 = OpAccessChain %163 %40 %72 %72 %627 +%630 = OpAccessChain %107 %629 %72 %631 = OpLoad %5 %630 -%632 = OpAccessChain %105 %627 %187 +%632 = OpAccessChain %107 %629 %194 %633 = OpLoad %5 %632 -%634 = OpAccessChain %105 %627 %188 +%634 = OpAccessChain %107 %629 %195 %635 = OpLoad %5 %634 -%636 = OpCompositeConstruct %4 %629 %631 %633 %635 -%637 = OpBitcast %11 %625 -%638 = OpFunctionCall %5 %52 %636 %637 -%639 = OpVectorExtractDynamic %6 %638 %626 +%636 = OpAccessChain %107 %629 %196 +%637 = OpLoad %5 %636 +%638 = OpCompositeConstruct %4 %631 %633 %635 %637 +%639 = OpBitcast %11 %628 +%640 = OpFunctionCall %5 %52 %638 %639 +%641 = OpCompositeExtract %6 %640 0 +OpLine %3 215 21 +%642 = OpLoad %7 %471 +%643 = OpLoad %7 %471 +%644 = OpLoad %7 %471 +%645 = OpAccessChain %163 %40 %72 %72 %642 +%646 = OpAccessChain %107 %645 %72 +%647 = OpLoad %5 %646 +%648 = OpAccessChain %107 %645 %194 +%649 = OpLoad %5 %648 +%650 = OpAccessChain %107 %645 %195 +%651 = OpLoad %5 %650 +%652 = OpAccessChain %107 %645 %196 +%653 = OpLoad %5 %652 +%654 = OpCompositeConstruct %4 %647 %649 %651 %653 +%655 = OpBitcast %11 %643 +%656 = OpFunctionCall %5 %52 %654 %655 +%657 = OpVectorExtractDynamic %6 %656 %644 OpLine %3 218 5 -OpStore %451 %509 +%658 = OpAccessChain %466 %37 %72 +OpStore %658 %527 OpLine %3 219 5 OpLine %3 219 5 -%640 = OpAccessChain %460 %451 %72 -OpStore %640 %514 +%659 = OpAccessChain %477 %37 %72 %72 +OpStore %659 %532 OpLine %3 220 5 OpLine %3 220 5 OpLine %3 220 5 -%641 = OpAccessChain %71 %451 %72 %72 %72 -OpStore %641 %524 +%660 = OpAccessChain %71 %37 %72 %72 %72 %72 +OpStore %660 %542 OpLine %3 221 5 -%642 = OpLoad %7 %455 +%661 = OpLoad %7 %471 OpLine %3 221 5 -%643 = OpAccessChain %71 %451 %72 %642 %72 -OpStore %643 %535 +%662 = OpAccessChain %71 %37 %72 %72 %661 %72 +OpStore %662 %553 OpLine %3 222 5 OpLine %3 222 5 OpLine %3 222 5 OpLine %3 222 5 -%644 = OpAccessChain %84 %451 %72 %72 %72 %72 -OpStore %644 %537 +%663 = OpAccessChain %85 %37 %72 %72 %72 %72 %72 +OpStore %663 %555 OpLine %3 223 5 OpLine %3 223 5 -%645 = OpLoad %7 %455 +%664 = OpLoad %7 %471 OpLine %3 223 5 -%646 = OpAccessChain %84 %451 %72 %72 %72 %645 -OpStore %646 %550 +%665 = OpAccessChain %85 %37 %72 %72 %72 %72 %664 +OpStore %665 %568 OpLine %3 224 5 -%647 = OpLoad %7 %455 +%666 = OpLoad %7 %471 OpLine %3 224 5 OpLine %3 224 5 -%648 = OpAccessChain %84 %451 %72 %647 %72 %72 -OpStore %648 %553 +%667 = OpAccessChain %85 %37 %72 %72 %666 %72 %72 +OpStore %667 %571 OpLine %3 225 5 -%649 = OpLoad %7 %455 -%650 = OpLoad %7 %455 +%668 = OpLoad %7 %471 +%669 = OpLoad %7 %471 OpLine %3 225 5 -%651 = OpAccessChain %84 %451 %72 %649 %72 %650 -OpStore %651 %567 +%670 = OpAccessChain %85 %37 %72 %72 %668 %72 %669 +OpStore %670 %585 OpLine %3 226 5 OpLine %3 226 5 OpLine %3 226 5 OpLine %3 226 5 OpLine %3 226 5 -%652 = OpAccessChain %90 %451 %72 %72 %72 %72 %72 -OpStore %652 %569 +%671 = OpAccessChain %91 %37 %72 %72 %72 %72 %72 %72 +OpStore %671 %587 OpLine %3 227 5 OpLine %3 227 5 OpLine %3 227 5 -%653 = OpLoad %7 %455 +%672 = OpLoad %7 %471 OpLine %3 227 5 -%654 = OpAccessChain %90 %451 %72 %72 %72 %72 %653 -OpStore %654 %572 +%673 = OpAccessChain %91 %37 %72 %72 %72 %72 %72 %672 +OpStore %673 %590 OpLine %3 228 5 OpLine %3 228 5 -%655 = OpLoad %7 %455 +%674 = OpLoad %7 %471 OpLine %3 228 5 OpLine %3 228 5 -%656 = OpAccessChain %90 %451 %72 %72 %72 %655 %72 -OpStore %656 %586 +%675 = OpAccessChain %91 %37 %72 %72 %72 %72 %674 %72 +OpStore %675 %604 OpLine %3 229 5 OpLine %3 229 5 -%657 = OpLoad %7 %455 -%658 = OpLoad %7 %455 +%676 = OpLoad %7 %471 +%677 = OpLoad %7 %471 OpLine %3 229 5 -%659 = OpAccessChain %90 %451 %72 %72 %72 %657 %658 -OpStore %659 %601 +%678 = OpAccessChain %91 %37 %72 %72 %72 %72 %676 %677 +OpStore %678 %619 OpLine %3 230 5 -%660 = OpLoad %7 %455 +%679 = OpLoad %7 %471 OpLine %3 230 5 OpLine %3 230 5 OpLine %3 230 5 -%661 = OpAccessChain %90 %451 %72 %660 %72 %72 %72 -OpStore %661 %604 +%680 = OpAccessChain %91 %37 %72 %72 %679 %72 %72 %72 +OpStore %680 %622 OpLine %3 231 5 -%662 = OpLoad %7 %455 +%681 = OpLoad %7 %471 OpLine %3 231 5 -%663 = OpLoad %7 %455 +%682 = OpLoad %7 %471 OpLine %3 231 5 -%664 = OpAccessChain %90 %451 %72 %662 %72 %72 %663 -OpStore %664 %608 +%683 = OpAccessChain %91 %37 %72 %72 %681 %72 %72 %682 +OpStore %683 %626 OpLine %3 232 5 -%665 = OpLoad %7 %455 -%666 = OpLoad %7 %455 +%684 = OpLoad %7 %471 +%685 = OpLoad %7 %471 OpLine %3 232 5 OpLine %3 232 5 -%667 = OpAccessChain %90 %451 %72 %665 %72 %666 %72 -OpStore %667 %623 +%686 = OpAccessChain %91 %37 %72 %72 %684 %72 %685 %72 +OpStore %686 %641 OpLine %3 233 5 -%668 = OpLoad %7 %455 -%669 = OpLoad %7 %455 -%670 = OpLoad %7 %455 +%687 = OpLoad %7 %471 +%688 = OpLoad %7 %471 +%689 = OpLoad %7 %471 OpLine %3 233 5 -%671 = OpAccessChain %90 %451 %72 %668 %72 %669 %670 -OpStore %671 %639 +%690 = OpAccessChain %91 %37 %72 %72 %687 %72 %688 %689 +OpStore %690 %657 OpReturn OpFunctionEnd -%673 = OpFunction %2 None %70 -%672 = OpLabel -%674 = OpAccessChain %71 %19 %72 -%675 = OpAccessChain %74 %22 %72 -%676 = OpAccessChain %155 %25 %72 -%677 = OpAccessChain %157 %28 %72 -%678 = OpAccessChain %271 %31 %72 -%679 = OpAccessChain %273 %34 %72 -%680 = OpAccessChain %450 %37 %72 -%681 = OpAccessChain %452 %40 %72 -OpBranch %682 -%682 = OpLabel +%692 = OpFunction %2 None %70 +%691 = OpLabel +%693 = OpAccessChain %71 %19 %72 +%694 = OpAccessChain %74 %22 %72 +%695 = OpAccessChain %161 %25 %72 +%696 = OpAccessChain %163 %28 %72 +%697 = OpAccessChain %284 %31 %72 +%698 = OpAccessChain %286 %34 %72 +%699 = OpAccessChain %466 %37 %72 +%700 = OpAccessChain %468 %40 %72 +OpBranch %701 +%701 = OpLabel OpLine %3 238 5 -%683 = OpFunctionCall %2 %69 +%702 = OpFunctionCall %2 %69 OpLine %3 239 5 -%684 = OpFunctionCall %2 %154 +%703 = OpFunctionCall %2 %160 OpLine %3 240 5 -%685 = OpFunctionCall %2 %270 +%704 = OpFunctionCall %2 %283 OpLine %3 241 5 -%686 = OpFunctionCall %2 %449 +%705 = OpFunctionCall %2 %465 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm.glsl b/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm.glsl index cc2d0df0c..b9c6f68e4 100644 --- a/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-mat_cx2_f16.spvasm.glsl @@ -131,9 +131,9 @@ void access_m() s_m_1._m0[idx][idx] = mat4x2_f16_get_column(mat4x2_f16_from_std140(u_m_1._m0), uint(idx))[idx]; } -StructWithMat StructWithMat_from_std140(std140_StructWithMat _145) +StructWithMat StructWithMat_from_std140(std140_StructWithMat _151) { - return StructWithMat(f16mat4x2(_145.m_col0, _145.m_col1, _145.m_col2, _145.m_col3)); + return StructWithMat(f16mat4x2(_151.m_col0, _151.m_col1, _151.m_col2, _151.m_col3)); } void access_sm() @@ -150,9 +150,9 @@ void access_sm() s_sm_1._m0.m[idx][idx] = mat4x2_f16_get_column(f16mat4x2(u_sm_1._m0.m_col0, u_sm_1._m0.m_col1, u_sm_1._m0.m_col2, u_sm_1._m0.m_col3), uint(idx))[idx]; } -f16mat4x2[4] array_mat4x2_f16_4_from_std140(std140_mat4x2_f16_ _258[4]) +f16mat4x2[4] array_mat4x2_f16_4_from_std140(std140_mat4x2_f16_ _271[4]) { - return f16mat4x2[](mat4x2_f16_from_std140(_258[0]), mat4x2_f16_from_std140(_258[1]), mat4x2_f16_from_std140(_258[2]), mat4x2_f16_from_std140(_258[3])); + return f16mat4x2[](mat4x2_f16_from_std140(_271[0]), mat4x2_f16_from_std140(_271[1]), mat4x2_f16_from_std140(_271[2]), mat4x2_f16_from_std140(_271[3])); } void access_am() @@ -176,14 +176,14 @@ void access_am() s_am_1._m0[idx][idx][idx] = mat4x2_f16_get_column(mat4x2_f16_from_std140(u_am_1._m0[idx]), uint(idx))[idx]; } -StructWithMat[4] array_StructWithMat_4_from_std140(std140_StructWithMat _435[4]) +StructWithMat[4] array_StructWithMat_4_from_std140(std140_StructWithMat _451[4]) { - return StructWithMat[](StructWithMat_from_std140(_435[0]), StructWithMat_from_std140(_435[1]), StructWithMat_from_std140(_435[2]), StructWithMat_from_std140(_435[3])); + return StructWithMat[](StructWithMat_from_std140(_451[0]), StructWithMat_from_std140(_451[1]), StructWithMat_from_std140(_451[2]), StructWithMat_from_std140(_451[3])); } -StructWithArrayOfStructOfMat StructWithArrayOfStructOfMat_from_std140(std140_StructWithArrayOfStructOfMat _430) +StructWithArrayOfStructOfMat StructWithArrayOfStructOfMat_from_std140(std140_StructWithArrayOfStructOfMat _446) { - return StructWithArrayOfStructOfMat(array_StructWithMat_4_from_std140(_430.a)); + return StructWithArrayOfStructOfMat(array_StructWithMat_4_from_std140(_446.a)); } void access_sasm() diff --git a/naga/tests/out/spv/wgsl-mat_cx3.spvasm b/naga/tests/out/spv/wgsl-mat_cx3.spvasm index 341a52b5c..d1660e409 100644 --- a/naga/tests/out/spv/wgsl-mat_cx3.spvasm +++ b/naga/tests/out/spv/wgsl-mat_cx3.spvasm @@ -1,13 +1,13 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 452 +; Bound: 464 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %438 "main" -OpExecutionMode %438 LocalSize 1 1 1 +OpEntryPoint GLCompute %450 "main" +OpExecutionMode %450 LocalSize 1 1 1 OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %7 0 ColMajor OpMemberDecorate %7 0 MatrixStride 16 @@ -95,18 +95,18 @@ OpMemberDecorate %35 0 Offset 0 %43 = OpTypePointer Uniform %3 %45 = OpConstant %6 1 %47 = OpTypePointer Function %6 -%52 = OpTypePointer StorageBuffer %4 -%58 = OpTypePointer StorageBuffer %5 -%72 = OpTypePointer Uniform %4 -%78 = OpTypePointer Uniform %5 -%104 = OpTypePointer StorageBuffer %7 -%106 = OpTypePointer Uniform %7 -%166 = OpTypePointer StorageBuffer %8 -%168 = OpTypePointer Uniform %8 -%299 = OpTypePointer StorageBuffer %12 -%301 = OpTypePointer Uniform %12 -%308 = OpTypePointer StorageBuffer %11 -%357 = OpTypePointer Uniform %11 +%53 = OpTypePointer StorageBuffer %4 +%59 = OpTypePointer StorageBuffer %5 +%74 = OpTypePointer Uniform %4 +%80 = OpTypePointer Uniform %5 +%107 = OpTypePointer StorageBuffer %7 +%109 = OpTypePointer Uniform %7 +%172 = OpTypePointer StorageBuffer %8 +%174 = OpTypePointer Uniform %8 +%308 = OpTypePointer StorageBuffer %12 +%310 = OpTypePointer Uniform %12 +%318 = OpTypePointer StorageBuffer %11 +%368 = OpTypePointer Uniform %11 %38 = OpFunction %2 None %39 %37 = OpLabel %46 = OpVariable %47 Function %45 @@ -117,455 +117,467 @@ OpBranch %48 %49 = OpLoad %6 %46 %50 = OpISub %6 %49 %45 OpStore %46 %50 -%51 = OpLoad %3 %42 -%53 = OpAccessChain %52 %42 %41 -%54 = OpLoad %4 %53 -%55 = OpLoad %6 %46 -%56 = OpAccessChain %52 %42 %55 -%57 = OpLoad %4 %56 -%59 = OpAccessChain %58 %42 %41 %41 -%60 = OpLoad %5 %59 -%61 = OpLoad %6 %46 -%62 = OpAccessChain %58 %42 %41 %61 -%63 = OpLoad %5 %62 -%64 = OpLoad %6 %46 -%65 = OpAccessChain %58 %42 %64 %41 -%66 = OpLoad %5 %65 -%67 = OpLoad %6 %46 +%51 = OpAccessChain %40 %13 %41 +%52 = OpLoad %3 %51 +%54 = OpAccessChain %53 %13 %41 %41 +%55 = OpLoad %4 %54 +%56 = OpLoad %6 %46 +%57 = OpAccessChain %53 %13 %41 %56 +%58 = OpLoad %4 %57 +%60 = OpAccessChain %59 %13 %41 %41 %41 +%61 = OpLoad %5 %60 +%62 = OpLoad %6 %46 +%63 = OpAccessChain %59 %13 %41 %41 %62 +%64 = OpLoad %5 %63 +%65 = OpLoad %6 %46 +%66 = OpAccessChain %59 %13 %41 %65 %41 +%67 = OpLoad %5 %66 %68 = OpLoad %6 %46 -%69 = OpAccessChain %58 %42 %67 %68 -%70 = OpLoad %5 %69 -%71 = OpLoad %3 %44 -%73 = OpAccessChain %72 %44 %41 -%74 = OpLoad %4 %73 -%75 = OpLoad %6 %46 -%76 = OpAccessChain %72 %44 %75 -%77 = OpLoad %4 %76 -%79 = OpAccessChain %78 %44 %41 %41 -%80 = OpLoad %5 %79 -%81 = OpLoad %6 %46 -%82 = OpAccessChain %78 %44 %41 %81 -%83 = OpLoad %5 %82 -%84 = OpLoad %6 %46 -%85 = OpAccessChain %78 %44 %84 %41 -%86 = OpLoad %5 %85 -%87 = OpLoad %6 %46 -%88 = OpLoad %6 %46 -%89 = OpAccessChain %78 %44 %87 %88 -%90 = OpLoad %5 %89 -OpStore %42 %71 -%91 = OpAccessChain %52 %42 %41 -OpStore %91 %74 -%92 = OpLoad %6 %46 -%93 = OpAccessChain %52 %42 %92 -OpStore %93 %77 -%94 = OpAccessChain %58 %42 %41 %41 -OpStore %94 %80 +%69 = OpLoad %6 %46 +%70 = OpAccessChain %59 %13 %41 %68 %69 +%71 = OpLoad %5 %70 +%72 = OpAccessChain %43 %16 %41 +%73 = OpLoad %3 %72 +%75 = OpAccessChain %74 %16 %41 %41 +%76 = OpLoad %4 %75 +%77 = OpLoad %6 %46 +%78 = OpAccessChain %74 %16 %41 %77 +%79 = OpLoad %4 %78 +%81 = OpAccessChain %80 %16 %41 %41 %41 +%82 = OpLoad %5 %81 +%83 = OpLoad %6 %46 +%84 = OpAccessChain %80 %16 %41 %41 %83 +%85 = OpLoad %5 %84 +%86 = OpLoad %6 %46 +%87 = OpAccessChain %80 %16 %41 %86 %41 +%88 = OpLoad %5 %87 +%89 = OpLoad %6 %46 +%90 = OpLoad %6 %46 +%91 = OpAccessChain %80 %16 %41 %89 %90 +%92 = OpLoad %5 %91 +%93 = OpAccessChain %40 %13 %41 +OpStore %93 %73 +%94 = OpAccessChain %53 %13 %41 %41 +OpStore %94 %76 %95 = OpLoad %6 %46 -%96 = OpAccessChain %58 %42 %41 %95 -OpStore %96 %83 -%97 = OpLoad %6 %46 -%98 = OpAccessChain %58 %42 %97 %41 -OpStore %98 %86 -%99 = OpLoad %6 %46 +%96 = OpAccessChain %53 %13 %41 %95 +OpStore %96 %79 +%97 = OpAccessChain %59 %13 %41 %41 %41 +OpStore %97 %82 +%98 = OpLoad %6 %46 +%99 = OpAccessChain %59 %13 %41 %41 %98 +OpStore %99 %85 %100 = OpLoad %6 %46 -%101 = OpAccessChain %58 %42 %99 %100 -OpStore %101 %90 +%101 = OpAccessChain %59 %13 %41 %100 %41 +OpStore %101 %88 +%102 = OpLoad %6 %46 +%103 = OpLoad %6 %46 +%104 = OpAccessChain %59 %13 %41 %102 %103 +OpStore %104 %92 OpReturn OpFunctionEnd -%103 = OpFunction %2 None %39 -%102 = OpLabel -%108 = OpVariable %47 Function %45 -%105 = OpAccessChain %104 %19 %41 -%107 = OpAccessChain %106 %22 %41 -OpBranch %109 -%109 = OpLabel -%110 = OpLoad %6 %108 -%111 = OpISub %6 %110 %45 -OpStore %108 %111 -%112 = OpLoad %7 %105 -%113 = OpAccessChain %40 %105 %41 -%114 = OpLoad %3 %113 -%115 = OpAccessChain %52 %105 %41 %41 -%116 = OpLoad %4 %115 -%117 = OpLoad %6 %108 -%118 = OpAccessChain %52 %105 %41 %117 -%119 = OpLoad %4 %118 -%120 = OpAccessChain %58 %105 %41 %41 %41 -%121 = OpLoad %5 %120 -%122 = OpLoad %6 %108 -%123 = OpAccessChain %58 %105 %41 %41 %122 -%124 = OpLoad %5 %123 -%125 = OpLoad %6 %108 -%126 = OpAccessChain %58 %105 %41 %125 %41 -%127 = OpLoad %5 %126 -%128 = OpLoad %6 %108 -%129 = OpLoad %6 %108 -%130 = OpAccessChain %58 %105 %41 %128 %129 +%106 = OpFunction %2 None %39 +%105 = OpLabel +%111 = OpVariable %47 Function %45 +%108 = OpAccessChain %107 %19 %41 +%110 = OpAccessChain %109 %22 %41 +OpBranch %112 +%112 = OpLabel +%113 = OpLoad %6 %111 +%114 = OpISub %6 %113 %45 +OpStore %111 %114 +%115 = OpAccessChain %107 %19 %41 +%116 = OpLoad %7 %115 +%117 = OpAccessChain %40 %19 %41 %41 +%118 = OpLoad %3 %117 +%119 = OpAccessChain %53 %19 %41 %41 %41 +%120 = OpLoad %4 %119 +%121 = OpLoad %6 %111 +%122 = OpAccessChain %53 %19 %41 %41 %121 +%123 = OpLoad %4 %122 +%124 = OpAccessChain %59 %19 %41 %41 %41 %41 +%125 = OpLoad %5 %124 +%126 = OpLoad %6 %111 +%127 = OpAccessChain %59 %19 %41 %41 %41 %126 +%128 = OpLoad %5 %127 +%129 = OpLoad %6 %111 +%130 = OpAccessChain %59 %19 %41 %41 %129 %41 %131 = OpLoad %5 %130 -%132 = OpLoad %7 %107 -%133 = OpAccessChain %43 %107 %41 -%134 = OpLoad %3 %133 -%135 = OpAccessChain %72 %107 %41 %41 -%136 = OpLoad %4 %135 -%137 = OpLoad %6 %108 -%138 = OpAccessChain %72 %107 %41 %137 -%139 = OpLoad %4 %138 -%140 = OpAccessChain %78 %107 %41 %41 %41 -%141 = OpLoad %5 %140 -%142 = OpLoad %6 %108 -%143 = OpAccessChain %78 %107 %41 %41 %142 -%144 = OpLoad %5 %143 -%145 = OpLoad %6 %108 -%146 = OpAccessChain %78 %107 %41 %145 %41 -%147 = OpLoad %5 %146 -%148 = OpLoad %6 %108 -%149 = OpLoad %6 %108 -%150 = OpAccessChain %78 %107 %41 %148 %149 -%151 = OpLoad %5 %150 -OpStore %105 %132 -%152 = OpAccessChain %40 %105 %41 -OpStore %152 %134 -%153 = OpAccessChain %52 %105 %41 %41 -OpStore %153 %136 -%154 = OpLoad %6 %108 -%155 = OpAccessChain %52 %105 %41 %154 -OpStore %155 %139 -%156 = OpAccessChain %58 %105 %41 %41 %41 -OpStore %156 %141 -%157 = OpLoad %6 %108 -%158 = OpAccessChain %58 %105 %41 %41 %157 -OpStore %158 %144 -%159 = OpLoad %6 %108 -%160 = OpAccessChain %58 %105 %41 %159 %41 -OpStore %160 %147 -%161 = OpLoad %6 %108 -%162 = OpLoad %6 %108 -%163 = OpAccessChain %58 %105 %41 %161 %162 -OpStore %163 %151 +%132 = OpLoad %6 %111 +%133 = OpLoad %6 %111 +%134 = OpAccessChain %59 %19 %41 %41 %132 %133 +%135 = OpLoad %5 %134 +%136 = OpAccessChain %109 %22 %41 +%137 = OpLoad %7 %136 +%138 = OpAccessChain %43 %22 %41 %41 +%139 = OpLoad %3 %138 +%140 = OpAccessChain %74 %22 %41 %41 %41 +%141 = OpLoad %4 %140 +%142 = OpLoad %6 %111 +%143 = OpAccessChain %74 %22 %41 %41 %142 +%144 = OpLoad %4 %143 +%145 = OpAccessChain %80 %22 %41 %41 %41 %41 +%146 = OpLoad %5 %145 +%147 = OpLoad %6 %111 +%148 = OpAccessChain %80 %22 %41 %41 %41 %147 +%149 = OpLoad %5 %148 +%150 = OpLoad %6 %111 +%151 = OpAccessChain %80 %22 %41 %41 %150 %41 +%152 = OpLoad %5 %151 +%153 = OpLoad %6 %111 +%154 = OpLoad %6 %111 +%155 = OpAccessChain %80 %22 %41 %41 %153 %154 +%156 = OpLoad %5 %155 +%157 = OpAccessChain %107 %19 %41 +OpStore %157 %137 +%158 = OpAccessChain %40 %19 %41 %41 +OpStore %158 %139 +%159 = OpAccessChain %53 %19 %41 %41 %41 +OpStore %159 %141 +%160 = OpLoad %6 %111 +%161 = OpAccessChain %53 %19 %41 %41 %160 +OpStore %161 %144 +%162 = OpAccessChain %59 %19 %41 %41 %41 %41 +OpStore %162 %146 +%163 = OpLoad %6 %111 +%164 = OpAccessChain %59 %19 %41 %41 %41 %163 +OpStore %164 %149 +%165 = OpLoad %6 %111 +%166 = OpAccessChain %59 %19 %41 %41 %165 %41 +OpStore %166 %152 +%167 = OpLoad %6 %111 +%168 = OpLoad %6 %111 +%169 = OpAccessChain %59 %19 %41 %41 %167 %168 +OpStore %169 %156 OpReturn OpFunctionEnd -%165 = OpFunction %2 None %39 -%164 = OpLabel -%170 = OpVariable %47 Function %45 -%167 = OpAccessChain %166 %25 %41 -%169 = OpAccessChain %168 %28 %41 -OpBranch %171 -%171 = OpLabel -%172 = OpLoad %6 %170 -%173 = OpISub %6 %172 %45 -OpStore %170 %173 -%174 = OpLoad %8 %167 -%175 = OpAccessChain %40 %167 %41 -%176 = OpLoad %3 %175 -%177 = OpLoad %6 %170 -%178 = OpAccessChain %40 %167 %177 -%179 = OpLoad %3 %178 -%180 = OpAccessChain %52 %167 %41 %41 -%181 = OpLoad %4 %180 -%182 = OpLoad %6 %170 -%183 = OpAccessChain %52 %167 %41 %182 -%184 = OpLoad %4 %183 -%185 = OpLoad %6 %170 -%186 = OpAccessChain %52 %167 %185 %41 -%187 = OpLoad %4 %186 -%188 = OpLoad %6 %170 -%189 = OpLoad %6 %170 -%190 = OpAccessChain %52 %167 %188 %189 +%171 = OpFunction %2 None %39 +%170 = OpLabel +%176 = OpVariable %47 Function %45 +%173 = OpAccessChain %172 %25 %41 +%175 = OpAccessChain %174 %28 %41 +OpBranch %177 +%177 = OpLabel +%178 = OpLoad %6 %176 +%179 = OpISub %6 %178 %45 +OpStore %176 %179 +%180 = OpAccessChain %172 %25 %41 +%181 = OpLoad %8 %180 +%182 = OpAccessChain %40 %25 %41 %41 +%183 = OpLoad %3 %182 +%184 = OpLoad %6 %176 +%185 = OpAccessChain %40 %25 %41 %184 +%186 = OpLoad %3 %185 +%187 = OpAccessChain %53 %25 %41 %41 %41 +%188 = OpLoad %4 %187 +%189 = OpLoad %6 %176 +%190 = OpAccessChain %53 %25 %41 %41 %189 %191 = OpLoad %4 %190 -%192 = OpAccessChain %58 %167 %41 %41 %41 -%193 = OpLoad %5 %192 -%194 = OpLoad %6 %170 -%195 = OpAccessChain %58 %167 %41 %41 %194 -%196 = OpLoad %5 %195 -%197 = OpLoad %6 %170 -%198 = OpAccessChain %58 %167 %41 %197 %41 -%199 = OpLoad %5 %198 -%200 = OpLoad %6 %170 -%201 = OpLoad %6 %170 -%202 = OpAccessChain %58 %167 %41 %200 %201 +%192 = OpLoad %6 %176 +%193 = OpAccessChain %53 %25 %41 %192 %41 +%194 = OpLoad %4 %193 +%195 = OpLoad %6 %176 +%196 = OpLoad %6 %176 +%197 = OpAccessChain %53 %25 %41 %195 %196 +%198 = OpLoad %4 %197 +%199 = OpAccessChain %59 %25 %41 %41 %41 %41 +%200 = OpLoad %5 %199 +%201 = OpLoad %6 %176 +%202 = OpAccessChain %59 %25 %41 %41 %41 %201 %203 = OpLoad %5 %202 -%204 = OpLoad %6 %170 -%205 = OpAccessChain %58 %167 %204 %41 %41 +%204 = OpLoad %6 %176 +%205 = OpAccessChain %59 %25 %41 %41 %204 %41 %206 = OpLoad %5 %205 -%207 = OpLoad %6 %170 -%208 = OpLoad %6 %170 -%209 = OpAccessChain %58 %167 %207 %41 %208 +%207 = OpLoad %6 %176 +%208 = OpLoad %6 %176 +%209 = OpAccessChain %59 %25 %41 %41 %207 %208 %210 = OpLoad %5 %209 -%211 = OpLoad %6 %170 -%212 = OpLoad %6 %170 -%213 = OpAccessChain %58 %167 %211 %212 %41 -%214 = OpLoad %5 %213 -%215 = OpLoad %6 %170 -%216 = OpLoad %6 %170 -%217 = OpLoad %6 %170 -%218 = OpAccessChain %58 %167 %215 %216 %217 -%219 = OpLoad %5 %218 -%220 = OpLoad %8 %169 -%221 = OpAccessChain %43 %169 %41 -%222 = OpLoad %3 %221 -%223 = OpLoad %6 %170 -%224 = OpAccessChain %43 %169 %223 -%225 = OpLoad %3 %224 -%226 = OpAccessChain %72 %169 %41 %41 -%227 = OpLoad %4 %226 -%228 = OpLoad %6 %170 -%229 = OpAccessChain %72 %169 %41 %228 -%230 = OpLoad %4 %229 -%231 = OpLoad %6 %170 -%232 = OpAccessChain %72 %169 %231 %41 -%233 = OpLoad %4 %232 -%234 = OpLoad %6 %170 -%235 = OpLoad %6 %170 -%236 = OpAccessChain %72 %169 %234 %235 -%237 = OpLoad %4 %236 -%238 = OpAccessChain %78 %169 %41 %41 %41 -%239 = OpLoad %5 %238 -%240 = OpLoad %6 %170 -%241 = OpAccessChain %78 %169 %41 %41 %240 -%242 = OpLoad %5 %241 -%243 = OpLoad %6 %170 -%244 = OpAccessChain %78 %169 %41 %243 %41 -%245 = OpLoad %5 %244 -%246 = OpLoad %6 %170 -%247 = OpLoad %6 %170 -%248 = OpAccessChain %78 %169 %41 %246 %247 -%249 = OpLoad %5 %248 -%250 = OpLoad %6 %170 -%251 = OpAccessChain %78 %169 %250 %41 %41 -%252 = OpLoad %5 %251 -%253 = OpLoad %6 %170 -%254 = OpLoad %6 %170 -%255 = OpAccessChain %78 %169 %253 %41 %254 -%256 = OpLoad %5 %255 -%257 = OpLoad %6 %170 -%258 = OpLoad %6 %170 -%259 = OpAccessChain %78 %169 %257 %258 %41 +%211 = OpLoad %6 %176 +%212 = OpAccessChain %59 %25 %41 %211 %41 %41 +%213 = OpLoad %5 %212 +%214 = OpLoad %6 %176 +%215 = OpLoad %6 %176 +%216 = OpAccessChain %59 %25 %41 %214 %41 %215 +%217 = OpLoad %5 %216 +%218 = OpLoad %6 %176 +%219 = OpLoad %6 %176 +%220 = OpAccessChain %59 %25 %41 %218 %219 %41 +%221 = OpLoad %5 %220 +%222 = OpLoad %6 %176 +%223 = OpLoad %6 %176 +%224 = OpLoad %6 %176 +%225 = OpAccessChain %59 %25 %41 %222 %223 %224 +%226 = OpLoad %5 %225 +%227 = OpAccessChain %174 %28 %41 +%228 = OpLoad %8 %227 +%229 = OpAccessChain %43 %28 %41 %41 +%230 = OpLoad %3 %229 +%231 = OpLoad %6 %176 +%232 = OpAccessChain %43 %28 %41 %231 +%233 = OpLoad %3 %232 +%234 = OpAccessChain %74 %28 %41 %41 %41 +%235 = OpLoad %4 %234 +%236 = OpLoad %6 %176 +%237 = OpAccessChain %74 %28 %41 %41 %236 +%238 = OpLoad %4 %237 +%239 = OpLoad %6 %176 +%240 = OpAccessChain %74 %28 %41 %239 %41 +%241 = OpLoad %4 %240 +%242 = OpLoad %6 %176 +%243 = OpLoad %6 %176 +%244 = OpAccessChain %74 %28 %41 %242 %243 +%245 = OpLoad %4 %244 +%246 = OpAccessChain %80 %28 %41 %41 %41 %41 +%247 = OpLoad %5 %246 +%248 = OpLoad %6 %176 +%249 = OpAccessChain %80 %28 %41 %41 %41 %248 +%250 = OpLoad %5 %249 +%251 = OpLoad %6 %176 +%252 = OpAccessChain %80 %28 %41 %41 %251 %41 +%253 = OpLoad %5 %252 +%254 = OpLoad %6 %176 +%255 = OpLoad %6 %176 +%256 = OpAccessChain %80 %28 %41 %41 %254 %255 +%257 = OpLoad %5 %256 +%258 = OpLoad %6 %176 +%259 = OpAccessChain %80 %28 %41 %258 %41 %41 %260 = OpLoad %5 %259 -%261 = OpLoad %6 %170 -%262 = OpLoad %6 %170 -%263 = OpLoad %6 %170 -%264 = OpAccessChain %78 %169 %261 %262 %263 -%265 = OpLoad %5 %264 -OpStore %167 %220 -%266 = OpAccessChain %40 %167 %41 -OpStore %266 %222 -%267 = OpLoad %6 %170 -%268 = OpAccessChain %40 %167 %267 -OpStore %268 %225 -%269 = OpAccessChain %52 %167 %41 %41 -OpStore %269 %227 -%270 = OpLoad %6 %170 -%271 = OpAccessChain %52 %167 %41 %270 -OpStore %271 %230 -%272 = OpLoad %6 %170 -%273 = OpAccessChain %52 %167 %272 %41 -OpStore %273 %233 -%274 = OpLoad %6 %170 -%275 = OpLoad %6 %170 -%276 = OpAccessChain %52 %167 %274 %275 -OpStore %276 %237 -%277 = OpAccessChain %58 %167 %41 %41 %41 -OpStore %277 %239 -%278 = OpLoad %6 %170 -%279 = OpAccessChain %58 %167 %41 %41 %278 -OpStore %279 %242 -%280 = OpLoad %6 %170 -%281 = OpAccessChain %58 %167 %41 %280 %41 -OpStore %281 %245 -%282 = OpLoad %6 %170 -%283 = OpLoad %6 %170 -%284 = OpAccessChain %58 %167 %41 %282 %283 -OpStore %284 %249 -%285 = OpLoad %6 %170 -%286 = OpAccessChain %58 %167 %285 %41 %41 -OpStore %286 %252 -%287 = OpLoad %6 %170 -%288 = OpLoad %6 %170 -%289 = OpAccessChain %58 %167 %287 %41 %288 -OpStore %289 %256 -%290 = OpLoad %6 %170 -%291 = OpLoad %6 %170 -%292 = OpAccessChain %58 %167 %290 %291 %41 -OpStore %292 %260 -%293 = OpLoad %6 %170 -%294 = OpLoad %6 %170 -%295 = OpLoad %6 %170 -%296 = OpAccessChain %58 %167 %293 %294 %295 -OpStore %296 %265 +%261 = OpLoad %6 %176 +%262 = OpLoad %6 %176 +%263 = OpAccessChain %80 %28 %41 %261 %41 %262 +%264 = OpLoad %5 %263 +%265 = OpLoad %6 %176 +%266 = OpLoad %6 %176 +%267 = OpAccessChain %80 %28 %41 %265 %266 %41 +%268 = OpLoad %5 %267 +%269 = OpLoad %6 %176 +%270 = OpLoad %6 %176 +%271 = OpLoad %6 %176 +%272 = OpAccessChain %80 %28 %41 %269 %270 %271 +%273 = OpLoad %5 %272 +%274 = OpAccessChain %172 %25 %41 +OpStore %274 %228 +%275 = OpAccessChain %40 %25 %41 %41 +OpStore %275 %230 +%276 = OpLoad %6 %176 +%277 = OpAccessChain %40 %25 %41 %276 +OpStore %277 %233 +%278 = OpAccessChain %53 %25 %41 %41 %41 +OpStore %278 %235 +%279 = OpLoad %6 %176 +%280 = OpAccessChain %53 %25 %41 %41 %279 +OpStore %280 %238 +%281 = OpLoad %6 %176 +%282 = OpAccessChain %53 %25 %41 %281 %41 +OpStore %282 %241 +%283 = OpLoad %6 %176 +%284 = OpLoad %6 %176 +%285 = OpAccessChain %53 %25 %41 %283 %284 +OpStore %285 %245 +%286 = OpAccessChain %59 %25 %41 %41 %41 %41 +OpStore %286 %247 +%287 = OpLoad %6 %176 +%288 = OpAccessChain %59 %25 %41 %41 %41 %287 +OpStore %288 %250 +%289 = OpLoad %6 %176 +%290 = OpAccessChain %59 %25 %41 %41 %289 %41 +OpStore %290 %253 +%291 = OpLoad %6 %176 +%292 = OpLoad %6 %176 +%293 = OpAccessChain %59 %25 %41 %41 %291 %292 +OpStore %293 %257 +%294 = OpLoad %6 %176 +%295 = OpAccessChain %59 %25 %41 %294 %41 %41 +OpStore %295 %260 +%296 = OpLoad %6 %176 +%297 = OpLoad %6 %176 +%298 = OpAccessChain %59 %25 %41 %296 %41 %297 +OpStore %298 %264 +%299 = OpLoad %6 %176 +%300 = OpLoad %6 %176 +%301 = OpAccessChain %59 %25 %41 %299 %300 %41 +OpStore %301 %268 +%302 = OpLoad %6 %176 +%303 = OpLoad %6 %176 +%304 = OpLoad %6 %176 +%305 = OpAccessChain %59 %25 %41 %302 %303 %304 +OpStore %305 %273 OpReturn OpFunctionEnd -%298 = OpFunction %2 None %39 -%297 = OpLabel -%303 = OpVariable %47 Function %45 -%300 = OpAccessChain %299 %31 %41 -%302 = OpAccessChain %301 %34 %41 -OpBranch %304 -%304 = OpLabel -%305 = OpLoad %6 %303 -%306 = OpISub %6 %305 %45 -OpStore %303 %306 -%307 = OpLoad %12 %300 -%309 = OpAccessChain %308 %300 %41 -%310 = OpLoad %11 %309 -%311 = OpAccessChain %40 %300 %41 %41 %41 -%312 = OpLoad %3 %311 -%313 = OpLoad %6 %303 -%314 = OpAccessChain %40 %300 %41 %313 %41 -%315 = OpLoad %3 %314 -%316 = OpAccessChain %52 %300 %41 %41 %41 %41 -%317 = OpLoad %4 %316 -%318 = OpLoad %6 %303 -%319 = OpAccessChain %52 %300 %41 %41 %41 %318 -%320 = OpLoad %4 %319 -%321 = OpLoad %6 %303 -%322 = OpAccessChain %52 %300 %41 %321 %41 %41 -%323 = OpLoad %4 %322 -%324 = OpLoad %6 %303 -%325 = OpLoad %6 %303 -%326 = OpAccessChain %52 %300 %41 %324 %41 %325 +%307 = OpFunction %2 None %39 +%306 = OpLabel +%312 = OpVariable %47 Function %45 +%309 = OpAccessChain %308 %31 %41 +%311 = OpAccessChain %310 %34 %41 +OpBranch %313 +%313 = OpLabel +%314 = OpLoad %6 %312 +%315 = OpISub %6 %314 %45 +OpStore %312 %315 +%316 = OpAccessChain %308 %31 %41 +%317 = OpLoad %12 %316 +%319 = OpAccessChain %318 %31 %41 %41 +%320 = OpLoad %11 %319 +%321 = OpAccessChain %40 %31 %41 %41 %41 %41 +%322 = OpLoad %3 %321 +%323 = OpLoad %6 %312 +%324 = OpAccessChain %40 %31 %41 %41 %323 %41 +%325 = OpLoad %3 %324 +%326 = OpAccessChain %53 %31 %41 %41 %41 %41 %41 %327 = OpLoad %4 %326 -%328 = OpAccessChain %58 %300 %41 %41 %41 %41 %41 -%329 = OpLoad %5 %328 -%330 = OpLoad %6 %303 -%331 = OpAccessChain %58 %300 %41 %41 %41 %41 %330 -%332 = OpLoad %5 %331 -%333 = OpLoad %6 %303 -%334 = OpAccessChain %58 %300 %41 %41 %41 %333 %41 -%335 = OpLoad %5 %334 -%336 = OpLoad %6 %303 -%337 = OpLoad %6 %303 -%338 = OpAccessChain %58 %300 %41 %41 %41 %336 %337 +%328 = OpLoad %6 %312 +%329 = OpAccessChain %53 %31 %41 %41 %41 %41 %328 +%330 = OpLoad %4 %329 +%331 = OpLoad %6 %312 +%332 = OpAccessChain %53 %31 %41 %41 %331 %41 %41 +%333 = OpLoad %4 %332 +%334 = OpLoad %6 %312 +%335 = OpLoad %6 %312 +%336 = OpAccessChain %53 %31 %41 %41 %334 %41 %335 +%337 = OpLoad %4 %336 +%338 = OpAccessChain %59 %31 %41 %41 %41 %41 %41 %41 %339 = OpLoad %5 %338 -%340 = OpLoad %6 %303 -%341 = OpAccessChain %58 %300 %41 %340 %41 %41 %41 +%340 = OpLoad %6 %312 +%341 = OpAccessChain %59 %31 %41 %41 %41 %41 %41 %340 %342 = OpLoad %5 %341 -%343 = OpLoad %6 %303 -%344 = OpLoad %6 %303 -%345 = OpAccessChain %58 %300 %41 %343 %41 %41 %344 -%346 = OpLoad %5 %345 -%347 = OpLoad %6 %303 -%348 = OpLoad %6 %303 -%349 = OpAccessChain %58 %300 %41 %347 %41 %348 %41 -%350 = OpLoad %5 %349 -%351 = OpLoad %6 %303 -%352 = OpLoad %6 %303 -%353 = OpLoad %6 %303 -%354 = OpAccessChain %58 %300 %41 %351 %41 %352 %353 -%355 = OpLoad %5 %354 -%356 = OpLoad %12 %302 -%358 = OpAccessChain %357 %302 %41 -%359 = OpLoad %11 %358 -%360 = OpAccessChain %43 %302 %41 %41 %41 -%361 = OpLoad %3 %360 -%362 = OpLoad %6 %303 -%363 = OpAccessChain %43 %302 %41 %362 %41 -%364 = OpLoad %3 %363 -%365 = OpAccessChain %72 %302 %41 %41 %41 %41 -%366 = OpLoad %4 %365 -%367 = OpLoad %6 %303 -%368 = OpAccessChain %72 %302 %41 %41 %41 %367 -%369 = OpLoad %4 %368 -%370 = OpLoad %6 %303 -%371 = OpAccessChain %72 %302 %41 %370 %41 %41 -%372 = OpLoad %4 %371 -%373 = OpLoad %6 %303 -%374 = OpLoad %6 %303 -%375 = OpAccessChain %72 %302 %41 %373 %41 %374 -%376 = OpLoad %4 %375 -%377 = OpAccessChain %78 %302 %41 %41 %41 %41 %41 -%378 = OpLoad %5 %377 -%379 = OpLoad %6 %303 -%380 = OpAccessChain %78 %302 %41 %41 %41 %41 %379 -%381 = OpLoad %5 %380 -%382 = OpLoad %6 %303 -%383 = OpAccessChain %78 %302 %41 %41 %41 %382 %41 -%384 = OpLoad %5 %383 -%385 = OpLoad %6 %303 -%386 = OpLoad %6 %303 -%387 = OpAccessChain %78 %302 %41 %41 %41 %385 %386 -%388 = OpLoad %5 %387 -%389 = OpLoad %6 %303 -%390 = OpAccessChain %78 %302 %41 %389 %41 %41 %41 -%391 = OpLoad %5 %390 -%392 = OpLoad %6 %303 -%393 = OpLoad %6 %303 -%394 = OpAccessChain %78 %302 %41 %392 %41 %41 %393 +%343 = OpLoad %6 %312 +%344 = OpAccessChain %59 %31 %41 %41 %41 %41 %343 %41 +%345 = OpLoad %5 %344 +%346 = OpLoad %6 %312 +%347 = OpLoad %6 %312 +%348 = OpAccessChain %59 %31 %41 %41 %41 %41 %346 %347 +%349 = OpLoad %5 %348 +%350 = OpLoad %6 %312 +%351 = OpAccessChain %59 %31 %41 %41 %350 %41 %41 %41 +%352 = OpLoad %5 %351 +%353 = OpLoad %6 %312 +%354 = OpLoad %6 %312 +%355 = OpAccessChain %59 %31 %41 %41 %353 %41 %41 %354 +%356 = OpLoad %5 %355 +%357 = OpLoad %6 %312 +%358 = OpLoad %6 %312 +%359 = OpAccessChain %59 %31 %41 %41 %357 %41 %358 %41 +%360 = OpLoad %5 %359 +%361 = OpLoad %6 %312 +%362 = OpLoad %6 %312 +%363 = OpLoad %6 %312 +%364 = OpAccessChain %59 %31 %41 %41 %361 %41 %362 %363 +%365 = OpLoad %5 %364 +%366 = OpAccessChain %310 %34 %41 +%367 = OpLoad %12 %366 +%369 = OpAccessChain %368 %34 %41 %41 +%370 = OpLoad %11 %369 +%371 = OpAccessChain %43 %34 %41 %41 %41 %41 +%372 = OpLoad %3 %371 +%373 = OpLoad %6 %312 +%374 = OpAccessChain %43 %34 %41 %41 %373 %41 +%375 = OpLoad %3 %374 +%376 = OpAccessChain %74 %34 %41 %41 %41 %41 %41 +%377 = OpLoad %4 %376 +%378 = OpLoad %6 %312 +%379 = OpAccessChain %74 %34 %41 %41 %41 %41 %378 +%380 = OpLoad %4 %379 +%381 = OpLoad %6 %312 +%382 = OpAccessChain %74 %34 %41 %41 %381 %41 %41 +%383 = OpLoad %4 %382 +%384 = OpLoad %6 %312 +%385 = OpLoad %6 %312 +%386 = OpAccessChain %74 %34 %41 %41 %384 %41 %385 +%387 = OpLoad %4 %386 +%388 = OpAccessChain %80 %34 %41 %41 %41 %41 %41 %41 +%389 = OpLoad %5 %388 +%390 = OpLoad %6 %312 +%391 = OpAccessChain %80 %34 %41 %41 %41 %41 %41 %390 +%392 = OpLoad %5 %391 +%393 = OpLoad %6 %312 +%394 = OpAccessChain %80 %34 %41 %41 %41 %41 %393 %41 %395 = OpLoad %5 %394 -%396 = OpLoad %6 %303 -%397 = OpLoad %6 %303 -%398 = OpAccessChain %78 %302 %41 %396 %41 %397 %41 +%396 = OpLoad %6 %312 +%397 = OpLoad %6 %312 +%398 = OpAccessChain %80 %34 %41 %41 %41 %41 %396 %397 %399 = OpLoad %5 %398 -%400 = OpLoad %6 %303 -%401 = OpLoad %6 %303 -%402 = OpLoad %6 %303 -%403 = OpAccessChain %78 %302 %41 %400 %41 %401 %402 -%404 = OpLoad %5 %403 -OpStore %300 %356 -%405 = OpAccessChain %308 %300 %41 -OpStore %405 %359 -%406 = OpAccessChain %40 %300 %41 %41 %41 -OpStore %406 %361 -%407 = OpLoad %6 %303 -%408 = OpAccessChain %40 %300 %41 %407 %41 -OpStore %408 %364 -%409 = OpAccessChain %52 %300 %41 %41 %41 %41 -OpStore %409 %366 -%410 = OpLoad %6 %303 -%411 = OpAccessChain %52 %300 %41 %41 %41 %410 -OpStore %411 %369 -%412 = OpLoad %6 %303 -%413 = OpAccessChain %52 %300 %41 %412 %41 %41 -OpStore %413 %372 -%414 = OpLoad %6 %303 -%415 = OpLoad %6 %303 -%416 = OpAccessChain %52 %300 %41 %414 %41 %415 -OpStore %416 %376 -%417 = OpAccessChain %58 %300 %41 %41 %41 %41 %41 -OpStore %417 %378 -%418 = OpLoad %6 %303 -%419 = OpAccessChain %58 %300 %41 %41 %41 %41 %418 -OpStore %419 %381 -%420 = OpLoad %6 %303 -%421 = OpAccessChain %58 %300 %41 %41 %41 %420 %41 -OpStore %421 %384 -%422 = OpLoad %6 %303 -%423 = OpLoad %6 %303 -%424 = OpAccessChain %58 %300 %41 %41 %41 %422 %423 -OpStore %424 %388 -%425 = OpLoad %6 %303 -%426 = OpAccessChain %58 %300 %41 %425 %41 %41 %41 -OpStore %426 %391 -%427 = OpLoad %6 %303 -%428 = OpLoad %6 %303 -%429 = OpAccessChain %58 %300 %41 %427 %41 %41 %428 -OpStore %429 %395 -%430 = OpLoad %6 %303 -%431 = OpLoad %6 %303 -%432 = OpAccessChain %58 %300 %41 %430 %41 %431 %41 -OpStore %432 %399 -%433 = OpLoad %6 %303 -%434 = OpLoad %6 %303 -%435 = OpLoad %6 %303 -%436 = OpAccessChain %58 %300 %41 %433 %41 %434 %435 -OpStore %436 %404 +%400 = OpLoad %6 %312 +%401 = OpAccessChain %80 %34 %41 %41 %400 %41 %41 %41 +%402 = OpLoad %5 %401 +%403 = OpLoad %6 %312 +%404 = OpLoad %6 %312 +%405 = OpAccessChain %80 %34 %41 %41 %403 %41 %41 %404 +%406 = OpLoad %5 %405 +%407 = OpLoad %6 %312 +%408 = OpLoad %6 %312 +%409 = OpAccessChain %80 %34 %41 %41 %407 %41 %408 %41 +%410 = OpLoad %5 %409 +%411 = OpLoad %6 %312 +%412 = OpLoad %6 %312 +%413 = OpLoad %6 %312 +%414 = OpAccessChain %80 %34 %41 %41 %411 %41 %412 %413 +%415 = OpLoad %5 %414 +%416 = OpAccessChain %308 %31 %41 +OpStore %416 %367 +%417 = OpAccessChain %318 %31 %41 %41 +OpStore %417 %370 +%418 = OpAccessChain %40 %31 %41 %41 %41 %41 +OpStore %418 %372 +%419 = OpLoad %6 %312 +%420 = OpAccessChain %40 %31 %41 %41 %419 %41 +OpStore %420 %375 +%421 = OpAccessChain %53 %31 %41 %41 %41 %41 %41 +OpStore %421 %377 +%422 = OpLoad %6 %312 +%423 = OpAccessChain %53 %31 %41 %41 %41 %41 %422 +OpStore %423 %380 +%424 = OpLoad %6 %312 +%425 = OpAccessChain %53 %31 %41 %41 %424 %41 %41 +OpStore %425 %383 +%426 = OpLoad %6 %312 +%427 = OpLoad %6 %312 +%428 = OpAccessChain %53 %31 %41 %41 %426 %41 %427 +OpStore %428 %387 +%429 = OpAccessChain %59 %31 %41 %41 %41 %41 %41 %41 +OpStore %429 %389 +%430 = OpLoad %6 %312 +%431 = OpAccessChain %59 %31 %41 %41 %41 %41 %41 %430 +OpStore %431 %392 +%432 = OpLoad %6 %312 +%433 = OpAccessChain %59 %31 %41 %41 %41 %41 %432 %41 +OpStore %433 %395 +%434 = OpLoad %6 %312 +%435 = OpLoad %6 %312 +%436 = OpAccessChain %59 %31 %41 %41 %41 %41 %434 %435 +OpStore %436 %399 +%437 = OpLoad %6 %312 +%438 = OpAccessChain %59 %31 %41 %41 %437 %41 %41 %41 +OpStore %438 %402 +%439 = OpLoad %6 %312 +%440 = OpLoad %6 %312 +%441 = OpAccessChain %59 %31 %41 %41 %439 %41 %41 %440 +OpStore %441 %406 +%442 = OpLoad %6 %312 +%443 = OpLoad %6 %312 +%444 = OpAccessChain %59 %31 %41 %41 %442 %41 %443 %41 +OpStore %444 %410 +%445 = OpLoad %6 %312 +%446 = OpLoad %6 %312 +%447 = OpLoad %6 %312 +%448 = OpAccessChain %59 %31 %41 %41 %445 %41 %446 %447 +OpStore %448 %415 OpReturn OpFunctionEnd -%438 = OpFunction %2 None %39 -%437 = OpLabel -%439 = OpAccessChain %40 %13 %41 -%440 = OpAccessChain %43 %16 %41 -%441 = OpAccessChain %104 %19 %41 -%442 = OpAccessChain %106 %22 %41 -%443 = OpAccessChain %166 %25 %41 -%444 = OpAccessChain %168 %28 %41 -%445 = OpAccessChain %299 %31 %41 -%446 = OpAccessChain %301 %34 %41 -OpBranch %447 -%447 = OpLabel -%448 = OpFunctionCall %2 %38 -%449 = OpFunctionCall %2 %103 -%450 = OpFunctionCall %2 %165 -%451 = OpFunctionCall %2 %298 +%450 = OpFunction %2 None %39 +%449 = OpLabel +%451 = OpAccessChain %40 %13 %41 +%452 = OpAccessChain %43 %16 %41 +%453 = OpAccessChain %107 %19 %41 +%454 = OpAccessChain %109 %22 %41 +%455 = OpAccessChain %172 %25 %41 +%456 = OpAccessChain %174 %28 %41 +%457 = OpAccessChain %308 %31 %41 +%458 = OpAccessChain %310 %34 %41 +OpBranch %459 +%459 = OpLabel +%460 = OpFunctionCall %2 %38 +%461 = OpFunctionCall %2 %106 +%462 = OpFunctionCall %2 %171 +%463 = OpFunctionCall %2 %307 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat_cx3.spvasm.glsl b/naga/tests/out/spv/wgsl-mat_cx3.spvasm.glsl index b6a2e0ec0..f1cd325ef 100644 --- a/naga/tests/out/spv/wgsl-mat_cx3.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-mat_cx3.spvasm.glsl @@ -64,68 +64,68 @@ void _38() _13._m0[_46][_46] = _16._m0[_46][_46]; } -void _103() +void _106() { - int _108 = 1; - _108--; + int _111 = 1; + _111--; _19._m0 = _22._m0; _19._m0._m0 = _22._m0._m0; _19._m0._m0[0u] = _22._m0._m0[0u]; - _19._m0._m0[_108] = _22._m0._m0[_108]; + _19._m0._m0[_111] = _22._m0._m0[_111]; _19._m0._m0[0u].x = _22._m0._m0[0u].x; - _19._m0._m0[0u][_108] = _22._m0._m0[0u][_108]; - _19._m0._m0[_108].x = _22._m0._m0[_108].x; - _19._m0._m0[_108][_108] = _22._m0._m0[_108][_108]; + _19._m0._m0[0u][_111] = _22._m0._m0[0u][_111]; + _19._m0._m0[_111].x = _22._m0._m0[_111].x; + _19._m0._m0[_111][_111] = _22._m0._m0[_111][_111]; } -void _165() +void _171() { - int _170 = 1; - _170--; + int _176 = 1; + _176--; _25._m0 = _28._m0; _25._m0[0u] = _28._m0[0u]; - _25._m0[_170] = _28._m0[_170]; + _25._m0[_176] = _28._m0[_176]; _25._m0[0u][0u] = _28._m0[0u][0u]; - _25._m0[0u][_170] = _28._m0[0u][_170]; - _25._m0[_170][0u] = _28._m0[_170][0u]; - _25._m0[_170][_170] = _28._m0[_170][_170]; + _25._m0[0u][_176] = _28._m0[0u][_176]; + _25._m0[_176][0u] = _28._m0[_176][0u]; + _25._m0[_176][_176] = _28._m0[_176][_176]; _25._m0[0u][0u].x = _28._m0[0u][0u].x; - _25._m0[0u][0u][_170] = _28._m0[0u][0u][_170]; - _25._m0[0u][_170].x = _28._m0[0u][_170].x; - _25._m0[0u][_170][_170] = _28._m0[0u][_170][_170]; - _25._m0[_170][0u].x = _28._m0[_170][0u].x; - _25._m0[_170][0u][_170] = _28._m0[_170][0u][_170]; - _25._m0[_170][_170].x = _28._m0[_170][_170].x; - _25._m0[_170][_170][_170] = _28._m0[_170][_170][_170]; + _25._m0[0u][0u][_176] = _28._m0[0u][0u][_176]; + _25._m0[0u][_176].x = _28._m0[0u][_176].x; + _25._m0[0u][_176][_176] = _28._m0[0u][_176][_176]; + _25._m0[_176][0u].x = _28._m0[_176][0u].x; + _25._m0[_176][0u][_176] = _28._m0[_176][0u][_176]; + _25._m0[_176][_176].x = _28._m0[_176][_176].x; + _25._m0[_176][_176][_176] = _28._m0[_176][_176][_176]; } -void _298() +void _307() { - int _303 = 1; - _303--; + int _312 = 1; + _312--; _31._m0 = _34._m0; _31._m0._m0 = _34._m0._m0; _31._m0._m0[0u]._m0 = _34._m0._m0[0u]._m0; - _31._m0._m0[_303]._m0 = _34._m0._m0[_303]._m0; + _31._m0._m0[_312]._m0 = _34._m0._m0[_312]._m0; _31._m0._m0[0u]._m0[0u] = _34._m0._m0[0u]._m0[0u]; - _31._m0._m0[0u]._m0[_303] = _34._m0._m0[0u]._m0[_303]; - _31._m0._m0[_303]._m0[0u] = _34._m0._m0[_303]._m0[0u]; - _31._m0._m0[_303]._m0[_303] = _34._m0._m0[_303]._m0[_303]; + _31._m0._m0[0u]._m0[_312] = _34._m0._m0[0u]._m0[_312]; + _31._m0._m0[_312]._m0[0u] = _34._m0._m0[_312]._m0[0u]; + _31._m0._m0[_312]._m0[_312] = _34._m0._m0[_312]._m0[_312]; _31._m0._m0[0u]._m0[0u].x = _34._m0._m0[0u]._m0[0u].x; - _31._m0._m0[0u]._m0[0u][_303] = _34._m0._m0[0u]._m0[0u][_303]; - _31._m0._m0[0u]._m0[_303].x = _34._m0._m0[0u]._m0[_303].x; - _31._m0._m0[0u]._m0[_303][_303] = _34._m0._m0[0u]._m0[_303][_303]; - _31._m0._m0[_303]._m0[0u].x = _34._m0._m0[_303]._m0[0u].x; - _31._m0._m0[_303]._m0[0u][_303] = _34._m0._m0[_303]._m0[0u][_303]; - _31._m0._m0[_303]._m0[_303].x = _34._m0._m0[_303]._m0[_303].x; - _31._m0._m0[_303]._m0[_303][_303] = _34._m0._m0[_303]._m0[_303][_303]; + _31._m0._m0[0u]._m0[0u][_312] = _34._m0._m0[0u]._m0[0u][_312]; + _31._m0._m0[0u]._m0[_312].x = _34._m0._m0[0u]._m0[_312].x; + _31._m0._m0[0u]._m0[_312][_312] = _34._m0._m0[0u]._m0[_312][_312]; + _31._m0._m0[_312]._m0[0u].x = _34._m0._m0[_312]._m0[0u].x; + _31._m0._m0[_312]._m0[0u][_312] = _34._m0._m0[_312]._m0[0u][_312]; + _31._m0._m0[_312]._m0[_312].x = _34._m0._m0[_312]._m0[_312].x; + _31._m0._m0[_312]._m0[_312][_312] = _34._m0._m0[_312]._m0[_312][_312]; } void main() { _38(); - _103(); - _165(); - _298(); + _106(); + _171(); + _307(); } diff --git a/naga/tests/out/spv/wgsl-padding.spvasm b/naga/tests/out/spv/wgsl-padding.spvasm index 615965cc3..a42c0fe29 100644 --- a/naga/tests/out/spv/wgsl-padding.spvasm +++ b/naga/tests/out/spv/wgsl-padding.spvasm @@ -120,15 +120,15 @@ OpBranch %38 %38 = OpLabel OpLine %3 32 12 OpLine %3 32 12 -%41 = OpAccessChain %39 %31 %40 +%41 = OpAccessChain %39 %15 %30 %40 %42 = OpLoad %4 %41 %43 = OpVectorTimesScalar %14 %37 %42 OpLine %3 32 12 -%44 = OpAccessChain %39 %33 %40 +%44 = OpAccessChain %39 %18 %30 %40 %45 = OpLoad %4 %44 %46 = OpVectorTimesScalar %14 %43 %45 OpLine %3 32 12 -%47 = OpAccessChain %39 %35 %40 +%47 = OpAccessChain %39 %21 %30 %40 %48 = OpLoad %4 %47 %49 = OpVectorTimesScalar %14 %46 %48 OpStore %25 %49 diff --git a/naga/tests/out/spv/wgsl-phony_assignment.spvasm b/naga/tests/out/spv/wgsl-phony_assignment.spvasm index 842618390..3e8349610 100644 --- a/naga/tests/out/spv/wgsl-phony_assignment.spvasm +++ b/naga/tests/out/spv/wgsl-phony_assignment.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 30 +; Bound: 33 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 @@ -39,10 +39,13 @@ OpFunctionEnd %23 = OpAccessChain %21 %7 %22 OpBranch %24 %24 = OpLabel -%25 = OpLoad %3 %23 -%26 = OpLoad %3 %23 -%27 = OpFunctionCall %4 %11 -%28 = OpFunctionCall %4 %11 -%29 = OpLoad %3 %23 +%25 = OpAccessChain %21 %7 %22 +%26 = OpLoad %3 %25 +%27 = OpAccessChain %21 %7 %22 +%28 = OpLoad %3 %27 +%29 = OpFunctionCall %4 %11 +%30 = OpFunctionCall %4 %11 +%31 = OpAccessChain %21 %7 %22 +%32 = OpLoad %3 %31 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-policy-mix.spvasm b/naga/tests/out/spv/wgsl-policy-mix.spvasm index 23f331334..c1e7971bf 100644 --- a/naga/tests/out/spv/wgsl-policy-mix.spvasm +++ b/naga/tests/out/spv/wgsl-policy-mix.spvasm @@ -164,10 +164,10 @@ OpBranch %55 OpLine %3 24 25 OpLine %3 24 5 OpLine %3 27 11 -%58 = OpAccessChain %57 %43 %42 %37 +%58 = OpAccessChain %57 %22 %42 %42 %37 %59 = OpLoad %5 %58 OpLine %3 27 11 -%62 = OpAccessChain %61 %45 %42 %37 +%62 = OpAccessChain %61 %25 %42 %42 %37 %63 = OpLoad %5 %62 %64 = OpFAdd %5 %59 %63 OpLine %3 27 11 diff --git a/naga/tests/out/spv/wgsl-ray-query-no-init-tracking.spvasm b/naga/tests/out/spv/wgsl-ray-query-no-init-tracking.spvasm index 8fe3b2044..e3df0870e 100644 --- a/naga/tests/out/spv/wgsl-ray-query-no-init-tracking.spvasm +++ b/naga/tests/out/spv/wgsl-ray-query-no-init-tracking.spvasm @@ -361,12 +361,12 @@ OpBranch %253 %256 = OpCompositeExtract %6 %254 0 %257 = OpIEqual %8 %256 %35 %258 = OpSelect %6 %257 %90 %35 -%259 = OpAccessChain %255 %250 %35 +%259 = OpAccessChain %255 %17 %35 %35 OpStore %259 %258 %261 = OpCompositeExtract %3 %254 1 %262 = OpVectorTimesScalar %4 %252 %261 %263 = OpFunctionCall %4 %229 %262 %254 -%264 = OpAccessChain %260 %250 %90 +%264 = OpAccessChain %260 %17 %35 %90 OpStore %264 %263 OpReturn OpFunctionEnd diff --git a/naga/tests/out/spv/wgsl-ray-query.spvasm b/naga/tests/out/spv/wgsl-ray-query.spvasm index 8fe3b2044..e3df0870e 100644 --- a/naga/tests/out/spv/wgsl-ray-query.spvasm +++ b/naga/tests/out/spv/wgsl-ray-query.spvasm @@ -361,12 +361,12 @@ OpBranch %253 %256 = OpCompositeExtract %6 %254 0 %257 = OpIEqual %8 %256 %35 %258 = OpSelect %6 %257 %90 %35 -%259 = OpAccessChain %255 %250 %35 +%259 = OpAccessChain %255 %17 %35 %35 OpStore %259 %258 %261 = OpCompositeExtract %3 %254 1 %262 = OpVectorTimesScalar %4 %252 %261 %263 = OpFunctionCall %4 %229 %262 %254 -%264 = OpAccessChain %260 %250 %90 +%264 = OpAccessChain %260 %17 %35 %90 OpStore %264 %263 OpReturn OpFunctionEnd diff --git a/naga/tests/out/spv/wgsl-shadow.spvasm b/naga/tests/out/spv/wgsl-shadow.spvasm index a5b29c4f3..dbc62c296 100644 --- a/naga/tests/out/spv/wgsl-shadow.spvasm +++ b/naga/tests/out/spv/wgsl-shadow.spvasm @@ -369,10 +369,10 @@ OpFunctionEnd OpBranch %95 %95 = OpLabel OpLine %3 37 13 -%97 = OpAccessChain %96 %91 %88 +%97 = OpAccessChain %96 %28 %88 %88 %98 = OpLoad %5 %97 OpLine %3 38 21 -%99 = OpAccessChain %96 %91 %88 +%99 = OpAccessChain %96 %28 %88 %88 %100 = OpLoad %5 %99 %101 = OpConvertSToF %6 %77 %102 = OpMatrixTimesVector %6 %100 %101 @@ -399,7 +399,7 @@ OpLine %3 41 5 OpStore %119 %102 OpLine %3 42 5 OpLine %3 42 25 -%120 = OpAccessChain %96 %89 %88 +%120 = OpAccessChain %96 %25 %88 %88 %121 = OpLoad %5 %120 %122 = OpMatrixTimesVector %6 %121 %102 OpLine %3 42 5 @@ -461,7 +461,7 @@ OpBranch %158 OpLine %3 1 1 %177 = OpLoad %7 %151 OpLine %3 88 29 -%180 = OpAccessChain %179 %144 %115 %88 +%180 = OpAccessChain %179 %25 %88 %115 %88 %181 = OpLoad %7 %180 OpLine %3 88 21 %182 = OpExtInst %7 %1 UMin %181 %19 @@ -476,7 +476,7 @@ OpBranch %186 %186 = OpLabel OpLine %3 89 21 %188 = OpLoad %7 %151 -%190 = OpAccessChain %189 %147 %188 +%190 = OpAccessChain %189 %31 %88 %188 %191 = OpLoad %16 %190 OpLine %3 91 38 %192 = OpLoad %7 %151 @@ -521,7 +521,7 @@ OpLine %3 1 1 OpLine %3 99 12 %214 = OpCompositeConstruct %6 %213 %49 OpLine %3 99 12 -%216 = OpAccessChain %215 %145 %115 +%216 = OpAccessChain %215 %28 %88 %115 %217 = OpLoad %6 %216 %218 = OpFMul %6 %214 %217 OpStore %142 %218 @@ -569,7 +569,7 @@ OpBranch %242 OpLine %3 1 1 %255 = OpLoad %7 %236 OpLine %3 107 29 -%256 = OpAccessChain %179 %229 %115 %88 +%256 = OpAccessChain %179 %25 %88 %115 %88 %257 = OpLoad %7 %256 OpLine %3 107 21 %258 = OpExtInst %7 %1 UMin %257 %19 @@ -584,7 +584,7 @@ OpBranch %262 %262 = OpLabel OpLine %3 110 21 %264 = OpLoad %7 %236 -%266 = OpAccessChain %265 %232 %264 +%266 = OpAccessChain %265 %34 %88 %264 %267 = OpLoad %16 %266 OpLine %3 111 38 %268 = OpLoad %7 %236 @@ -629,7 +629,7 @@ OpLine %3 1 1 OpLine %3 116 12 %290 = OpCompositeConstruct %6 %289 %49 OpLine %3 116 12 -%291 = OpAccessChain %215 %230 %115 +%291 = OpAccessChain %215 %28 %88 %115 %292 = OpLoad %6 %291 %293 = OpFMul %6 %290 %292 OpStore %227 %293 diff --git a/naga/tests/out/spv/wgsl-skybox.spvasm b/naga/tests/out/spv/wgsl-skybox.spvasm index f3e4be2cc..225ef1166 100644 --- a/naga/tests/out/spv/wgsl-skybox.spvasm +++ b/naga/tests/out/spv/wgsl-skybox.spvasm @@ -117,18 +117,18 @@ OpStore %58 %64 %71 = OpFMul %4 %70 %52 %72 = OpFSub %4 %71 %53 %73 = OpCompositeConstruct %3 %68 %72 %54 %53 -%77 = OpAccessChain %75 %50 %76 %49 +%77 = OpAccessChain %75 %14 %49 %76 %49 %78 = OpLoad %3 %77 %79 = OpVectorShuffle %5 %78 %78 0 1 2 -%80 = OpAccessChain %75 %50 %76 %76 +%80 = OpAccessChain %75 %14 %49 %76 %76 %81 = OpLoad %3 %80 %82 = OpVectorShuffle %5 %81 %81 0 1 2 -%84 = OpAccessChain %75 %50 %76 %83 +%84 = OpAccessChain %75 %14 %49 %76 %83 %85 = OpLoad %3 %84 %86 = OpVectorShuffle %5 %85 %85 0 1 2 %87 = OpCompositeConstruct %11 %79 %82 %86 %88 = OpTranspose %11 %87 -%89 = OpAccessChain %74 %50 %49 +%89 = OpAccessChain %74 %14 %49 %49 %90 = OpLoad %7 %89 %91 = OpMatrixTimesVector %3 %90 %73 %92 = OpVectorShuffle %5 %91 %91 0 1 2 diff --git a/naga/tests/out/spv/wgsl-struct-layout.spvasm b/naga/tests/out/spv/wgsl-struct-layout.spvasm index 6b34fd563..a244992fe 100644 --- a/naga/tests/out/spv/wgsl-struct-layout.spvasm +++ b/naga/tests/out/spv/wgsl-struct-layout.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 92 +; Bound: 96 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" @@ -9,13 +9,13 @@ OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %30 "no_padding_frag" %22 %25 %28 OpEntryPoint Vertex %42 "no_padding_vert" %37 %39 %41 OpEntryPoint GLCompute %45 "no_padding_comp" -OpEntryPoint Fragment %67 "needs_padding_frag" %60 %62 %64 %66 -OpEntryPoint Vertex %78 "needs_padding_vert" %71 %73 %75 %77 -OpEntryPoint GLCompute %81 "needs_padding_comp" +OpEntryPoint Fragment %69 "needs_padding_frag" %62 %64 %66 %68 +OpEntryPoint Vertex %80 "needs_padding_vert" %73 %75 %77 %79 +OpEntryPoint GLCompute %83 "needs_padding_comp" OpExecutionMode %30 OriginUpperLeft OpExecutionMode %45 LocalSize 16 1 1 -OpExecutionMode %67 OriginUpperLeft -OpExecutionMode %81 LocalSize 16 1 1 +OpExecutionMode %69 OriginUpperLeft +OpExecutionMode %83 LocalSize 16 1 1 OpMemberDecorate %5 0 Offset 0 OpMemberDecorate %5 1 Offset 12 OpMemberDecorate %7 0 Offset 0 @@ -43,14 +43,14 @@ OpDecorate %28 Location 0 OpDecorate %37 Location 0 OpDecorate %39 Location 1 OpDecorate %41 BuiltIn Position -OpDecorate %60 Location 0 -OpDecorate %62 Location 1 -OpDecorate %64 Location 2 -OpDecorate %66 Location 0 -OpDecorate %71 Location 0 -OpDecorate %73 Location 1 -OpDecorate %75 Location 2 -OpDecorate %77 BuiltIn Position +OpDecorate %62 Location 0 +OpDecorate %64 Location 1 +OpDecorate %66 Location 2 +OpDecorate %68 Location 0 +OpDecorate %73 Location 0 +OpDecorate %75 Location 1 +OpDecorate %77 Location 2 +OpDecorate %79 BuiltIn Position %2 = OpTypeVoid %4 = OpTypeFloat 32 %3 = OpTypeVector %4 3 @@ -87,18 +87,18 @@ OpDecorate %77 BuiltIn Position %50 = OpTypePointer StorageBuffer %5 %53 = OpTypePointer Function %5 %54 = OpConstantNull %5 -%60 = OpVariable %26 Input -%62 = OpVariable %23 Input -%64 = OpVariable %26 Input -%66 = OpVariable %29 Output -%71 = OpVariable %26 Input -%73 = OpVariable %23 Input -%75 = OpVariable %26 Input -%77 = OpVariable %29 Output -%82 = OpTypePointer Uniform %7 -%84 = OpTypePointer StorageBuffer %7 -%87 = OpTypePointer Function %7 -%88 = OpConstantNull %7 +%62 = OpVariable %26 Input +%64 = OpVariable %23 Input +%66 = OpVariable %26 Input +%68 = OpVariable %29 Output +%73 = OpVariable %26 Input +%75 = OpVariable %23 Input +%77 = OpVariable %26 Input +%79 = OpVariable %29 Output +%84 = OpTypePointer Uniform %7 +%86 = OpTypePointer StorageBuffer %7 +%89 = OpTypePointer Function %7 +%90 = OpConstantNull %7 %30 = OpFunction %2 None %31 %20 = OpLabel %24 = OpLoad %3 %22 @@ -126,44 +126,48 @@ OpFunctionEnd %51 = OpAccessChain %50 %11 %47 OpBranch %55 %55 = OpLabel -%56 = OpLoad %5 %49 -OpStore %52 %56 -%57 = OpLoad %5 %51 +%56 = OpAccessChain %46 %8 %47 +%57 = OpLoad %5 %56 OpStore %52 %57 +%58 = OpAccessChain %50 %11 %47 +%59 = OpLoad %5 %58 +OpStore %52 %59 OpReturn OpFunctionEnd -%67 = OpFunction %2 None %31 -%58 = OpLabel -%61 = OpLoad %4 %60 -%63 = OpLoad %3 %62 -%65 = OpLoad %4 %64 -%59 = OpCompositeConstruct %7 %61 %63 %65 -OpBranch %68 -%68 = OpLabel -OpStore %66 %33 +%69 = OpFunction %2 None %31 +%60 = OpLabel +%63 = OpLoad %4 %62 +%65 = OpLoad %3 %64 +%67 = OpLoad %4 %66 +%61 = OpCompositeConstruct %7 %63 %65 %67 +OpBranch %70 +%70 = OpLabel +OpStore %68 %33 OpReturn OpFunctionEnd -%78 = OpFunction %2 None %31 -%69 = OpLabel -%72 = OpLoad %4 %71 -%74 = OpLoad %3 %73 -%76 = OpLoad %4 %75 -%70 = OpCompositeConstruct %7 %72 %74 %76 -OpBranch %79 -%79 = OpLabel -OpStore %77 %33 +%80 = OpFunction %2 None %31 +%71 = OpLabel +%74 = OpLoad %4 %73 +%76 = OpLoad %3 %75 +%78 = OpLoad %4 %77 +%72 = OpCompositeConstruct %7 %74 %76 %78 +OpBranch %81 +%81 = OpLabel +OpStore %79 %33 OpReturn OpFunctionEnd -%81 = OpFunction %2 None %31 -%80 = OpLabel -%86 = OpVariable %87 Function %88 -%83 = OpAccessChain %82 %14 %47 -%85 = OpAccessChain %84 %17 %47 -OpBranch %89 -%89 = OpLabel -%90 = OpLoad %7 %83 -OpStore %86 %90 -%91 = OpLoad %7 %85 -OpStore %86 %91 +%83 = OpFunction %2 None %31 +%82 = OpLabel +%88 = OpVariable %89 Function %90 +%85 = OpAccessChain %84 %14 %47 +%87 = OpAccessChain %86 %17 %47 +OpBranch %91 +%91 = OpLabel +%92 = OpAccessChain %84 %14 %47 +%93 = OpLoad %7 %92 +OpStore %88 %93 +%94 = OpAccessChain %86 %17 %47 +%95 = OpLoad %7 %94 +OpStore %88 %95 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-struct-layout.spvasm.glsl b/naga/tests/out/spv/wgsl-struct-layout.spvasm.glsl index cbba0a89f..e9710fc9b 100644 --- a/naga/tests/out/spv/wgsl-struct-layout.spvasm.glsl +++ b/naga/tests/out/spv/wgsl-struct-layout.spvasm.glsl @@ -178,14 +178,14 @@ layout(set = 0, binding = 3, std430) buffer _18_17 _7 _m0; } _17; -layout(location = 0) in float _60; -layout(location = 1) in vec3 _62; -layout(location = 2) in float _64; -layout(location = 0) out vec4 _66; +layout(location = 0) in float _62; +layout(location = 1) in vec3 _64; +layout(location = 2) in float _66; +layout(location = 0) out vec4 _68; void main() { - _66 = vec4(0.0); + _68 = vec4(0.0); } @@ -227,9 +227,9 @@ layout(set = 0, binding = 3, std430) buffer _18_17 _7 _m0; } _17; -layout(location = 0) in float _71; -layout(location = 1) in vec3 _73; -layout(location = 2) in float _75; +layout(location = 0) in float _73; +layout(location = 1) in vec3 _75; +layout(location = 2) in float _77; void main() { @@ -278,8 +278,8 @@ layout(set = 0, binding = 3, std430) buffer _18_17 void main() { - _7 _86 = _7(0.0, vec3(0.0), 0.0); - _86 = _14._m0; - _86 = _17._m0; + _7 _88 = _7(0.0, vec3(0.0), 0.0); + _88 = _14._m0; + _88 = _17._m0; } diff --git a/naga/tests/out/spv/wgsl-workgroup-var-init.spvasm b/naga/tests/out/spv/wgsl-workgroup-var-init.spvasm index 801ad15e9..11656cad9 100644 --- a/naga/tests/out/spv/wgsl-workgroup-var-init.spvasm +++ b/naga/tests/out/spv/wgsl-workgroup-var-init.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 38 +; Bound: 39 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" @@ -86,6 +86,7 @@ OpLine %3 14 14 %36 = OpAccessChain %35 %12 %21 %37 = OpLoad %5 %36 OpLine %3 14 5 -OpStore %22 %37 +%38 = OpAccessChain %20 %14 %21 +OpStore %38 %37 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/tests/wgpu-gpu/indirect_validator_buffer.rs b/tests/tests/wgpu-gpu/indirect_validator_buffer.rs new file mode 100644 index 000000000..3c4e17e2f --- /dev/null +++ b/tests/tests/wgpu-gpu/indirect_validator_buffer.rs @@ -0,0 +1,151 @@ +use wgpu::util::DeviceExt as _; +use wgpu_test::{ + gpu_test, GpuTestConfiguration, GpuTestInitializer, TestParameters, TestingContext, +}; + +pub fn all_tests(tests: &mut Vec) { + tests.push(INDIRECT_VALIDATOR_BUFFER); +} + +#[gpu_test] +static INDIRECT_VALIDATOR_BUFFER: GpuTestConfiguration = GpuTestConfiguration::new() + .parameters( + TestParameters::default() + .features(wgpu::Features::IMMEDIATES) + .limits(wgpu::Limits { + max_immediate_size: 8, + ..wgpu::Limits::downlevel_defaults() + }), + ) + .run_async(indirect_validator_buffer); + +async fn indirect_validator_buffer(ctx: TestingContext) { + let shader = ctx + .device + .create_shader_module(wgpu::ShaderModuleDescriptor { + label: None, + source: wgpu::ShaderSource::Wgsl( + include_str!("../../../wgpu-core/src/indirect_validation/validate_draw.wgsl") + .into(), + ), + }); + let layouts: Vec<_> = (0..3) + .map(|i| { + ctx.device + .create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: None, + entries: &[wgpu::BindGroupLayoutEntry { + binding: 0, + visibility: wgpu::ShaderStages::COMPUTE, + ty: wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Storage { read_only: i != 2 }, + has_dynamic_offset: false, + min_binding_size: None, + }, + count: None, + }], + }) + }) + .collect(); + let layout = ctx + .device + .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: None, + bind_group_layouts: &[Some(&layouts[0]), Some(&layouts[1]), Some(&layouts[2])], + immediate_size: 8, + }); + let pipeline = ctx + .device + .create_compute_pipeline(&wgpu::ComputePipelineDescriptor { + label: None, + layout: Some(&layout), + module: &shader, + entry_point: Some("main"), + cache: None, + compilation_options: wgpu::PipelineCompilationOptions { + constants: &[ + ("supports_indirect_first_instance", 1.0), + ("write_d3d12_special_constants", 0.0), + ], + ..Default::default() + }, + }); + let data: [Vec; 3] = [ + vec![ + 0x80000000, + 0, + 10000, + u32::MAX, + 0x80000005, + 0x80000005, + 10000, + u32::MAX - 1, + 0x8000000a, + 10, + 10000, + 1, + ], + vec![6, 3, 42, 24, 0, 6, 3, 42, 24, 0, 6, 3, 42, 24, 0], + vec![0; 15], + ]; + let buffers: Vec<_> = data + .iter() + .map(|words| { + ctx.device + .create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: None, + contents: bytemuck::cast_slice(words), + usage: wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_SRC, + }) + }) + .collect(); + let groups: Vec<_> = (0..3) + .map(|i| { + ctx.device.create_bind_group(&wgpu::BindGroupDescriptor { + label: None, + layout: &layouts[i], + entries: &[wgpu::BindGroupEntry { + binding: 0, + resource: buffers[i].as_entire_binding(), + }], + }) + }) + .collect(); + let staging = ctx.device.create_buffer(&wgpu::BufferDescriptor { + label: None, + size: 168, + usage: wgpu::BufferUsages::MAP_READ | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let mut encoder = ctx.device.create_command_encoder(&Default::default()); + { + let mut pass = encoder.begin_compute_pass(&Default::default()); + pass.set_pipeline(&pipeline); + for (i, group) in groups.iter().enumerate() { + pass.set_bind_group(i as u32, group, &[]); + } + pass.set_immediates(0, bytemuck::cast_slice(&[0u32, 3u32])); + pass.dispatch_workgroups(1, 1, 1); + } + encoder.copy_buffer_to_buffer(&buffers[0], 0, &staging, 0, 48); + encoder.copy_buffer_to_buffer(&buffers[1], 0, &staging, 48, 60); + encoder.copy_buffer_to_buffer(&buffers[2], 0, &staging, 108, 60); + ctx.queue.submit([encoder.finish()]); + staging + .slice(..) + .map_async(wgpu::MapMode::Read, Result::unwrap); + ctx.async_poll(wgpu::PollType::wait_indefinitely()) + .await + .unwrap(); + { + let bytes = staging.slice(..).get_mapped_range().unwrap(); + let words: &[u32] = bytemuck::cast_slice(&bytes); + assert_eq!(&words[..12], data[0]); + assert_eq!(&words[12..27], data[1]); + assert_eq!( + &words[27..], + &[6, 3, 42, 24, 0, 6, 3, 42, 24, 0, 0, 0, 0, 0, 0] + ); + } + staging.unmap(); +} diff --git a/tests/tests/wgpu-gpu/main.rs b/tests/tests/wgpu-gpu/main.rs index a9e6a3547..c2b406c22 100644 --- a/tests/tests/wgpu-gpu/main.rs +++ b/tests/tests/wgpu-gpu/main.rs @@ -39,8 +39,10 @@ mod external_texture; mod float32_filterable; mod image_atomics; mod immediates; +mod indirect_validator_buffer; mod instance; mod life_cycle; +mod matrix_buffer_access; mod mem_leaks; mod mesh_shader; mod multiview; @@ -98,6 +100,8 @@ fn all_tests() -> Vec { buffer_copy::all_tests(&mut tests); buffer_usages::all_tests(&mut tests); buffer::all_tests(&mut tests); + matrix_buffer_access::all_tests(&mut tests); + indirect_validator_buffer::all_tests(&mut tests); clear_texture::all_tests(&mut tests); clip_distances::all_tests(&mut tests); cloneable_types::all_tests(&mut tests); diff --git a/tests/tests/wgpu-gpu/matrix_buffer_access.rs b/tests/tests/wgpu-gpu/matrix_buffer_access.rs new file mode 100644 index 000000000..c2b6a09fd --- /dev/null +++ b/tests/tests/wgpu-gpu/matrix_buffer_access.rs @@ -0,0 +1,114 @@ +use wgpu::util::DeviceExt as _; +use wgpu_test::{ + gpu_test, GpuTestConfiguration, GpuTestInitializer, TestParameters, TestingContext, +}; + +pub fn all_tests(tests: &mut Vec) { + tests.push(GLOBAL_MATRIX_BUFFER_ACCESS); +} + +#[gpu_test] +static GLOBAL_MATRIX_BUFFER_ACCESS: GpuTestConfiguration = GpuTestConfiguration::new() + .parameters( + TestParameters::default() + .test_features_limits() + .limits(wgpu::Limits { + max_storage_buffers_per_shader_stage: 7, + ..wgpu::Limits::downlevel_defaults() + }), + ) + .run_async(global_matrix_buffer_access); + +async fn global_matrix_buffer_access(ctx: TestingContext) { + let shader = ctx + .device + .create_shader_module(wgpu::ShaderModuleDescriptor { + label: Some("global matrix access"), + source: wgpu::ShaderSource::Wgsl( + include_str!("../../../naga/tests/in/wgsl/global-matrix-access.wgsl").into(), + ), + }); + let pipeline = ctx + .device + .create_compute_pipeline(&wgpu::ComputePipelineDescriptor { + label: None, + layout: None, + module: &shader, + entry_point: Some("main"), + compilation_options: Default::default(), + cache: None, + }); + let buffers: Vec<_> = [2, 2, 2, 4, 1, 1, 2, 0] + .into_iter() + .enumerate() + .map(|(binding, matrices)| { + let data: Vec = if binding == 7 { + vec![0.; 36] + } else { + (1..=matrices * 16).map(|value| value as f32).collect() + }; + let usage = if binding == 5 { + wgpu::BufferUsages::UNIFORM + } else { + wgpu::BufferUsages::STORAGE + }; + ctx.device + .create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: None, + contents: bytemuck::cast_slice(&data), + usage: usage | wgpu::BufferUsages::COPY_SRC, + }) + }) + .collect(); + let entries: Vec<_> = buffers + .iter() + .enumerate() + .map(|(binding, buffer)| wgpu::BindGroupEntry { + binding: binding as u32, + resource: buffer.as_entire_binding(), + }) + .collect(); + let group = ctx.device.create_bind_group(&wgpu::BindGroupDescriptor { + label: None, + layout: &pipeline.get_bind_group_layout(0), + entries: &entries, + }); + let staging = ctx.device.create_buffer(&wgpu::BufferDescriptor { + label: None, + size: 272, + usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ, + mapped_at_creation: false, + }); + let mut encoder = ctx.device.create_command_encoder(&Default::default()); + { + let mut pass = encoder.begin_compute_pass(&Default::default()); + pass.set_pipeline(&pipeline); + pass.set_bind_group(0, &group, &[]); + pass.dispatch_workgroups(2, 4, 1); + } + encoder.copy_buffer_to_buffer(&buffers[7], 0, &staging, 0, 144); + encoder.copy_buffer_to_buffer(&buffers[1], 0, &staging, 144, 128); + ctx.queue.submit([encoder.finish()]); + staging + .slice(..) + .map_async(wgpu::MapMode::Read, Result::unwrap); + ctx.async_poll(wgpu::PollType::wait_indefinitely()) + .await + .unwrap(); + { + let view = staging.slice(..).get_mapped_range().unwrap(); + let actual: &[f32] = bytemuck::cast_slice(&view); + let sums: Vec = (0..32) + .map(|index| { + let matrix = index / 16; + let element = index % 16; + 6. * (element + 1) as f32 + if matrix == 0 { 16. } else { 80. } + }) + .collect(); + let mut expected = sums.clone(); + expected.extend([2., 2., 13., 14.]); + expected.extend(sums); + assert_eq!(actual, expected); + } + staging.unmap(); +} diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 196daf4c5..27744b906 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -2301,6 +2301,13 @@ impl super::Instance { super::Workarounds::EMPTY_RESOLVE_ATTACHMENT_LISTS, phd_capabilities.properties.vendor_id == db::qualcomm::VENDOR, ); + workarounds.set( + super::Workarounds::FORCE_SHADER_BUFFER_BOUNDS_CHECKS, + phd_capabilities.properties.vendor_id == db::qualcomm::VENDOR + && phd_capabilities.driver.is_none_or(|driver| { + driver.driver_id == vk::DriverId::QUALCOMM_PROPRIETARY + }), + ); workarounds.set( super::Workarounds::FORCE_FILL_BUFFER_WITH_SIZE_GREATER_4096_ALIGNED_OFFSET_16, phd_capabilities.properties.vendor_id == db::nvidia::VENDOR, @@ -2837,7 +2844,13 @@ impl super::Adapter { capabilities: Some(capabilities.iter().cloned().collect()), bounds_check_policies: naga::proc::BoundsCheckPolicies { index: naga::proc::BoundsCheckPolicy::Restrict, - buffer: if self.private_caps.robust_buffer_access2 { + // Valid dependent reads can return zero on proprietary Qualcomm + // without shader bounds checks. Retain hardware robustness too. + buffer: if self.private_caps.robust_buffer_access2 + && !self + .workarounds + .contains(super::Workarounds::FORCE_SHADER_BUFFER_BOUNDS_CHECKS) + { naga::proc::BoundsCheckPolicy::Unchecked } else { naga::proc::BoundsCheckPolicy::Restrict diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index 948f77a58..c2e0bce89 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -729,7 +729,15 @@ impl super::Device { if !runtime_checks.bounds_checks { temp_options.bounds_check_policies = naga::proc::BoundsCheckPolicies { index: naga::proc::BoundsCheckPolicy::Unchecked, - buffer: naga::proc::BoundsCheckPolicy::Unchecked, + buffer: if self + .shared + .workarounds + .contains(super::Workarounds::FORCE_SHADER_BUFFER_BOUNDS_CHECKS) + { + naga::proc::BoundsCheckPolicy::Restrict + } else { + naga::proc::BoundsCheckPolicy::Unchecked + }, image_load: naga::proc::BoundsCheckPolicy::Unchecked, binding_array: naga::proc::BoundsCheckPolicy::Unchecked, }; @@ -1884,7 +1892,15 @@ impl crate::Device for super::Device { if !desc.runtime_checks.bounds_checks { naga_options.bounds_check_policies = naga::proc::BoundsCheckPolicies { index: naga::proc::BoundsCheckPolicy::Unchecked, - buffer: naga::proc::BoundsCheckPolicy::Unchecked, + buffer: if self + .shared + .workarounds + .contains(super::Workarounds::FORCE_SHADER_BUFFER_BOUNDS_CHECKS) + { + naga::proc::BoundsCheckPolicy::Restrict + } else { + naga::proc::BoundsCheckPolicy::Unchecked + }, image_load: naga::proc::BoundsCheckPolicy::Unchecked, binding_array: naga::proc::BoundsCheckPolicy::Unchecked, }; diff --git a/wgpu-hal/src/vulkan/mod.rs b/wgpu-hal/src/vulkan/mod.rs index 51e7414b6..767f61d0a 100644 --- a/wgpu-hal/src/vulkan/mod.rs +++ b/wgpu-hal/src/vulkan/mod.rs @@ -439,6 +439,8 @@ bitflags::bitflags!( /// Qualcomm OOMs when there are zero color attachments but a non-null pointer /// to a subpass resolve attachment array. This nulls out that pointer in that case. const EMPTY_RESOLVE_ATTACHMENT_LISTS = 0x2; + /// Retain shader-side storage buffer bounds checks on proprietary Qualcomm. + const FORCE_SHADER_BUFFER_BOUNDS_CHECKS = 0x8; /// If the following code returns false, then nvidia will end up filling the wrong range. /// /// ```skip