Commit Graph

117 Commits

Author SHA1 Message Date
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
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
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
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
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
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
christopher waters
d1e9a0ce0b Adding ERHIFeatureLevel::SM6 and SP_PCD3D_SM6. Initially, both are disabled by default. The shader model is enabled with r.D3D12.AllowShaderModel6 and the feature level is only used when the shader model is enabled and the PC runtime supports 12_1 and SM6.5. The idea here is to raise these requirements to 12_2 and SM6.6 when those come online.
#jira none
#rb kenzo.terelst, arciel.rekman, lukas.hermanns, mihnea.balta, yuriy.odonnell

[CL 15222057 by christopher waters in ue5-main branch]
2021-01-27 16:08:00 -04:00
Marc Audy
ada7c144fa Merge //UE5/Release-Engine-Staging @14903491 to //UE5/Main
[CL 14906022 by Marc Audy in ue5-main branch]
2020-12-11 14:21:20 -04:00
christopher waters
c53cd84637 Make sure we use the checked in version of d3dcompiler_47.dll when loading the d3d shader format. Also make sure that version goes along in SN-DBS.
#jira none
#rb arciel.rekman, lukas.hermanns

[CL 14883307 by christopher waters in ue5-main branch]
2020-12-08 17:50:55 -04:00
zach bethel
0d7dc4d4ed Refactor of uniform buffer binding to allow for runtime selection of static or per-shader binding. This is a necessary precursor to moving the View uniform buffer to use static bindings on mesh passes; it is used in so many places that both binding models are required to preserve compatibility. Added validation to catch when a uniform buffer is bound using both methods at the same time. Added CVar to RHI transition validation to control whether to break in the debugger on a transition failure.
#rb christopher.waters

[CL 14873973 by zach bethel in ue5-main branch]
2020-12-07 17:42:32 -04:00
Lukas Hermanns
5acb4c83b6 DXC Update: SCW backends.
#rb none
#fyi Mihnea.Balta, Rolando.Caloca, Will.Damon, Jonas.Meyer, Michael.Sartain
#jira none
#rnx

[CL 14832278 by Lukas Hermanns in ue5-main branch]
2020-12-01 19:33:51 -04:00
Rolando Caloca
8c5dda23da UE5 - Proper fix for r.Shaders.KeepDebugInfo passing in the FRHIShader::ShaderName correctly
Initial fixes and tested on D3D11, D3D12 and Vulkan
Changed 'n' to FShaderCodeName::Key
Also added checks if trying to add optional shader data out of order
#rb Jonas.Meyer, Kenzo.Terelst, Mihnea.Balta

[CL 14816162 by Rolando Caloca in ue5-main branch]
2020-11-26 13:34:15 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
zach bethel
fbbedc9910 Fix for RGS not finding global uniform buffers.
#rb yuriy.odonnell

[CL 14601037 by zach bethel in ue5-main branch]
2020-10-28 13:32:40 -04:00
christopher waters
5a905dcc66 Fixing static analysis warnings.
Each case is a "if (BindDesc.Type == D3D_SIT_TEXTURE || BindDesc.Type == D3D_SIT_SAMPLER)" block that has "if (BindDesc.Type == D3D_SIT_SAMPLER) {} else if (BindDesc.Type == D3D_SIT_TEXTURE) {}", the second condition should just be an else.

#jira UE-101644
#rb Arciel.Rekman

[CL 14548383 by christopher waters in ue5-main branch]
2020-10-22 16:04:07 -04:00
christopher waters
1fefa64f2f Updating "D3D10" type usages to the version agnostic "D3D"
#jira none
#rb Arciel.Rekman, Lukas.Hermanns

[CL 14397141 by christopher waters in ue5-main branch]
2020-09-25 12:21:25 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
arne schober
65b0137579 M2 - DX11 shader creation errors due to Extension and DXIL shaders passed into DX11 when r.CreateShadersOnLoad=1 is used
#jira UE-96404
[FYI] Arciel.Rekman, Yuriy.ODonnell, Graham.Wihlidal
#RB Graham.Wihlidal

#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 14325095 in //UE5/Release-5.0-M2/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-M2 -> Main) (v738-14305781)

[CL 14325304 by arne schober in ue5-main branch]
2020-09-15 22:14:11 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Rolando Caloca
05132dc581 S - Change DXC unroll issue from error to warning
#rb Graham.Wihlidal
#rnx
#jira none

[CL 14037315 by Rolando Caloca in ue5-main branch]
2020-08-05 11:03:57 -04:00