6b9bd3f038
Typically, optimization passes go through all the blocks in a shader and make adjustments on the fly, so we always want them to update the current block or the current block pointer will become outdated. Also, we don't need to keep track of the previous current block pointer to restore it, since optimization passes run after we have completed conversion to VIR, and therefore, anything that comes after that should always set the current block before emitting code. Fixes debug assert crashes when running shader-db: vir.c:1888: try_opt_ldunif: Assertion `found || &c->cur_block->instructions == c->cursor.link' failed Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13625>