Files
SPIRV-Interpreter/example/shader.spvasm
2025-12-25 02:34:41 +01:00

41 lines
1.5 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: SirLynix Nazara ShaderLang Compiler; 4226
; Bound: 20
; 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_1 = OpConstant %float 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %2
%13 = OpLabel
%14 = OpVariable %_ptr_Function_FragOut Function
%15 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
%16 = OpAccessChain %_ptr_Function_v4float %14 %int_0
OpStore %16 %15
%18 = OpLoad %FragOut %14
%19 = OpCompositeExtract %v4float %18 0
OpStore %color %19
OpReturn
OpFunctionEnd