summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-17 21:34:32 -0500
committerDudemanguy <random342@airmail.cc>2023-10-10 19:10:55 +0000
commita899e14bccb667af243f8fce454160e17ae45c2a (patch)
tree77fede3fe581c4cedbe6cf04f456e16937374dfb /video/out/vulkan
parentc82c55b4b9d4015ba79fb36170defb328563cdea (diff)
downloadmpv-a899e14bccb667af243f8fce454160e17ae45c2a.tar.bz2
mpv-a899e14bccb667af243f8fce454160e17ae45c2a.tar.xz
vo: change vo->driver->wait_events to nanoseconds
In many cases, this is purely cosmetic because poll still only accepts microseconds. There's still a gain here however since pthread_cond_timedwait can take a realtime ts now. Additionally, 37d6604d70c8c594de2817db26356c4c950ac0fd changed the value added to timeout_ms in X11 and Wayland to ensure that it would never be 0 and rounded up. This was both incomplete, several other parts of the player have this same problem like drm, and not really needed. Instead the MPCLAMP is just adjusted to have a min of 1.
Diffstat (limited to 'video/out/vulkan')
-rw-r--r--video/out/vulkan/context_display.c2
-rw-r--r--video/out/vulkan/context_wayland.c4
-rw-r--r--video/out/vulkan/context_xlib.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/video/out/vulkan/context_display.c b/video/out/vulkan/context_display.c
index da801dd921..84cef1e8c2 100644
--- a/video/out/vulkan/context_display.c
+++ b/video/out/vulkan/context_display.c
@@ -474,7 +474,7 @@ static void display_wakeup(struct ra_ctx *ctx)
// TODO
}
-static void display_wait_events(struct ra_ctx *ctx, int64_t until_time_us)
+static void display_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
{
// TODO
}
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c
index 5ca6265a91..761ff5b12c 100644
--- a/video/out/vulkan/context_wayland.c
+++ b/video/out/vulkan/context_wayland.c
@@ -142,9 +142,9 @@ static void wayland_vk_wakeup(struct ra_ctx *ctx)
vo_wayland_wakeup(ctx->vo);
}
-static void wayland_vk_wait_events(struct ra_ctx *ctx, int64_t until_time_us)
+static void wayland_vk_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
{
- vo_wayland_wait_events(ctx->vo, until_time_us);
+ vo_wayland_wait_events(ctx->vo, until_time_ns);
}
static void wayland_vk_update_render_opts(struct ra_ctx *ctx)
diff --git a/video/out/vulkan/context_xlib.c b/video/out/vulkan/context_xlib.c
index 0c01d56fc9..673dc312b7 100644
--- a/video/out/vulkan/context_xlib.c
+++ b/video/out/vulkan/context_xlib.c
@@ -126,9 +126,9 @@ static void xlib_wakeup(struct ra_ctx *ctx)
vo_x11_wakeup(ctx->vo);
}
-static void xlib_wait_events(struct ra_ctx *ctx, int64_t until_time_us)
+static void xlib_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
{
- vo_x11_wait_events(ctx->vo, until_time_us);
+ vo_x11_wait_events(ctx->vo, until_time_ns);
}
const struct ra_ctx_fns ra_ctx_vulkan_xlib = {