aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan
diff options
context:
space:
mode:
authorzccrs <zccrs@live.com>2022-05-01 14:27:40 +0800
committerzccrs <zccrs@live.com>2022-05-01 14:46:18 +0800
commit48c811ffb6ef49a311eb25669da96519bfd5dc97 (patch)
tree399525cd1143a091549838b641d4c6450490028c /render/vulkan
parentbc4350c976f238bc945ad02cfddb0b186de207ed (diff)
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
Diffstat (limited to 'render/vulkan')
-rw-r--r--render/vulkan/texture.c7
1 files changed, 6 insertions, 1 deletions
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 <sys/stat.h>
#include <unistd.h>
#include <wlr/render/wlr_texture.h>
+#include <wlr/render/vulkan.h>
#include <wlr/util/log.h>
#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;
}