Commit Graph

407 Commits

Author SHA1 Message Date
tim smith
af243577b4 Fixed global delegate functions to support changes when doing live coding.
Fixed issue where changing a function signature in an interface wouldn't update nodes in a blueprint.
Changed the API of the deferred registry to be more inline with UE coding standards.

#rb ben.marsh phillip.kavan
#rnx
#jira UE-113662
#preflight 60c0c0fdc61264000190e16a

#ROBOMERGE-SOURCE: CL 16606206 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16606221 by tim smith in ue5-release-engine-test branch]
2021-06-09 11:43:12 -04:00
Lukas Hermanns
b5aafce030 Dump preprocessed shader source in log on D3DCompile exception.
#rb Rolando.Caloca
#fyi Michal.Valient, Mihnea.Balta, Luke.Thatcher, Arciel.Rekman, Chris.Bunner
#jira UE-114967
#rnx

[CL 16518546 by Lukas Hermanns in ue5-main branch]
2021-06-01 14:24:07 -04:00
Lukas Hermanns
b7a50e1d3d Report error code and addresses on D3DCompile exception.
#rb Rolando.Caloca
#jira UE-114967
#rnx

[CL 16437813 by Lukas Hermanns in ue5-main branch]
2021-05-24 14:02:01 -04:00
David Harvey
1d41c2c202 Undo the refactor to allow Windows-based Platform extensions to specialize GenericWindowsTargetPlatform (CL 16329569).
Cannot easily specialize the specialization's config settings, so a different approach is required.

#jira UE-115613
#rb none
#rnx

[CL 16382731 by David Harvey in ue5-main branch]
2021-05-19 05:56:48 -04:00
David Harvey
2ae75e362a Windows-based Platform extentions can specialize GenericWindowsTargetPlatform, allowing access to all PC rendering features etc.
#jira UE-115613
#rb josh.adams
#rnx

[CL 16329569 by David Harvey in ue5-main branch]
2021-05-14 10:34:17 -04:00
Tim Smith
69a057a601 Fixing LiveCoding issue where multiple changes to properties could still result in crashes during editing and at exit time.
#jira UE-112720
#rb jonathan.adamczewski
#rnx
#preflight 609e59dc22cce00001cf19d9

[CL 16328393 by Tim Smith in ue5-main branch]
2021-05-14 07:44:02 -04:00
Arciel Rekman
d1e2a85fce Keep rewriting unused inputs until they stop changing (UE-115083)
- In a complex material, compiler may not be able to see through the code to discover all unused inputs.

E.g. first pass compilation says that input A is unused, but B and C are used. After we rewrite the code to remove A, the code is simpler and compiler is now able to see that B is also unused.

Since we pass the "used attributes" to the next stage, this creates a mismatch where vertex shader outputs only C, but pixel shader (rewritten based on the first pass results) expects B and C.

- The fixed code will check if the unused inputs changed, and if so, will go back and rewrite the code based on a more complete info.

- This fixes a bug that JonL ran into for which I haven't yet created a JIRA (will do before checkin).

#rb Ben.Ingram, Rolando.Caloca, Jason.Nadro
#review @Lukas.Hermanns, @Rolando.Caloca, @Ben.Ingram, @Jason.Nadro, @Kevin.Ortegren
#jira UE-115083

[CL 16312596 by Arciel Rekman in ue5-main branch]
2021-05-13 10:21:33 -04:00
Yuriy ODonnell
aa9e6a0c41 Added a basic implementation of assert in shaders for D3D12. Requires SM6 support which can be enabled through r.D3D12.AllowShaderModel6=1.
Example usage in a shader:

PLATFORM_ASSERT4(GroupThread > 4321, 0xDF7DC903, GroupThread, GroupIndex, GroupBase, asuint(123.456f));

Example GPU crash report output:

LogD3D12RHI: Error: [GPUBreadCrumb] Last tracked GPU operations:
LogD3D12RHI: Error: [GPUBreadCrumb]	3D Queue 0 - Begin: Frame 348 - Scene - ReflectionIndirect - RayTracingReflections - RayTracingDeferredReflectionsShade 957x466
LogD3D12RHI: Error: [GPUBreadCrumb]	Shader assertion failed! ID: 0xDF7DC903
LogD3D12RHI: Error: [GPUBreadCrumb]	Payload  [int32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb]	Payload [uint32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb]	Payload    [hex]: 0x000001A0 0x0000002A 0x0002A000 0x42F6E979
LogD3D12RHI: Error: [GPUBreadCrumb]	Payload  [float]: 0.000000 0.000000 0.000000 123.456001

This works through automatic diagnostic buffer binding in D3D12 RHI, which becomes available in *any* shader as a UAV.
Opens the door for arbitrary human-readable message output from any shader in the future.

PLATFORM_ASSERT macro is always enabled and available on supported platforms. It is intended to be a low-level mechanism for a higher-level check() that would be controlled via CVars.

#rb Christopher.Waters

[CL 16167404 by Yuriy ODonnell in ue5-main branch]
2021-04-30 08:37:35 -04:00
Tim Smith
de9adfe9b0 Fix NonUnity build
#rb trivial
#rnx

[CL 16122938 by Tim Smith in ue5-main branch]
2021-04-27 06:40:20 -04:00
Tim Smith
5fb833c5c1 Added support for more arbitrary property changes to live coding.
1) Changed the pre/post compile notifications from module notifications to process commands.
2) Added server command to notify that we want re-instance patching (two phase)
3) Added support for two phase patching to enable re-instancing without all the limitations.
4) Added a null CDO check for old blueprint classes (approved by Phillip)

#rb ben.marsh
#rnx
#preflight 6086e3481046fb000183c2d4

[CL 16115620 by Tim Smith in ue5-main branch]
2021-04-26 12:49:25 -04:00
rob krajcarski
edf0afd436 Move D3DShaderCompiler fatal error over UAV counts to a shader compiler error.
#jira none
#rb lukas.hermanns

[CL 16074451 by rob krajcarski in ue5-main branch]
2021-04-21 11:31:10 -04:00
christopher waters
83f70197d3 Tessellation Removal: Removing RHI Hull/Domain shader types and enums.
#rb lukas.hermanns
#jira UE-94564
#preflight 607f2e11eb4f050001d4655e

[CL 16066223 by christopher waters in ue5-main branch]
2021-04-20 17:00:25 -04:00
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