summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan/common.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-29 00:36:46 +0200
committerMartin Herkt <652892+lachs0r@users.noreply.github.com>2017-12-25 00:47:53 +0100
commitf2f91cf570ad6736a62192f2cb36b6c2887a0fda (patch)
treebd6237760eddc3c2642555d455d80230cd5a9257 /video/out/vulkan/common.h
parent5feaaba0fd27af34ee1fef12545f1dd96ebefddd (diff)
downloadmpv-f2f91cf570ad6736a62192f2cb36b6c2887a0fda.tar.bz2
mpv-f2f91cf570ad6736a62192f2cb36b6c2887a0fda.tar.xz
vo_gpu: vulkan: add a vk_signal abstraction
This combines VkSemaphores and VkEvents into a common umbrella abstraction which can resolve to either. We aggressively try to prefer VkEvents over VkSemaphores whenever the conditions are met (1. we can unsignal the semaphore, i.e. it comes from the same frame; and 2. it comes from the same queue).
Diffstat (limited to 'video/out/vulkan/common.h')
-rw-r--r--video/out/vulkan/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/vulkan/common.h b/video/out/vulkan/common.h
index 35c5b3dbfb..de49c6f1af 100644
--- a/video/out/vulkan/common.h
+++ b/video/out/vulkan/common.h
@@ -53,6 +53,10 @@ struct mpvk_ctx {
struct vk_cmd *last_cmd; // most recently submitted (pending) command
struct spirv_compiler *spirv; // GLSL -> SPIR-V compiler
+ // Common pool of signals, to avoid having to re-create these objects often
+ struct vk_signal **signals;
+ int num_signals;
+
// Cached capabilities
VkPhysicalDeviceLimits limits;
};