Commit Graph

669 Commits

Author SHA1 Message Date
Ben Ingram
66944fbb51 Fix merge of shader changes from Release-4.25 combined with optimizations from FN
#rb none

[CL 12960787 by Ben Ingram in Main branch]
2020-04-21 15:57:02 -04:00
ben ingram
45dc6407f3 #jira UE-92268
Allow FShader::Finalize to be called multiple times, ensure index doesn't change
#rb none

#ROBOMERGE-SOURCE: CL 12958102 in //UE4/Release-4.25/... via CL 12958109 via CL 12959154
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12959964 by ben ingram in Main branch]
2020-04-21 15:23:53 -04:00
ben ingram
68fbb75271 #jira UE-92139
Fix issues causing material DDC values to be non-determinisic
- Shader code within resources sorted by hash
- Debug source code values sorted by type
Also add mechanism to serialize any MemoryLayout described type to string
- Makes it easier to inspect material data to find sources of non-determinism
#rb none

#ROBOMERGE-OWNER: ben.ingram
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 12944988 in //UE4/Release-4.25/... via CL 12944998 via CL 12957822
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12957827 by ben ingram in Main branch]
2020-04-21 13:46:17 -04:00
arne schober
a95c78f7c4 FNEM - Optimizations arround TMemoryImageArray where usually the offset would be reapplied when using the index operator. Using an ArrayView avoids this.
#ROBOMERGE-SOURCE: CL 12945299 via CL 12945300 via CL 12945302
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12945306 by arne schober in Main branch]
2020-04-21 00:51:50 -04:00
rolando caloca
0325fe0ba6 UE4.25 - Fix bad module dependencies
#rb none
#rnx
#jira
#lockdown Marcus.Wassmer

#ROBOMERGE-SOURCE: CL 12874924 in //UE4/Release-4.25/... via CL 12874991 via CL 12875005
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12875015 by rolando caloca in Main branch]
2020-04-16 18:37:33 -04:00
eric mcdaniel
6215a145a2 Remove shader compilation flag CFLAG_SkipOptimizationsDXC
- this was added to aid DXC bring up and is no longer needed
  - there are no active references

#rb David.Harvey
#jira none
#rnx
#ushell-cherrypick of 12599316 by eric.mcdaniel

#ROBOMERGE-SOURCE: CL 12754507 in //UE4/Release-4.25Plus/... via CL 12783839
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12786352 by eric mcdaniel in Main branch]
2020-04-14 16:52:50 -04:00
eric mcdaniel
f58f42e02a Support for dumping shader debug info only on compilation errors or warnings
- valid settings for r.DumpShaderDebugInfo are now 0-3
  - 0 - don't dump (unchanged)
  - 1 - always dump (unchanged)
  - 2 - dump on error (ie compilation failure)
  - 3 - dump on generated errors or warnings

- implementation details:
  - mode 2 and 3 are achieved by reissuing shader compilation jobs
    - jobs are issued as normal with no DumpInfoPath set so the platform specific shader compilers will not dump additional files
      - jobs that fail to compile (mode 2) or generate any errors/warnings (mode 3) are reissued with a valid DumpInfoPath which will cause the platform specific shader compilers to dump the additional files
        - the directory creation is deferred until the second pass on mode 2 or 3 as well so no empty directories are created

- limitations:
  - shader compilation jobs which crash the shader compile worker will not produce debug dump info on modes 2 or 3 as we will not get an opportunity to reissue the jobs

#rb Rolando.Caloca, Lukas.Hermanns
#jira none
#ushell-cherrypick of 12649065 by eric.mcdaniel

#ROBOMERGE-SOURCE: CL 12729479 in //UE4/Release-4.25Plus/... via CL 12781786
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12782596 by eric mcdaniel in Main branch]
2020-04-14 13:41:58 -04:00
jeremy moore
c3f5dbad94 Moved definition of virtual texture log
#ROBOMERGE-SOURCE: CL 12764102 via CL 12764127 via CL 12764136 via CL 12764147
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200)

[CL 12764160 by jeremy moore in Main branch]
2020-04-13 15:46:49 -04:00
ben ingram
54a7ace313 Fix RemoveShaderTypePermutaion(), avoid crash when recompiling shaders
#rb none

#ROBOMERGE-SOURCE: CL 12759664 via CL 12759665 via CL 12759667
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200)

[CL 12759668 by ben ingram in Main branch]
2020-04-13 14:29:28 -04:00
jordan cristiano
f0a40dee89 Added StartRenderCommandFenceBundler/StopRenderCommandFenceBundler to FPendingCleanupObjects to avoid massive render command enqueue hitching.
#rb mickael.gilabert
[FYI] mike.fricker
#rnx

#ROBOMERGE-SOURCE: CL 12692247 via CL 12692249 via CL 12692255 via CL 12692259
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v676-12543919)

[CL 12692267 by jordan cristiano in Main branch]
2020-04-09 13:53:27 -04:00
ben ingram
0b04e0f76e #jira UE-88814
Improve behavior when global shades can't be loaded due to memory layout differences
(Trigger a fatal log mentioning missing global shaders, rather than simply crash on nullptr access)
#rb none

#ROBOMERGE-SOURCE: CL 12675920 in //UE4/Release-4.25/... via CL 12675925 via CL 12675937
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12675940 by ben ingram in Main branch]
2020-04-08 13:32:26 -04:00
jonas meyer
e738543586 Add -noexceptionhandler command line parameter. This allows you to use JIT debugging.
#rb stefan.boberg
#jira none

