[Piglit] [PATCH] arb_gpu_shader_fp64: fix GS tests generator

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 6 21:43:37 UTC 2016


In order to emit a color for each vertex, we need to move fs_color
inside the loop because EmitVertex() will invalidate all previous
output writes, and there is an interpolated varying in the fragment
shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 generated_tests/templates/gen_conversion_fp64/shader.geom.mako | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generated_tests/templates/gen_conversion_fp64/shader.geom.mako b/generated_tests/templates/gen_conversion_fp64/shader.geom.mako
index bf64065..4e19579 100644
--- a/generated_tests/templates/gen_conversion_fp64/shader.geom.mako
+++ b/generated_tests/templates/gen_conversion_fp64/shader.geom.mako
@@ -16,9 +16,9 @@ void main()
 {
 	${to_type} converted = ${converted_from};
 	bool match = converted == to;
-	fs_color = match ? GREEN : RED;
 
 	for (int i = 0; i < 3; i++) {
+		fs_color = match ? GREEN : RED;
 		gl_Position = vertex_to_gs[i];
 		EmitVertex();
 	}
-- 
2.8.3



More information about the Piglit mailing list