49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
|
OpCapability Shader
|
||
|
%1 = OpExtInstImport "GLSL.std.450"
|
||
|
OpMemoryModel Logical GLSL450
|
||
|
OpEntryPoint GLCompute %main "main" %_ %gl_GlobalInvocationID
|
||
|
OpExecutionMode %main LocalSize 1 1 1
|
||
|
OpSource GLSL 450
|
||
|
OpName %main "main"
|
||
|
OpName %SSBO "SSBO"
|
||
|
OpMemberName %SSBO 0 "values"
|
||
|
OpName %_ ""
|
||
|
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
|
||
|
OpDecorate %_runtimearr_float ArrayStride 4
|
||
|
OpMemberDecorate %SSBO 0 Offset 0
|
||
|
OpDecorate %SSBO Block
|
||
|
OpDecorate %_ DescriptorSet 0
|
||
|
OpDecorate %_ Binding 0
|
||
|
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
||
|
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
|
||
|
%void = OpTypeVoid
|
||
|
%3 = OpTypeFunction %void
|
||
|
%float = OpTypeFloat 32
|
||
|
%_runtimearr_float = OpTypeRuntimeArray %float
|
||
|
%SSBO = OpTypeStruct %_runtimearr_float
|
||
|
%_ptr_StorageBuffer_SSBO = OpTypePointer StorageBuffer %SSBO
|
||
|
%_ = OpVariable %_ptr_StorageBuffer_SSBO StorageBuffer
|
||
|
%int = OpTypeInt 32 1
|
||
|
%int_0 = OpConstant %int 0
|
||
|
%uint = OpTypeInt 32 0
|
||
|
%v3uint = OpTypeVector %uint 3
|
||
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
||
|
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
|
||
|
%uint_0 = OpConstant %uint 0
|
||
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
||
|
%float_2 = OpConstant %float 2
|
||
|
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
||
|
%uint_1 = OpConstant %uint 1
|
||
|
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
|
||
|
%main = OpFunction %void None %3
|
||
|
%5 = OpLabel
|
||
|
%19 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0
|
||
|
%20 = OpLoad %uint %19
|
||
|
%23 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %20
|
||
|
%24 = OpLoad %float %23
|
||
|
%25 = OpFAdd %float %24 %float_2
|
||
|
%26 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %20
|
||
|
OpStore %26 %25
|
||
|
OpReturn
|
||
|
OpFunctionEnd
|