nir: use nir_i{ne,eq}_imm helpers

We already have these, so let's use them more.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>
This commit is contained in:
Erik Faye-Lund
2023-06-02 12:25:58 +02:00
committed by Marge Bot
parent 57260a836a
commit 28b1c5bca1
18 changed files with 36 additions and 36 deletions

View File

@@ -110,7 +110,7 @@ brw_nir_lower_launch_mesh_workgroups_instr(nir_builder *b, nir_instr *instr, voi
/* Make sure that the mesh workgroup size is taken from the first invocation
* (nir_intrinsic_launch_mesh_workgroups requirement)
*/
nir_ssa_def *cmp = nir_ieq(b, local_invocation_index, nir_imm_int(b, 0));
nir_ssa_def *cmp = nir_ieq_imm(b, local_invocation_index, 0);
nir_if *if_stmt = nir_push_if(b, cmp);
{
/* TUE header contains 4 words:

View File

@@ -370,7 +370,7 @@ lower_ray_query_intrinsic(nir_builder *b,
* RayQueryCommittedIntersectionGeneratedEXT = 2U <= hit_in.leaf_type == BRW_RT_BVH_NODE_TYPE_PROCEDURAL (3)
*/
sysval =
nir_bcsel(b, nir_ieq(b, hit_in.leaf_type, nir_imm_int(b, 4)),
nir_bcsel(b, nir_ieq_imm(b, hit_in.leaf_type, 4),
nir_imm_int(b, 1), nir_imm_int(b, 2));
sysval =
nir_bcsel(b, hit_in.valid,
@@ -379,8 +379,8 @@ lower_ray_query_intrinsic(nir_builder *b,
/* 0 -> triangle, 1 -> AABB */
sysval =
nir_b2i32(b,
nir_ieq(b, hit_in.leaf_type,
nir_imm_int(b, BRW_RT_BVH_NODE_TYPE_PROCEDURAL)));
nir_ieq_imm(b, hit_in.leaf_type,
BRW_RT_BVH_NODE_TYPE_PROCEDURAL));
}
break;

View File

@@ -926,8 +926,8 @@ brw_nir_rt_load_primitive_id_from_hit(nir_builder *b,
{
if (!is_procedural) {
is_procedural =
nir_ieq(b, defs->leaf_type,
nir_imm_int(b, BRW_RT_BVH_NODE_TYPE_PROCEDURAL));
nir_ieq_imm(b, defs->leaf_type,
BRW_RT_BVH_NODE_TYPE_PROCEDURAL);
}
nir_ssa_def *prim_id_proc, *prim_id_quad;
@@ -973,7 +973,7 @@ brw_nir_rt_acceleration_structure_to_root_node(nir_builder *b,
* BVH, we can find the root node at a given offset.
*/
nir_ssa_def *root_node_ptr, *null_node_ptr;
nir_push_if(b, nir_ieq(b, as_addr, nir_imm_int64(b, 0)));
nir_push_if(b, nir_ieq_imm(b, as_addr, 0));
{
null_node_ptr = nir_imm_int64(b, 0);
}