Commit Graph

267 Commits

Author SHA1 Message Date
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
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
carl lloyd
232f64154e Added support for full precision in Material expressions to project
Added override for half precision to Materials

#jira UE-130988
#rb Jack.Porter, Dmitriy.Dyomin
#p4v-cherrypick 17965223

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 18035100 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18035152 by carl lloyd in ue5-release-engine-test branch]
2021-11-03 11:57:39 -04:00
lukas hermanns
91113e2e9e Enable Metal v2.4; maps from MAX_SHADER_LANGUAGE_VERSION=7.
#rb Will.Damon
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18018804 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18018978 by lukas hermanns in ue5-release-engine-test branch]
2021-11-02 10:36:33 -04:00
lukas hermanns
5289dc49d1 Fix compile error in MetalShaderCompiler.cpp as appendix to CL 17817375.
#rb none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 17818115 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17818133 by lukas hermanns in ue5-release-engine-test branch]
2021-10-14 12:57:20 -04:00
lukas hermanns
d43f20d79c Replace EHlslCompileTarget with FHlslShaderModel in ShaderConductor interface for better control over input shader version.
#rb Jeannoe.Morissette, Will.Damon
[FYI] Steve.Smith, Rolando.Caloca
#jira UE-121893
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 17817375 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17817405 by lukas hermanns in ue5-release-engine-test branch]
2021-10-14 12:05:06 -04:00
lukas hermanns
bc3049ec03 Handle VersionEnum=7 in Metal backend and improve error output on unknown VersionEnum value.
Fix for new shader version introduced in CL 17643752.

#rb Will.Damon
[FYI] Jack.Porter
#jira UE-129872
#preflight 615c6a518ebc2600019f0312
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 17722581 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17722604 by lukas hermanns in ue5-release-engine-test branch]
2021-10-05 11:56:05 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
lukas hermanns
f85f5ce83f Fix compiler errors in Metal and GLSL backends.
#rb none
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 17409014 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17409078 by lukas hermanns in ue5-release-engine-test branch]
2021-09-02 16:59:27 -04:00
lukas hermanns
c5400b94fe Replace EHlslShaderFrequency with EShaderFrequency in ShaderConductor interface.
Also remove further references to Hull and Domain shaders as tessellation is no longer supported in UE5.

#rb Will.Damon, Brian.White, Christopher.Waters, Jeannoe.Morissette
[FYI] Carl.Lloyd, Florin.Pascu, Ryan.Vance, Rolando.Caloca, Mihnea.Balta
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 17408818 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17408845 by lukas hermanns in ue5-release-engine-test branch]
2021-09-02 16:41:03 -04:00
christopher waters
1c21a5489c Shader symbol terminology changes
- Splitting symbol generation and shader "debug info" generation into two different cvars. This should now allow us to generate symbols post-packaging without generating different shader variants. This should also enable us to always generate symbols and still have the final deduplicated shader sizes.
- r.Shaders.Symbols is now the primary way to enable shader symbols for debugging.
- r.Shaders.GenerateSymbols can be enabled to always generate symbols without writing them to disk.
- r.Shaders.WriteSymbols can be used to force write symbols if they were previously generated.
- r.Shaders.ExtraData can be used to generate shader names for engine runtime systems to use.
- NotifyShaderCooked replaced with NotifyShaderCompiled, prep for upcoming non-cook symbol writing.
- PC DXC shader compiles should only generate debug info when requested, not all the time.
- PC FXC shader compiles should generate debug info when requested, not just when r.Shaders.Optimize is 0.

#jira none
#rb arciel.rekman, lukas.hermanns
#preflight 611ad9035e737200015992db

#ROBOMERGE-SOURCE: CL 17186155 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17186162 by christopher waters in ue5-release-engine-test branch]
2021-08-16 23:18:23 -04:00