shader: fix a bug where GS didn't always emit TF output

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: 9157dcbca0

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Italo Nicola 3 years ago committed by Gert Wollny
parent 26767c3ba0
commit 216d3b1014
  1. 2
      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);

Loading…
Cancel
Save