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// Gives link error on: 7// Samsung Galaxy S7 8// Model number: SM-G930F 9// GL_VERSION: OpenGL ES 3.2 v1.r12p1-03dev0.92cea07ab1b80f9f42b782b097e01409 10// GL_VENDOR: ARM 11// GL_RENDERER: Mali-T880 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 26void main() 27{ 28 int r; 29 int g; 30 int b; 31 int a; 32 r = 100 * int(injectionSwitch.y); 33 g = int(injectionSwitch.x) * int(injectionSwitch.y); 34 b = 2 * int(injectionSwitch.x); 35 a = g - int(injectionSwitch.x); 36 for( 37 int i = 0; 38 i < 10; 39 i ++ 40 ) 41 { 42 r --; 43 g ++; 44 b ++; 45 a ++; 46 for( 47 int j = 1; 48 j < 10; 49 j ++ 50 ) 51 { 52 if(injectionSwitch.x > injectionSwitch.y) 53 { 54 continue; 55 } 56 if(injectionSwitch.x > injectionSwitch.y) 57 { 58 discard; 59 } 60 a ++; 61 b ++; 62 g ++; 63 r --; 64 } 65 } 66 float fr; 67 float fg; 68 float fb; 69 float fa; 70 fr = float(r / 100); 71 fg = float(g / 100); 72 fb = float(b / 100); 73 fa = float(a / 100); 74 gl_FragColor = vec4(r, g, b, a); 75} 76