panfrost: Rewrite texture descriptor creation logic
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Feb 2020 19:20:16 +0000 (14:20 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 21 Feb 2020 12:27:05 +0000 (07:27 -0500)
commitb929565ea8d4846b1943f35b6e86d685a616ed54
treeade22274d92ad322a463b9849d88ca91878a62e1
parentad44f587a8e3adbfa76aaea88f59e1f0724805b7
panfrost: Rewrite texture descriptor creation logic

Rather than creating partially within the Gallium create function and
monkeypatching on draw time with code split across N different files
with tight Gallium dependencies, let's streamline everything into a
series of maintainable routines in mesa/src/panfrost with no Gallium
dependencies, doing the entire texture creation in one-shot and thus
adding absolutely zero draw-time overhead (since we can allocate a BO
for the descriptor and upload ahead-of-time, so switching textures is as
cheap as switching pointers).

Was this worth it? You know, I'm not sure :|

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_resource.c
src/panfrost/encoder/pan_texture.c
src/panfrost/encoder/pan_texture.h