[Mesa-dev] [PATCH 5/6] st/nir: Gather info after applying lowering FS variant features

Kenneth Graunke kenneth at whitecape.org
Mon Dec 17 18:37:39 UTC 2018


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.
---
 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.19.1



More information about the mesa-dev mailing list