iris: Move down iris_emit_sbe_swiz in profiles.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sat, 2 Nov 2019 07:06:03 +0000 (08:06 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 14:28:36 +0000 (14:28 +0000)
Harvest the information gathered in the previous patch
inside of iris.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>

src/gallium/drivers/iris/iris_state.c

index 6c760e0..eab934f 100644 (file)
@@ -3872,7 +3872,8 @@ iris_emit_sbe_swiz(struct iris_batch *batch,
 
    /* XXX: this should be generated when putting programs in place */
 
-   for (int fs_attr = 0; fs_attr < VARYING_SLOT_MAX; fs_attr++) {
+   for (uint8_t idx = 0; idx < wm_prog_data->urb_setup_attribs_count; idx++) {
+      const uint8_t fs_attr = wm_prog_data->urb_setup_attribs[idx];
       const int input_index = wm_prog_data->urb_setup[fs_attr];
       if (input_index < 0 || input_index >= 16)
          continue;