diff options
author | Niklas Haas <git@haasn.xyz> | 2020-06-30 20:40:42 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2020-06-30 20:42:52 +0200 |
commit | ace249acc5e2576dae42725d10c0351029de1c40 (patch) | |
tree | 4177e8c2ca2aa3e0163d4af43fa89e0ae28d72c8 | |
parent | 22a27c6720244dd24c9b704c8a8225ca1665272f (diff) | |
download | mpv-ace249acc5e2576dae42725d10c0351029de1c40.tar.bz2 mpv-ace249acc5e2576dae42725d10c0351029de1c40.tar.xz |
vo_gpu: vulkan: add ability to disable events
libplacebo exposes this feature already, because this particular type of
bug is unusually common in practice. Simply make use of it, by exposing
it as an option.
Could probably also bump the libplacebo minimum version to get rid of
the #if, but that would break debian oldoldstable or something.
Fixes #7867.
-rw-r--r-- | DOCS/man/options.rst | 5 | ||||
-rw-r--r-- | video/out/vulkan/context.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 2f49e629c1..ce0f19e113 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5225,6 +5225,11 @@ The following video options are currently all specific to ``--vo=gpu`` and use of compute shaders over fragment shaders wherever possible. Enabled by default, although Nvidia users may want to disable it. +``--vulkan-disable-events`` + Disable the use of VkEvents, for debugging purposes or for compatibility + with some older drivers / vulkan portability layers that don't provide + working VkEvent support. + ``--d3d11-exclusive-fs=<yes|no>`` Switches the D3D11 swap chain fullscreen state to 'fullscreen' when fullscreen video is requested. Also known as "exclusive fullscreen" or diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c index 000afe211e..4d94c6fb77 100644 --- a/video/out/vulkan/context.c +++ b/video/out/vulkan/context.c @@ -27,6 +27,7 @@ struct vulkan_opts { int queue_count; int async_transfer; int async_compute; + int disable_events; }; static int vk_validate_dev(struct mp_log *log, const struct m_option *opt, @@ -97,6 +98,7 @@ const struct m_sub_options vulkan_conf = { {"vulkan-queue-count", OPT_INT(queue_count), M_RANGE(1, 8)}, {"vulkan-async-transfer", OPT_FLAG(async_transfer)}, {"vulkan-async-compute", OPT_FLAG(async_compute)}, + {"vulkan-disable-events", OPT_FLAG(disable_events)}, {0} }, .size = sizeof(struct vulkan_opts), @@ -169,6 +171,9 @@ bool ra_vk_ctx_init(struct ra_ctx *ctx, struct mpvk_ctx *vk, .async_compute = p->opts->async_compute, .queue_count = p->opts->queue_count, .device_name = p->opts->device, +#if PL_API_VER >= 24 + .disable_events = p->opts->disable_events, +#endif }); if (!vk->vulkan) goto error; |