diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp new file mode 100644 index 00000000000..7da9f95b9ec --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp @@ -0,0 +1,123 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 26 +; 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 "ints" + OpMemberName %SSBO 1 "uints" + OpName %_ "" + 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 + %v4int = OpTypeVector %int 4 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 + %SSBO = OpTypeStruct %v4int %v4uint +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int + %int_1 = OpConstant %int 1 +%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint + %main = OpFunction %void None %3 + %5 = OpLabel + %ints_ptr = OpAccessChain %_ptr_Uniform_v4int %_ %int_0 + %uints_ptr = OpAccessChain %_ptr_Uniform_v4uint %_ %int_1 + %ints = OpLoad %v4int %ints_ptr + %uints = OpLoad %v4uint %uints_ptr + + %int_to_int_sabs = OpExtInst %v4int %1 SAbs %ints + %int_to_uint_sabs = OpExtInst %v4uint %1 SAbs %ints + %uint_to_int_sabs = OpExtInst %v4int %1 SAbs %uints + %uint_to_uint_sabs = OpExtInst %v4uint %1 SAbs %uints + + %int_to_int_ssign = OpExtInst %v4int %1 SSign %ints + %int_to_uint_ssign = OpExtInst %v4uint %1 SSign %ints + %uint_to_int_ssign = OpExtInst %v4int %1 SSign %uints + %uint_to_uint_ssign = OpExtInst %v4uint %1 SSign %uints + + %int_to_int_smsb = OpExtInst %v4int %1 FindSMsb %uints + %int_to_uint_smsb = OpExtInst %v4uint %1 FindSMsb %uints + %uint_to_int_umsb = OpExtInst %v4int %1 FindUMsb %ints + %uint_to_uint_umsb = OpExtInst %v4uint %1 FindUMsb %ints + + %int_to_int_smin = OpExtInst %v4int %1 SMin %ints %ints + %int_to_uint_smin = OpExtInst %v4uint %1 SMin %ints %uints + %uint_to_int_smin = OpExtInst %v4int %1 SMin %uints %uints + %uint_to_uint_smin = OpExtInst %v4uint %1 SMin %uints %ints + + %int_to_int_umin = OpExtInst %v4int %1 UMin %ints %uints + %int_to_uint_umin = OpExtInst %v4uint %1 UMin %ints %uints + %uint_to_int_umin = OpExtInst %v4int %1 UMin %uints %ints + %uint_to_uint_umin = OpExtInst %v4uint %1 UMin %uints %ints + + %int_to_int_smax = OpExtInst %v4int %1 SMax %ints %ints + %int_to_uint_smax = OpExtInst %v4uint %1 SMax %ints %ints + %uint_to_int_smax = OpExtInst %v4int %1 SMax %uints %ints + %uint_to_uint_smax = OpExtInst %v4uint %1 SMax %uints %ints + + %int_to_int_umax = OpExtInst %v4int %1 UMax %ints %uints + %int_to_uint_umax = OpExtInst %v4uint %1 UMax %ints %ints + %uint_to_int_umax = OpExtInst %v4int %1 UMax %uints %ints + %uint_to_uint_umax = OpExtInst %v4uint %1 UMax %uints %ints + + %int_to_int_sclamp = OpExtInst %v4int %1 SClamp %uints %uints %uints + %int_to_uint_sclamp = OpExtInst %v4uint %1 SClamp %uints %uints %uints + %uint_to_int_uclamp = OpExtInst %v4int %1 UClamp %ints %ints %ints + %uint_to_uint_uclamp = OpExtInst %v4uint %1 UClamp %ints %ints %ints + + OpStore %ints_ptr %int_to_int_sabs + OpStore %uints_ptr %int_to_uint_sabs + OpStore %ints_ptr %uint_to_int_sabs + OpStore %uints_ptr %uint_to_uint_sabs + + OpStore %ints_ptr %int_to_int_ssign + OpStore %uints_ptr %int_to_uint_ssign + OpStore %ints_ptr %uint_to_int_ssign + OpStore %uints_ptr %uint_to_uint_ssign + + OpStore %ints_ptr %int_to_int_smsb + OpStore %uints_ptr %int_to_uint_smsb + OpStore %ints_ptr %uint_to_int_umsb + OpStore %uints_ptr %uint_to_uint_umsb + + OpStore %ints_ptr %int_to_int_smin + OpStore %uints_ptr %int_to_uint_smin + OpStore %ints_ptr %uint_to_int_smin + OpStore %uints_ptr %uint_to_uint_smin + + OpStore %ints_ptr %int_to_int_umin + OpStore %uints_ptr %int_to_uint_umin + OpStore %ints_ptr %uint_to_int_umin + OpStore %uints_ptr %uint_to_uint_umin + + OpStore %ints_ptr %int_to_int_smax + OpStore %uints_ptr %int_to_uint_smax + OpStore %ints_ptr %uint_to_int_smax + OpStore %uints_ptr %uint_to_uint_smax + + OpStore %ints_ptr %int_to_int_umax + OpStore %uints_ptr %int_to_uint_umax + OpStore %ints_ptr %uint_to_int_umax + OpStore %uints_ptr %uint_to_uint_umax + + OpStore %ints_ptr %int_to_int_sclamp + OpStore %uints_ptr %int_to_uint_sclamp + OpStore %ints_ptr %uint_to_int_uclamp + OpStore %uints_ptr %uint_to_uint_uclamp + + OpReturn + OpFunctionEnd |