Commit Graph

47 Commits

Author SHA1 Message Date
christopher waters
281072e217 Don't count shader parameters that we don't bind through resource tables. Resources like UEDiagnosticBuffer and vendor extensions are handled through Root Signatures.
#jira
#rb yuriy.odonnell, elizabeth.baumel
#preflight 633ef2f7511dd8cb01cc51db

[CL 22381598 by christopher waters in ue5-main branch]
2022-10-06 15:23:50 -04:00
christopher waters
38cc1eb3b2 Instead of adding the different D3D shader format versions together, combine their hashes. This will prevent version overlaps when someone changes the shared version.
#jira none
#rb yuriy.odonnell
#preflight 633e43653a20cf302c9fee76

[CL 22371688 by christopher waters in ue5-main branch]
2022-10-05 23:57:45 -04:00
yuriy odonnell
0e08f4aa38 Add bindless resource support as a requirement for ray tracing on PC (SM 6.6 + Resource Binding Tier 3).
Compile DXR shaders using the same profile when targeting PCD3D_SM5 and PCD3D_SM6 (i.e. lib_6_6 or lib_6_5 based on USE_SHADER_MODEL_6_6 define).

#rb christopher.waters
#preflight 63376cc6466fb43669315f62

[CL 22286556 by yuriy odonnell in ue5-main branch]
2022-09-30 23:05:36 -04:00
christopher waters
74c6a9d8fb When changing SM6 raytracing shaders to use lib_6_6 from lib_6_5, the __SHADER_TARGET_MINOR value wasn't updated to 6.
When changing SM5 raytracing shaders to use lib_6_5 from lib_6_3, the __SHADER_TARGET_MINOR value wasn't updated to 5.
Bumping SM6 and SM5 shader versions.

#jira none
#rb yuriy.odonnell
#preflight 6335b2abf76de2d4d559891a

[CL 22263071 by christopher waters in ue5-main branch]
2022-09-30 00:44:25 -04:00
christopher waters
56b4134b24 Fixing debug DXC shader compiles.
When D3DCOMPILE_SKIP_OPTIMIZATION is set, none of the other D3DCOMPILE_OPTIMIZATION_LEVEL flags are set. Given that D3DCOMPILE_OPTIMIZATION_LEVEL1 is "0", this always forced debug shader builds to be compiled with "/Od /O1".
The fix is to ignore the other flags when D3DCOMPILE_SKIP_OPTIMIZATION is set.

#jira none
#rb massimo.tristano, mihnea.balta
#preflight 630e1989e54ec9d581800a92

[CL 21701349 by christopher waters in ue5-main branch]
2022-08-30 11:08:48 -04:00
Yujiang Wang
f6dc5c0058 Make sure every uniform buffer name in shader optional data is a valid name, i.e. no more "None"-s. Usually it's $Global being removed
#rb laura.hermanns
#preflight 62f1216bd76ea4b503e25128

[CL 21269863 by Yujiang Wang in ue5-main branch]
2022-08-08 12:01:59 -04:00
christopher waters
0c8638b589 Removing the "equality comparison with extraneous parentheses" warning from DXC compiles.
#jira none
#rb laura.hermanns
#preflight 62aa2c56da0af39a474fbb74

[CL 20677503 by christopher waters in ue5-main branch]
2022-06-15 17:57:39 -04:00
christopher waters
784625ccec Include Reflection data with SM6 embedded PDBs. This makes them way more useful in PIX.
#jira none
#rb jason.nadro, arciel.rekman, zach.bethel
#preflight 628e8695592ae524e3daac98

[CL 20400241 by christopher waters in ue5-main branch]
2022-05-27 17:56:55 -04:00
christopher waters
4e12726208 Migrating back to using UniformBuffer structs.
Since the cbuffer uses the same name as the struct, we have to rename the cbuffer using a consistent prefix. The reflection handling also needs to reinterpret the renamed cbuffer as the correct UniformBuffer.

#jira none
#rb mihnea.balta
#preflight 626c1762ce3959ce8fe7766e

[CL 20026049 by christopher waters in ue5-main branch]
2022-05-03 11:09:45 -04:00
robert srinivasiah
3737a45475 Hololens: Dedicated Shader Platform
We can't share DDPI infrastructure with PC D3D ES3.1 because of conflicts from sharing. We need a separate shader platform.
For now, we'll just 'intrusively' plumb the new Hololens shader platform. In the future, we want to move as much code out into
Hololens-specific platform code to reduce conflict with shared paths that don't need to know about Hololens.

#rb steve.smith, christopher.waters
#jira UE-133375
#preflight 61f9ca302251c6fb596e583e

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 18818524 in //UE5/Release-5.0/... via CL 18818546 via CL 18822881
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824735 by robert srinivasiah in ue5-main branch]
2022-02-02 08:00:15 -05:00
christopher waters
80c4624c01 Fixing PC SM6.6 support for RayTracing shaders.
#jira none
#rb yuriy.odonnell
#preflight 61f30f2a8255dba0d6b8f1d8

[CL 18778188 by christopher waters in ue5-main branch]
2022-01-28 16:01:30 -05:00
christopher waters
88cabcd2ff Initial work on SM6.6 support
- SM6.6 not enabled just yet.
- Adding our own defines of __SHADER_TARGET_MAJOR and __SHADER_TARGET_MINOR to mimic the DXC defines. Since we preprocess, we can't rely on DXC to define them for us.
- Adding support for 64bit atomic operations
- Changing part of Nanite PC atomic permutation selection to be based on DataDrivenPlatformInfo
- Fixing DXC shader debugging. The PDB section was still being stripped from the final DXIL.

#jira none
#rb rune.stubbe
#preflight 61548928f5e4fd0001d7d0b3

[CL 17665881 by christopher waters in ue5-main branch]
2021-09-29 15:08:47 -04:00
christopher waters
a8f866f355 D3D shader cleanup:
- Removed some unnecessary code from D3D shader compilers.
- Removing shader VendorExtensions runtime data from platforms that don't need them.
- Turning FShaderCodeFeatures into a set of flags to reduce its size. Adding a few new flags for future use.
- Moved the common D3D12 shader data and creation code into shared locations to cut down on code duplication.
- Removed the unnecessary copying of header data from all D3D12 shader types.
- Removed FD3D12ShaderBytecode since its values can be inferred from other shader data.

#jira none
#rb rolando.caloca, arciel.rekman
#preflight 6140c2df3aa82d000149f13b

[CL 17509617 by christopher waters in ue5-main branch]
2021-09-14 16:28:06 -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
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
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
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
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
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
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
ryan durand
471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00
Stu McKenna
35eb686d38 - Implement INVARIANT on D3D to make use of the precise keyword
- This fixes various issues around depth divergence that can be see in the Niagara Mesh Vertex Factory as well as doing certain operations inside world position offset

#rb Uriel.Doyon,Rolando.Caloca
#jira UE-81271

[CL 9660243 by Stu McKenna in 4.24 branch]
2019-10-17 15:22:57 -04:00