SPIRV-Cross/shaders-no-opt/asm/comp/bitscan.asm.comp

73 lines
2.7 KiB
Plaintext
Raw Normal View History

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 35
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpSource GLSL 450
OpName %main "main"
OpName %SSBO "SSBO"
OpMemberName %SSBO 0 "u"
OpMemberName %SSBO 1 "i"
OpMemberDecorate %SSBO 0 Offset 0
OpMemberDecorate %SSBO 1 Offset 16
OpDecorate %SSBO BufferBlock
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%ivec4 = OpTypeVector %int 4
%uint = OpTypeInt 32 0
%uvec4 = OpTypeVector %uint 4
%SSBO = OpTypeStruct %uvec4 %ivec4
%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO
%_ = OpVariable %_ptr_Uniform_SSBO Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_uvec4 = OpTypePointer Uniform %uvec4
%int_1 = OpConstant %int 1
%_ptr_Uniform_ivec4 = OpTypePointer Uniform %ivec4
%main = OpFunction %void None %3
%5 = OpLabel
%uptr = OpAccessChain %_ptr_Uniform_uvec4 %_ %int_0
%iptr = OpAccessChain %_ptr_Uniform_ivec4 %_ %int_1
%uvalue = OpLoad %uvec4 %uptr
%ivalue = OpLoad %ivec4 %iptr
%lsb_uint_to_uint = OpExtInst %uvec4 %1 FindILsb %uvalue
%lsb_uint_to_int = OpExtInst %ivec4 %1 FindILsb %uvalue
%lsb_int_to_uint = OpExtInst %uvec4 %1 FindILsb %ivalue
%lsb_int_to_int = OpExtInst %ivec4 %1 FindILsb %ivalue
%umsb_uint_to_uint = OpExtInst %uvec4 %1 FindUMsb %uvalue
%umsb_uint_to_int = OpExtInst %ivec4 %1 FindUMsb %uvalue
%umsb_int_to_uint = OpExtInst %uvec4 %1 FindUMsb %ivalue
%umsb_int_to_int = OpExtInst %ivec4 %1 FindUMsb %ivalue
%smsb_uint_to_uint = OpExtInst %uvec4 %1 FindSMsb %uvalue
%smsb_uint_to_int = OpExtInst %ivec4 %1 FindSMsb %uvalue
%smsb_int_to_uint = OpExtInst %uvec4 %1 FindSMsb %ivalue
%smsb_int_to_int = OpExtInst %ivec4 %1 FindSMsb %ivalue
OpStore %uptr %lsb_uint_to_uint
OpStore %iptr %lsb_uint_to_int
OpStore %uptr %lsb_int_to_uint
OpStore %iptr %lsb_int_to_int
OpStore %uptr %umsb_uint_to_uint
OpStore %iptr %umsb_uint_to_int
OpStore %uptr %umsb_int_to_uint
OpStore %iptr %umsb_int_to_int
OpStore %uptr %smsb_uint_to_uint
OpStore %iptr %smsb_uint_to_int
OpStore %uptr %smsb_int_to_uint
OpStore %iptr %smsb_int_to_int
OpReturn
OpFunctionEnd