SPIRV-Cross/shaders-no-opt/asm/comp/buffer-atomic-nonuniform.vk.nocompat.asm.comp
2020-03-19 12:05:27 +01:00

54 lines
2.2 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 8
; Bound: 26
; Schema: 0
OpCapability Shader
OpCapability ShaderNonUniform
OpCapability RuntimeDescriptorArray
OpCapability StorageBufferArrayNonUniformIndexing
OpExtension "SPV_EXT_descriptor_indexing"
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID
OpExecutionMode %main LocalSize 1 1 1
OpSource GLSL 450
OpSourceExtension "GL_EXT_nonuniform_qualifier"
OpName %main "main"
OpName %SSBO "SSBO"
OpMemberName %SSBO 0 "v"
OpName %ssbos "ssbos"
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
OpMemberDecorate %SSBO 0 Offset 0
OpDecorate %SSBO BufferBlock
OpDecorate %ssbos DescriptorSet 0
OpDecorate %ssbos Binding 0
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %22 NonUniform
%void = OpTypeVoid
%3 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%SSBO = OpTypeStruct %uint
%_runtimearr_SSBO = OpTypeRuntimeArray %SSBO
%_ptr_Uniform__runtimearr_SSBO = OpTypePointer Uniform %_runtimearr_SSBO
%ssbos = OpVariable %_ptr_Uniform__runtimearr_SSBO Uniform
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%uint_2 = OpConstant %uint 2
%_ptr_Input_uint = OpTypePointer Input %uint
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
%main = OpFunction %void None %3
%5 = OpLabel
%16 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_2
%17 = OpLoad %uint %16
%18 = OpCopyObject %uint %17
%22 = OpAccessChain %_ptr_Uniform_uint %ssbos %18 %int_0
%25 = OpAtomicIAdd %uint %22 %uint_1 %uint_0 %uint_1
OpReturn
OpFunctionEnd