v3d: Split the creating of TEXTURE_SHADER_STATE into a helper function

This extracts the part of v3d_create_sampler_view that creates and fills
in the buffer for the TEXTURE_SHADER_STATE record into a helper
function. This will be used in a later patch to update the record when
the information changes.

v2: Also put the part that creates the buffer into the helper function
    so that it won’t override the contents of an inflight buffer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6914>
4 files changed