Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reference/opt/shaders/frag/loop-dominator-and-switch-default.frag68
-rw-r--r--reference/shaders/frag/loop-dominator-and-switch-default.frag50
-rw-r--r--shaders/frag/loop-dominator-and-switch-default.frag34
3 files changed, 152 insertions, 0 deletions
diff --git a/reference/opt/shaders/frag/loop-dominator-and-switch-default.frag b/reference/opt/shaders/frag/loop-dominator-and-switch-default.frag
new file mode 100644
index 00000000..4db96300
--- /dev/null
+++ b/reference/opt/shaders/frag/loop-dominator-and-switch-default.frag
@@ -0,0 +1,68 @@
+#version 310 es
+precision mediump float;
+precision highp int;
+
+layout(location = 0) out vec4 fragColor;
+
+vec4 _83;
+
+void main()
+{
+ mediump int _18 = int(_83.x);
+ highp vec4 _85;
+ _85 = _83;
+ highp vec4 _92;
+ for (int _84 = 0; _84 < _18; _85 = _92, _84++)
+ {
+ highp vec4 _86;
+ switch (_18)
+ {
+ case 0:
+ {
+ highp vec4 _76 = _85;
+ _76.y = 0.0;
+ _86 = _76;
+ break;
+ }
+ case 1:
+ {
+ highp vec4 _78 = _85;
+ _78.y = 1.0;
+ _86 = _78;
+ break;
+ }
+ default:
+ {
+ int _87;
+ highp vec4 _91;
+ _91 = _85;
+ _87 = 0;
+ mediump int _50;
+ for (;;)
+ {
+ _50 = _87 + 1;
+ if (_87 < _18)
+ {
+ highp vec4 _74 = _91;
+ _74.y = _91.y + 0.5;
+ _91 = _74;
+ _87 = _50;
+ continue;
+ }
+ else
+ {
+ break;
+ }
+ }
+ _92 = _91;
+ continue;
+ }
+ }
+ highp vec4 _82 = _86;
+ _82.y = _86.y + 0.5;
+ _92 = _82;
+ continue;
+ }
+ fragColor = _85;
+}
+
diff --git a/reference/shaders/frag/loop-dominator-and-switch-default.frag b/reference/shaders/frag/loop-dominator-and-switch-default.frag
new file mode 100644
index 00000000..df968f1a
--- /dev/null
+++ b/reference/shaders/frag/loop-dominator-and-switch-default.frag
@@ -0,0 +1,50 @@
+#version 310 es
+precision mediump float;
+precision highp int;
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ vec4 f4;
+ mediump int c = int(f4.x);
+ for (mediump int j = 0; j < c; j++)
+ {
+ switch (c)
+ {
+ case 0:
+ {
+ f4.y = 0.0;
+ break;
+ }
+ case 1:
+ {
+ f4.y = 1.0;
+ break;
+ }
+ default:
+ {
+ mediump int i = 0;
+ for (;;)
+ {
+ mediump int _48 = i;
+ mediump int _50 = _48 + 1;
+ i = _50;
+ if (_48 < c)
+ {
+ f4.y += 0.5;
+ continue;
+ }
+ else
+ {
+ break;
+ }
+ }
+ continue;
+ }
+ }
+ f4.y += 0.5;
+ }
+ fragColor = f4;
+}
+
diff --git a/shaders/frag/loop-dominator-and-switch-default.frag b/shaders/frag/loop-dominator-and-switch-default.frag
new file mode 100644
index 00000000..344d895b
--- /dev/null
+++ b/shaders/frag/loop-dominator-and-switch-default.frag
@@ -0,0 +1,34 @@
+#version 310 es
+precision mediump float;
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ vec4 f4;
+ int c = int(f4.x);
+
+ for (int j = 0; j < c; j++)
+ {
+ switch (c)
+ {
+ case 0:
+ f4.y = 0.0;
+ break;
+ case 1:
+ f4.y = 1.0;
+ break;
+ default:
+ {
+ int i = 0;
+ while (i++ < c) {
+ f4.y += 0.5;
+ }
+ continue;
+ }
+ }
+ f4.y += 0.5;
+ }
+
+ fragColor = f4;
+}