fix(linux/vulkan): guard deprecated FFmpeg Vulkan queue lock/unlock (#5005)
This commit is contained in:
@@ -148,6 +148,8 @@ if(${SUNSHINE_ENABLE_VULKAN})
|
|||||||
list(APPEND PLATFORM_TARGET_FILES
|
list(APPEND PLATFORM_TARGET_FILES
|
||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vulkan_encode.h"
|
"${CMAKE_SOURCE_DIR}/src/platform/linux/vulkan_encode.h"
|
||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vulkan_encode.cpp")
|
"${CMAKE_SOURCE_DIR}/src/platform/linux/vulkan_encode.cpp")
|
||||||
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/platform/linux/vulkan_encode.cpp"
|
||||||
|
PROPERTIES COMPILE_OPTIONS "-Wno-deprecated-declarations")
|
||||||
|
|
||||||
# compile GLSL -> SPIR-V -> C include at build time
|
# compile GLSL -> SPIR-V -> C include at build time
|
||||||
set(VULKAN_SHADER_DIR "${CMAKE_BINARY_DIR}/generated-src/shaders")
|
set(VULKAN_SHADER_DIR "${CMAKE_BINARY_DIR}/generated-src/shaders")
|
||||||
|
|||||||
@@ -770,18 +770,21 @@ namespace vk {
|
|||||||
submit.signalSemaphoreCount = sem_count;
|
submit.signalSemaphoreCount = sem_count;
|
||||||
submit.pSignalSemaphores = signal_sems.data();
|
submit.pSignalSemaphores = signal_sems.data();
|
||||||
|
|
||||||
// Lock the queue (FFmpeg requires this)
|
#if !defined(FF_API_VULKAN_SYNC_QUEUES) || FF_API_VULKAN_SYNC_QUEUES
|
||||||
vk_dev.ctx->lock_queue(
|
vk_dev.ctx->lock_queue(
|
||||||
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
|
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
|
||||||
vk_dev.compute_qf,
|
vk_dev.compute_qf,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
auto res = vkQueueSubmit(vk_dev.compute_queue, 1, &submit, VK_NULL_HANDLE);
|
auto res = vkQueueSubmit(vk_dev.compute_queue, 1, &submit, VK_NULL_HANDLE);
|
||||||
|
#if !defined(FF_API_VULKAN_SYNC_QUEUES) || FF_API_VULKAN_SYNC_QUEUES
|
||||||
vk_dev.ctx->unlock_queue(
|
vk_dev.ctx->unlock_queue(
|
||||||
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
|
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
|
||||||
vk_dev.compute_qf,
|
vk_dev.compute_qf,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (res != VK_SUCCESS) {
|
if (res != VK_SUCCESS) {
|
||||||
BOOST_LOG(error) << "vkQueueSubmit failed: " << res;
|
BOOST_LOG(error) << "vkQueueSubmit failed: " << res;
|
||||||
|
|||||||
Reference in New Issue
Block a user