st/mesa: consolidate view format setup code
authorBrian Paul <brianp@vmware.com>
Fri, 23 Sep 2016 19:36:22 +0000 (13:36 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 6 Oct 2016 17:29:32 +0000 (11:29 -0600)
commitb3127a96a942513d0c7df9e45857959244490f4c
tree8105184de011bd1180f975ac8781e305b97416d8
parent628e651f64f1d90c0c56ff02f752ed45e82a50a4
st/mesa: consolidate view format setup code

Before, we had code to compute the sampler view's format spread across two
different functions: in update_single_texture() and
st_get_texture_sampler_view_from_stobj().  Now it's all in one new function.

Also, use _mesa_texture_base_format() to simplify the code.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atom_texture.c