From 51e343ea48c4587e5155becd7b73ff47228919cd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 29 Jan 2019 14:02:17 +1000 Subject: [PATCH] shader: move realcolor emit to fs. Just noticed this reviewing Gert's final code. Signed-off-by: Dave Airlie --- src/vrend_shader.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 4d0e50d..824b6e3 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4276,12 +4276,6 @@ static void emit_ios_common(struct dump_ctx *ctx) emit_hdrf(ctx, "uniform uvec4 %sconst0[%d];\n", cname, ctx->num_consts); } - if (ctx->key->color_two_side) { - if (ctx->color_in_mask & 1) - emit_hdr(ctx, "vec4 realcolor0;\n"); - if (ctx->color_in_mask & 2) - emit_hdr(ctx, "vec4 realcolor1;\n"); - } if (ctx->ubo_used_mask) { const char *cname = tgsi_proc_to_prefix(ctx->prog_type); @@ -4543,6 +4537,13 @@ static void emit_ios_fs(struct dump_ctx *ctx) } } + if (ctx->key->color_two_side) { + if (ctx->color_in_mask & 1) + emit_hdr(ctx, "vec4 realcolor0;\n"); + if (ctx->color_in_mask & 2) + emit_hdr(ctx, "vec4 realcolor1;\n"); + } + if (ctx->write_all_cbufs) { for (i = 0; i < (uint32_t)ctx->cfg->max_draw_buffers; i++) { if (ctx->cfg->use_gles)