dawn-cmake/test/tint/bug/tint/993.wgsl.expected.spvasm

86 lines
3.6 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 40
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %constants_block "constants_block"
OpMemberName %constants_block 0 "inner"
OpName %Constants "Constants"
OpMemberName %Constants 0 "zero"
OpName %constants "constants"
OpName %result_block "result_block"
OpMemberName %result_block 0 "inner"
OpName %Result "Result"
OpMemberName %Result 0 "value"
OpName %result "result"
OpName %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %TestData "TestData"
OpMemberName %TestData 0 "data"
OpName %s "s"
OpName %runTest "runTest"
OpName %main "main"
OpDecorate %constants_block Block
OpMemberDecorate %constants_block 0 Offset 0
OpMemberDecorate %Constants 0 Offset 0
OpDecorate %constants NonWritable
OpDecorate %constants DescriptorSet 1
OpDecorate %constants Binding 0
OpDecorate %result_block Block
OpMemberDecorate %result_block 0 Offset 0
OpMemberDecorate %Result 0 Offset 0
OpDecorate %result DescriptorSet 1
OpDecorate %result Binding 1
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpMemberDecorate %TestData 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 4
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 0
%uint = OpTypeInt 32 0
%Constants = OpTypeStruct %uint
%constants_block = OpTypeStruct %Constants
%_ptr_Uniform_constants_block = OpTypePointer Uniform %constants_block
%constants = OpVariable %_ptr_Uniform_constants_block Uniform
%Result = OpTypeStruct %uint
%result_block = OpTypeStruct %Result
%_ptr_StorageBuffer_result_block = OpTypePointer StorageBuffer %result_block
%result = OpVariable %_ptr_StorageBuffer_result_block StorageBuffer
%int = OpTypeInt 32 1
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%TestData = OpTypeStruct %_arr_int_uint_3
%s_block = OpTypeStruct %TestData
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%17 = OpTypeFunction %int
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
%24 = OpConstantNull %uint
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%void = OpTypeVoid
%32 = OpTypeFunction %void
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%runTest = OpFunction %int None %17
%19 = OpLabel
%27 = OpAccessChain %_ptr_Uniform_uint %constants %uint_0 %uint_0
%28 = OpLoad %uint %27
%29 = OpIAdd %uint %24 %28
%31 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %uint_0 %29
%20 = OpAtomicLoad %int %31 %uint_1 %uint_0
OpReturnValue %20
OpFunctionEnd
%main = OpFunction %void None %32
%35 = OpLabel
%36 = OpFunctionCall %int %runTest
%37 = OpBitcast %uint %36
%39 = OpAccessChain %_ptr_StorageBuffer_uint %result %uint_0 %uint_0
OpStore %39 %37
OpReturn
OpFunctionEnd