mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
nir: add quad_ballot_agx intrinsic
to lower quad votes in nir. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179>
This commit is contained in:
parent
2912f531a7
commit
9d824bd123
1 changed files with 3 additions and 0 deletions
|
|
@ -1803,6 +1803,9 @@ intrinsic("load_fep_w_v3d", dest_comp=1, flags=[CAN_ELIMINATE, CAN_REORDER])
|
|||
# Equivalent to popcount(ballot(true) & ((1 << subgroup_invocation) - 1))
|
||||
system_value("active_subgroup_invocation_agx", 1)
|
||||
|
||||
# Like ballot() but only within a quad.
|
||||
intrinsic("quad_ballot_agx", src_comp=[1], dest_comp=1, flags=[CAN_ELIMINATE])
|
||||
|
||||
# With [0, 1] clipping, no transform is needed on the output z' = z. But with [-1,
|
||||
# 1] clipping, we need to transform z' = (z + w) / 2. We express both cases as a
|
||||
# lerp between z and w, where this is the lerp coefficient: 0 for [0, 1] and 0.5
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue