From 031d582bc12399b085de2ec7dd50ba77ccff1d5a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 3 Nov 2015 13:24:24 +1000 Subject: [PATCH] renderer: emit clip distances before emitting position This fixes piglit fixed-clip-enables test. --- src/vrend_shader.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 46cc05b..5e00c8e 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -1740,15 +1740,15 @@ iter_instruction(struct tgsi_iterate_context *iter, if (ret) return FALSE; } + ret = emit_clip_dist_movs(ctx); + if (ret) + return FALSE; if (!ctx->key->gs_present) { ret = emit_prescale(ctx); if (ret) return FALSE; } - ret = emit_clip_dist_movs(ctx); - if (ret) - return FALSE; } else if (iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY) { } else if (iter->processor.Processor == TGSI_PROCESSOR_FRAGMENT) { @@ -1805,10 +1805,10 @@ iter_instruction(struct tgsi_iterate_context *iter, if (ctx->so && ctx->key->gs_present) { emit_so_movs(ctx); } - ret = emit_prescale(ctx); + ret = emit_clip_dist_movs(ctx); if (ret) return FALSE; - ret = emit_clip_dist_movs(ctx); + ret = emit_prescale(ctx); if (ret) return FALSE; snprintf(buf, 255, "EmitVertex();\n");