/* GFX9+: ES is merged into GS, data is passed through LDS. */
nir_ssa_def *vertex_idx = nir_build_load_local_invocation_index(b);
nir_ssa_def *off = nir_iadd(b, nir_imul_imm(b, vertex_idx, st->esgs_itemsize), io_off);
- nir_build_store_shared(b, intrin->src[0].ssa, off, .write_mask = write_mask,
- .align_mul = 16u, .align_offset = (nir_intrinsic_component(intrin) * 4u) % 16u);
+ nir_build_store_shared(b, intrin->src[0].ssa, off, .write_mask = write_mask);
}
nir_instr_remove(instr);
nir_ssa_def *off = gs_per_vertex_input_offset(b, st, intrin);
if (st->gfx_level >= GFX9)
- return nir_build_load_shared(b, intrin->dest.ssa.num_components, intrin->dest.ssa.bit_size, off,
- .align_mul = 16u, .align_offset = (nir_intrinsic_component(intrin) * 4u) % 16u);
+ return nir_build_load_shared(b, intrin->dest.ssa.num_components, intrin->dest.ssa.bit_size, off);
unsigned wave_size = 64u; /* GFX6-8 only support wave64 */
nir_ssa_def *ring = nir_build_load_ring_esgs_amd(b);
/* Compute the ESGS item size for VS or TES as ES. */
producer->info.esgs_itemsize = num_outputs_written * 16;
+
+ /* For the ESGS ring in LDS, add 1 dword to reduce LDS bank
+ * conflicts, i.e. each vertex will start on a different bank.
+ */
+ if (device->physical_device->rad_info.gfx_level >= GFX9 && producer->info.esgs_itemsize)
+ producer->info.esgs_itemsize += 4;
}
/* Compute NGG info (GFX10+) or GS info. */