mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
pan/bi: Assert immediate indices fit
This would have caught the assortment of bugs fixed in the previous two commits, and should help lint going forward. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>
This commit is contained in:
parent
77209e0500
commit
455cde2562
1 changed files with 1 additions and 0 deletions
|
|
@ -272,6 +272,7 @@ def pack_variant(opname, states):
|
|||
|
||||
for (name, pos, width) in st[1].get("immediates", []):
|
||||
common_body.append('unsigned {} = I->{};'.format(name, name))
|
||||
common_body.append('assert({} < {});'.format(name, hex(1 << width)))
|
||||
|
||||
for st in pack_exprs:
|
||||
st.append('({} << {})'.format(name, pos))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue