Skip to content

Commit

Permalink
vk: move macOS video routing code from context to renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghead committed Apr 10, 2024
1 parent 9e916ca commit 108c8a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions core/rend/vulkan/vulkan_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,10 +1030,6 @@ void VulkanContext::term()
renderCompleteSemaphores.clear();
drawFences.clear();
allocator.Term();
#if defined(VIDEO_ROUTING) && defined(TARGET_MAC)
extern void os_VideoRoutingTermVk();
os_VideoRoutingTermVk();
#endif
#ifndef USE_SDL
surface.reset();
#else
Expand Down
9 changes: 9 additions & 0 deletions core/rend/vulkan/vulkan_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <memory>
#include <vector>

void os_VideoRoutingTermVk();

class BaseVulkanRenderer : public Renderer
{
protected:
Expand Down Expand Up @@ -76,6 +78,9 @@ class BaseVulkanRenderer : public Renderer
{
GetContext()->WaitIdle();
GetContext()->PresentFrame(nullptr, nullptr, vk::Extent2D(), 0);
#if defined(VIDEO_ROUTING) && defined(TARGET_MAC)
os_VideoRoutingTermVk();
#endif
framebufferDrawer.reset();
quadPipeline.reset();
osdBuffer.reset();
Expand Down Expand Up @@ -249,6 +254,10 @@ class BaseVulkanRenderer : public Renderer
extern void os_VideoRoutingPublishFrameTexture(const vk::Device& device, const vk::Image& image, const vk::Queue& queue, float x, float y, float w, float h);
os_VideoRoutingPublishFrameTexture(device, srcImage, graphicsQueue, 0, 0, targetWidth, targetHeight);
}
else
{
os_VideoRoutingTermVk();
}
#endif
}

Expand Down

0 comments on commit 108c8a4

Please sign in to comment.