diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-11-30 20:01:12 -0500 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-11-30 20:01:12 -0500 |
commit | c5a3c5ca4cc4ee664bb4b4edad77dba8c36b0a21 (patch) | |
tree | f693358d1a1502fbab143eeb06eb3944f693812a /render/vulkan | |
parent | 57b18d26d09f5219fe0458dcdd06fd2c817c294e (diff) |
render: Implement texture_preferred_read_format
Diffstat (limited to 'render/vulkan')
-rw-r--r-- | render/vulkan/texture.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c index 16c48356..20aa12f1 100644 --- a/render/vulkan/texture.c +++ b/render/vulkan/texture.c @@ -262,9 +262,15 @@ static bool vulkan_texture_read_pixels(struct wlr_texture *wlr_texture, options->format, options->stride, src.width, src.height, src.x, src.y, 0, 0, p); } +static uint32_t vulkan_texture_preferred_read_format(struct wlr_texture *wlr_texture) { + struct wlr_vk_texture *texture = vulkan_get_texture(wlr_texture); + return texture->format->drm; +} + static const struct wlr_texture_impl texture_impl = { .update_from_buffer = vulkan_texture_update_from_buffer, .read_pixels = vulkan_texture_read_pixels, + .preferred_read_format = vulkan_texture_preferred_read_format, .destroy = vulkan_texture_unref, }; |