Tests: Add usage and tests for previous commit.
authorJohn Kessenich <cepheus@frii.com>
Tue, 17 Apr 2018 23:44:11 +0000 (17:44 -0600)
committerJohn Kessenich <cepheus@frii.com>
Tue, 17 Apr 2018 23:44:11 +0000 (17:44 -0600)
StandAlone/StandAlone.cpp
Test/baseResults/compoundsuffix.frag.hlsl [new file with mode: 0644]
Test/baseResults/compoundsuffix.vert.glsl [new file with mode: 0644]
Test/compoundsuffix.frag.hlsl [new file with mode: 0644]
Test/compoundsuffix.vert.glsl [new file with mode: 0755]
Test/runtests

index 1f7c5f2..1986a2f 100644 (file)
@@ -1306,6 +1306,8 @@ void usage()
            "    .geom   for a geometry shader\n"
            "    .frag   for a fragment shader\n"
            "    .comp   for a compute shader\n"
+           "    .glsl   for .vert.glsl, .tesc.glsl, ..., .comp.glsl compound suffixes\n"
+           "    .hlsl   for .vert.hlsl, .tesc.hlsl, ..., .comp.hlsl compound suffixes\n"
            "\n"
            "Options:\n"
            "  -C          cascading errors; risk crash from accumulation of error recoveries\n"
diff --git a/Test/baseResults/compoundsuffix.frag.hlsl b/Test/baseResults/compoundsuffix.frag.hlsl
new file mode 100644 (file)
index 0000000..be527a3
--- /dev/null
@@ -0,0 +1,27 @@
+compoundsuffix.frag.hlsl\r
+// Module Version 10000\r
+// Generated by (magic number): 80006\r
+// Id's are bound by 21\r
+\r
+                              Capability Shader\r
+               1:             ExtInstImport  "GLSL.std.450"\r
+                              MemoryModel Logical GLSL450\r
+                              EntryPoint Fragment 4  "main" 20\r
+                              ExecutionMode 4 OriginUpperLeft\r
+                              Source HLSL 500\r
+                              Name 4  "main"\r
+                              Name 20  "fragColor"\r
+                              Decorate 20(fragColor) Location 0\r
+               2:             TypeVoid\r
+               3:             TypeFunction 2\r
+               6:             TypeFloat 32\r
+               7:             TypeVector 6(float) 4\r
+              13:    6(float) Constant 1065353216\r
+              14:    7(fvec4) ConstantComposite 13 13 13 13\r
+              19:             TypePointer Output 7(fvec4)\r
+   20(fragColor):     19(ptr) Variable Output\r
+         4(main):           2 Function None 3\r
+               5:             Label\r
+                              Store 20(fragColor) 14\r
+                              Return\r
+                              FunctionEnd\r
diff --git a/Test/baseResults/compoundsuffix.vert.glsl b/Test/baseResults/compoundsuffix.vert.glsl
new file mode 100644 (file)
index 0000000..58354a4
--- /dev/null
@@ -0,0 +1,15 @@
+compoundsuffix.vert.glsl\r
+Shader version: 100\r
+0:? Sequence\r
+0:1  Function Definition: main( ( global void)\r
+0:1    Function Parameters: \r
+0:3    Sequence\r
+0:3      move second child to first child ( temp highp 4-component vector of float)\r
+0:3        'gl_Position' ( gl_Position highp 4-component vector of float Position)\r
+0:3        Constant:\r
+0:3          1.000000\r
+0:3          1.000000\r
+0:3          1.000000\r
+0:3          1.000000\r
+0:?   Linker Objects\r
+\r
diff --git a/Test/compoundsuffix.frag.hlsl b/Test/compoundsuffix.frag.hlsl
new file mode 100644 (file)
index 0000000..59322ac
--- /dev/null
@@ -0,0 +1,6 @@
+void main(out float4 fragColor : SV_TARGET0)\r
+{\r
+    fragColor = 1;\r
+}\r
+\r
+\r
diff --git a/Test/compoundsuffix.vert.glsl b/Test/compoundsuffix.vert.glsl
new file mode 100755 (executable)
index 0000000..26862ff
--- /dev/null
@@ -0,0 +1,4 @@
+void main()\r
+{\r
+    gl_Position = vec4(1.0);\r
+}
\ No newline at end of file
index 6ebb6ee..93429a1 100755 (executable)
@@ -74,11 +74,15 @@ else
 fi
 
 #
-# Testing -S
+# Testing -S and compound suffixes
 #
-echo Running explicit stage test
+echo Running explicit stage test and compound suffix tests
 $EXE -i -S vert nosuffix > $TARGETDIR/nosuffix.out
 diff -b $BASEDIR/nosuffix.out $TARGETDIR/nosuffix.out || HASERROR=1
+$EXE -i compoundsuffix.vert.glsl > $TARGETDIR/compoundsuffix.vert.glsl
+diff -b $BASEDIR/compoundsuffix.vert.glsl $TARGETDIR/compoundsuffix.vert.glsl || HASERROR=1
+$EXE -D -e main -H compoundsuffix.frag.hlsl > $TARGETDIR/compoundsuffix.frag.hlsl
+diff -b $BASEDIR/compoundsuffix.frag.hlsl $TARGETDIR/compoundsuffix.frag.hlsl || HASERROR=1
 
 #
 # Testing --hlsl-offsets