mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
nir/opcodes: Define udiv_aligned_4 to return poison for not-aligned-4.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39369>
This commit is contained in:
parent
94237c3ea3
commit
231a477402
1 changed files with 5 additions and 2 deletions
|
|
@ -958,8 +958,11 @@ opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], False, "",
|
|||
"src0 >> (src1 & (sizeof(src0) * 8 - 1))",
|
||||
description = "Unsigned right-shift." + shift_note)
|
||||
|
||||
opcode("udiv_aligned_4", 0, tuint, [0], [tuint], False, "",
|
||||
"src0 >> 2", description = "Divide a multiple of 4 by 4")
|
||||
opcode("udiv_aligned_4", 0, tuint, [0], [tuint], False, "", """
|
||||
dst = src0 >> 2;
|
||||
if (src0 & 3)
|
||||
poison = true;
|
||||
""", description = "Divide a multiple of 4 by 4")
|
||||
|
||||
opcode("urol", 0, tuint, [0, 0], [tuint, tuint32], False, "", """
|
||||
uint32_t rotate_mask = sizeof(src0) * 8 - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue