The target info reported when running `xcrun --sdk <platform> metal -v' is always the default for the running OS, and may vary slightly between point releases. Specifying the target reduces the chances of mismatched shader version when using FASTBuild to compile shaders.
NOTE: In order for the shader version to match, the FASTBuild workers must (currently) have the same version Xcode installed, but do not necessarily need to be running the same OS version.
#rb trivial
#[fyi] richard.wallis
#rnx
#robomerge[STARSHIP] Release-5.0-EarlyAccess
#ushell-cherrypick of 15734101 by will.damon
[CL 15739001 by will damon in ue5-main branch]
#rb lukas.hermanns
#jira none
#rnx
#lockdown marcus.wassmer
#ushell-cherrypick of 15389786 by will.damon
#ROBOMERGE-SOURCE: CL 15381462 in //UE4/Release-4.26/... via CL 15387405 via CL 15389663 via CL 15392606
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15392611 by will damon in ue5-main branch]
#jira UE-89933
#rb carl.lloyd
#ROBOMERGE-SOURCE: CL 11894021 in //UE4/Release-4.25/... via CL 11894022
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 11894024 by wei liu in Main branch]
#rnx
#rb none
#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870584 by ryan durand in Main branch]
Maybe workaround another Apple/AMD internal compiler error - the safe_array code was causing the AMD driver compiler to fail but simplifying the code seems to work. May have unintended consequences on iOS.
#rb none
#jira UE-72812
[CL 5923534 by Mark Satterthwaite in Main branch]
Package Metal shader source into a zip file rather than a tgz so it can be done on Windows builds too and do this asynchronously while generating the Metal libraries. This file is stored in the MetaData folder so should be moved out of the content and not get packaged. Must be unzipped at the command-line for some reason, but it works.
#rb none
#ROBOMERGE-SOURCE: CL 5333983
[CL 5333997 by mark satterthwaite in Main branch]
- Brings over the necessary engine changes for embedding UE4 mobile as a dylib/so in native mobile app
- Various changes for facial animation, screen recording, others
- ARKit and ARCore plugins were removed, as deemed "not ready"
#rb many people
#ROBOMERGE-OWNER: josh.adams
#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 5201138 via CL 5203024
[CL 5226277 by Josh Adams in Main branch]
[FYI] Marcus.Wassmer, rolando.caloca, peter.sauerbrei
#rb none
#ROBOMERGE-OWNER: mark.satterthwaite
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5010458 via CL 5010459 via CL 5013401
[CL 5047337 by mark satterthwaite in Main branch]
- All Buffer<>/RWBuffer<> objects are now bound as texture2d or texture_buffer, unless they are 3-component, in which case they are bound as raw T* buffer pointers.
- 3-component Buffer/RWBuffer objects should now work - Metal needed to use packed_* types internally as normal 3-component types in Metal are the same size as 4-component types which is different to HLSL. This is untested as we have no such example.
- Texture Gather/GatherCompare operations have been fixed and should now work.
- Remove all the TypedBufferFormat function-constant specialisation infrastructure and metadata as it is no longer necessary.
- Remove all the raw-conversion for 1, 2 and 4 component vector types as it is no longer required.
- Fixed input qualifiers (centroid, linear, etc.) for Fragment shader inputs - they should now work.
- Remove a bunch of Metal specific shader changes due to buffer type casting and swizzling that will now just work.
- Use the BGRA vertex format for FColor on Metal when available (everywhere but iOS/tvOS 10 using Metal 1.2).
- Simplify ShouldCompilePermutation & similar functions now that we have fewer versions to support.
#rb none
#jira N/A
[CL 4729845 by Mark Satterthwaite in Dev-Rendering branch]
- Added a new Metal shader version (5) which compiles as Metal 2.1 with Indirect Argument Buffers for resource binding.
- Only enable the IAB feature for Metal shader version 5 and above and only on macOS for now.
- Added code to create argument encoders which are cached as creating them is pricey.
- Added code to create argument buffers from RHIUniformBuffers and their layouts.
- Ensured that vertex, index and uniform data is allocated such that the pointer won't be invalidated after being written into the IAB.
- Significant changes to the shader compiler and ue4_stdlib to emit IAB structures.
Todo:
- No support for atomic operations on elements within an IAB yet - need to modify ue4_stdlib and the MetalBackend.
- Incorrect compilation of StructuredBuffera and/or ByteAddressBuffer when within an IAB - need to emit a different type in the IAB structure and then only bind the buffer pointer at runtime.
- Indirect Argument Buffers are incompatible with the RHI thread because the creation of texture-views is deferred to the RHI thread but IAB creation is not yet.
#rb none
[CL 4554125 by Mark Satterthwaite in Dev-Rendering branch]