summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert')
-rw-r--r--3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert87
1 files changed, 0 insertions, 87 deletions
diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert b/3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert
deleted file mode 100644
index 86c27a584e4..00000000000
--- a/3rdparty/bgfx/3rdparty/glslang/Test/110scope.vert
+++ /dev/null
@@ -1,87 +0,0 @@
-#version 110
-
-int f(int a, int b, int c)
-{
- int a = b; // ERROR, redefinition
-
- {
- float a = float(a) + 1.0; // okay
- }
-
- return a;
-}
-
-int f(int a, int b, int c); // okay to redeclare
-
-bool b;
-float b(int a); // okay, b and b() are different
-
-float c(int a);
-bool c; // okay, and c() are different
-
-float f; // okay f and f() are different
-float tan; // okay, hides built-in function
-float sin(float x); // okay, can redefine built-in functions
-float cos(float x) // okay, can redefine built-in functions
-{
- return 1.0;
-}
-bool radians(bool x) // okay, can overload built-in functions
-{
- return true;
-}
-
-int gi = f(1,2,3); // ERROR, can't call user-defined function from global scope
-
-void main()
-{
- int g(); // okay
- g();
-
- float sin; // okay
- sin;
- sin(0.7); // okay
- f(1,2,3);
-
- float f;
- f = 3.0;
-
- gl_Position = vec4(f);
-
- for (int f = 0; f < 10; ++f)
- ++f;
-
- int x = 1;
- {
- float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
- int z = z; // ERROR: z not previously defined.
- }
- {
- int x = x; // x is initialized to '1'
- }
-
- struct S
- {
- int x;
- };
- {
- S S = S(0); // 'S' is only visible as a struct and constructor
- S.x; // 'S' is now visible as a variable
- }
-
- int degrees;
- degrees(3.2);
-
- {
- S s;
- s.x = 3;
- struct S { // okay, hides S
- bool b;
- };
- S t;
- t.b = true;
- struct S { // ERROR, redefinition of struct S
- float f;
- };
- }
-}