ac/llvm: global stores should have no holes in the writemask

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29282>
This commit is contained in:
Marek Olšák
2024-05-18 19:30:26 -04:00
committed by Marge Bot
parent 7952e4fc7a
commit 5a115b1055

View File

@@ -2016,6 +2016,10 @@ static void visit_store_global(struct ac_nir_context *ctx,
LLVMTypeRef type = LLVMTypeOf(data);
LLVMValueRef addr = get_global_address(ctx, instr, type);
LLVMValueRef val;
/* nir_opt_shrink_stores should be enough to simplify the writemask. Store writemasks should
* have no holes.
*/
assert(nir_intrinsic_write_mask(instr) == BITFIELD_MASK(instr->src[0].ssa->num_components));
val = LLVMBuildStore(ctx->ac.builder, data, addr);