mark satterthwaite
8280278056
Duplicate 5919089
...
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
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5923534 in //UE4/Main/...
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5938417 by mark satterthwaite in Dev-Anim branch]
2019-04-17 13:11:43 -04:00
mark satterthwaite
cca4272a70
When compiling Metal shaders sometimes local temporary arrays are actually declared as variables - these should use safe_array too.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5808821 via CL 5808822 via CL 5808823 via CL 5812117 via CL 5812326
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5841786 by mark satterthwaite in Dev-Anim branch]
2019-04-12 12:58:34 -04:00
mark satterthwaite
46d253b5c6
Invalidating the MetalShaderFormat version seems to cure the build machine of generating bogus shaders for the BoneMatrix SRV change.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5691957 via CL 5691961 via CL 5691963 via CL 5696013 via CL 5696965 via CL 5697149
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5704458 by mark satterthwaite in Dev-Anim branch]
2019-04-03 01:00:53 -04:00
mark satterthwaite
2d2f18ef4f
MetalBackend changes to actually convert local constant arrays to the new safe_array template which sanitises input addresses - because iOS doesn't do that for you. This should reduce the number of bad-access GPU timeouts according to Apple.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5659739 via CL 5659747 via CL 5659748 via CL 5659749 via CL 5659823 via CL 5659843
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5665007 by mark satterthwaite in Dev-Anim branch]
2019-04-01 09:12:16 -04:00
mark satterthwaite
62ea572d5f
Fix Metal shader translation bugs:
...
- Texture*Array.Load needs to split the array index out of the vector coordinate for Metal.
- The GetDimensions function needs to support the array-length/depth output argument.
- RemovePackedVarReferences was inserting new variables at the top of the function, not the same scope as the source variable, which won't compile in cases where structs are used as temporaries and not function arguments.
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5502462 via CL 5503115 via CL 5535524
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5538913 by mark satterthwaite in Dev-Anim branch]
2019-03-25 16:59:57 -04:00
mark satterthwaite
ba77b9b6b4
Missed some Metal shader defines from CL #5419941 that were then causing compile errors on the builders.
...
#jira UE-71698
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5434778 in //UE4/Release-4.22/... via CL 5434784
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5436707 by mark satterthwaite in Dev-Anim branch]
2019-03-18 17:14:18 -04:00
mark satterthwaite
df9eb9be7d
Make RWBuffer's use raw Metal T* buffers so that we don't run into problems where texture_buffer/texture2d can't be both read & write at the same time on iOS. This will be slower but it will work on more iOS/tvOS devices. This does not affect macOS.
...
#jira UE-71589
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5419941 in //UE4/Release-4.22/... via CL 5419946
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5421758 by mark satterthwaite in Dev-Anim branch]
2019-03-15 17:07:29 -04:00
rolando caloca
c193b73679
UE4 - Fix invalid IR on hlslcc potentially causing a crash
...
#rb none
[FYI] Jonas.Meyer
#rnx
#jira UE-71397
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: rolando.caloca
#ROBOMERGE-SOURCE: CL 5399410 in //UE4/Release-4.22/... via CL 5399503
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5410439 by rolando caloca in Dev-Anim branch]
2019-03-15 05:35:41 -04:00
Thomas Sarkanen
bb193db1aa
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 5356908
...
#rb none
[CL 5360337 by Thomas Sarkanen in Dev-Anim branch]
2019-03-11 12:18:32 -04:00
mark satterthwaite
43a845ce72
Apply the workaround from CL #3722943 to the patchCount variable as well in the hope that this will fix Nvidia PSO compiler failures - it fixes at least one of the examples we have logged.
...
#jira UE-69104
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5289294 in //UE4/Release-4.22/... via CL 5308163
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5324678 by mark satterthwaite in Dev-Anim branch]
2019-03-06 18:12:30 -05:00
mark satterthwaite
01268e0367
Previous commit overlooked the subtlties that FixIntrinsics was dealing with in addition to FramebufferFetchES2 - so pass through the shader type and only handle FramebufferFetchES2 for fragment shaders instead.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5296814 via CL 5296819 via CL 5307410 via CL 5307511
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5323499 by mark satterthwaite in Dev-Anim branch]
2019-03-06 18:07:38 -05:00
mark satterthwaite
72c0d39ff4
Framebuffer fetch is fragment-shader only for Metal - you can't use it in vertex shaders.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5296664 via CL 5296665 via CL 5307395 via CL 5307467
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5323383 by mark satterthwaite in Dev-Anim branch]
2019-03-06 18:07:10 -05:00
mark satterthwaite
e5f394829c
Fix compiling shaders to Metal that use SceneDepth nodes but do not write any color targets - only depth. If a shader writes nothing at all then it will assume float4 input for the fragment fetch binding.
...
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5295610 via CL 5295687 via CL 5306310 via CL 5306417
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5321960 by mark satterthwaite in Dev-Anim branch]
2019-03-06 18:01:43 -05:00
Thomas Sarkanen
474bc576ee
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 5236305
...
#rb none
#jira none
[CL 5236785 by Thomas Sarkanen in Dev-Anim branch]
2019-02-28 04:41:36 -05:00
mark satterthwaite
a355cba263
Compile out all support for Metal tessellation shaders from the MetalRHI runtime & remove all vestigial references to geometry shaders using the new pre-processor flags. This resizes all the various arrays to eliminate unused entries which were previously SF_NumFrequencies in size.
...
[FYI] Marcus.Wassmer, rolando.caloca, peter.sauerbrei
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 5010458 via CL 5010459 via CL 5013401 via CL 5047337
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5129224 by mark satterthwaite in Dev-Anim branch]
2019-02-22 02:07:55 -05:00
mark satterthwaite
d2c90e6d48
Use dynamic casting to access Metal tessellation shader index buffers - means restoring the code path for R16Uint and R32Uint but that should be fine. This avoids the AMD driver bug that causes incorrect reads at the extreme beginning/end of a texture_buffer or texture2d created from an index buffer. Need to get to the bottom of this with the driver team.
...
#jira UE-69266
#rb none
#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: mark.satterthwaite
#ROBOMERGE-SOURCE: CL 4956763 in //UE4/Release-4.22/... via CL 4968434
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)
[CL 5027715 by mark satterthwaite in Dev-Anim branch]
2019-02-16 04:05:54 -05:00
Lina Halper
f7baa58bc9
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim)
...
#fyi: Laurent.Delayen, James.Hopkin
#rb: none
[CL 4923303 by Lina Halper in Dev-Anim branch]
2019-02-06 14:35:56 -05:00
Marc Audy
e5610adfd8
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ 4802313
...
#rb
#rnx
#lockdown Laurent.Delayen
[CL 4803512 by Marc Audy in Dev-Anim branch]
2019-01-24 15:32:49 -05:00
Thomas Sarkanen
8ba3c4c087
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
...
#rb none
#jira none
[CL 4665410 by Thomas Sarkanen in Dev-Anim branch]
2018-12-17 06:31:16 -05:00
Thomas Sarkanen
e5eb5adfbe
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
...
#rb none
#jira none
[CL 4644540 by Thomas Sarkanen in Dev-Anim branch]
2018-12-10 05:09:18 -05:00
Thomas Sarkanen
c51a339259
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4574801
...
#jira none
#rb none
[CL 4575789 by Thomas Sarkanen in Dev-Anim branch]
2018-11-19 07:03:18 -05:00
Thomas Sarkanen
c359a36380
Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4534846
...
#rb none
#jira none
[CL 4539252 by Thomas Sarkanen in Dev-Anim branch]
2018-11-05 05:56:30 -05:00
mark satterthwaite
d5733e9712
Add separate Metal shader platforms for tvOS - we were relying upon a bug in Apple's metal toolchain to allow sharing shader bytecode between iOS and tvOS but that isn't possible anymore.
...
- Added IsMetalMobilePlatform, IsMetalMRTPlatform & IsMetalSM5Platform to simplify testing shader platforms.
- Twiddled the shader compiler to emit the correct min-OS flags to compile for iOS and tvOS.
#rb none
#jira UE-64891
#ROBOMERGE-SOURCE: CL 4488318 in //UE4/Release-4.21/...
#ROBOMERGE-BOT: RELEASE (Release-4.21 -> Release-Staging-4.21)
[CL 4488329 by mark satterthwaite in Staging-4.21 branch]
2018-10-18 16:47:22 -04:00
richard wallis
e3717b4194
Fix for distance field text rendering in Metal - fragmenmts were getting discarded in the pixel shader as the FSimpleElementDistanceFieldGammaPS::FSimpleElementMaskedGammaBasePS::ClipRef value was getting overwritten by a different value in the global structure buffer. Metal buffer has different alignment for < 4 byte types compared to the expected value in the parameter map. This change requests a 4 byte alignment for bool inside structs.
...
#jira UE-63783, UE-65053
#rb mark.satterthwaite
#ROBOMERGE-SOURCE: CL 4485493 in //UE4/Release-4.21/...
#ROBOMERGE-BOT: RELEASE (Release-4.21 -> Release-Staging-4.21)
[CL 4485495 by richard wallis in Staging-4.21 branch]
2018-10-18 10:18:05 -04:00
Marc Audy
af90b7bcd4
Copying //UE4/Fortnite-Staging to Dev-Main (//UE4/Dev-Main) @ 4395008
...
#rb
#rnx
#lockdown Nick.Penwarden
[CL 4395058 by Marc Audy in Main branch]
2018-09-25 10:11:35 -04:00