Commit Graph

101 Commits

Author SHA1 Message Date
rob krajcarski
a7225d5d7a Fix for member function specialization on android with VectorVM
#rb none


#ROBOMERGE-SOURCE: CL 12310974 via CL 12311084
#ROBOMERGE-BOT: (v670-12295787)

[CL 12311103 by rob krajcarski in Main branch]
2020-03-19 16:30:52 -04:00
rob krajcarski
357a490ebd Add local jump table to VectorVM's optimized byte code to reduce memory footprint (~%30 lower)
#rb stu.mckenna


#ROBOMERGE-SOURCE: CL 12306979 via CL 12306987
#ROBOMERGE-BOT: (v670-12295787)

[CL 12307004 by rob krajcarski in Main branch]
2020-03-19 14:40:42 -04:00
rob krajcarski
5f2b4ebba6 Generates function bindings for external DI functions that don't require user poitners so that we can share them across instances
-changes the function table to be an array of function pointers to allow for the redirection without copies/reallocations
-eliminates 2nd most common allocation in cases with large instance counts in niagara
#rb stu.mckenna


#ROBOMERGE-SOURCE: CL 12146347 via CL 12146348
#ROBOMERGE-BOT: (v659-12123632)

[CL 12146350 by rob krajcarski in Main branch]
2020-03-11 22:27:39 -04:00
arne schober
8ebb9182e7 FNM - Added Compression option for Niagara Systems. Thge Option will try to compress some of the parameters to use half precission, which can be a performance benefit on the GPU and sometimes also on the CPU.
#RB Rob.Krajcarski, Stu.McKenna
#JIRA UE-84463


#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 12105113 via CL 12121713
#ROBOMERGE-BOT: (v657-12064184)

[CL 12121717 by arne schober in Main branch]
2020-03-10 21:00:17 -04:00
shaun kime
de14270ed2 Adding a check if we are overflowing the specified constant buffer table
#rb Rob.Krajcarski
#jira none

#ROBOMERGE-SOURCE: CL 11575449 in //UE4/Release-4.25/... via CL 11575450
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11585320 by shaun kime in Main branch]
2020-02-22 18:11:14 -05:00
mihnea balta
1dacb87178 Fixed particle IDs never being deallocated on CPU (bug introduced in 11290626).
#rb none


#ROBOMERGE-SOURCE: CL 11303717 via CL 11303719
#ROBOMERGE-BOT: (v653-11302973)

[CL 11303721 by mihnea balta in Main branch]
2020-02-10 10:20:18 -05:00
mihnea balta
6c7931e56b Fixed stale entries in the ID to index buffers for CPU emitters.
The code used to update the output ID to index table, but that left stale entries in the input buffer set. When particles died, one of the buffers had -1 for the dead IDs, but the other still had the old execution indexes. This could lead to direct reads returning bogus data, instead of reporting that the ID is no longer in use. The solution is to clear the ID table at the beginning of the tick, and let the UpdateID() function fill in the IDs which are still in use.

This problem didn't occur on GPU, where the tables were already being cleared.

#rb none


#ROBOMERGE-SOURCE: CL 11292467 via CL 11292468
#ROBOMERGE-BOT: (v647-11244347)

[CL 11293007 by mihnea balta in Main branch]
2020-02-07 13:07:57 -05:00
mihnea balta
dd1264d2a4 Fixed incorrect ID to index mapping on CPU when an emitter spawns additional particles.
The UpdateID CPU kernel didn't take into account the instance start offset, so the spawn step mapped new IDs to indices starting at 0. If the emitter already contained particles, this caused the ID to index mapping to be incorrect in the frame when the spawn happened, which caused further problems if another emitter tried to read the particles in that frame.

#rb none


#ROBOMERGE-SOURCE: CL 11290626 via CL 11290627
#ROBOMERGE-BOT: (v647-11244347)

