Commit Graph

177 Commits

Author SHA1 Message Date
carl lloyd
a0d85084b1 Added support for padding attribute locations automatically for OpenGLES
Fixed OpenGLES preview

#rb Lukas.Hermanns

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 17460403 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17460416 by carl lloyd in ue5-release-engine-test branch]
2021-09-08 13:00:48 -04:00
guillaume abadie
5f34bdd406 Fixes shader compile worker crash on vulkan
#rb none
#preflight trivial

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17438300 via CL 17439818
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17439944 by guillaume abadie in ue5-release-engine-test branch]
2021-09-06 15:24:08 -04:00
guillaume abadie
d56bfe7b07 Migrates D3D to submit all loose shaders parameters in a single RHISetShaderParameter()
#rb none
#preflight 61323f857d30040001b77b61

#ROBOMERGE-OWNER: guillaume.abadie
#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17431343 via CL 17438616
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17438618 by guillaume abadie in ue5-release-engine-test branch]
2021-09-06 11:28:30 -04:00
lukas hermanns
c5400b94fe Replace EHlslShaderFrequency with EShaderFrequency in ShaderConductor interface.
Also remove further references to Hull and Domain shaders as tessellation is no longer supported in UE5.

#rb Will.Damon, Brian.White, Christopher.Waters, Jeannoe.Morissette
[FYI] Carl.Lloyd, Florin.Pascu, Ryan.Vance, Rolando.Caloca, Mihnea.Balta
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 17408818 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17408845 by lukas hermanns in ue5-release-engine-test branch]
2021-09-02 16:41:03 -04:00
lukas hermanns
011e219a20 Fix mapping of EHlslShaderFrequency when cross-compiling HLSL-to-HLSL as appendix to CL 17291947.
#rb Christopher.Waters
#jira UE-117831
#rnx

#ROBOMERGE-SOURCE: CL 17317441 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17317452 by lukas hermanns in ue5-release-engine-test branch]
2021-08-26 10:22:08 -04:00
lukas hermanns
3c7f7188c0 Cross-compile HLSL-to-HLSL after FXC crashed due to internal error.
#rb Christopher.Waters
[FYI] Mihnea.Balta, Jonathan.Bard
#jira UE-117831

#ROBOMERGE-SOURCE: CL 17291947 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17291953 by lukas hermanns in ue5-release-engine-test branch]
2021-08-24 15:34:07 -04:00
guillaume abadie
3f0a1b9fb2 Allows SHADER_USE_PARAMETER_STRUCT() to submit all shader parameters in a single RHISetShaderParameter()
#rb yuriy.odonnell
#preflight 611d572d9db7df000134eb13

#ROBOMERGE-SOURCE: CL 17222098 via CL 17222140
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17222165 by guillaume abadie in ue5-release-engine-test branch]
2021-08-18 16:56:25 -04:00
christopher waters
1c21a5489c Shader symbol terminology changes
- Splitting symbol generation and shader "debug info" generation into two different cvars. This should now allow us to generate symbols post-packaging without generating different shader variants. This should also enable us to always generate symbols and still have the final deduplicated shader sizes.
- r.Shaders.Symbols is now the primary way to enable shader symbols for debugging.
- r.Shaders.GenerateSymbols can be enabled to always generate symbols without writing them to disk.
- r.Shaders.WriteSymbols can be used to force write symbols if they were previously generated.
- r.Shaders.ExtraData can be used to generate shader names for engine runtime systems to use.
- NotifyShaderCooked replaced with NotifyShaderCompiled, prep for upcoming non-cook symbol writing.
- PC DXC shader compiles should only generate debug info when requested, not all the time.
- PC FXC shader compiles should generate debug info when requested, not just when r.Shaders.Optimize is 0.

#jira none
#rb arciel.rekman, lukas.hermanns
#preflight 611ad9035e737200015992db

