- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
- UnrealArch is a single architecture, expandable enum-like struct
- There is no more concept of "no/default architecture", there is always a valid active architecture when building
- Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
- UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
- UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
- TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
- Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)
#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471
[CL 23829977 by josh adams in ue5-main branch]
Plus cherry-pick these commits from SDL main:
f39e155 [release-2.0.18] Fixed undefined behavior in SDL_memset() (thanks andrewrk!)
74ee7c0 Fixed potential buffer overflow in YUV conversion
52e4e52 autotools, cmake: tighten Xfixes check && explicitly test BarrierEventID
Switch SDL_ConfineCursor calls to new SDL_SetWindowMouseRect SDL2 functionality**
** Hat tip Ethan Lee
[at]Brandon.Schaefer
#jira none
#preflight 61dc62c42e0e436c72901f1b
#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 18561443 in //UE5/Release-5.0/... via CL 18561451
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18561471 by michael sartain in ue5-release-engine-test branch]
This is part of an effort to update Unreal Engine's SDL_dynapi function table to match upstream's, allowing for safe use of SDL_DYNAMIC_API. Currently UE breaks away from upstream in two places:
SDL_Vulkan_GetRequiredInstanceExtensions, which works similar to the upstream SDL_Vulkan_GetInstanceExtensions
SDL_ConfineCursor, a new API altogether
I'll be working to introduce an upstream version of SDL_ConfineCursor this week. As for SDL_Vulkan_GetRequiredInstanceExtensions, it turns out that there are some issues here:
1. SDL_Vulkan_GetInstanceExtensions depends on SDL_Vulkan_LoadLibrary, which UE does not use when checking for Vulkan functions
2. The UE base Vulkan functions aren't quite what you can get out of vkInstanceGetProcAddr, so we can't trivially replace dlsym for the base and then fudge the rest with a VkInstance
3. Because GetRequiredInstanceExtensions is effectively Epic-only, it only supports as many backends as UE itself does
The best solution, at least for now, is to just cut out the SDL part and implement the WSI extension query inside VulkanLinuxPlatform instead. It's basically the same thing but with less mallocs and doesn't break the dynapi table. It'd be cool to fix this "for real" one day, but it would require a bit of refactoring and affect a ton of platforms at once, so this seems like a safe compromise.
The patch is based on ue5-main, but can be applied to any UE branch that is still officially supported and uses the SDL extension. It was tested on X11, Wayland, and Xwayland.
#jira UE-132665
PR #8548: SDL2: Remove Vulkan_GetRequiredInstanceExtensions (Contributed by flibitijibibo)
[at]Brandon.Schaefer
#rb Brandon.Schaefer
#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 17945563 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
[CL 17945591 by flibitijibibo in ue5-release-engine-test branch]
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485
[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
Switch SDL_SetKeyboardGrab to SDL_SetWindowKeyboardGrab
Add SDL_ConfineCursor to dynapi_overrides
Hat tip Ethan Lee
#jira none
#rb Brandon.Schaefer
[at]Brandon.Schaefer
#ROBOMERGE-SOURCE: CL 17252629 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17252653 by michael sartain in ue5-release-engine-test branch]
#rnx
#rb none
#ROBOMERGE-SOURCE: CL 10869250 via CL 10869537 via CL 10869906
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870965 by ryan durand in Main branch]