From: Kenneth Graunke Date: Thu, 1 Nov 2018 18:57:09 +0000 (-0700) Subject: st/nir: Gather info after applying lowering FS variant features X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a78b46e59318e58aba87e44689925a3bc84fa88;p=mesa.git st/nir: Gather info after applying lowering FS variant features 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 --- 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;