Commit Graph

547 Commits

Author SHA1 Message Date
christopher waters
f5ff98f2e1 ShaderParameterParser cleanup
- Making ConstantBufferType a constructor only argument. This removes the duplicated logic of calling ShouldUseStableConstantBuffer.
- Moving ShouldUseStableConstantBuffer to ShaderCompilerCommon.
- Made UE::ShaderCompilerCommon::ParseParameterType array arguments const

#jira UE-166341
#rb Guillaume.Abadie
#preflight 634eeceea1527f6b3bda9ff0

[CL 22608320 by christopher waters in ue5-main branch]
2022-10-18 15:25:05 -04:00
christopher waters
1b8ad85eaa Working around DXC issue https://github.com/microsoft/DirectXShaderCompiler/issues/4715
When filling out D3D12_FUNCTION_DESC, DXC does not populate RequiredFeatureFlags. Given we rely on these flags to validate bindless support at runtime, we need to emulate these flags being set.

#jira UE-162014
#rb elizabeth.baumel
#preflight 634488a6c272487ed4784593

[CL 22458354 by christopher waters in ue5-main branch]
2022-10-11 11:06:47 -04:00
Yuriy ODonnell
9ab9403717 ShaderMinifier - Track and output line directives
#rb Jason.Nadro
#preflight 63406dd22a0a2c1ead8d1145

[CL 22405822 by Yuriy ODonnell in ue5-main branch]
2022-10-07 14:31:38 -04:00
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
Laura Hermanns
32c8d9eb49 Don't remove PDB from DXIL container if it wasn't generated in the first place to prevent hlsl::Exception to be thrown by DXC if PDB part is not present.
#rb Yuriy.ODonnell
#fyi Christopher.Waters
#jira UE-164622
#preflight 6334c8ea691c0168b71d7e0d
#rnx

[CL 22233889 by Laura Hermanns in ue5-main branch]
2022-09-28 18:43:53 -04:00
bryan sefcik
0beee50b45 Updated ../Engine/Source/Developer/... to inline gen.cpp files
Before:
Total CPU Time: 53783.640625 s
Total time in Parallel executor: 558.66 seconds
After:
Total CPU Time: 47886.140625 s
Total time in Parallel executor: 498.81 seconds

#jira

[CL 22173145 by bryan sefcik in ue5-main branch]
2022-09-24 13:31:25 -04:00
yuriy odonnell
095c4ceee5 ShaderMinifier - Add experimental CFLAG_RemoveDeadCode to run shader rewriting step that removes unused functions and types from shader source before compilation to improve compile times
#rb Jason.Nadro
#preflight 632e0ecae23e50651ba4c5a0

#ushell-cherrypick of 21900443 by Yuriy.ODonnell
#ushell-cherrypick of 21931128 by Yuriy.ODonnell
#ushell-cherrypick of 22029907 by Yuriy.ODonnell
#ushell-cherrypick of 22036834 by Yuriy.ODonnell

[CL 22173105 by yuriy odonnell in ue5-main branch]
2022-09-24 13:27:11 -04:00
jason nadro
5ec1160356 Adding Total Thread Preprocess Time for shader compilation.
- Instrument how long shader preprocessing takes for each shader compilation job.
- Keep a running total in our shader stats per shader type.
- Add logging to track total thread preprocessing time for all shaders.
- Fixup local variable names to match the output log names.

#rb Dan.Elksnitis
#preflight 632a224ab40000c8f08c5815

[CL 22125080 by jason nadro in ue5-main branch]
2022-09-21 17:34:15 -04:00
Yuriy ODonnell
6db429d732 ShaderMinifier - Add experimental CFLAG_RemoveDeadCode to run shader rewriting step that removes unused functions and types from shader source before compilation to improve compile times
#rb Jason.Nadro
#preflight 632363a75a44869a7d025585

[CL 22036834 by Yuriy ODonnell in ue5-main branch]
2022-09-15 15:45:20 -04:00
Yuriy ODonnell
e741d25317 Add CVar r.RayTracing.RequireSM6 (default=0) to explicitly control when ray tracing shaders/features should be available, instead of relying on project target platform shader model settings. This is required because target platform settings are not available when running a packaged game.
The engine uses GRayTracingPlaformMask to compute ShouldCompilePermutation() for shaders. This is filled based on platform settings and capabilities when running the editor. When running a standalone game, the mask is filled purely based on whether ray tracing is enabled for the project (r.RayTracing) and the current runtime environment supports it (GRHISupportsRayTracing).

