Commit Graph

213 Commits

Author SHA1 Message Date
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
Arciel Rekman
da789a035f Fix FHlslParser to support global scope.
#rb Yuriy.ODonnel
#jira none
#preflight none

[CL 20233493 by Arciel Rekman in ue5-main branch]
2022-05-16 18:10:37 -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
Charles deRousiers
546f1b27c6 Add ROV type support for shader binding.
#rb mihnea.balta
#jira none
#preflight 623b31aaca34ffd7bf7ca796

[CL 19481254 by Charles deRousiers in ue5-main branch]
2022-03-23 13:02:24 -04:00
Jason Nadro
65a90154a6 Add scoped cpu markers to various D3D shader compiler functions to make this easier to profile when shader compilation is done in process.
#rb trivial
#jira none
#preflight 62389f8fec68595f3b78e9df

[CL 19453136 by Jason Nadro in ue5-main branch]
2022-03-21 12:17:22 -04:00
Lukas Hermanns
2e57229bd3 Added uint64_t type to lexer grammar of HlslParser and improved warning output for removal of unused shader interpolators.
#rb Christopher.Waters
#fyi Kevin.Ortegren
#jira UE-145738
#rnx
#preflight 623219ca6d230f4cc800a13d

[CL 19409711 by Lukas Hermanns in ue5-main branch]
2022-03-16 15:04:39 -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
Charles deRousiers
6e9c5e788f * Simplify shader print API: Context/Print/Newline.
* Added small inline documentation for shader print
* Fix incorrect slider/checkbox text alignement.

#rb none
#jira none
#preflight 6212a4d7f448f38bd82d944e

[CL 19064616 by Charles deRousiers in ue5-main branch]
2022-02-20 15:34:53 -05:00
Charles deRousiers
a0b4e64895 Add (experimental) shader-driven widgets (slider/checkbox).
* Split FontSize into FontSize/FontSpacing
* Add ShaderPrintContext to easier create/manage cursor position

#rb none
#jira none
#preflight 62120b06326e31b71fbad51f

[CL 19064190 by Charles deRousiers in ue5-main branch]
2022-02-20 07:20:20 -05:00
Lukas Hermanns
5b8643add8 Fix shader parameter parser: Also erase 'const'-qualifier alongside global parameter.
#rb Christopher.Waters
[FYI] Rolando.Caloca, Mihnea.Balta
#jira UE-142529
#preflight 620a859d803d9066e6834d7c
#rnx

#ROBOMERGE-OWNER: Lukas.Hermanns
#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 18986629 in //UE5/Release-5.0/... via CL 18990115 via CL 18990512
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
#ROBOMERGE-CONFLICT from-shelf

[CL 18991175 by Lukas Hermanns in ue5-main branch]
2022-02-14 21:40:37 -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
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -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