74 lines
3.0 KiB
Plaintext
74 lines
3.0 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 37
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %main "main"
|
|
OpExecutionMode %main LocalSize 1 1 1
|
|
OpName %Constants "Constants"
|
|
OpMemberName %Constants 0 "zero"
|
|
OpName %constants "constants"
|
|
OpName %Result "Result"
|
|
OpMemberName %Result 0 "value"
|
|
OpName %result "result"
|
|
OpName %TestData "TestData"
|
|
OpMemberName %TestData 0 "data"
|
|
OpName %s "s"
|
|
OpName %runTest "runTest"
|
|
OpName %main "main"
|
|
OpDecorate %Constants Block
|
|
OpMemberDecorate %Constants 0 Offset 0
|
|
OpDecorate %constants NonWritable
|
|
OpDecorate %constants DescriptorSet 1
|
|
OpDecorate %constants Binding 0
|
|
OpDecorate %Result Block
|
|
OpMemberDecorate %Result 0 Offset 0
|
|
OpDecorate %result DescriptorSet 1
|
|
OpDecorate %result Binding 1
|
|
OpDecorate %TestData Block
|
|
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
|
|
%_ptr_Uniform_Constants = OpTypePointer Uniform %Constants
|
|
%constants = OpVariable %_ptr_Uniform_Constants Uniform
|
|
%Result = OpTypeStruct %uint
|
|
%_ptr_StorageBuffer_Result = OpTypePointer StorageBuffer %Result
|
|
%result = OpVariable %_ptr_StorageBuffer_Result StorageBuffer
|
|
%int = OpTypeInt 32 1
|
|
%uint_3 = OpConstant %uint 3
|
|
%_arr_int_uint_3 = OpTypeArray %int %uint_3
|
|
%TestData = OpTypeStruct %_arr_int_uint_3
|
|
%_ptr_StorageBuffer_TestData = OpTypePointer StorageBuffer %TestData
|
|
%s = OpVariable %_ptr_StorageBuffer_TestData StorageBuffer
|
|
%14 = OpTypeFunction %int
|
|
%uint_1 = OpConstant %uint 1
|
|
%uint_0 = OpConstant %uint 0
|
|
%21 = OpConstantNull %uint
|
|
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
|
%void = OpTypeVoid
|
|
%29 = OpTypeFunction %void
|
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
|
%runTest = OpFunction %int None %14
|
|
%16 = OpLabel
|
|
%24 = OpAccessChain %_ptr_Uniform_uint %constants %uint_0
|
|
%25 = OpLoad %uint %24
|
|
%26 = OpIAdd %uint %21 %25
|
|
%28 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %26
|
|
%17 = OpAtomicLoad %int %28 %uint_1 %uint_0
|
|
OpReturnValue %17
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %29
|
|
%32 = OpLabel
|
|
%33 = OpFunctionCall %int %runTest
|
|
%34 = OpBitcast %uint %33
|
|
%36 = OpAccessChain %_ptr_StorageBuffer_uint %result %uint_0
|
|
OpStore %36 %34
|
|
OpReturn
|
|
OpFunctionEnd
|