Commit Graph

118 Commits

Author SHA1 Message Date
rob krajcarski
4f6ee877d7 Fix out of bounds access in experimental VM optimizer when handling a stat op as well as fixes up the index of referenced input ops when instructions are being reordered
#jira UE-148682, UE-148691
#rb stu.mckenna
#preflight 62618ae16119a1a496ad3541

#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 19852605 via CL 19852632 via CL 19852671
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19854626 by rob krajcarski in ue5-main branch]
2022-04-21 15:48:18 -04:00
rob krajcarski
485ffd5ac5 Fix safe instructions for experimental VM to match the behavior of the legacy VM
#jira UE-148596
#rb stu.mckenna
#preflight none

#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 19749420 via CL 19749423 via CL 19749427
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19801804 by rob krajcarski in ue5-main branch]
2022-04-18 23:24:44 -04:00
shawn mcgrath
a5a3936e40 VectorVM: allow dead random instruction to be removed.
Turned new VM back on and bumped the Niagara_LatestScriptCompileVersion.  #JIRA UE-147838 #preflight 624c47478e5ae00f0ab7e7f4 #rb rob.krajcarski

[CL 19627043 by shawn mcgrath in ue5-main branch]
2022-04-05 12:28:07 -04:00
shawn mcgrath
b03432bbb0 New VectorVM optimizer fixes. Fixes some invalid instruction removal bugs as well as incorrect SSA calculation on re-ordered instructions. Also fixed potential external function register alignment bugs. Turned new VectorVM back on by default and bumped the Niagara script compiled version. #preflight 62438337c51908059aa24096 #rb rob.krajcarski
[CL 19551771 by shawn mcgrath in ue5-main branch]
2022-03-29 20:09:16 -04:00
rob krajcarski
b281028c38 Additional support for new experimental VM
-moves optimization pass to the async compilation pipeline (including moving it to it's own file, out of NiagaraSystem)
-splits up the NIAGARA_VM_EXP preprocessor define into VECTORVM_SUPPORTS_LEGACY & VECTORVM_SUPPORTS_EXPERIMENTAL allowing support of one, the other or both (the default)
#rb shawn.mcgrath
#jira none
#preflight 623c85cd1302f69e9aa0b1d7

[CL 19496739 by rob krajcarski in ue5-main branch]
2022-03-24 11:52:03 -04:00
shawn mcgrath
72c3bceecd Vector VM optimizer: temporarily removed redundant instructions that's causing an SSA allocation bug. Will investigate bug in more depth, but this temp fix solves the Lyra (and potentially other) bugs. #jira UE-146776 #rb rob.krajcarski #preflight none
[CL 19496492 by shawn mcgrath in ue5-main branch]
2022-03-24 11:42:31 -04:00
shawn mcgrath
1771d98a72 VectorVM neon compiler fix. VectorRegister4 vs VectorRegister4f #rb none #preflight none
[CL 19488202 by shawn mcgrath in ue5-main branch]
2022-03-23 18:58:16 -04:00
shawn mcgrath
98f32c6499 Fix VectorVM alignment bug on f2i/i2f instructions. #jira UE-146776 #rb rob.krajcarski #preflight none
[CL 19487475 by shawn mcgrath in ue5-main branch]
2022-03-23 18:22:13 -04:00
shawn mcgrath
769266d97d VectorVM Optimizer bug fix calculating dummy registers. #jira UE-146588 #rb jeff.roberts #preflight 6239feafc73745c600a07f34
[CL 19471633 by shawn mcgrath in ue5-main branch]
2022-03-22 16:24:09 -04:00
shawn mcgrath
817835763e New VectorVM bug fixes.
Fixed pointer alignment causing compiler to generate aligned instructions on unaligned data.  Fixed optimization bug on empty scripts.
#jira UE-146424 UE-146342
#rb jeff.roberts
#preflight 62361e7948746817f1491ef8

[CL 19446753 by shawn mcgrath in ue5-main branch]
2022-03-19 23:27:04 -04:00
rob krajcarski
2289d9f8ca Fix for empty scripts (i.e. scripts that only has a single 'done' instruction)
#rb stu.mckenna
#jira none
#preflight 62325396161b100559411a8b

[CL 19413379 by rob krajcarski in ue5-main branch]
2022-03-16 17:35:01 -04:00
rob krajcarski
9fc29320b1 Fixup some warnings generated from usage of VectorRegister2Int64 with new experimental VectorVM
#jira UE-146165
#preflight 623231286c05dd6bbc6e005a
#rb stu.mckenna

[CL 19410336 by rob krajcarski in ue5-main branch]
2022-03-16 15:26:36 -04:00
shawn mcgrath
3b09ee5388 New VectorVM half float bug fixes #rb none #preflight none
[CL 19405520 by shawn mcgrath in ue5-main branch]
2022-03-16 10:13:08 -04:00
shawn mcgrath
61cf03bac1 VectorVM bug fixes & half float support. Experimental VM on by default. #rb Rob.Krajcarski #preflight 6230b204421403c1553829fc
[CL 19388907 by shawn mcgrath in ue5-main branch]
2022-03-15 13:46:08 -04:00
shawn mcgrath
2d080325b5 Niagara/VectorVM bug fixes. #rb none #preflight 622146d4a00412627d15dab5
[CL 19257352 by shawn mcgrath in ue5-main branch]
2022-03-03 18:52:26 -05:00
shawn mcgrath
cb83612158 - New Vector VM with optimizer and serialization.
- curve sampling DIs changed to 4-wide
- Off by default
#rb stu.mckenna #preflight 620bba0e4353dc61c7f60f39

[CL 18996550 by shawn mcgrath in ue5-main branch]
2022-02-15 11:01:00 -05:00
rob krajcarski
6d21460c89 Moved VM functions over to use their accurate vectorized version (still uses approximations but uses newton-raphson iteraions to improve the estimate at some cost). Brings individual op costs of rcp(), rsqrt() and, by association, sqrt() up by a factor of ~4 but nearly doubles the precision. Also updated a few of the core modules (FindQuatBetween/DirectionAndLength/DirectionAndLengthSafe) to better take advantage of the fast/precise intrinsics
#rb stu.mckenna
#preflight 61dddf9df33c0754172a88e6

#ROBOMERGE-OWNER: rob.krajcarski
#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 18578280 via CL 18578407 via CL 18578421 via CL 18578819 via CL 18578843 via CL 18578847
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18578854 by rob krajcarski in ue5-main branch]
2022-01-11 18:41:23 -05:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
johan torp
d8b1cf4d6b Math constant constexprification and outlining to reduce massive code bloat
#ROBOMERGE-AUTHOR: johan.torp
#ROBOMERGE-SOURCE: CL 17679918 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17679955 by johan torp in ue5-release-engine-test branch]
2021-09-30 13:03:15 -04:00
shawn mcgrath
cc848ed446 Wrapped FVectorVMContext in NiagaraDataInterfaceFunctionContext for external functions to facilitate running an experimental VM in parallel.
External functions should no longer access FVectorVMContext directly and instead use the helper member functions in the NiagaraDataInterfaceFunctionContext class... this should have zero effect without NIAGARA_EXP_VM defined... if it is defined then it'll use the experimental VM functions, which are not included in this CL.
#rb shaun.kime #jira none #okforgithub public