[CL 11290628 by mihnea balta in Main branch]
2020-02-07 06:53:49 -05:00
mihnea balta
ff43248d11 Particle read DI:
* added functions which can retrieve the IDs of the particles spawned in the last tick
* added missing barriers on source buffers when reading from another emitter
* fixed bug when more than one DI function was used in a module (bad alignment on the elements of the array of attribute indices)

Persistent IDs:
* replaced ClearUAV with a custom shader, so we can set sane barriers instead of the stuff that ClearUAV() forces. Dev-Rendering replaced ClearUAV() with a better API, but I didn't want to wait for that merge.
* grouped together all the ID buffer clears before the simulation dispatches, and all the free ID list updates after rendering, so they can overlap and to avoid stalls

Barriers:
* fixed a bogus compute to graphics transition on the ID to index buffer
* when running multiple ticks, only the outputs of the final tick are transitioned to graphics
* automatic CS cache flushes are disabled once before running all the ticks and enabled at the end, instead of doing it for each tick

#jira UE-84717
#rb Stu.McKenna


#ROBOMERGE-OWNER: mihnea.balta
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 11163241 via CL 11163243
#ROBOMERGE-BOT: (v640-11091645)

[CL 11167081 by mihnea balta in Main branch]
2020-01-29 15:31:45 -05:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
rob krajcarski
c5f7899345 Adds a set of constant buffers to hold engine driven niagara variables so that we can reduce the cost of managing the parameters through the script execution pipeline
-reduces fixed concurrent CPU costs of emitters by about 15%
-emitter parameter storage remains in place for non-system parameters
#rb stu.mckenna, simon.tovey


#ROBOMERGE-OWNER: rob.krajcarski
#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 11082540 via CL 11082550
#ROBOMERGE-BOT: (v637-11041722)

[CL 11082603 by rob krajcarski in Main branch]
2020-01-22 10:22:18 -05:00
stu mckenna
5a1902f295 - Ensure we don't accidentally read from the constant table when optimizing stat calls inside the VectorVM
- If the compiler chooses to fold both the Optimize & regular VM function calls together we will read garbage

#rb joe.barnes,ben.woodhouse
#rnx


#ROBOMERGE-OWNER: stu.mckenna
#ROBOMERGE-AUTHOR: stu.mckenna
#ROBOMERGE-SOURCE: CL 10907287 via CL 10907300 via CL 10907449 via CL 10907456 via CL 10907462
#ROBOMERGE-BOT: (v626-10872990)

[CL 10907468 by stu mckenna in Main branch]
2020-01-08 14:49:48 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
rob krajcarski
43c07bf080 Fix for vector writes crossing batch boundaries in VectorVM with batched outputs
#rb simon.tovey


#ROBOMERGE-SOURCE: CL 10798049 via CL 10798059
#ROBOMERGE-BOT: (v610-10636431)

[CL 10798061 by rob krajcarski in Main branch]
2019-12-18 12:01:16 -05:00
stu mckenna
45b407eb5e - Enable optimized VM code by default
- Fallback to synchronous optimizing when free is enabled so that we can free the source until I figure out a safe way to do this

[FYI] shaun.kime,simon.tovey,rob.krajcarski
#rnx


#ROBOMERGE-SOURCE: CL 10667538 via CL 10668398 via CL 10668414
#ROBOMERGE-BOT: (v609-10634694)

[CL 10668428 by stu mckenna in Main branch]
2019-12-11 23:55:24 -05:00
stu mckenna
891cc8b780 - Generate optimized VM ByteCode async
[CODEREVIEW] simon.tovey,rob.krajcarski
#rnx


#ROBOMERGE-SOURCE: CL 10621008 via CL 10621900 via CL 10621993
#ROBOMERGE-BOT: (v608-10590470)

