Skip to content

llvmpipe: Add handle export for resource_get_param

Daniel Stone requested to merge daniels/mesa:llvmpipe-kms-swrast into main

2dcc9c7f from !6639 (merged) 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 Reported-by: Jonas Ådahl jadahl@gmail.com Fixes: 2dcc9c7f ("llvmpipe: add resource get param support.") Ref: !6639 (merged)


@jadahl I've gone for a more conservative approach here, can you please double-check it still works?

cc @airlied @sroland

Merge request reports