mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 20:50:09 +01:00
nir: add bounds_agx opcode
used to facilitate bounds checking optimization Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
parent
b1e5e73011
commit
6287c8251d
1 changed files with 7 additions and 0 deletions
|
|
@ -1361,6 +1361,13 @@ opcode("imadshl_agx", 0, tint, [0, 0, 0, 0], [tint, tint, tint, tint], False,
|
|||
opcode("imsubshl_agx", 0, tint, [0, 0, 0, 0], [tint, tint, tint, tint], False,
|
||||
"", f"(src0 * src1) - (src2 << src3)")
|
||||
|
||||
# Bounds check instruction.
|
||||
#
|
||||
# Sources: <data, end offset, bounds>
|
||||
opcode("bounds_agx", 0, tint, [0, 0, 0],
|
||||
[tint, tint, tint], False,
|
||||
"", "src1 <= src2 ? src0 : 0")
|
||||
|
||||
binop_convert("interleave_agx", tuint32, tuint16, "", """
|
||||
dst = 0;
|
||||
for (unsigned bit = 0; bit < 16; bit++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue