turnip: minor cleanups for push constants
Remove shared_consts
from tu_compiled_shaders
. Skip gather_push_constants
when shared consts are enabled. This makes sure push_consts
is only zero-initialized, and reserved_user_consts
is 0. This saves some space in the const file.
This also adds a few asserts and a comment to lower_load_push_constant
. Because shared consts share the same range for all stages, we should not apply per-stage offsets in lower_load_push_constant
. It worked because nir_lower_explicit_io
always sets base to 0 for nir_var_mem_push_const
and shader->push_consts.lo
was always 0 for all stages.