ac/nir/ngg: fix store shared alignment

For stream!=0, this align_mul=4 is not true. Not observe any
problem yet, just for correctness.

Fixes: 60ac5dda82 ("ac: Add NIR lowering for NGG GS.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22304>
This commit is contained in:
Qiang Yu
2023-04-05 09:52:01 +08:00
committed by Marge Bot
parent c082cdacae
commit a2cecbbc44
+4 -1
View File
@@ -2777,7 +2777,10 @@ lower_ngg_gs_emit_vertex_with_counter(nir_builder *b, nir_intrinsic_instr *intri
prim_flag = nir_ior(b, prim_flag, odd_flag);
}
nir_store_shared(b, nir_u2u8(b, prim_flag), gs_emit_vtx_addr, .base = s->lds_offs_primflags + stream, .align_mul = 4u);
nir_store_shared(b, nir_u2u8(b, prim_flag), gs_emit_vtx_addr,
.base = s->lds_offs_primflags + stream,
.align_mul = 4, .align_offset = stream);
nir_instr_remove(&intrin->instr);
return true;
}