Commit Graph

277 Commits

Author SHA1 Message Date
axel riffard
b701c98a7e Set Metal minimum flow for iOS and MacOS
#jira UE-163352
#rb adam.kinge
#preflight 632954d3fc7f1efbdf238155

[CL 22089354 by axel riffard in ue5-main branch]
2022-09-20 03:10:30 -04:00
axel riffard
c64aa2de93 Catalina, iOS 14 removal
Metal 2.3 removed, Metal 3.0 added for Mac

#jira UE-163352
#rb adam.kinge bertrand.carre
#preflight 631ea7eb94758d0bf2008668

[CL 21960671 by axel riffard in ue5-main branch]
2022-09-11 23:47:08 -04:00
axel riffard
494b98c831 Remove Catalina support and Metal 2.2 from Mac.
#jira UE-149923
#rb jack.porter
#preflight 6315c60bf448dc6e58121822

[CL 21790515 by axel riffard in ue5-main branch]
2022-09-05 06:05:22 -04:00
Richard Wallis
5f67dcf13c Apply patch from Apple. Enable WaveOps for macOS - tested on Vega 56 Monterey 12.5.1
#jira none
#rnx
#preflight 6310b4d7ea685939704c090a
#review-21739599 @zack.Neyland
#rb zack.Neyland

[CL 21756741 by Richard Wallis in ue5-main branch]
2022-09-02 04:26:05 -04:00
Laura Hermanns
bbb62728d4 Strip [[clang::optnone]] attribute from Metal shaders due to performance hit with WPO on M1 Macs.
#rb Will.Damon
#fyi MarcAndre.Lalonde
#jira none
#preflight 62f56422f3107c023cc15341
#rnx

[CL 21344324 by Laura Hermanns in ue5-main branch]
2022-08-11 16:27:00 -04:00
christopher waters
a987160f55 Reworking the parameter rewrite code to do automatic bindless
- Refactoring FShaderParameterParser to use more string views since we can rely on OriginalParsedShader not changing.
- Split FShaderParameterParser::ParseAndMoveShaderParametersToRootConstantBuffer into smaller functions
- Moving FShaderParametersMetadata::IterateShaderParameterMembers into the only module it's used in, ShaderParameterParser.cpp
- Adding CFLAG_BindlessResources which will be set when ENABLE_BINDLESS_RESOURCES is set
- Adding CFLAG_BindlessSamplers which will be set when ENABLE_BINDLESS_SAMPLERS is set
- Adding resource/sampler detection and conversion to bindless in FShaderParameterParser

#jira UE-139616
#rb guillaume.abadie, jeannoe.morissette, yuriy.odonnell, laura.hermanns
#preflight 62d180cce468fcfd0b7001a0

[CL 21111994 by christopher waters in ue5-main branch]
2022-07-15 12:25:44 -04:00
Florin Pascu
f64fc575d2 Re-submiting with Mac fixes
Changed ShaderArchive, GlobalShaderCache, ShaderDebugInfo and Autogen to use ShaderPlatformName and not ShaderFormat when naming their output files.
#rb Jack.Porter, Chris.Waters, Mihnea.Balta, Jason.Nadro
#jira UE-120561
#preflight 62c31f6fc9410537282296c6

[CL 20937870 by Florin Pascu in ue5-main branch]
2022-07-04 19:06:33 -04:00
axel riffard
8e78f187b8 ios 16, tvos 16 and metal 3.0 implementation
#jira UE-156821
#rb jack.porter
#fyi will.damon
#preflight 62b959ec5d29d0d10a8e9497

