lume/test/SPIRV/add.spv.asm

22 lines
579 B
NASM

; SPIR-V
; Version: 1.0
; Generator: 0
; Bound: 8
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
; int add(int a, int b) { return a + b; }
%1 = OpTypeInt 32 1 ; i32 (signed)
%2 = OpTypeFunction %1 %1 %1 ; return i32, params (i32, i32)
%3 = OpFunction %1 None %2
%4 = OpFunctionParameter %1 ; param a
%5 = OpFunctionParameter %1 ; param b
%6 = OpLabel
%7 = OpIAdd %1 %4 %5 ; a + b
OpReturnValue %7
OpFunctionEnd