lavapipe: add a mapping for BDA
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 31 May 2023 15:59:25 +0000 (11:59 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Jun 2023 01:22:01 +0000 (01:22 +0000)
commitea9ded410a4031c83e7c27c570856ce7e8dd29c1
tree356f4c07bd2b9a51b6b7e9d9366c2e599efc3e03
parent2ac8ca7d72dddf1b58ab5378f654395b644dbdd9
lavapipe: add a mapping for BDA

when passing around BDA, it's important to be able to link the pointer
back to the pipe_resource since BDA doesn't have an explicit lifetime

this mapping enables cmds to receive a BDA pointer and then map it back
to a pipe_resource in order to avoid gymnastics with dynamically creating
pipe_resource objects which may or may not be able to be freed

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
src/gallium/frontends/lavapipe/lvp_device.c
src/gallium/frontends/lavapipe/lvp_image.c
src/gallium/frontends/lavapipe/lvp_private.h