The new CVar is meant to be consistent between the cook time and run time. This is achieved by setting GRHISupportsRayTracing=false when running on SM5 if r.RayTracing.RequireSM6 is 1.

#rb christopher.waters
#preflight 631f8c8680642a7fa783ca18
#jira UE-163012

[CL 21971785 by Yuriy ODonnell in ue5-main branch]
2022-09-12 16:27:08 -04:00
florin pascu
dbcd6198d0 Add the Frequency name to the "Unrecognized shader frequency" Shader Compiler error
#jira none
#rb Carl.Lloyd
#preflight 6319e1662b7fe03eb6a70f52

[CL 21907568 by florin pascu in ue5-main branch]
2022-09-08 19:36:17 -04:00
david harvey
10b05a8cf3 Capture platform-specific project analytics for launching, cooking & packaging in the editor.
#jira UE-142191
#rb Brian.White, Wojciech.Krywult
#preflight 6319a11bd135b61bc5f729c9

[CL 21907474 by david harvey in ue5-main branch]
2022-09-08 19:33:14 -04:00
Yuriy ODonnell
bdcb1cc814 Move duplicated implementations of ParseRayTracingEntryPoint() to ShaderCommon module
#preflight 631a28a0967ffc68fbe3d8a7
#rb jason.nadro

[CL 21900443 by Yuriy ODonnell in ue5-main branch]
2022-09-08 15:20:52 -04:00
Florin Pascu
6b3c1469ba Preview Shader Platform using different ShaderMaps and the DDPI/Cvar values of the Previewable Actual Platform
NumPlatforms limit changed from 64 to 65536, limited by NumBits
#jira UE-120561
#rb Chris.Waters, Jack.Porter, Mihnea.Balta
#preflight 630f1604f92416fb92b373ab

[CL 21718179 by Florin Pascu in ue5-main branch]
2022-08-31 04:38:34 -04:00
Tim Smith
5154702a01 Fix crash issue when LiveCodingConsole is run independently.
#rb self
#preflight 630e2e2be352708d441a96ba

[CL 21702269 by Tim Smith in ue5-main branch]
2022-08-30 11:41:54 -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
christopher waters
bd14aa177e Moving bindless resource count validation into the new UE::ShaderCompilerCommon::ValidatePackedResourceCounts
#jira UE-161950
#rb kenzo.terelst, yuriy.odonnell
#preflight 6307a0d03703fd9528673032

[CL 21567446 by christopher waters in ue5-main branch]
2022-08-25 13:02:21 -04:00
christopher waters
0a6873668c The Windows Feature Level checkboxes should prompt the user to restart.
#jira UE-156930
#rb mihnea.balta, kenzo.terelst
#preflight 62fba5c0cf7afa018ba1feda

[CL 21405137 by christopher waters in ue5-main branch]
2022-08-16 10:59:06 -04:00
Tim Smith
af57b8323e Fixed issue where packaged blueprint builds would not be able to start live coding without first having to clear the live coding source project variable.
#rb self
#jira UE-149584
#preflight 62fb8d851e39eb26a03adcfc

[CL 21403836 by Tim Smith in ue5-main branch]
2022-08-16 08:49:21 -04:00
Tim Smith
dfc7238978 Provide console feedback when starting live coding fails packaged builds
#rb self
#jira UE-149580
#preflight 62fa974c153b17e746461877

[CL 21391530 by Tim Smith in ue5-main branch]
2022-08-15 15:08:39 -04:00
Tim Smith
0ad177d3af Added tagging for unassigned allocations
#rb self
#jira UE-153910
#preflight 62fa5e6bb66d5d93137aada8

[CL 21387777 by Tim Smith in ue5-main branch]
2022-08-15 12:06:33 -04:00
Tim Smith
6da6208fa9 Fixed issue where modules listed to be preloaded were not being preloaded.
#rb self
#jira UE-160674
#preflight 62f4f82e7c66d5539e8a8bad

[CL 21334853 by Tim Smith in ue5-main branch]
2022-08-11 08:59:35 -04:00