mesa/st: Move the dword slot counting function to glsl_types as well.
authorEric Anholt <eric@anholt.net>
Mon, 6 Jan 2020 20:00:57 +0000 (12:00 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jan 2020 23:55:00 +0000 (23:55 +0000)
commitbc4f089d0167dc22fb86c85fbd0fd0fa6f073a85
tree7de37a77455a8e421f92cc6acef4c8e1b3e6fb4c
parent4cabd4812a6b2a15d15cd889778a36956574c9a3
mesa/st: Move the dword slot counting function to glsl_types as well.

To implement NIR-to-TGSI, we need to be able to get the size of the
uniform variable for the TGSI declaration, not just the
.driver_location.  With its location in mesa/st, drivers couldn't link
to it from nir-to-tgsi.

This feels like a common enough function to want, so let's share it in
the core compiler.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3297>
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h
src/compiler/nir_types.cpp
src/compiler/nir_types.h
src/mesa/Makefile.sources
src/mesa/meson.build
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_glsl_types.cpp [deleted file]
src/mesa/state_tracker/st_glsl_types.h [deleted file]
src/mesa/state_tracker/st_nir_builtins.c