Commit Graph

395 Commits

Author SHA1 Message Date
graham wihlidal
b841d3cb41 Added shader compiler support for [noinline] where available. Informs compiler we want a subroutine created, which can be used to decrease register pressure in certain situations. Code is kept separate, and a set number of registers are used on each call. Should only be used with extensive profiling, as the default inlining behavior is usually best.
DXIL:  https://github.com/microsoft/DirectXShaderCompiler/blob/master/tools/clang/test/HLSLFileCheck/hlsl/functions/attribute/noinline.hlsl
SPIRV: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html (DontInline)

Shader code can now use NOINLINE, and also test if it maps to something useful with COMPILER_SUPPORTS_NOINLINE

#rb yuriy.odonnell
[FYI] rune.stubbe, brian.karis
#jira UETOP-1088
#lockdown nick.whiting

#ROBOMERGE-SOURCE: CL 16019442 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16022532 by graham wihlidal in ue5-main branch]
2021-04-15 12:09:16 -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
graham wihlidal
7b6ec4d476 Work in progress support for D3D12 Shader Model 6.6, specifying validator version, and workarounds to disable validation/signing until validator v1.6 is available that supports the 6.6 profile (requires developer mode and experimental features).
Disabled by default (guarded by USE_SHADER_MODEL_6_6).

Includes work done by Yuriy.

#rb yuriy.odonnell
#fyi brian.karis, christopher.waters, lukas.hermanns

[CL 15914077 by graham wihlidal in ue5-main branch]
2021-04-05 04:40:52 -04:00
Tim Smith
737ad605ed Fixing Clang warnings in LiveCoding
#rb devin.doucette
#jira UE-112494

[CL 15877566 by Tim Smith in ue5-main branch]
2021-03-31 13:00:20 -04:00
halfdan ingvarsson
e5c856c8c9 Instead of relying on non-conflict with library-provided wmemchr, just re-implement std::wstring::find on top of wcsstr for clang 11.0 on Windows only.
#jira none
#rb tim.smith
#rnx

[CL 15860653 by halfdan ingvarsson in ue5-main branch]
2021-03-30 09:03:46 -04:00
tim smith
1f6c785bcf Removed references to UE4 in Epic modifications
#rb none
#jira UE-111726

#ROBOMERGE-SOURCE: CL 15852110 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15852982 by tim smith in ue5-main branch]
2021-03-29 13:42:59 -04:00
tim smith
238c0372a1 Removing UE4 from code
#rb none
#jira UE-111710

#ROBOMERGE-SOURCE: CL 15852066 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15852981 by tim smith in ue5-main branch]
2021-03-29 13:42:53 -04:00
Tim Smith
5dc30d2303 Adding the ability to disable re-instancing when doing live coding.
Will be disabled until blueprint issues are resolved.

#rb trivial

[CL 15851149 by Tim Smith in ue5-main branch]
2021-03-29 10:54:06 -04:00
halfdan ingvarsson
c8d619d990 Workaround for a bug in clang-cl 11.0 when building in C++17 mode, where __builtin_wmemchr is not implemented.
#jira none
#rb tim.smith
#rnx

[CL 15850274 by halfdan ingvarsson in ue5-main branch]
2021-03-29 09:23:17 -04:00
mihnea balta
d5c41b1dec More cleanup for UE4 references.
#rb trivial
#rnx
#jira UE-111661 UE-111087 UE-111327 UE-111056 UE-111062 UE-111414 UE-111417 UE-111415 UE-111453 UE-111474 UE-111729

#ROBOMERGE-SOURCE: CL 15825946 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v785-15821902)

[CL 15829883 by mihnea balta in ue5-main branch]
2021-03-25 15:42:37 -04:00
Tim Smith
196d6c5b42 Fix improper extern declaration that caused issues with Clang but not MSVC (Clang was right IMHO)
#rb trivial
#jira UE-111492

[CL 15747765 by Tim Smith in ue5-main branch]
2021-03-19 11:36:00 -04:00
Steve Robb
4fa411c84e Removal of dependencies to Windows Vista or earlier.
#jira UE-110555
#rb josh.adams

[CL 15746365 by Steve Robb in ue5-main branch]
2021-03-19 08:05:49 -04:00
christopher waters
1d0b1d44eb Initial support for Mesh and Amplification Shaders. These new shader types are an optional feature of the RHIs and are only enabled on PC D3D12 with Feature Level SM6.
#jira none
#rb emil.persson, graham.wihlidal, lukas.hermanns

[CL 15742432 by christopher waters in ue5-main branch]
2021-03-18 18:42:49 -04:00
Tim Smith
a2237e050d LiveCoding Re-instancing
LIMITATIONS:

1) Re-instancing will only update UClass instance data.
2) Adding and removing properties should only be done towards the end of a class or structure and can not be followed by complex data types.
3) Adding and removing properties from a base class should not be done if a derived class contains complex data types.

KNOWN ISSUES:

1) Changes to enumerations and structures will not be reflected in existing blueprints.  However, adding new nodes to the blueprint will show the updated enumeration or structure.
2) If a class contains an enumeration or structure as a member, the class will not be re-instanced if enumeration or structure is changed.

CHANGES:

1) LiveCodingServer
1a) Modified to always execute certain static instances during load.
1b) Modified to exclude the _Statics static structures to avoid patching to old copies.

