Commit 7e857092 by Nicolas Capens Committed by Nicolas Capens

Support running PowerVR samples using SwiftShader on Linux

By setting the RPATH to $ORIGIN, Linux executables can behave like on Windows and search for shared libraries in the exectuables directory before looking elsewhere. We copy SwiftShader's Vulkan library into this directory, naming it vulkan.so.1 to match the loader name the executables look for. This also relies on SwiftShader exporting all Vulkan API entry functions like the loader library does: b/148240133 Bug: b/141361933 Change-Id: I617303cc11faead7aac9e689142a4400731a58a5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41970Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent a4e6b8cf
......@@ -2431,11 +2431,15 @@ endif(SWIFTSHADER_BUILD_TESTS AND SWIFTSHADER_BUILD_VULKAN)
if(SWIFTSHADER_BUILD_PVR)
if(UNIX AND NOT APPLE)
set(PVR_WINDOW_SYSTEM XCB)
# Set the RPATH of the next defined build targets to $ORIGIN,
# allowing them to load shared libraries from the execution directory.
set(CMAKE_BUILD_RPATH "$ORIGIN")
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/PowerVR_Examples)
if(WIN32)
if(NOT APPLE)
# Copy the 'loader' library to the bin/ directory
# where the PowerVR executables are placed.
add_custom_command(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment