llvmpipe: Add handle export for resource_get_param
authorDaniel Stone <daniels@collabora.com>
Mon, 21 Jun 2021 18:44:01 +0000 (19:44 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Jun 2021 02:13:13 +0000 (02:13 +0000)
commit91029211093c7ab9e32de101ac7499a958635ac6
treee6eab35af4af85a724dd525041cbfe96c91332a7
parentd3ea8f519eab95f4911143814b412ffbbd05f2d8
llvmpipe: Add handle export for resource_get_param

mesa/mesa@2dcc9c7f54ed from mesa/mesa!6639 added a resource_get_param
hook for llvmpipe, which was nice since it gave lavapipe more features.
One of those features was not exporting llvmpipe textures, so those
parts were stubbed out and landed in an assert(0).

This completely broke kms_swrast (llvmpipe+GBM) on non-release builds,
since that definitely does need to export llvmpipe textures.

The query codepath which caused this explosion does fall back to
resource_get_handle() - which is how it worked previously - but not all
callers do this, so just do what all other drivers implementing
resource_get_param() do and open-code the translation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reported-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Jonas Ådahl <jadahl@gmail.com>
Fixes: 2dcc9c7f54ed ("llvmpipe: add resource get param support.")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6639
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11504>
src/gallium/drivers/llvmpipe/lp_texture.c