#ROBOMERGE-SOURCE: CL 12670885 in //UE4/Release-4.25/... via CL 12670887 via CL 12670888
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12672054 by jonas meyer in Main branch]
2020-04-08 10:12:09 -04:00
ben ingram
367e909b48 #jira UE-91658
Force 64bit alignment for some uint64s used with atomics, fixes crash on 32bit windows
#rb none

#ROBOMERGE-SOURCE: CL 12669971 in //UE4/Release-4.25/... via CL 12669974 via CL 12669981
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12671692 by ben ingram in Main branch]
2020-04-08 10:07:01 -04:00
rolando caloca
d525dc9f3d UE4.25 - Copy/paste fix
#rb none
#rnx
#lockdown Marcus.Wassmer
#jira UE-91638

#ROBOMERGE-SOURCE: CL 12654310 in //UE4/Release-4.25/... via CL 12654489 via CL 12654700
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12654835 by rolando caloca in Main branch]
2020-04-07 11:03:39 -04:00
ben ingram
d9d0535ddc Add freezable hash table, use to accelerate lookup of shaders within ShaderMap
- Shaders are searched by TypeName and PermutationId, so move those fields out of FShader and into separate arrays inside ShaderMap, to reduce cache misses while finding shaders
#rb none

#ROBOMERGE-OWNER: ben.ingram
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 12646854 via CL 12646966 via CL 12646981
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12646995 by ben ingram in Main branch]
2020-04-06 21:12:18 -04:00
rolando caloca
d7fc07f4ea UE4.25 - Deprecate UnbindRenderTargets
#rb none
#lockdown Marcus.Wassmer
#jira UE-91584

#ROBOMERGE-OWNER: rolando.caloca
#ROBOMERGE-AUTHOR: rolando.caloca
#ROBOMERGE-SOURCE: CL 12632871 in //UE4/Release-4.25/... via CL 12632899 via CL 12633229
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12633251 by rolando caloca in Main branch]
2020-04-06 16:28:53 -04:00
ben ingram
eb819d2d9f Cache hashed filename on FShaderType, avoid semi-expensive TCHAR*->FName->FHashedName conversion when looking up global shaders
#rb none

#ROBOMERGE-SOURCE: CL 12579879 via CL 12579892 via CL 12579904
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12579927 by ben ingram in Main branch]
2020-04-02 18:01:08 -04:00
arciel rekman
6df10f716d Do not log errors when loading shaders for other RHIs.
- If a game targets both Vulkan and D3D, when running with -vulkan D3D shaders will not be loaded.

#rb none
[CODEREVIEW] Ben.Ingram
#jira none

#ROBOMERGE-SOURCE: CL 12571714 in //UE4/Release-4.25/... via CL 12571775 via CL 12571793
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12571822 by arciel rekman in Main branch]
2020-04-02 16:00:42 -04:00
arciel rekman
15a2eef5e0 Fix running -nullrhi with native shader libraries (UE-91432).
#rb Ben.Ingram
#jira UE-91432

#ROBOMERGE-SOURCE: CL 12513296 in //UE4/Release-4.25/... via CL 12513299 via CL 12513301
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12513305 by arciel rekman in Main branch]
2020-04-01 20:32:33 -04:00
lukas hermanns
cc4e0c2981 Support VolumeTexture in TextureProperty node. Also added "GetSizeZ" function to FTexture.
#rb Rolando.Caloca, Uriel.Doyon
[FYI] Ben.Ingram
#jira UE-88163
#rnx
#hardlock Nick.Penwarden

#ROBOMERGE-SOURCE: CL 12498744 in //UE4/Release-4.25/... via CL 12498754 via CL 12498763
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12498769 by lukas hermanns in Main branch]
2020-03-31 13:43:24 -04:00
dmitriy dyomin
3fb1b40436 Fixed: Runtime Virtual Textures crash on Mobile
#jira UE-91261
#rb none
#lockdown christina.riveron

#ROBOMERGE-SOURCE: CL 12493731 in //UE4/Release-4.25/... via CL 12493775 via CL 12493804
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12493857 by dmitriy dyomin in Main branch]
2020-03-31 05:49:05 -04:00
zabir hoque
c0d645c05f Expose AllowShaderWorkers to cvars as well.
#rb: Rolando.Caloca
#jira: none

#ROBOMERGE-SOURCE: CL 12491544 in //UE4/Release-4.25/... via CL 12491551 via CL 12491558
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12491562 by zabir hoque in Main branch]
2020-03-30 18:23:49 -04:00
ben ingram
73961fa70d Updates to FileCache to work better with shader preloading
- FileCache can dynamically allocate/release memory as needed
- Preloaded lines are locked in the cache.  One the preloaded memory has been read, the line is unlocked.  This prevents preloaded lines from being evicted before they're needed.
- Cache line size changed from 64k to 16k, reduce fragmentation due to locked preloaded lines
#rb none

#ROBOMERGE-SOURCE: CL 12491121 via CL 12491126 via CL 12491130
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12491133 by ben ingram in Main branch]
2020-03-30 17:41:29 -04:00
zach bethel
8be56c56e2 Fixed RDG leaking uniform buffers.
#rb none

#ROBOMERGE-SOURCE: CL 12488855 via CL 12488867 via CL 12488870
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12488877 by zach bethel in Main branch]
2020-03-30 14:27:58 -04:00
zach bethel
24a7354031 Removed additional allocations from FRDGBuilder. Compile out debug labels for test / shipping in render target pool. Don't set global uniform buffers when none exist.
#rb none


#ROBOMERGE-SOURCE: CL 12435615 via CL 12435617
#ROBOMERGE-BOT: (v671-12333473)

[CL 12441349 by zach bethel in Release-Engine-Staging branch]
2020-03-26 07:21:08 -04:00