ir3/parser: Fix oob write with immediates array
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 16 Apr 2021 16:36:20 +0000 (18:36 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 19 Apr 2021 16:10:44 +0000 (16:10 +0000)
commit4c5b696cc3ae4795c145e0b33338158a37b3f2ff
tree2ae8a73dcdeea35a61b74041643941f55d59cf88
parent8c140006e2a6812d0930bcd5f6c9738a08abc0d2
ir3/parser: Fix oob write with immediates array

immediates_count and immediates_size are supposed to have the same
units, but it was only incrementing immediates_count by 1. While we're
here, also fix the case where constants are specified out-of-order.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10291>
src/freedreno/ir3/ir3_parser.y