mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 10:10:23 +01:00
aco/isel: Improve vector splits for image_bvh8_intersect_ray
Using split_vector to split everything into scalars allows copy-prop to eliminate the final p_create_vector. Considerably reduces copies and register thrashing. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35269>
This commit is contained in:
parent
76f1e08222
commit
f17fe05e32
1 changed files with 11 additions and 2 deletions
|
|
@ -1850,9 +1850,18 @@ visit_bvh8_intersect_ray_amd(isel_context* ctx, nir_intrinsic_instr* instr)
|
|||
mimg->dmask = 0xf;
|
||||
mimg->unrm = true;
|
||||
mimg->r128 = true;
|
||||
emit_split_vector(ctx, result, 10);
|
||||
emit_split_vector(ctx, new_origin, 3);
|
||||
emit_split_vector(ctx, new_dir, 3);
|
||||
|
||||
bld.pseudo(aco_opcode::p_create_vector, Definition(dst), Operand(result), Operand(new_origin),
|
||||
Operand(new_dir));
|
||||
Temp vec[16];
|
||||
for (unsigned i = 0; i < 10; ++i)
|
||||
vec[i] = emit_extract_vector(ctx, result, i, RegClass::v1);
|
||||
for (unsigned i = 0; i < 3; ++i) {
|
||||
vec[10 + i] = emit_extract_vector(ctx, new_origin, i, RegClass::v1);
|
||||
vec[13 + i] = emit_extract_vector(ctx, new_dir, i, RegClass::v1);
|
||||
}
|
||||
create_vec_from_array(ctx, vec, 16, RegType::vgpr, 4, 0, dst);
|
||||
}
|
||||
|
||||
static std::vector<Temp>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue