SPIRV-Cross/shaders-msl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp
2022-01-18 12:39:16 +01:00

82 lines
3.5 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 49
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID %gl_LocalInvocationID
OpExecutionMode %main LocalSize 4 4 1
OpSource GLSL 450
OpName %main "main"
OpName %SSBO "SSBO"
OpMemberName %SSBO 0 "values"
OpName %_ ""
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
OpName %gl_LocalInvocationID "gl_LocalInvocationID"
OpName %indexable "indexable"
OpName %indexable_0 "indexable"
OpName %25 "indexable"
OpName %38 "indexable"
OpDecorate %_runtimearr_int ArrayStride 4
OpMemberDecorate %SSBO 0 Offset 0
OpDecorate %SSBO BufferBlock
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %gl_LocalInvocationID BuiltIn LocalInvocationId
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_runtimearr_int = OpTypeRuntimeArray %int
%SSBO = OpTypeStruct %_runtimearr_int
%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO
%_ = OpVariable %_ptr_Uniform_SSBO Uniform
%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
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%25 = OpConstantComposite %_arr_int_uint_4 %int_0 %int_1 %int_2 %int_3
%gl_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input
%_ptr_Function__arr_int_uint_4 = OpTypePointer Function %_arr_int_uint_4
%_ptr_Function_int = OpTypePointer Function %int
%int_4 = OpConstant %int 4
%int_5 = OpConstant %int 5
%int_6 = OpConstant %int 6
%int_7 = OpConstant %int 7
%38 = OpConstantComposite %_arr_int_uint_4 %int_4 %int_5 %int_6 %int_7
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_4 %uint_4 %uint_1
%main = OpFunction %void None %3
%5 = OpLabel
%indexable = OpVariable %_ptr_Function__arr_int_uint_4 Function
%indexable_0 = OpVariable %_ptr_Function__arr_int_uint_4 Function
%18 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0
%19 = OpLoad %uint %18
%27 = OpAccessChain %_ptr_Input_uint %gl_LocalInvocationID %uint_0
%28 = OpLoad %uint %27
OpStore %indexable %25
%32 = OpAccessChain %_ptr_Function_int %indexable %28
%33 = OpLoad %int %32
%40 = OpAccessChain %_ptr_Input_uint %gl_LocalInvocationID %uint_1
%41 = OpLoad %uint %40
OpStore %indexable_0 %38
%43 = OpAccessChain %_ptr_Function_int %indexable_0 %41
%44 = OpLoad %int %43
%45 = OpIAdd %int %33 %44
%47 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %19
OpStore %47 %45
OpReturn
OpFunctionEnd