Stop importing DMA-BUFs into EGL
Make renderer_texture_from_dmabuf a no-op, since we handle client DMA-BUFs with Vulkan. We're using wlr_buffer_get_dmabuf to directly access the client-submitted FDs.
This commit is contained in:
parent
7adcd2fb20
commit
cd4c1a4d7d
2 changed files with 20 additions and 2 deletions
|
@ -2155,6 +2155,16 @@ uint32_t vulkan_texture_get_fbid( VulkanTexture_t vulkanTex )
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void texture_destroy( struct wlr_texture *wlr_texture )
|
||||
{
|
||||
VulkanWlrTexture_t *tex = (VulkanWlrTexture_t *)wlr_texture;
|
||||
delete tex;
|
||||
}
|
||||
|
||||
static const struct wlr_texture_impl texture_impl = {
|
||||
.destroy = texture_destroy,
|
||||
};
|
||||
|
||||
static void renderer_begin( struct wlr_renderer *renderer, uint32_t width, uint32_t height )
|
||||
{
|
||||
abort(); // unreachable
|
||||
|
@ -2225,8 +2235,11 @@ static const struct wlr_drm_format_set *renderer_get_dmabuf_texture_formats( str
|
|||
|
||||
static struct wlr_texture *renderer_texture_from_dmabuf( struct wlr_renderer *wlr_renderer, struct wlr_dmabuf_attributes *dmabuf )
|
||||
{
|
||||
VulkanRenderer_t *renderer = (VulkanRenderer_t *) wlr_renderer;
|
||||
return wlr_texture_from_dmabuf( renderer->parent, dmabuf );
|
||||
VulkanWlrTexture_t *tex = new VulkanWlrTexture_t();
|
||||
wlr_texture_init( &tex->base, &texture_impl, dmabuf->width, dmabuf->height );
|
||||
// TODO: check format/modifier
|
||||
// TODO: try importing it into Vulkan
|
||||
return &tex->base;
|
||||
}
|
||||
|
||||
static bool renderer_resource_is_wl_drm_buffer( struct wlr_renderer *wlr_renderer, struct wl_resource *resource )
|
||||
|
|
|
@ -70,6 +70,11 @@ struct VulkanRenderer_t
|
|||
struct wlr_renderer *parent;
|
||||
};
|
||||
|
||||
struct VulkanWlrTexture_t
|
||||
{
|
||||
struct wlr_texture base;
|
||||
};
|
||||
|
||||
class CVulkanTexture
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue