Commit Graph

151 Commits

Author SHA1 Message Date
Lukas Hermanns
7161ed1348 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

[CL 17408818 by Lukas Hermanns in ue5-main branch]
2021-09-02 16:39:14 -04:00
Rolando Caloca
dbff4319b2 UE5 - Remove some hlslcc vestiges from Vulkan
#rb Dmitriy.Dyomin, Lukas.Hermanns, jeannoe.morissette

[CL 17369648 by Rolando Caloca in ue5-main branch]
2021-08-31 12:04:21 -04:00
Rolando Caloca
d64b146cb2 UE5 - Remove platform
#rb Steve.Smith
#fyi Jules.Blok, Ryan.Durand, Ben.Marsh

[CL 17295935 by Rolando Caloca in ue5-main branch]
2021-08-24 19:27:11 -04:00
jeannoe morissette
b9cec8eea3 Fix "ViewMode ShaderComplexity" in Vulkan by adding approximate SPIRV instruction counts during shader compilation.
#rb Lukas.Hermanns
#jira UE-111807

[CL 17292669 by jeannoe morissette in ue5-main branch]
2021-08-24 16:15:49 -04:00
christopher waters
a737c92c4b 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

[CL 17186155 by christopher waters in ue5-main branch]
2021-08-16 23:18:03 -04:00
jeannoe morissette
bd8cc7a34b - Add support for 64bit image atomics extension (VK_EXT_shader_image_atomic_int64).
- Add CVar (r.Vulkan.Allow64bitShaderAtomics) to forcefully disable 64bit image atomics.  Currently defaults to 0 (until other components are in).
- Check driver version for Vulkan on NVIDIA, a fix was added for the 64bit image atomics that is required for Nanite. (currently Windows only, Linux TBD)

#rb Rolando.Caloca
#fyi mihnea.balta,dmitriy.dyomin,brandon.schaefer

[CL 16982971 by jeannoe morissette in ue5-main branch]
2021-07-28 11:49:42 -04:00
Lukas Hermanns
669b07aa3e Fix precision qualifier condition for ESSL output. Fix for CL 16757096.
#rb none
#fyi Rob.Krajcarski
#rnx

[CL 16761315 by Lukas Hermanns in ue5-main branch]
2021-06-23 15:58:22 -04:00
Lukas Hermanns
8b33493bee Only emit precision qualifier for integer and floating-point types in ESSL output (Vulkan backend).
#rb Rob.Krajcarski
#fyi Carl.Lloyd
#rnx

[CL 16757096 by Lukas Hermanns in ue5-main branch]
2021-06-23 10:52:28 -04:00
Ryan Vance
96bac36aa9 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

[CL 16711940 by Ryan Vance in ue5-main branch]
2021-06-17 17:15:16 -04:00
Lukas Hermanns
199b35c9f4 Unify compiler info and source info in CCHeader meta data.
#rb Will.Damon, Ryan.Vance
#fyi Carl.Lloyd
#jira none
#rnx

[CL 16687864 by Lukas Hermanns in ue5-main branch]
2021-06-16 10:14:15 -04:00
Rolando Caloca
3475ca5434 UE5 - Fix Vulkan missing dual blending annotation; move it to be platform agnostic
#fyi Brian.White, Dmitriy.Dyomin
#rb Will.Damon
#jira UE-117253
#rnx

[CL 16574688 by Rolando Caloca in ue5-main branch]
2021-06-07 14:30:42 -04:00
carl lloyd
9b6d231e68 Enabling DXC on Vulkan Mobile
#rb Lukas.Hermanns

[CL 16346836 by carl lloyd in ue5-main branch]
2021-05-17 05:59:00 -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
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
Lukas Hermanns
603d5cd805 Fix Vulkan backend: SPIRV module was duplicated in output archive.
#rb Carl.Lloyd.
#fyi Ryan.Vance, Rolando.Caloca, Mihnea.Balta
#jira none
#rnx

[CL 16037693 by Lukas Hermanns in ue5-main branch]
2021-04-16 14:43:18 -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
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
Lukas Hermanns
c147f01b29 Extend input/output bitmask in shader binding descriptors from 16 to 32 bits; in Metal, GLSL, ESSL, and SPIR-V backends.
#rb Will.Damon, Brian.White, Dmitriy.Dyomin
[FYI] Mihnea.Balta, Rolando.Caloca, Ola.Olsson, Carl.Lloyd
#jira UE-108926
#rnx

#ROBOMERGE-OWNER: Lukas.Hermanns
#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 15642763 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)
#ROBOMERGE-CONFLICT from-shelf

[CL 15642935 by Lukas Hermanns in ue5-main branch]
2021-03-08 13:24:59 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
Florin Pascu
77051879b6 DistanceField Shadow Mobile(disabled by default for the moment)
#rb Dmitriy.Dyomin,Zach.Bethel, Jack.Porter
#jira UE-103864

[CL 15471024 by Florin Pascu in ue5-main branch]
2021-02-19 07:49:57 -04:00
Marc Audy
9753392e2b Merge UE5/RES CL# 15462083 to UE5/Main
This represents UE4/Main @ 15414221

[CL 15463811 by Marc Audy in ue5-main branch]
2021-02-18 18:13:28 -04:00