mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 02:04:41 +08:00
intel/brw: Use VEC for emit_unzip()
Helps make SIMD-split code more SSA-friendly. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28971>
This commit is contained in:
parent
1b54b4fad5
commit
84139470a5
@ -482,10 +482,13 @@ emit_unzip(const fs_builder &lbld, fs_inst *inst, unsigned i)
|
||||
const fs_reg src = horiz_offset(inst->src[i], lbld.group() - inst->group);
|
||||
|
||||
if (needs_src_copy(lbld, inst, i)) {
|
||||
const fs_reg tmp = lbld.vgrf(inst->src[i].type, inst->components_read(i));
|
||||
const unsigned num_components = inst->components_read(i);
|
||||
const fs_reg tmp = lbld.vgrf(inst->src[i].type, num_components);
|
||||
|
||||
for (unsigned k = 0; k < inst->components_read(i); ++k)
|
||||
lbld.MOV(offset(tmp, lbld, k), offset(src, inst->exec_size, k));
|
||||
fs_reg comps[num_components];
|
||||
for (unsigned k = 0; k < num_components; ++k)
|
||||
comps[k] = offset(src, inst->exec_size, k);
|
||||
lbld.VEC(tmp, comps, num_components);
|
||||
|
||||
return tmp;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user