const array_remapping& rhs);
private:
+
+ void interleave(int trgt_access_mask, int src_access_mask);
+
unsigned target_id;
int8_t read_swizzle_map[4];
};
return os;
}
+/* Apply the array remapping (internal use, exposed here for testing) */
+ bool get_array_remapping(int narrays, array_live_range *array_live_ranges,
+ array_remapping *remapping);
+
+/* Apply the array remapping (internal use, exposed here for testing) */
+int remap_arrays(int narrays, unsigned *array_sizes,
+ exec_list *instructions,
+ array_remapping *map);
+
}
+
+/** Remap the array access to finalize the array merging and interleaving.
+ * @param[in] narrays number of input arrays,
+ * @param[in,out] array_sizes length array of input arrays, on output the
+ * array sizes will be updated according to the remapping,
+ * @param[in,out] instructions TGSI program, on output the arrays access is
+ * remapped to the new array layout,
+ * @param[in] array_live_ranges live ranges and access information of the
+ * arrays.
+ * @returns number of remaining arrays
+ */
+int merge_arrays(int narrays,
+ unsigned *array_sizes,
+ exec_list *instructions,
+ class array_live_range *arr_live_ranges);
#endif