intel/compiler: store the FS inputs in WM prog data
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 31 Mar 2020 10:45:26 +0000 (10:45 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Apr 2020 23:36:28 +0000 (23:36 +0000)
Store the fragment shader inputs in the program data so we can use them
later when required without needing the NIR shader.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2010>

src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp

index 2048cfaafccde43642ab3721633ca6ae4d0def10..99047998e9afb6c9c543e2f8dcf5ee368695cc9e 100644 (file)
@@ -780,6 +780,11 @@ struct brw_wm_prog_data {
     */
    uint32_t flat_inputs;
 
+   /**
+    * The FS inputs
+    */
+   uint64_t inputs;
+
    /* Mapping of VUE slots to interpolation modes.
     * Used by the Gen4-5 clip/sf/wm stages.
     */
index d20af30b32d961ae57fc4c419e233fcd1adff5c9..ed9005f86d8d0ca024139cc007274671da73ab19 100644 (file)
@@ -1748,6 +1748,7 @@ calculate_urb_setup(const struct gen_device_info *devinfo,
    }
 
    prog_data->num_varying_inputs = urb_next;
+   prog_data->inputs = nir->info.inputs_read;
 
    brw_compute_urb_setup_index(prog_data);
 }