mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
nir: Require vectorized ALU ops to be all-or-nothing
Long ago, the semantics of bcsel were such that it took a single boolean value and selected between whole vectors. These days, it takes a vector boolean with the assumption that if you want the old behavior you can just use a .xxxx swizzle. There currently are no opcodes which use a output_size of 0 but have a scalar or fixed-vector input. Let's disallow it for now to force us to think through the semantics again if this ever comes up as something someone actually wants. Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11438>
This commit is contained in:
parent
ea68d4a676
commit
f00b5a30f5
1 changed files with 2 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ class Opcode(object):
|
|||
assert 0 <= output_size <= 5 or (output_size == 8) or (output_size == 16)
|
||||
for size in input_sizes:
|
||||
assert 0 <= size <= 5 or (size == 8) or (size == 16)
|
||||
if output_size == 0:
|
||||
assert size == 0
|
||||
if output_size != 0:
|
||||
assert size != 0
|
||||
self.name = name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue