Commit Graph

106 Commits

Author SHA1 Message Date
bryan sefcik a3dddc6630 Pass 1 on Developer include fixes:
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.

#jira
#preflight 631e281694758d0bf2ea1399

[CL 21960082 by bryan sefcik in ue5-main branch]
2022-09-11 18:32:18 -04:00
Yuriy ODonnell a18b223061 Groundwork for custom shader preprocessing step that removes unused code from shader source before compilation (not used yet by the shader pipeline)
#preflight 631bca62304480f8f8c2db54
#rb Jason.Nadro

[CL 21931128 by Yuriy ODonnell in ue5-main branch]
2022-09-09 19:33:52 -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
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
bryan sefcik de1956f47b Ran IWYU on Public headers under Engine/Source/Developer/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21064294 by bryan.sefcik
#jira
#preflight 62d5c2111062f2e63015e598

#ROBOMERGE-OWNER: bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21182053 by bryan sefcik in ue5-main branch]
2022-07-20 12:03:45 -04:00
christopher waters a987160f55 Reworking the parameter rewrite code to do automatic bindless
- Refactoring FShaderParameterParser to use more string views since we can rely on OriginalParsedShader not changing.
- Split FShaderParameterParser::ParseAndMoveShaderParametersToRootConstantBuffer into smaller functions
- Moving FShaderParametersMetadata::IterateShaderParameterMembers into the only module it's used in, ShaderParameterParser.cpp
- Adding CFLAG_BindlessResources which will be set when ENABLE_BINDLESS_RESOURCES is set
- Adding CFLAG_BindlessSamplers which will be set when ENABLE_BINDLESS_SAMPLERS is set
- Adding resource/sampler detection and conversion to bindless in FShaderParameterParser

#jira UE-139616
#rb guillaume.abadie, jeannoe.morissette, yuriy.odonnell, laura.hermanns
#preflight 62d180cce468fcfd0b7001a0

[CL 21111994 by christopher waters in ue5-main branch]
2022-07-15 12:25:44 -04:00
christopher waters b28a0c467f Moving ShaderParameterParser into its own source files.
#jira none
#rb guillaume.abadie, kenzo.terelst
#preflight 62b0ecb8ec13d14b5a1897ba

[CL 20757788 by christopher waters in ue5-main branch]
2022-06-21 10:49:56 -04:00
christopher waters 1e01768e33 Bindless shader parameters
- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.

#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39

[CL 20250348 by christopher waters in ue5-main branch]
2022-05-17 16:30:48 -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
eric mcdaniel bf7658a0f6 [Backout] - CL19813742
- backing out due to assertions in Vulkan shader compiler
  - constant buffer renaming causes failures to lookup parameter name

#preflight 625f6ed5e239763df51ba585
#fyi christopher.waters

Original CL Desc
-----------------------------------------------------------------
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 kenzo.terelst
#preflight 625edc5f034d8924cdcc35e2

[CL 19825755 by eric mcdaniel in ue5-main branch]
2022-04-19 22:40:31 -04:00
christopher waters 5c395bb058 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 kenzo.terelst
#preflight 625edc5f034d8924cdcc35e2

[CL 19813742 by christopher waters in ue5-main branch]
2022-04-19 14:32:30 -04:00
christopher waters 46d39f296a Reorganizing reflection handling to funnel through common functions.
This is a prerequisite for upcoming bindless changes as it centralizes key points where we register the different binding types.

#jira none
#rb jason.nadro, eric.mcdaniel, jeannoe.morissette
#preflight 62574453f7476d662c8dd2fe

[CL 19761676 by christopher waters in ue5-main branch]
2022-04-14 15:46:20 -04:00
carl lloyd 379853c1ea Added new android patch pass to fix driver crashes on Adreno devices running Android 10
#rb Laura.Hermanns
#preflight 625540723f5641db59e7628a

[CL 19718421 by carl lloyd in ue5-main branch]
2022-04-12 05:31:35 -04:00
christopher waters 0a8074d5a5 RemoveUniformBuffersFromSource shouldn't implicitly call TransformStringIntoCharacterArray.
#jira none
#rb jason.nadro
#preflight 624ddf0f090236773a1ad8c1

[CL 19656058 by christopher waters in ue5-main branch]
2022-04-06 17:19:38 -04:00
Lukas Hermanns 999fb99c6c Enable HLSL 2021 language version (CFLAG_HLSL2021) in shader compiler backends.
#rb Guillaume.Abadie, Will.Damon
#fyi Carl.Lloyd, Ryan.Vance, Christopher.Waters, Mihnea.Balta, Rolando.Caloca, Yuriy.ODonnell, Graham.Wihlidal
#jira UE-138358
#preflight 6227b6b3c653e7ef9f571dc8

