Test a for loop with no body.
authorDejan Mircevski <deki@google.com>
Mon, 11 Jan 2016 04:15:08 +0000 (23:15 -0500)
committerDejan Mircevski <deki@google.com>
Mon, 11 Jan 2016 04:15:08 +0000 (23:15 -0500)
Change-Id: I5b53cc008349afad94b14500506fcab4d6e64d2e

Test/baseResults/spv.for-nobody.vert.out [new file with mode: 0644]
Test/spv.for-nobody.vert [new file with mode: 0644]

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