*result = vir_emit_def(c, ldunifa);
else
vir_emit_nondef(c, ldunifa);
- c->last_unifa_offset += 4;
+ c->current_unifa_offset += 4;
}
static void
ntq_emit_load_ubo_unifa(struct v3d_compile *c, nir_intrinsic_instr *instr)
{
/* Every ldunifa auto-increments the unifa address by 4 bytes, so our
- * last unifa offset is 4 bytes ahead of the offset of the last load.
+ * current unifa offset is 4 bytes ahead of the offset of the last load.
*/
static const int32_t max_unifa_skip_dist =
MAX_UNIFA_SKIP_DISTANCE - 4;
bool skip_unifa = false;
uint32_t ldunifa_skips = 0;
if (dynamic_src) {
- c->last_unifa_block = NULL;
- } else if (c->cur_block == c->last_unifa_block &&
- c->last_unifa_index == index &&
- c->last_unifa_offset <= const_offset &&
- c->last_unifa_offset + max_unifa_skip_dist >= const_offset) {
+ c->current_unifa_block = NULL;
+ } else if (c->cur_block == c->current_unifa_block &&
+ c->current_unifa_index == index &&
+ c->current_unifa_offset <= const_offset &&
+ c->current_unifa_offset + max_unifa_skip_dist >= const_offset) {
skip_unifa = true;
- ldunifa_skips = (const_offset - c->last_unifa_offset) / 4;
+ ldunifa_skips = (const_offset - c->current_unifa_offset) / 4;
} else {
- c->last_unifa_block = c->cur_block;
- c->last_unifa_index = index;
- c->last_unifa_offset = const_offset;
+ c->current_unifa_block = c->cur_block;
+ c->current_unifa_index = index;
+ c->current_unifa_offset = const_offset;
}
if (!skip_unifa) {
*/
uint32_t min_threads_for_reg_alloc;
- /* 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.
+ /* The UBO index and block used with the last unifa load, as well as the
+ * current unifa offset *after* emitting that load. 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;
+ struct qblock *current_unifa_block;
+ int32_t current_unifa_index;
+ uint32_t current_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.