[CL 19319858 by Lukas Hermanns in ue5-main branch]
2022-03-09 09:47:28 -05:00
carl lloyd 7119eccc6d Added support for framebuffer fetch and pixel local storage to OpenGLES with DXC
(Submitting for Carl.Lloyd)
#rb Dmitriy.Dyomin, Laura.Hermanns
#lockdown Jack.Porter
#jira UE-120580
#preflight None

#ROBOMERGE-OWNER: carl.lloyd
#ROBOMERGE-AUTHOR: jack.porter
#ROBOMERGE-SOURCE: CL 18916240 in //UE5/Release-5.0/... via CL 18926540 via CL 18927298
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v916-18915374)

[CL 18927326 by carl lloyd in ue5-main branch]
2022-02-09 18:32:08 -05:00
david harvey 4ddb2103eb Fix for previous dxc shader compiler integration from UE5 clashing with the DumpDebugBlobDetail changes from CL 18033267.
#rnx
#jira none
#rb none
#preflight none

#ROBOMERGE-OWNER: david.harvey
#ROBOMERGE-AUTHOR: david.harvey
#ROBOMERGE-SOURCE: CL 18639004 in //UE5/Release-Engine-Staging/... via CL 18639034
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)
#ROBOMERGE-CONFLICT from-shelf

[CL 18639065 by david harvey in ue5-main branch]
2022-01-18 08:39:34 -05:00
carl lloyd c9c7e1e38f Fix to allow preservation of fragment shader inputs for OpenGL
#rb Lukas.Hermanns
#preflight 61ddb3cbcd2cced710590320

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 18582376 in //UE5/Release-5.0/... via CL 18582418 via CL 18582422
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18582431 by carl lloyd in ue5-main branch]
2022-01-12 05:06:34 -05:00
lukas hermanns a38bd44594 Add option to ShaderConductor to enable/disable re-assignment of in/out attribute slots. Rebuild ShaderConductor for Win64, Mac, and Linux.
#rb Carl.Lloyd
[FYI] Will.Damon, Brandon.Schaefer, Michael.Sartain, Brian.White, Jeannoe.Morissette
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18421689 in //UE5/Release-5.0/... via CL 18422988
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18423292 by lukas hermanns in ue5-release-engine-test branch]
2021-12-09 15:02:07 -05:00
carl lloyd 4c5af4bae8 Fix for Android bug when using OpTypeImage and setting depth to unknown
#rb Lukas.Hermanns
[FYI] Dmitriy.Dyomin

#ROBOMERGE-OWNER: carl.lloyd
#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 18309759 via CL 18309767 via CL 18310351 via CL 18310386 via CL 18310920 via CL 18310950 via CL 18312599 via CL 18312697
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18312969 by carl lloyd in ue5-release-engine-test branch]
2021-11-29 13:35:16 -05:00
yuriy odonnell 7c43dc50b8 Add an explicit SPIR-V target environment option to CrossCompiler::FShaderConductorOptions and use Vulkan 1.2 environment when compiling ray tracing shaders and shaders with CFLAG_InlineRayTracing.
#rb Tiago.Costa
[FYI] Lukas.Hermanns

#ROBOMERGE-AUTHOR: yuriy.odonnell
#ROBOMERGE-SOURCE: CL 18283136 in //UE5/Release-5.0/... via CL 18283139
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18283146 by yuriy odonnell in ue5-release-engine-test branch]
2021-11-24 09:26:06 -05:00
lukas hermanns b8f4d067a0 Allow to disable scalar block layout in DXC with compiler option. Updated DXC to rev. 4b4b52a (Nov. 18). Rebuild ShaderConductor for Win64, Mac, and Linux.
#rb Yuriy.Odonnell, Dmitriy.Dyomin
[REVIEW] 18264230
[FYI] Jeannoe.Morissette, Ryan.Vance, Carl.Lloyd, Brandon.Schaefer, Michael.Sartain, Will.Damon, Mihnea.Balta
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18273482 in //UE5/Release-5.0/... via CL 18273498
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18273510 by lukas hermanns in ue5-release-engine-test branch]
2021-11-23 14:28:47 -05:00
christopher waters 5f8dab7623 Removing usage of DDSPI from ValidateShaderParameterTypes
#jira none
#rb lukas.hermanns, arciel.rekman
#preflight 6196a1ce89733d53862e1af8

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18243604 in //UE5/Release-5.0/... via CL 18243617
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18243627 by christopher waters in ue5-release-engine-test branch]
2021-11-18 15:53:43 -05:00
aurel cordonnier fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
lukas hermanns 70d3a6233c Fix compile error introduced in CL 18033267 and adopt temporary reflection object in DumpDebugBlobDetail from //UE5/Release-Engine-Staging.
#rb none
[FYI] Rolando.Caloca, Christopher.Waters
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18033701 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18033718 by lukas hermanns in ue5-release-engine-test branch]
2021-11-03 10:29:05 -04:00