intel/compiler: Store the number of position slots in the VUE map
authorJason Ekstrand <jason.ekstrand@collabora.com>
Mon, 18 Jul 2022 16:22:54 +0000 (11:22 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 31 Aug 2022 02:00:18 +0000 (02:00 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>

src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_vue_map.c

index b9d79ad..6a78965 100644 (file)
@@ -1203,6 +1203,12 @@ struct brw_vue_map {
    int num_slots;
 
    /**
+    * Number of position VUE slots.  If num_pos_slots > 1, primitive
+    * replication is being used.
+    */
+   int num_pos_slots;
+
+   /**
     * Number of per-patch VUE slots. Only valid for tessellation control
     * shader outputs and tessellation evaluation shader inputs.
     */
index b7f379d..c11708b 100644 (file)
@@ -206,6 +206,7 @@ brw_compute_vue_map(const struct intel_device_info *devinfo,
    }
 
    vue_map->num_slots = slot;
+   vue_map->num_pos_slots = pos_slots;
    vue_map->num_per_vertex_slots = 0;
    vue_map->num_per_patch_slots = 0;
 }
@@ -275,6 +276,7 @@ brw_compute_tess_vue_map(struct brw_vue_map *vue_map,
    }
 
    vue_map->num_per_vertex_slots = slot - vue_map->num_per_patch_slots;
+   vue_map->num_pos_slots = 0;
    vue_map->num_slots = slot;
 }