mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
gallivm: Return 0 first_active_invocation when we know that up front.
46 -> 30 seconds on dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_i16vec4 by not spamming LLVM with so many loops. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21001>
This commit is contained in:
parent
dc7c518abe
commit
c11fa55f6d
1 changed files with 3 additions and 0 deletions
|
|
@ -100,6 +100,9 @@ static LLVMValueRef first_active_invocation(struct lp_build_nir_context *bld_bas
|
|||
struct gallivm_state *gallivm = bld_base->base.gallivm;
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
|
||||
if (invocation_0_must_be_active(bld_base))
|
||||
return lp_build_const_int32(gallivm, 0);
|
||||
|
||||
/* have to find the first active (nonzero) invocation in the exec_mask
|
||||
* vector, but there's no nice LLVM intrinsic to do so. Loop down from the
|
||||
* last invocation to the first, storing the loop counter to a scalar temp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue