aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan/texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/vulkan/texture.c')
-rw-r--r--render/vulkan/texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c
index 083931ff..a72124d2 100644
--- a/render/vulkan/texture.c
+++ b/render/vulkan/texture.c
@@ -22,7 +22,8 @@ bool wlr_texture_is_vk(struct wlr_texture *wlr_texture) {
struct wlr_vk_texture *vulkan_get_texture(struct wlr_texture *wlr_texture) {
assert(wlr_texture_is_vk(wlr_texture));
- return (struct wlr_vk_texture *)wlr_texture;
+ struct wlr_vk_texture *texture = wl_container_of(wlr_texture, texture, wlr_texture);
+ return texture;
}
static VkImageAspectFlagBits mem_plane_aspect(unsigned i) {