zink: fix streamout for tess stage

the tess shader needs to actually emit xfb stuff in order for it to work

Fixes: 2891e0b74e ("zink: pull xfb info from tess shader when applicable")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9013>
This commit is contained in:
Mike Blumenkrantz 2021-02-12 10:22:43 -05:00 committed by Marge Bot
parent 41e8dec75c
commit 8721a6cbf2
2 changed files with 3 additions and 3 deletions

View file

@ -3791,8 +3791,8 @@ nir_to_spirv(struct nir_shader *s, const struct zink_so_info *so_info,
emit_cf_list(&ctx, &entry->body);
/* vertex shader emits copied xfb outputs at the end of the shader */
if (so_info && ctx.stage == MESA_SHADER_VERTEX)
/* vertex/tess shader emits copied xfb outputs at the end of the shader */
if (so_info && (ctx.stage == MESA_SHADER_VERTEX || ctx.stage == MESA_SHADER_TESS_EVAL))
emit_so_outputs(&ctx, so_info);
spirv_builder_return(&ctx.builder); // doesn't belong here, but whatevz

View file

@ -847,7 +847,7 @@ zink_create_tes_state(struct pipe_context *pctx,
else
nir = (struct nir_shader *)shader->ir.nir;
return zink_shader_create(zink_screen(pctx->screen), nir, NULL);
return zink_shader_create(zink_screen(pctx->screen), nir, &shader->stream_output);
}
static void