ir3: keep inputs at start block when creating empty preamble
It is expected that inputs and prefetches are always in the first block.
However, ir3_create_empty_preamble would create blocks before the first
one, leaving inputs after the preamble. This causes issues with
(probably among others) spilling/RA where precolored inputs could
illegally reuse the spill base register.
Fixes RA validation failures on a7xx for
dEQP-VK.ray_query.multiple_ray_queries.vertex_shader
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: f3026b3d3e ("ir3: add some preamble helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33977>
This commit is contained in:
@@ -683,6 +683,17 @@ ir3_create_empty_preamble(struct ir3 *ir)
|
||||
|
||||
main_start_block->reconvergence_point = true;
|
||||
|
||||
/* Inputs are always expected to be in the first block so move them there. */
|
||||
struct ir3_cursor inputs_cursor = ir3_before_terminator(shps_block);
|
||||
|
||||
foreach_instr_safe (instr, &main_start_block->instr_list) {
|
||||
if (instr->opc == OPC_META_INPUT || instr->opc == OPC_META_TEX_PREFETCH) {
|
||||
list_del(&instr->node);
|
||||
insert_instr(inputs_cursor, instr);
|
||||
instr->block = shps_block;
|
||||
}
|
||||
}
|
||||
|
||||
return shpe;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user