st/nir: Gather info after applying lowering FS variant features
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 1 Nov 2018 18:57:09 +0000 (11:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 21 Dec 2018 23:29:30 +0000 (15:29 -0800)
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 <marek.olsak@amd.com>
src/mesa/state_tracker/st_program.c

index 3bc7b0649c4ccf656bc422522f2bb5080fccc6d9..422b7b2a593ebe591862cc8707aacb1761f55fb0 100644 (file)
@@ -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;