Set Vulkan as default graphics API for Linux (#1639)

This commit is contained in:
Aidan Clear 2019-06-04 18:48:11 +02:00 committed by Néstor Subirón
parent 29483c4918
commit 0faffe2a38
6 changed files with 29 additions and 16 deletions

View File

@ -1,4 +1,6 @@
## Latest
* Vulkan support: Changed project settings to make vulkan default on linux and updated make script to allow user to select opengl
* Add ability to set motion blur settings for rgb camera in sensor python blueprint
* Improved visual quality of the screen capture for the rgb sensor
- Enabled Temporal AA for screen captures with no post-processing to prevent jaggies during motion

View File

@ -72,9 +72,16 @@ Running off-screen
In Linux, you can force the simulator to run off-screen by setting the
environment variable `DISPLAY` to empty
!!! important
**DISPLAY= only works with OpenGL**<br>
Vulkan is now the default graphics API used by Unreal Engine and CARLA on
Linux. Unreal Engine currently crashes when Vulkan is used when running off-screen.
Therefore the -opengl flag must be added to force the engine to use OpenGL instead.
We hope that this issue is addressed by Epic in the near future.
```sh
# Linux
DISPLAY= ./CarlaUE4.sh
DISPLAY= ./CarlaUE4.sh -opengl
```
This launches the simulator without simulator window, of course you can still

2
Jenkinsfile vendored
View File

@ -65,7 +65,7 @@ pipeline {
stage('Smoke Tests') {
steps {
sh 'DISPLAY= ./Dist/*/LinuxNoEditor/CarlaUE4.sh --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
sh 'DISPLAY= ./Dist/*/LinuxNoEditor/CarlaUE4.sh -opengl --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
sh 'make smoke_tests ARGS="--xml"'
sh 'make run-examples ARGS="localhost 3654"'
}

View File

@ -40,14 +40,6 @@ RuntimeGeneration=Static
[/Script/AIModule.CrowdManager]
MaxAgents=1000
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
SpatializationPlugin=
ReverbPlugin=
OcclusionPlugin=
-TargetedRHIs=SF_VULKAN_SM5
-TargetedRHIs=GLSL_430
+TargetedRHIs=GLSL_430
[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
DefaultTerminalVelocity=4000.000000
@ -55,7 +47,6 @@ DefaultFluidFriction=0.300000
SimulateScratchMemorySize=262144
RagdollAggregateThreshold=4
TriangleMeshTriangleMinAreaThreshold=5.000000
bEnableAsyncScene=False
bEnableShapeSharing=False
bEnablePCM=False
bEnableStabilization=False
@ -88,8 +79,17 @@ bSubsteppingAsync=False
MaxSubstepDeltaTime=0.016667
MaxSubsteps=6
SyncSceneSmoothingFactor=0.000000
AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
SpatializationPlugin=
ReverbPlugin=
OcclusionPlugin=
-TargetedRHIs=SF_VULKAN_SM5
-TargetedRHIs=GLSL_430
+TargetedRHIs=SF_VULKAN_SM5
+TargetedRHIs=GLSL_430

View File

@ -15,7 +15,7 @@
#if PLATFORM_WINDOWS
# define CARLA_WITH_VULKAN_SUPPORT 1
#else
# define CARLA_WITH_VULKAN_SUPPORT 0
# define CARLA_WITH_VULKAN_SUPPORT 1
#endif
// =============================================================================

View File

@ -18,7 +18,7 @@ fi
DOC_STRING="Build and launch CarlaUE4."
USAGE_STRING="Usage: $0 [-h|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean]"
USAGE_STRING="Usage: $0 [-h|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean] [--opengl]"
REMOVE_INTERMEDIATE=false
HARD_CLEAN=false
@ -26,8 +26,9 @@ BUILD_CARLAUE4=false
LAUNCH_UE4_EDITOR=false
GDB=
RHI="-vulkan"
OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb -n 'parse-options' -- "$@"`
OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "$USAGE_STRING" ; exit 2 ; fi
@ -55,6 +56,9 @@ while true; do
REMOVE_INTERMEDIATE=true;
HARD_CLEAN=true;
shift ;;
--opengl )
RHI="-opengl";
shift ;;
-h | --help )
echo "$DOC_STRING"
echo "$USAGE_STRING"
@ -138,7 +142,7 @@ fi
if ${LAUNCH_UE4_EDITOR} ; then
log "Launching UE4Editor..."
${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject"
${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject" ${RHI}
else