1uniform half4 colorGreen, colorRed; 2 3float get() { 4 switch (2) { 5 case 1: return abs(1); 6 case 2: return abs(2); // Only this case should be preserved. 7 case 3: return abs(3); 8 case 4: return abs(4); 9 } 10 // This won't be removed because dead-code elimination is disabled. 11 return abs(5); 12} 13 14half4 main(float2 coords) { 15 float result = get(); 16 return result == 2 ? colorGreen : colorRed; 17} 18