Skip to content

Commit

Permalink
decode: Linux shaderc library path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zlatinski committed Mar 5, 2025
1 parent dd0ade8 commit f468fc9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
23 changes: 23 additions & 0 deletions cmake/FindVulkanAndDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,26 @@ if(SHADERC_INCLUDE_DIR AND SHADERC_LIBRARY)
else()
message(FATAL_ERROR "Could not find or build Shaderc")
endif()

# Add this section to check for system-installed shaderc on Linux
if(NOT DEFINED SHADERC_LIB_SHARED_DIR AND UNIX)
# Try to find system-installed shaderc on Linux
find_library(SHADERC_SHARED_LIB
NAMES shaderc_shared
PATHS
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/local/lib
/usr/local/lib64
/lib
/lib64
)

if(SHADERC_SHARED_LIB)
get_filename_component(SHADERC_LIB_SHARED_DIR ${SHADERC_SHARED_LIB} DIRECTORY)
message(STATUS "Found Linux system shaderc at: ${SHADERC_LIB_SHARED_DIR}")
else()
message(WARNING "Could not find shaderc_shared library on Linux. Please install it using your package manager (e.g., apt install libshaderc-dev) or specify SHADERC_LIB_SHARED_DIR manually.")
endif()
endif()
1 change: 0 additions & 1 deletion vk_video_decoder/src/vulkan_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ VkResult VulkanVideoDecoderImpl::Initialize(VkInstance vkInstance,
(m_decoderConfig.enableVideoEncoder ? videoEncodeCodecs : (VkVideoCodecOperationFlagsKHR) VK_VIDEO_CODEC_OPERATION_NONE_KHR);

const bool supportsShellPresent = ((!m_decoderConfig.noPresent == false) && (pWsiDisplay != nullptr));
const bool createTransferQueue = supportsShellPresent ? false : true;
const bool createGraphicsQueue = supportsShellPresent ? true : false;
const bool createDisplayQueue = supportsShellPresent ? true : false;

Expand Down

0 comments on commit f468fc9

Please sign in to comment.