#ROBOMERGE-SOURCE: CL 17186155 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17186162 by christopher waters in ue5-release-engine-test branch]
2021-08-16 23:18:23 -04:00
carl lloyd
f2a628b2a6 Added packed UB support to DXC and fixed bugs
#rb Lukas.Hermanns

#ROBOMERGE-SOURCE: CL 17133860 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17133863 by carl lloyd in ue5-release-engine-test branch]
2021-08-11 07:11:25 -04:00
marc audy
8e9b660dc6 Fix non-unity
[FYI] christopher.waters
#lockdown Jeff.Farris

#ROBOMERGE-SOURCE: CL 16818338 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16818339 by marc audy in ue5-release-engine-test branch]
2021-07-09 13:17:27 -04:00
ryan vance
2263d0caa5 VKRT:
Add ray tracing shader types
Add initial ray tracing pipeline creation
Add acceleration structure descriptor type
Add basic ray tracing pipeline, occlusion support initially
Strip reflection from ray tracing shader spirv to deal with validation warnings
Don't use an array of vk descriptor types directly, this breaks with non-contiguous enum values which are common in extensions. Using a TMap from descriptor type to values instead.
Don't store vk types in the serialized shader header, translate to and from our own internal enum types to avoid similar non-contiguous value issues.
Re-enabled ray tracing compilation on windows desktop, explicitly disable runtime support using GRHISupportsRayTracing

Todo:
We need to deal with the lack of a 1:1 mapping between shader stages and frequencies for ray tracing hit groups. This is a one to many mapping which doesn't work with how most of the Vulkan RHI is authored. For now I'm assuming a hitgroup maps to a CHS.
Ray tracing shader descriptor allocation and pending state support. While we are serializing the descriptors for ray tracing shaders, we're not allocating or updating them yet which is the last large chunk needed to trace rays.
Fix spirv binary version mismatch validation error. This basically needs a local dxc modification which explicitly sets the spirv binary version to work around incorrect assuptions in dxc which is causing validation failures.
Add another local dxc modification to allow for arbirary struct size support using VK_EXT_scalar_block_layout for ray tracing shaders.

#rb jeannoe.morissette, lukas.hermanns

#ROBOMERGE-SOURCE: CL 16711940 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16711955 by ryan vance in ue5-release-engine-test branch]
2021-06-17 17:15:40 -04:00
lukas hermanns
9028640c86 Unify compiler info and source info in CCHeader meta data.
#rb Will.Damon, Ryan.Vance
[FYI] Carl.Lloyd
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 16687864 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16687921 by lukas hermanns in ue5-release-engine-test branch]
2021-06-16 10:16:50 -04:00
christopher waters
8daf488d1f Fixing an issue where PrepareExportedDebugInfo would actually force symbols to be written.
Adding {ProjectDir} and {ProjectSavedDir} to r.Shaders.SymbolPathOverride

#rb none
#preflight 60c29c63c612640001dd54a4

#ROBOMERGE-SOURCE: CL 16633386 via CL 16633428
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v831-16623017)

[CL 16633454 by christopher waters in ue5-release-engine-test branch]
2021-06-10 19:52:49 -04:00
christopher waters
fee7fc13b2 Moving shader symbol exporting into a shared type.
Adding shader symbol export path override cvar. This cvar supports specifying the shader platform name via "{Platform}".
Adding Luke's change for having build machine specific shader configs.

#jira none
#rb rolando.caloca, david.harvey, lukas.hermanns
#preflight 60c243181264df0001a2c283

#ROBOMERGE-SOURCE: CL 16631848 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v831-16623017)

[CL 16631858 by christopher waters in ue5-release-engine-test branch]
2021-06-10 18:12:07 -04:00
charles derousiers
b402ba8720 Fix vulkan compilation issue with new ShaderPrint coloring.
Vulkan/DXC does not support initialization of static const variable having complex type. This change lines change the initialization to some simple define instead.

#rb none


