mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
nir/opt_uniform_subgroup: Handle vote_feq
Brings the vertex shader in dEQP-VK.subgroups.vote.framebuffer.subgroupallequal_dvec4_vertex from 234 to 169 instructions on NAK. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
This commit is contained in:
parent
70fccc59fc
commit
8795006994
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ opt_uniform_subgroup_filter(const nir_instr *instr, const void *_state)
|
|||
case nir_intrinsic_masked_swizzle_amd:
|
||||
case nir_intrinsic_vote_all:
|
||||
case nir_intrinsic_vote_any:
|
||||
case nir_intrinsic_vote_feq:
|
||||
case nir_intrinsic_vote_ieq:
|
||||
return !nir_src_is_divergent(&intrin->src[0]);
|
||||
|
||||
|
|
@ -143,6 +144,9 @@ opt_uniform_subgroup_instr(nir_builder *b, nir_instr *instr, void *_state)
|
|||
intrin->src[0].ssa);
|
||||
}
|
||||
}
|
||||
} else if (intrin->intrinsic == nir_intrinsic_vote_feq) {
|
||||
nir_def *x = intrin->src[0].ssa;
|
||||
return nir_feq(b, x, x);
|
||||
} else if (intrin->intrinsic == nir_intrinsic_vote_ieq) {
|
||||
return nir_imm_true(b);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue