mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
ac/llvm: conditionally check wave id in gs sendmsg
nir lowering already call this with wave id check, no need to check inside ac_build_sendmsg_gs_alloc_req again. 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/17130>
This commit is contained in:
parent
e75f11625d
commit
74e596a5f0
2 changed files with 7 additions and 5 deletions
|
|
@ -4388,7 +4388,8 @@ void ac_build_sendmsg_gs_alloc_req(struct ac_llvm_context *ctx, LLVMValueRef wav
|
|||
export_dummy_prim = true;
|
||||
}
|
||||
|
||||
ac_build_ifcc(ctx, LLVMBuildICmp(builder, LLVMIntEQ, wave_id, ctx->i32_0, ""), 5020);
|
||||
if (wave_id)
|
||||
ac_build_ifcc(ctx, LLVMBuildICmp(builder, LLVMIntEQ, wave_id, ctx->i32_0, ""), 5020);
|
||||
|
||||
tmp = LLVMBuildShl(builder, prim_cnt, LLVMConstInt(ctx->i32, 12, false), "");
|
||||
tmp = LLVMBuildOr(builder, tmp, vtx_cnt, "");
|
||||
|
|
@ -4413,7 +4414,8 @@ void ac_build_sendmsg_gs_alloc_req(struct ac_llvm_context *ctx, LLVMValueRef wav
|
|||
ac_build_endif(ctx, 5021);
|
||||
}
|
||||
|
||||
ac_build_endif(ctx, 5020);
|
||||
if (wave_id)
|
||||
ac_build_endif(ctx, 5020);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4260,10 +4260,10 @@ static void visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins
|
|||
break;
|
||||
}
|
||||
case nir_intrinsic_alloc_vertices_and_primitives_amd:
|
||||
/* The caller should only call this conditionally for wave 0, so assume that the current
|
||||
* wave is always wave 0.
|
||||
/* The caller should only call this conditionally for wave 0, so pass NULL to disable
|
||||
* the wave 0 check inside this function.
|
||||
*/
|
||||
ac_build_sendmsg_gs_alloc_req(&ctx->ac, ctx->ac.i32_0,
|
||||
ac_build_sendmsg_gs_alloc_req(&ctx->ac, NULL,
|
||||
get_src(ctx, instr->src[0]),
|
||||
get_src(ctx, instr->src[1]));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue