ir3: Pass reserved_user_consts to ir3_shader_from_nir()
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 16 Jun 2020 12:02:24 +0000 (14:02 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 17 Jun 2020 13:13:05 +0000 (13:13 +0000)
commit6f2981176d96984288e1df57b84140096057eadb
tree6ad35a744a19927e0b291a0a7942c20918606f84
parent89c8393a1632720ed0dec82cb9529c5c487fb86d
ir3: Pass reserved_user_consts to ir3_shader_from_nir()

ir3_shader_from_nir() calls ir3_optimize_nir(), which currently sets up
the const state. However, we need to know the number of user consts
reserved by the driver before setting up the const state, which means
that this information needs to be passed into ir3_shader_from_nir()
somehow rather than being set in the shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
src/freedreno/ir3/ir3_shader.c
src/freedreno/ir3/ir3_shader.h
src/gallium/drivers/freedreno/ir3/ir3_gallium.c