#ROBOMERGE-SOURCE: CL 16574414
#ROBOMERGE-BOT: (v828-16531559)

[CL 16574416 by charles derousiers in ue5-main branch]
2021-06-07 14:15:34 -04:00
charles derousiers
0390184ee4 Add color support for shader print.
#rb none
#preflight 60bded2c0249c30001e4eceb


#ROBOMERGE-SOURCE: CL 16568047
#ROBOMERGE-BOT: (v828-16531559)

[CL 16568081 by charles derousiers in ue5-main branch]
2021-06-07 06:25:15 -04:00
charles derousiers
76466fc4e4 Add proper ASCII texture to print standard character set from shader.
#rb none


#ROBOMERGE-SOURCE: CL 16566309
#ROBOMERGE-BOT: (v828-16531559)

[CL 16566349 by charles derousiers in ue5-main branch]
2021-06-06 16:05:31 -04:00
charles derousiers
8c6a059f03 Add ShaderPrintText function for print TEXT("") string within shader.
#rb yuriy.odonnel, sebatien.hillaire
#jira none
#preflight 60b7570fc744b2000146292e

#ROBOMERGE-SOURCE: CL 16531948 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v828-16531559)

[CL 16531979 by charles derousiers in ue5-main branch]
2021-06-02 07:03:05 -04:00
Steve Robb
1f3fe8c9ac Some ANSICHAR/UTF8CHAR cast fixes for upcoming changes to StringConv.h.
#rb none
#jira none

[CL 16469364 by Steve Robb in ue5-main branch]
2021-05-26 10:45:12 -04:00
Lukas Hermanns
fb34aca6c2 Add '#line'-directive to custom HLSL rewriter in ShaderConductor.
#rb Rolando.Caloca, Will.Damon
#fyi Ryan.Vance, Carl.Lloyd
#jira none
#rnx

[CL 16367768 by Lukas Hermanns in ue5-main branch]
2021-05-18 11:17:09 -04:00
Lukas Hermanns
518ab66ee2 Remove unused struct field from "FShaderConductorOptions".
#rb Rolando.Caloca
#jira none
#rnx

[CL 16220825 by Lukas Hermanns in ue5-main branch]
2021-05-06 10:56:55 -04:00
Lukas Hermanns
7d8a9df55c Improve assertion output for redundancy check in SPIR-V header parser.
#rb Rolando.Caloca
#jira none
#rnx

[CL 16186518 by Lukas Hermanns in ue5-main branch]
2021-05-03 16:09:19 -04:00
Lukas Hermanns
c2eda93a8d Refactor SPIR-V patching and strip debug instructions for Vulkan mobile except OpName instructions in --strip-reflect pass as UE always needs this reflection information.
Rebuild ShaderConductor for Win64, Mac, Linux.

#rb Carl.Lloyd, Rolando.Caloca, Ryan.Vance
#fyi Mihnea.Balta, Will.Damon, Dmitriy.Dyomin, Michael.Sartain, Brandon.Schaefer
#jira none
#rnx

[CL 16186169 by Lukas Hermanns in ue5-main branch]
2021-05-03 15:22:38 -04:00
Lukas Hermanns
2a6092c316 Replace custom Disassemble function in ShaderConductor interface with the one that was already there.
#rb Ryan.Vance
#fyi Carl.Lloyd
#jira none
#rnx

[CL 16118857 by Lukas Hermanns in ue5-main branch]
2021-04-26 17:13:29 -04:00
rob krajcarski
21572f4b70 Fix for Niagara velocity shaders being generated incorrectly, which would fail PSOs to be created.
Fixes issue where an array of non-indexed elements with custom semantics would have their 'optimized' code path generated as:
Local_Value = OptimizedValue;
Instead of the reverse.
#rb lukas.hermanns, rolando.caloca
#jira none

[CL 16116319 by rob krajcarski in ue5-main branch]
2021-04-26 13:43:03 -04:00