Commit Graph

169 Commits

Author SHA1 Message Date
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
Ryan Vance
aacfa50a0d Initial shader compilation changes to support VKRT.
#rb Lukas.Hermanns, Rolando.Caloca

[CL 16098805 by Ryan Vance in ue5-main branch]
2021-04-22 17:38:43 -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
christopher waters
874ec853a4 Filling a few gaps in Mesh shader support. Adding ShouldCompilePermutation support to shader pipeline types to guard against unsupported shader types.
#jira none
#rb arciel.rekman
#preflight 60773f1c3f280e0001331ab8

[CL 16012256 by christopher waters in ue5-main branch]
2021-04-14 17:05:02 -04:00
Lukas Hermanns
677f2f50f1 Fix binding reflection for Metal backend: only Vulkan needs storage buffers to always occupy a UAV binding slot.
#rb Will.Damon
#jira none
#rnx

[CL 15979593 by Lukas Hermanns in ue5-main branch]
2021-04-12 13:16:00 -04:00
Lukas Hermanns
dc07d3f58e Add "Disassemble" function to public interface of ShaderConductor.
Move ShaderConductor utility to disassemble SPIR-V into ShaderCompilerCommon module.
Fix --strip-reflect pass in SPIRV-Tools to remove all SPV_GOOGLE* reflection extensions.
Rebuild ShaderConductor for Win64, Linux, and Mac.

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

[CL 15978123 by Lukas Hermanns in ue5-main branch]
2021-04-12 11:25:06 -04:00
Lukas Hermanns
c75e86cf40 Move SPIR-V utility functions for reflection and binding information into SpirvCommon.h/.cpp source files.
#rb Will.Damon, Carl.Lloyd
#fyi Ryan.Vance, Mihnea.Balta, Rolando.Caloca, Dmitriy.Dyomin
#jira none
#rnx

[CL 15954206 by Lukas Hermanns in ue5-main branch]
2021-04-08 10:09:56 -04:00
Lukas Hermanns
6c9b164f8b Added secondary "WritePackedGlobal" function to FHlslccHeaderWriter.
#rb Carl.Lloyd
#jira none
#rnx

[CL 15875032 by Lukas Hermanns in ue5-main branch]
2021-03-31 10:19:01 -04:00
Lukas Hermanns
2e1fb14cb7 Add "Optimize" function to public interface of ShaderConductor to perform SPIR-V optimizations *after* shader reflection (e.g. to strip reflection extensions).
#rb Carl.Lloyd, Will.Damon
#fyi Ryanc.Vance, Mihnea.Balta, Rolando.Caloca, Michael.Sartain, Brandon.Schaefer
#jira none
#rnx

[CL 15850443 by Lukas Hermanns in ue5-main branch]
2021-03-29 09:45:48 -04:00