st/mesa: re-arrange st_finalize_texture

Move the early-out for surface-based textures earlier. This narrows the
scope of the locking added in a follow-up commit.

Fix one remaining case of initializing a surface-based texture
without properly finalizing it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2 files changed