From 13228243b2be30ebc6377ddbbc59f0cc8d5da12a Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Sun, 10 Jan 2016 23:15:08 -0500 Subject: [PATCH] Test a for loop with no body. Change-Id: I5b53cc008349afad94b14500506fcab4d6e64d2e --- Test/baseResults/spv.for-nobody.vert.out | 59 ++++++++++++++++++++++++ Test/spv.for-nobody.vert | 7 +++ 2 files changed, 66 insertions(+) create mode 100644 Test/baseResults/spv.for-nobody.vert.out create mode 100644 Test/spv.for-nobody.vert diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out new file mode 100644 index 000000000..1645c66af --- /dev/null +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -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 diff --git a/Test/spv.for-nobody.vert b/Test/spv.for-nobody.vert new file mode 100644 index 000000000..99634761c --- /dev/null +++ b/Test/spv.for-nobody.vert @@ -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; +}