radv: Change radeon_cmdbuf counters to uint64_t to make alias analysis optimize radeon_emit better

1% gain in drawcall throughput on i5-2500. Depends quite heavily on
compiler and CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20877>
This commit is contained in:
Turo Lamminen 2023-01-24 14:25:23 +02:00 committed by Marge Bot
parent d7f429ccc1
commit 4b8dfaae89

View file

@ -103,8 +103,11 @@ enum radeon_value_id {
};
struct radeon_cmdbuf {
unsigned cdw; /* Number of used dwords. */
unsigned max_dw; /* Maximum number of dwords. */
/* These are uint64_t to tell the compiler that buf can't alias them.
* If they're uint32_t the generated code needs to redundantly
* store and reload them between buf writes. */
uint64_t cdw; /* Number of used dwords. */
uint64_t max_dw; /* Maximum number of dwords. */
uint32_t *buf; /* The base pointer of the chunk. */
};