2) Added support for LiveCoding reinstancing
2a) Refactored deferred registration system for UClass, UEnum, and UScriptStruct to use a common system that works for normal game, hot reload and live coding.
2b) Type specific version check data is possible (i.e. enum doesn't have a size)
2c) Single registration static for UClass
2d) Single registration class for all types that is just a blind forward to API.
2e) Static and dynamic registrations use different API entry points to avoid having overloaded argument lists that just apply to one or the other.
2f) Shims for older API

3) New common "Reload" system to avoid using HotReload code.
3a) Support common delegates regardless of who is reloading/reinstancing.
3b) Re-instancing code moved from HotReload to Kismet2 (where the bulk of the re-instance code already existed).
3c) Modified PyWrapper to use new helper class instead of depending on HotRelaod
3d) Added WITH_RELOAD which is defined if HotReload or LiveCoding is enabled.
3e) Modifed existing code to use new #define and delegates.

Robert did the review on the changes covered by Part 2.  Remaining changes are all straightforward.

#rb robert.manuszewski
#jira UE-74493

[CL 15736777 by Tim Smith in ue5-main branch]
2021-03-18 08:13:59 -04:00
Yuriy ODonnell
9219cb046d Differentiate between engine custom shader validation errors and real D3DCompileToDxil failures.
#rb Graham.Wihlidal

[CL 15732460 by Yuriy ODonnell in ue5-main branch]
2021-03-17 20:12:52 -04:00
Tim Smith
aa8091eb54 LiveCoding fails to load a patch after "Quick Restart" is used.
#rb trivial
#jira UE-110742

[CL 15710313 by Tim Smith in ue5-main branch]
2021-03-16 07:51:47 -04:00
christopher waters
bd8fabd199 Fixing UAVMask support.
- Removed OutputMask since nothing was using it anymore.
- Made UAVMask an optional output from FXC compiles, only d3d11 reads it.
- UAVMask now created from entire set of UAVs and not just UAVs in Uniform Buffers.

#jira none
#rb mihnea.balta

#ROBOMERGE-SOURCE: CL 15643920 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)

[CL 15643927 by christopher waters in ue5-main branch]
2021-03-08 15:13:56 -04:00
Arciel Rekman
751815e225 Load d3dcompiler_*.dll explicitly (UE-108348).
- This makes shader compilation predictable and resolves the issue with Incredibuild failing to run SCWs on systems without the library.

#rb Chris.Waters, Rolando.Caloca, Lukas.Hermanns
#review-15600065 @Chris.Waters, @Rolando.Caloca, @Lukas.Hermanns
#robomerge Release-5.0-EarlyAccess
#jira UE-108348

[CL 15600059 by Arciel Rekman in ue5-main branch]
2021-03-03 22:25:04 -04:00
dmitriy dyomin
1b97990bd1 Support compressed volume textures on iOS and Android (ASTC)
Removed bSupportsVolumeTextureCompression as all platforms support it now, only Switch fallbacks to uncompressed
#jira UE-108841
#rb jack.porter

#ROBOMERGE-SOURCE: CL 15566901 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15566914 by dmitriy dyomin in ue5-main branch]
2021-03-02 02:21:19 -04:00
chris kulla
fa647ce8c0 Add support for warning as errors when compiling shaders
This adds support for a new compilation flag that enables warnings as errors. Support was added for most of the main platforms. This feature has to opted into since many shaders currenntly contain small warnings, however this gives the ability for developpers to locally opt-in to this behavior to slowly sanitize code.

A global CVar: r.Shaders.WarningsAsErrors was also added, which will force every shader to be (re)built with this enabled for even more thorough checking.

#rb Jason.Nadro, Lukas.Hermanns, Rolando.Caloca

[CL 15383543 by chris kulla in ue5-main branch]
2021-02-10 20:30:29 -04:00
Yuriy ODonnell
2565f44a7b More verbose error message on DXC compile failure. Helps to differentiate shader compile errors from compiler crashes.
#rb Lukas.Hermanns

[CL 15349245 by Yuriy ODonnell in ue5-main branch]
2021-02-06 07:48:09 -04:00
Lukas Hermanns
a4dfdcd0ad Moved dxil.dll from DirectX folder into ShaderConductor binary folder and load dxil.dll manually to ensure it's always loaded from that location.
#rb Yuriy.ODonnell, Emil.Persson, Kenzo.Terelst
#fyi Mihnea.Balta, Rolando.Caloca, Graham.Wihlidal
#jira none
#rnx

[CL 15337426 by Lukas Hermanns in ue5-main branch]
2021-02-05 10:29:11 -04:00
Lukas Hermanns
a015b2c2e3 Use custom built dxc.exe for D3D shader compilation batch scripts.
#rb Yuriy.ODonnell
#fyi Graham.Wihlidal, Emil.Persson, Kenzo.Terelst
#jira none
#rnx

[CL 15284807 by Lukas Hermanns in ue5-main branch]
2021-02-02 17:12:57 -04:00
Yuriy ODonnell
8789e0bb07 Include shader compiler DLL version in FShaderFormatD3D/Vulkan::GetVersion(), similar to how it's done for other platforms.
#rb Lukas.Hermanns

[CL 15276007 by Yuriy ODonnell in ue5-main branch]
2021-02-01 18:54:58 -04:00
Josh Adams
b0e4357576 - UBT Code changes to remove 32-bit Windows support (C++ code for 32-bit still exists)
#rb marc.audy (concept, not each file)

[CL 15265424 by Josh Adams in ue5-main branch]
2021-01-31 15:09:58 -04:00