Commit 8e82641c authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜 Committed by Marge Bot
Browse files

pan/bi: Add bi_cmpf_nir helper


Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!8135>
parent 8c99fed4
......@@ -2048,6 +2048,33 @@ bi_nir_round(nir_op op)
}
}
static enum bi_cmpf
bi_cmpf_nir(nir_op op)
{
switch (op) {
case nir_op_flt32:
case nir_op_ilt32:
case nir_op_ult32:
return BI_CMPF_LT;
case nir_op_fge32:
case nir_op_ige32:
case nir_op_uge32:
return BI_CMPF_GE;
case nir_op_feq32:
case nir_op_ieq32:
return BI_CMPF_EQ;
case nir_op_fneu32:
case nir_op_ine32:
return BI_CMPF_NE;
default:
unreachable("Invalid compare");
}
}
/* TEXS instructions assume normal 2D f32 operation but are more
* space-efficient and with simpler RA/scheduling requirements*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment