From 48c811ffb6ef49a311eb25669da96519bfd5dc97 Mon Sep 17 00:00:00 2001 From: zccrs Date: Sun, 1 May 2022 14:27:40 +0800 Subject: [PATCH] render/vulkan: fix undefined reference to wlr_texture_is_vk Added the implement of wlr_texture_is_vk. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3419 --- render/vulkan/texture.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c index b705603c..26af9867 100644 --- a/render/vulkan/texture.c +++ b/render/vulkan/texture.c @@ -7,14 +7,19 @@ #include #include #include +#include #include #include "render/pixel_format.h" #include "render/vulkan.h" static const struct wlr_texture_impl texture_impl; +bool wlr_texture_is_vk(struct wlr_texture *wlr_texture) { + return wlr_texture->impl == &texture_impl; +} + struct wlr_vk_texture *vulkan_get_texture(struct wlr_texture *wlr_texture) { - assert(wlr_texture->impl == &texture_impl); + assert(wlr_texture_is_vk(wlr_texture)); return (struct wlr_vk_texture *)wlr_texture; }