Harbor

branch main
showing the latest snapshot on main
loop_control.glsl-opengl 624 B · Plain text
gpu/shader/tests/golden/loop_control.glsl-opengl 0644 Raw
#version 450

layout(location = 0) in float in_value;
layout(location = 0) out vec4 out__value;

void main() {
	float result = 0.0;
	for (int i = 0; i <= 10; i++) {
		if (((i % 2) == 0)) {
			continue;
		}
		result = (result + float(i));
	}
	float total = 0.0;
	for (int j = 0; j <= 100; j++) {
		if ((j > 5)) {
			break;
		}
		total = (total + 1.0);
	}
	int k = 0;
	while ((k < 100)) {
		if ((k > 10)) {
			break;
		}
		k = (k + 1);
	}
	float sum = 0.0;
	int m = 0;
	while ((m < 10)) {
		m = (m + 1);
		if ((m == 5)) {
			continue;
		}
		sum = (sum + 1.0);
	}
	out__value = vec4(((result + total) + sum), 0.0, 0.0, 1.0);
}