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 black image to be rendered on: 7// ASUS ZenPad 3S 10 8// Model number: P027 9// GL_VERSION: OpenGL ES 3.1 build 1.5@3830101 10// GL_VENDOR: Imagination Technologies 11// GL_RENDERER: PowerVR Rogue GX6250 12// Android version: 6.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 break; 55 } 56 a ++; 57 if(injectionSwitch.x > injectionSwitch.y) 58 { 59 break; 60 } 61 b ++; 62 g ++; 63 r --; 64 if(injectionSwitch.x > injectionSwitch.y) 65 { 66 return; 67 } 68 } 69 } 70 float fr; 71 float fg; 72 float fb; 73 float fa; 74 fr = float(r / 100); 75 fg = float(g / 100); 76 fb = float(b / 100); 77 fa = float(a / 100); 78 gl_FragColor = vec4(r, g, b, a); 79} 80