#ROBOMERGE-SOURCE: CL 16908052 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16908059 by shawn mcgrath in ue5-release-engine-test branch]
2021-07-21 07:43:14 -04:00
andrew davidson
fe7fa28e90 LWC: Niagara uses large world coordinate float types only.
Submitted on behalf of shaun.kime.
#rb chris.conway, frank.fella, michael.galetzka, simon.tovey, stu.mckenna, andy.davidson
#preflight 60cb5af49f1237000128cbe8

#ROBOMERGE-SOURCE: CL 16706154 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16706156 by andrew davidson in ue5-release-engine-test branch]
2021-06-17 12:39:31 -04:00
Marc Audy
e80ea6b959 Merge from Release-Engine-Staging @ 16444985
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16445122 by Marc Audy in ue5-release-engine-test branch]
2021-05-25 02:43:26 -04:00
rob krajcarski
9f80a46795 Standardize step() implementation between CPU and GPU scripts making the existing step(x) implement step(0, x)
#rb simon.tovey
#jira UE-115365


#ROBOMERGE-OWNER: rob.krajcarski
#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 16376696 via CL 16376755 via CL 16376824
#ROBOMERGE-BOT: (v804-16311228)
#ROBOMERGE-CONFLICT from-shelf

[CL 16376990 by rob krajcarski in ue5-release-engine-staging branch]
2021-05-18 17:46:08 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00