From 3a78b46e59318e58aba87e44689925a3bc84fa88 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 1 Nov 2018 11:57:09 -0700 Subject: [PATCH] st/nir: Gather info after applying lowering FS variant features MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit DrawPixels lowering, for example, adds new varyings that need to be accounted for in inputs_read. The earlier info gathering at link time cannot account for this. Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_program.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 3bc7b0649c4..422b7b2a593 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1103,6 +1103,10 @@ st_create_fp_variant(struct st_context *st, key->external.lower_iyuv); } + /* Some of the lowering above may have introduced new varyings */ + nir_shader_gather_info(tgsi.ir.nir, + nir_shader_get_entrypoint(tgsi.ir.nir)); + variant->driver_shader = pipe->create_fs_state(pipe, &tgsi); variant->key = *key; -- 2.30.2