|
|
@ -7,14 +7,19 @@
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <wlr/render/wlr_texture.h>
|
|
|
|
#include <wlr/render/wlr_texture.h>
|
|
|
|
|
|
|
|
#include <wlr/render/vulkan.h>
|
|
|
|
#include <wlr/util/log.h>
|
|
|
|
#include <wlr/util/log.h>
|
|
|
|
#include "render/pixel_format.h"
|
|
|
|
#include "render/pixel_format.h"
|
|
|
|
#include "render/vulkan.h"
|
|
|
|
#include "render/vulkan.h"
|
|
|
|
|
|
|
|
|
|
|
|
static const struct wlr_texture_impl texture_impl;
|
|
|
|
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) {
|
|
|
|
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;
|
|
|
|
return (struct wlr_vk_texture *)wlr_texture;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|