From 216d3b1014585e3618851cde4dda34a327eaa2e6 Mon Sep 17 00:00:00 2001 From: Italo Nicola Date: Wed, 9 Feb 2022 06:45:50 -0300 Subject: [PATCH] shader: fix a bug where GS didn't always emit TF output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, we always use the `tfout` variables when writing TF output for geometry shaders, but only declare them under specific conditions, causing GLSL errors in tests like `` Fixes: 9157dcbca0b3001d63ef0755e707f7bd4e2311a6 Signed-off-by: Italo Nicola Reviewed-by: Corentin Noël Reviewed-by: Gert Wollny --- src/vrend_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 7ba13c2..dcf2b08 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -6206,7 +6206,7 @@ static void emit_ios_streamout(const struct dump_ctx *ctx, const struct vrend_shader_io *output = get_io_slot(&ctx->outputs[0], ctx->num_outputs, ctx->so->output[i].register_index); if (ctx->so->output[i].need_temp || output->name == TGSI_SEMANTIC_CLIPDIST || - output->glsl_predefined_no_emit) { + ctx->prog_type == TGSI_PROCESSOR_GEOMETRY || output->glsl_predefined_no_emit) { if (ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL) emit_hdrf(glsl_strbufs, "out %s tfout%d[];\n", outtype, i);