• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 100
2
3// Copyright Alastair F. Donaldson and Hugues Evrard, Imperial College London, 2017
4// Defect found using GLFuzz - https://www.graphicsfuzz.com/
5//
6// Causes crash on:
7// Samsung Galaxy S7
8// Model number: SM-G930P
9// GL_VERSION: OpenGL ES 3.2 V@145.0 (GIT@I86b60582e4)
10// GL_VENDOR: Qualcomm
11// GL_RENDERER: Adreno (TM) 530
12// Android version: 7.0
13
14#ifdef GL_ES
15#ifdef GL_FRAGMENT_PRECISION_HIGH
16precision highp float;
17precision highp int;
18#else
19precision mediump float;
20precision mediump int;
21#endif
22#endif
23
24uniform vec2 injectionSwitch;
25
26vec4 f()
27{
28    if(injectionSwitch.x < injectionSwitch.y
29       ? injectionSwitch.x > injectionSwitch.y
30       : false)
31        {
32            return vec4(1.0);
33        }
34    return vec4(1.0);
35}
36void main()
37{
38    int r;
39    int g;
40    int b;
41    int a;
42    r = 100 * int(injectionSwitch.y);
43    g = int(injectionSwitch.x) * int(injectionSwitch.y);
44    b = 2 * int(injectionSwitch.x);
45    a = g - int(injectionSwitch.x);
46    for(
47        int i = 0;
48        i < 10;
49        i ++
50    )
51        {
52            r --;
53            g ++;
54            b ++;
55            a ++;
56            for(
57                int j = 1;
58                j < 10;
59                j ++
60            )
61                {
62                    f();
63                    a ++;
64                    b ++;
65                    g ++;
66                    r --;
67                }
68        }
69    float fr;
70    float fg;
71    float fb;
72    float fa;
73    fr = float(r / 100);
74    fg = float(g / 100);
75    fb = float(b / 100);
76    fa = float(a / 100);
77    gl_FragColor = vec4(r, g, b, a);
78}
79