[CL 20828293 by axel riffard in ue5-main branch]
2022-06-27 04:12:37 -04:00
will damon
0b522316a3 Remove AGXRHI and associated components from mainline.
- AGXRHI development is now occurring in a separate branch/stream.
- Relocate Engine/Source/Runtime/Apple/Common/Public/* -> Engine/Source/Runtime/Apple/MetalRHI/Public/*
- Update module dependencies, etc.

#rb will.damon
#jira none
#rnx
#preflight 62b610597c36e130975e1332

[CL 20817379 by will damon in ue5-main branch]
2022-06-24 17:44:05 -04:00
christopher waters
b28a0c467f Moving ShaderParameterParser into its own source files.
#jira none
#rb guillaume.abadie, kenzo.terelst
#preflight 62b0ecb8ec13d14b5a1897ba

[CL 20757788 by christopher waters in ue5-main branch]
2022-06-21 10:49:56 -04:00
carl lloyd
4b6434cac6 Fix for Apple A8 device support
- Devices crashing when using Base_Vertex metal shader semantics
  - Runtime error when using Virtual Texturing on A8 devices which is unsupported.

#jira UE-131863, UE-132217
#rb Will.Damon
[FYI] Jack.Porter
#preflight 62a75ad63d0a713cf8caf486

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 20631592 in //UE5/Release-5.0/... via CL 20649245
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20656300 by carl lloyd in ue5-main branch]
2022-06-14 16:23:13 -04:00
rob krajcarski
755d3d7dd9 Fix for metal shader backend mismatch between resources and samplers
#jira UE-151850
#rb christopher.waters
#preflight none

[CL 20246663 by rob krajcarski in ue5-main branch]
2022-05-17 13:36:05 -04:00
will damon
814e4992a2 Work around macOS Monterey 12.3.1 issue spewing objc warning messages in Apple frameworks to stdout.
#rb laura.hermanns, josh.adams
#jira UE-151307
#rnx
#preflight n/a

#ROBOMERGE-AUTHOR: will.damon
#ROBOMERGE-SOURCE: CL 20125803 in //UE5/Release-5.0/... via CL 20127517
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20130748 by will damon in ue5-main branch]
2022-05-10 18:02:19 -04:00
christopher waters
438eccf7a4 Reorganizing reflection handling to funnel through common functions, Metal edition.
#jira none
#rb laura.hermanns
#preflight mac

[CL 20026199 by christopher waters in ue5-main branch]
2022-05-03 11:21:15 -04:00
christopher waters
0a8074d5a5 RemoveUniformBuffersFromSource shouldn't implicitly call TransformStringIntoCharacterArray.
#jira none
#rb jason.nadro
#preflight 624ddf0f090236773a1ad8c1

[CL 19656058 by christopher waters in ue5-main branch]
2022-04-06 17:19:38 -04:00
carl lloyd
9bc1cec538 Enabling half precision floating point for Metal on iOS/tvOS
#rb Dmitriy.Dyomin, Laura.Hermanns
#jira UE-120588
#preflight 624c3b06f4217035fac65500

[CL 19626453 by carl lloyd in ue5-main branch]
2022-04-05 11:51:04 -04:00
Lukas Hermanns
999fb99c6c Enable HLSL 2021 language version (CFLAG_HLSL2021) in shader compiler backends.
#rb Guillaume.Abadie, Will.Damon
#fyi Carl.Lloyd, Ryan.Vance, Christopher.Waters, Mihnea.Balta, Rolando.Caloca, Yuriy.ODonnell, Graham.Wihlidal
#jira UE-138358
#preflight 6227b6b3c653e7ef9f571dc8

[CL 19319858 by Lukas Hermanns in ue5-main branch]
2022-03-09 09:47:28 -05:00
richard wallis
705ed1e745 Fix for Metal running out of buffer binding slots (max 31) due to the allocation of texture+buffer slot per SRV texture.
- Consume Uniform then UAV buffer slots first.
- Don't use up a buffer slot for texel buffers as we should be using texture buffers for these now.
- If we are not using a buffer slot for the same texel slot index then don't attempt to bind the underlying SRV buffer when binding the SRV texture otherwise it'll stomp on other in use buffer slots.
- Use CountTrailingZeros64() when referencing TextureIndices as that is a 64bit type.

#jira UE-141595
#preflight 620e3612fe76023596bd3e52
[REVIEW] [at]will.damon,  [at]laura.hermanns
#rnx
#lockdown cristina.riveron

#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 19116483 in //UE5/Release-5.0/... via CL 19117285
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19153361 by richard wallis in ue5-main branch]
2022-02-25 14:36:37 -05:00
lukas hermanns
b0ab21cd71 Improve stability for out of bounds buffer slots in Metal backend.
#rb Will.Damon, Mihnea.Balta, Rolando.Caloca
#jira UE-138002
#preflight none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18865633 in //UE5/Release-5.0/... via CL 18865641 via CL 18868946
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18869017 by lukas hermanns in ue5-main branch]
2022-02-04 14:01:55 -05:00
Martin Ridgers
de9b153aa2 Mac binaries would fail to locate shader libraries when running from sandboxes
It is possible to use the -sandbox= option to mount an alternative file system location from which to load data. On desktop platforms, if the -sandbox= is not specified then Saved/Cooked/[Platform] is implicitly created as a sandbox. This allows runtime binaries to run off cooked data and negate the need to stage. When cooking, the Metal shader compiler creates shader libraries with files in title case. UAT will convert these into lowercase when staging. The Metal RHI is unable to load the cooked libraries as it assumes it is loading lowercase ones from staged data. This change makes sure that all shader libraries are always lowercase. Secondly, the paths to .metallib files where preprocessed in a such a way that bypassed the sandbox file system, resulting in an incorrect native path. Now the API used to convert from IPlatformFile paths to native ones is always used such that sandboxing will get taken into account.

#jira UE-133202
#rnx
#rb will.damon
#preflight 61e7d989f517d721f993c82f

[CL 18656074 by Martin Ridgers in ue5-main branch]
2022-01-19 04:43:37 -05:00
axel riffard
92a7004918 Harmonize Metal version to use in iOS / Mac
#jira UE-135971
#rb jack.porter
[FYI] will.damon, carl.lloyd
#preflight 61e51ef2a2616066f675dd5e

#ROBOMERGE-OWNER: axel.riffard
#ROBOMERGE-AUTHOR: axel.riffard
#ROBOMERGE-SOURCE: CL 18631139 in //UE5/Release-5.0/...
#ROBOMERGE-BOT: UE5 (Release-5.0 -> Release-Engine-Staging) (v899-18417669)
#ROBOMERGE-CONFLICT from-shelf
#p4v-cherrypick 18631594
#preflight 61e643cb1f30b67a22f3febd

[CL 18636647 by axel riffard in ue5-main branch]
2022-01-17 23:50:00 -05:00
will damon
08957ffbc4 Set new default shader for Apple platforms and IOS 15 support
#jira UE-131184
#jira UE-124744
#rb jack.porter
#[fyi] will.damon carl.lloyd axel.riffard
#preflight 618e2f249e784835d570d871

#ushell-cherrypick of 18165990 by axel.riffard

[CL 18598774 by will damon in ue5-main branch]
2022-01-13 12:27:13 -05:00
Marc Audy
19feaafe28 Bring missing changes from Release-Engine-Staging to Release-Engine-Test
[CL 18449767 by Marc Audy in ue5-release-engine-test branch]
2021-12-13 17:38:18 -05:00
christopher waters
5f8dab7623 Removing usage of DDSPI from ValidateShaderParameterTypes
#jira none
#rb lukas.hermanns, arciel.rekman
#preflight 6196a1ce89733d53862e1af8

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18243604 in //UE5/Release-5.0/... via CL 18243617
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18243627 by christopher waters in ue5-release-engine-test branch]
2021-11-18 15:53:43 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00