Mesa (master): intel/compiler: store the FS inputs in WM prog data

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 1 23:45:45 UTC 2020


Module: Mesa
Branch: master
Commit: 460de2159e2aa8e67f216d9ad8e9ce00cc8c9679
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=460de2159e2aa8e67f216d9ad8e9ce00cc8c9679

Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date:   Tue Mar 31 10:45:26 2020 +0000

intel/compiler: store the FS inputs in WM prog data

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

---

 src/intel/compiler/brw_compiler.h | 5 +++++
 src/intel/compiler/brw_fs.cpp     | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
index 2048cfaafcc..99047998e9a 100644
--- a/src/intel/compiler/brw_compiler.h
+++ b/src/intel/compiler/brw_compiler.h
@@ -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.
     */
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index d20af30b32d..ed9005f86d8 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -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);
 }



More information about the mesa-commit mailing list