| // Copyright 2017 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| /* | |
| * Fragment shader for infinite loop test | |
| */ | |
| #version 430 | |
| #extension GL_ARB_separate_shader_objects : enable | |
| #extension GL_ARB_compute_shader : enable | |
| layout(std430, binding = 0) buffer SSBO | |
| { | |
| int value; | |
| } mem; | |
| void main() { | |
| while (mem.value != 0) { | |
| if (mem.value < 0) | |
| mem.value += 2; | |
| if (mem.value > 0) | |
| mem.value -= 2; | |
| } | |
| } |