mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
ac/llvm: skip ballot zext for 32-bit dest with wave32-as-wave64
NGG lowering can ballots with a 32-bit destination even if the ballot bit
size is 64.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
(cherry picked from commit 0cb26f31fe)
This commit is contained in:
parent
fae833ec0e
commit
9b0da6c5ad
2 changed files with 5 additions and 3 deletions
|
|
@ -224,7 +224,7 @@
|
|||
"description": "ac/llvm: skip ballot zext for 32-bit dest with wave32-as-wave64",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3055,8 +3055,10 @@ static bool visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins
|
|||
switch (instr->intrinsic) {
|
||||
case nir_intrinsic_ballot:
|
||||
result = ac_build_ballot(&ctx->ac, get_src(ctx, instr->src[0]));
|
||||
if (ctx->ac.ballot_mask_bits > ctx->ac.wave_size)
|
||||
result = LLVMBuildZExt(ctx->ac.builder, result, ctx->ac.iN_ballotmask, "");
|
||||
if (instr->dest.ssa.bit_size > ctx->ac.wave_size) {
|
||||
LLVMTypeRef dest_type = LLVMIntTypeInContext(ctx->ac.context, instr->dest.ssa.bit_size);
|
||||
result = LLVMBuildZExt(ctx->ac.builder, result, dest_type, "");
|
||||
}
|
||||
break;
|
||||
case nir_intrinsic_read_invocation:
|
||||
result =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue