-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.spirv
45 lines (45 loc) · 1.74 KB
/
sample.spirv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
; SPIR-V
; Version: 1.0
; Generator: Manual; 0
; Bound: 25
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %_ %position %color %outColor
OpSource GLSL 450
OpName %main "main"
OpName %gl_PerVertex "gl_PerVertex"
OpMemberName %gl_PerVertex 0 "gl_Position"
OpName %_ ""
OpName %position "position"
OpName %color "color"
OpName %outColor "outColor"
OpDecorate %gl_PerVertex Block
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
OpDecorate %_ Block
OpDecorate %position Location 0
OpDecorate %color Location 1
OpDecorate %outColor Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%gl_PerVertex = OpTypeStruct %v4float
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Input_v4float = OpTypePointer Input %v4float
%position = OpVariable %_ptr_Input_v4float Input
%color = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%outColor = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %3
%5 = OpLabel
%16 = OpLoad %v4float %position
%19 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %19 %16
%22 = OpLoad %v4float %color
OpStore %outColor %22
OpReturn
OpFunctionEnd