st/dri: Set next in template instead of after creation. (v2)
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 12 Feb 2020 15:54:21 +0000 (16:54 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 21:08:01 +0000 (21:08 +0000)
commitafd9274d4801d93dfaad13591d65c135d1c9e466
tree3e638368468da1f97c0c9236638094549e4254a5
parenta1e453f504addc6c1c8b270803c85db394356770
st/dri: Set next in template instead of after creation. (v2)

This should prevent horrors like Iris has with the delayed calls
to iris_resource_finish_aux_import just because info is not
available at allocation time.

AFAICT all drivers just copy the template except radeonsi/r600
which reset the next pointer.

AFAICT there is also no other place we get a state tracker setting
next ptrs on a resource.

v2: Updated Gallium docs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3792>
src/gallium/docs/source/screen.rst
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/radeonsi/si_texture.c
src/gallium/state_trackers/dri/dri2.c