[CL 10622045 by stu mckenna in Main branch]
2019-12-09 16:28:14 -05:00
rob krajcarski
ac25478aa1 Optimization to the VectorVM pattern of acquiring indices and outputting stream of attribute data.
Left packs the data with shuffles instead of branching on if a particle is valid, and claims blocks of indices rather than one at a time.
VectorIntShuffle intrinsic has been added locally to the VectorVM and is only included for selected platforms
#rb stu.mckenna, simon.tovey


#ROBOMERGE-SOURCE: CL 10594706 via CL 10594709
#ROBOMERGE-BOT: (v607-10590470)

[CL 10594712 by rob krajcarski in Main branch]
2019-12-06 13:41:14 -05:00
rob krajcarski
9903fc14f4 Back out changelist 10593082
#rb None


#ROBOMERGE-SOURCE: CL 10593938 via CL 10593945
#ROBOMERGE-BOT: (v607-10590470)

[CL 10593947 by rob krajcarski in Main branch]
2019-12-06 12:37:57 -05:00
rob krajcarski
f907fec87c Optimization to the VectorVM pattern of acquiring indices and outputting stream of attribute data.
Left packs the data with shuffles instead of branching on if a particle is valid, and claims blocks of indices rather than one at a time.
#rb stu.mckenna, simon.tovey


#ROBOMERGE-SOURCE: CL 10593082 via CL 10593089
#ROBOMERGE-BOT: (v607-10590470)

[CL 10593090 by rob krajcarski in Main branch]
2019-12-06 11:26:55 -05:00
rob krajcarski
941e82a956 Cherry pick SseMath changes (10103273 & 10114181), and also move VMVector over to use it (as well as create safe versions to protect against div/0 issues)
#rb stu.mckenna

#ushell-cherrypick of 10103273 by john.hable
#ushell-cherrypick of 10114181 by john.hable


#ROBOMERGE-SOURCE: CL 10481339 via CL 10481342
#ROBOMERGE-BOT: (v605-10478255)

[CL 10481343 by rob krajcarski in Main branch]
2019-11-30 15:58:53 -05:00
stu mckenna
60c265c60e - Fix decoding values on platforms that don't support unaligned loads
[FYI] nicholas.goldstein
#rnx


#ROBOMERGE-SOURCE: CL 10062477 via CL 10062526
#ROBOMERGE-BOT: (v574-10069753)

[CL 10071545 by stu mckenna in Main branch]
2019-11-07 12:16:59 -05:00
stu mckenna
746ee72100 - Fix for static analysis warning
- Warning is because a compare flags against a uint32 value and it assumes you should be doing an & == v which isn't correct in this instance

#rb none
#jira UE-83124
#rnx


#ROBOMERGE-SOURCE: CL 10034568 via CL 10034570
#ROBOMERGE-BOT: (v565-10026848)

[CL 10034571 by stu mckenna in Main branch]
2019-11-05 18:22:19 -05:00
stu mckenna
7d21538025 - Fix static analysis warning
#jira UE-83124
#rb none
#rnx


#ROBOMERGE-SOURCE: CL 10017401 via CL 10017403
#ROBOMERGE-BOT: (v562-10004402)

[CL 10017405 by stu mckenna in Main branch]
2019-11-05 12:55:06 -05:00
stu mckenna
087fd80d15 - Fix some static analysis warnings
[FYI] marc.audy
#rnx


#ROBOMERGE-SOURCE: CL 9975688 via CL 9975689
#ROBOMERGE-BOT: (v560-9963197)

[CL 9975690 by stu mckenna in Main branch]
2019-11-04 18:29:26 -05:00
stu mckenna
024ad914d4 - Fix error when PLATFORM_SUPPORTS_UNALIGNED_LOADS is not valid
#rb none
#rnx


#ROBOMERGE-SOURCE: CL 9962657 via CL 9964957
#ROBOMERGE-BOT: (v560-9963197)

[CL 9965542 by stu mckenna in Main branch]
2019-11-03 14:40:58 -05:00