Files
SPIRV-Interpreter/example/shader.spvasm
2026-01-11 23:40:50 +01:00

44 lines
1.7 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: SirLynix Nazara ShaderLang Compiler; 4226
; Bound: 23
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %color
OpExecutionMode %main OriginUpperLeft
OpSource NZSL 4198400
OpSourceExtension "Version: 1.1"
OpName %FragOut "FragOut"
OpMemberName %FragOut 0 "color"
OpName %color "color"
OpName %main "main"
OpDecorate %color Location 0
OpMemberDecorate %FragOut 0 Offset 0
%void = OpTypeVoid
%2 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%FragOut = OpTypeStruct %v4float
%_ptr_Function_FragOut = OpTypePointer Function %FragOut
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%float_4 = OpConstant %float 4
%float_3 = OpConstant %float 3
%float_2 = OpConstant %float 2
%float_1 = OpConstant %float 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %2
%16 = OpLabel
%17 = OpVariable %_ptr_Function_FragOut Function
%18 = OpCompositeConstruct %v4float %float_4 %float_3 %float_2 %float_1
%19 = OpAccessChain %_ptr_Function_v4float %17 %int_0
OpStore %19 %18
%21 = OpLoad %FragOut %17
%22 = OpCompositeExtract %v4float %21 0
OpStore %color %22
OpReturn
OpFunctionEnd