Test a for loop with no body.

Change-Id: I5b53cc008349afad94b14500506fcab4d6e64d2e
This commit is contained in:
Dejan Mircevski 2016-01-10 23:15:08 -05:00
parent e537b8b488
commit 13228243b2
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,59 @@
spv.for-nobody.vert
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Linked vertex stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 27
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 22 25 26
Source GLSL 450
Name 4 "main"
Name 8 "i"
Name 22 "r"
Name 25 "gl_VertexID"
Name 26 "gl_InstanceID"
Decorate 22(r) Location 0
Decorate 25(gl_VertexID) BuiltIn VertexId
Decorate 26(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: 6(int) Constant 0
15: 6(int) Constant 10
16: TypeBool
19: 6(int) Constant 1
21: TypePointer Output 6(int)
22(r): 21(ptr) Variable Output
24: TypePointer Input 6(int)
25(gl_VertexID): 24(ptr) Variable Input
26(gl_InstanceID): 24(ptr) Variable Input
4(main): 2 Function None 3
5: Label
8(i): 7(ptr) Variable Function
Store 8(i) 9
Branch 13
10: Label
Branch 12
11: Label
23: 6(int) Load 8(i)
Store 22(r) 23
Return
12: Label
18: 6(int) Load 8(i)
20: 6(int) IAdd 18 19
Store 8(i) 20
Branch 13
13: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 11 12 None
BranchConditional 17 10 11
FunctionEnd

7
Test/spv.for-nobody.vert Normal file
View File

@ -0,0 +1,7 @@
#version 450
layout(location=0) out highp int r;
void main() {
int i;
for (i=0; i<10; i++);
r = i;
}