mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 16:01:04 +01:00
Also, just use a single out variable for each type. rather than introducing a new output variable for every test we add.
80 lines
1.9 KiB
Plaintext
80 lines
1.9 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.1
|
|
; Generator: rspirv
|
|
; Bound: 49
|
|
OpCapability Shader
|
|
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %42 "main"
|
|
OpExecutionMode %42 LocalSize 1 1 1
|
|
OpDecorate %6 DescriptorSet 0
|
|
OpDecorate %6 Binding 0
|
|
OpDecorate %7 Block
|
|
OpMemberDecorate %7 0 Offset 0
|
|
OpDecorate %9 DescriptorSet 0
|
|
OpDecorate %9 Binding 1
|
|
OpDecorate %10 Block
|
|
OpMemberDecorate %10 0 Offset 0
|
|
%2 = OpTypeVoid
|
|
%4 = OpTypeInt 32 1
|
|
%3 = OpTypeVector %4 4
|
|
%5 = OpTypeVector %4 2
|
|
%7 = OpTypeStruct %3
|
|
%8 = OpTypePointer StorageBuffer %7
|
|
%6 = OpVariable %8 StorageBuffer
|
|
%10 = OpTypeStruct %4
|
|
%11 = OpTypePointer StorageBuffer %10
|
|
%9 = OpVariable %11 StorageBuffer
|
|
%14 = OpTypeFunction %2
|
|
%15 = OpTypePointer StorageBuffer %3
|
|
%17 = OpTypeInt 32 0
|
|
%16 = OpConstant %17 0
|
|
%19 = OpConstant %4 1
|
|
%20 = OpConstant %4 2
|
|
%21 = OpConstantComposite %5 %19 %20
|
|
%22 = OpConstant %4 3
|
|
%23 = OpConstant %4 4
|
|
%24 = OpConstantComposite %5 %22 %23
|
|
%25 = OpConstantComposite %3 %23 %22 %20 %19
|
|
%29 = OpTypePointer StorageBuffer %4
|
|
%37 = OpConstant %4 6
|
|
%13 = OpFunction %2 None %14
|
|
%12 = OpLabel
|
|
%18 = OpAccessChain %15 %6 %16
|
|
OpBranch %26
|
|
%26 = OpLabel
|
|
OpStore %18 %25
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%28 = OpFunction %2 None %14
|
|
%27 = OpLabel
|
|
%30 = OpAccessChain %29 %9 %16
|
|
OpBranch %31
|
|
%31 = OpLabel
|
|
%32 = OpLoad %4 %30
|
|
%33 = OpIAdd %4 %32 %20
|
|
OpStore %30 %33
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%35 = OpFunction %2 None %14
|
|
%34 = OpLabel
|
|
%36 = OpAccessChain %29 %9 %16
|
|
OpBranch %38
|
|
%38 = OpLabel
|
|
%39 = OpLoad %4 %36
|
|
%40 = OpIAdd %4 %39 %37
|
|
OpStore %36 %40
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%42 = OpFunction %2 None %14
|
|
%41 = OpLabel
|
|
%43 = OpAccessChain %15 %6 %16
|
|
%44 = OpAccessChain %29 %9 %16
|
|
OpBranch %45
|
|
%45 = OpLabel
|
|
%46 = OpFunctionCall %2 %13
|
|
%47 = OpFunctionCall %2 %28
|
|
%48 = OpFunctionCall %2 %35
|
|
OpReturn
|
|
OpFunctionEnd |