broadcom/compiler: skip unnecessary unifa writes
If a new UBO load happens to read exactly at the offset right after the previous UBO load (something that is fairly common, for example when reading a matrix), we can skip the unifa write (with its 3 delay slots) and just continue to call ldunifa to continue reading consecutive addresses. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128>
This commit is contained in:

committed by
Marge Bot

parent
e1cf2406da
commit
54c17e45ae
@@ -650,6 +650,15 @@ struct v3d_compile {
|
||||
*/
|
||||
bool disable_ldunif_opt;
|
||||
|
||||
/* Last UBO index and offset used with a unifa/ldunifa sequence and the
|
||||
* block where it was emitted. This is used to skip unifa writes (and
|
||||
* their 3 delay slot) when the next UBO load reads right after the
|
||||
* previous one in the same block.
|
||||
*/
|
||||
struct qblock *last_unifa_block;
|
||||
int32_t last_unifa_index;
|
||||
uint32_t last_unifa_offset;
|
||||
|
||||
/* State for whether we're executing on each channel currently. 0 if
|
||||
* yes, otherwise a block number + 1 that the channel jumped to.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user