aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-19 02:14:40 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-11-30 20:01:12 -0500
commit3ed1268f64fd736712c2de1bf522d42d6694e3cc (patch)
treedcb03756e36e54a8679b4c46a8d189c0968cf257 /render/vulkan
parentb3575fedbc8123b7e878d3b40778da74acfbadef (diff)
render: Nuke old read pixels API
Sadly, the new API is not backwards compatible with the old API. Since we have already switched all users in wlroots to the new API compositors are already practically mandated to implement the new API. Let's get rid of the old one since there is no point.
Diffstat (limited to 'render/vulkan')
-rw-r--r--render/vulkan/renderer.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index a116b0e5..35d5f829 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -1015,18 +1015,6 @@ static const struct wlr_drm_format_set *vulkan_get_render_formats(
return &renderer->dev->dmabuf_render_formats;
}
-static uint32_t vulkan_preferred_read_format(
- struct wlr_renderer *wlr_renderer) {
- struct wlr_vk_renderer *renderer = vulkan_get_renderer(wlr_renderer);
- struct wlr_dmabuf_attributes dmabuf = {0};
- if (!wlr_buffer_get_dmabuf(renderer->current_render_buffer->wlr_buffer,
- &dmabuf)) {
- wlr_log(WLR_ERROR, "vulkan_preferred_read_format: Failed to get dmabuf of current render buffer");
- return DRM_FORMAT_INVALID;
- }
- return dmabuf.format;
-}
-
static void vulkan_destroy(struct wlr_renderer *wlr_renderer) {
struct wlr_vk_renderer *renderer = vulkan_get_renderer(wlr_renderer);
struct wlr_vk_device *dev = renderer->dev;
@@ -1116,18 +1104,6 @@ static void vulkan_destroy(struct wlr_renderer *wlr_renderer) {
free(renderer);
}
-static bool vulkan_read_pixels_legacy(struct wlr_renderer *wlr_renderer,
- uint32_t drm_format, uint32_t stride,
- uint32_t width, uint32_t height, uint32_t src_x, uint32_t src_y,
- uint32_t dst_x, uint32_t dst_y, void *data) {
- struct wlr_vk_renderer *vk_renderer = vulkan_get_renderer(wlr_renderer);
- VkFormat src_format = vk_renderer->current_render_buffer->render_setup->render_format->vk;
- VkImage src_image = vk_renderer->current_render_buffer->image;
-
- return vulkan_read_pixels(vk_renderer, src_format, src_image, drm_format,
- stride, width, height, src_x, src_y, dst_x, dst_y, data);
-}
-
bool vulkan_read_pixels(struct wlr_vk_renderer *vk_renderer,
VkFormat src_format, VkImage src_image,
uint32_t drm_format, uint32_t stride,
@@ -1396,8 +1372,6 @@ static const struct wlr_renderer_impl renderer_impl = {
.get_shm_texture_formats = vulkan_get_shm_texture_formats,
.get_dmabuf_texture_formats = vulkan_get_dmabuf_texture_formats,
.get_render_formats = vulkan_get_render_formats,
- .preferred_read_format = vulkan_preferred_read_format,
- .read_pixels = vulkan_read_pixels_legacy,
.destroy = vulkan_destroy,
.get_drm_fd = vulkan_get_drm_fd,
.get_render_buffer_caps = vulkan_get_render_buffer_caps,