Commit Graph

225 Commits

Author SHA1 Message Date
dan elksnitis
5f85b46590 [shaders] remove unnecessary passing of hlslcc flags as an option to debug info output. this was just used to pass a switch on the SCW directcompile cmdline which SCW no longer does anything with. also cleaned up some additional unnecessary code related to these flags in backends that no longer use hlslcc at all.
#rb Laura.Hermanns

[CL 26685354 by dan elksnitis in ue5-main branch]
2023-07-28 15:58:01 -04:00
dan elksnitis
64a5c76444 [shaders] move custom vulkan bindless parameter parser behaviour into baseclass (parameter parser being part of the serialized preprocess output means subclassing is problematic)
#rb JeanNoe.Morissette

[CL 26674182 by dan elksnitis in ue5-main branch]
2023-07-28 11:11:42 -04:00
jason hoerner
7f22080814 Shader Compiler: Made FShaderCompilerDefinitions private, to reduce code publicly visible in ShaderCore.h. For now, it's just marked deprecated for 5.4, but will be hidden more generally in 5.5.
#rnx
#rb yuriy.odonnell dan.elksnitis jason.nadro

[CL 26534998 by jason hoerner in ue5-main branch]
2023-07-22 06:35:10 -04:00
jeannoe morissette
28b4d2dc2a VulkanRHI: VKRT WIP: Add SystemParameters as shader_record to all ray tracing shaders.
#rb Aleksander.Netzel
#jira UE-171798
#rnx

[CL 26355446 by jeannoe morissette in ue5-main branch]
2023-06-30 16:53:02 -04:00
guillaume abadie
fb96324861 Adds bSupportsRealTypes=RuntimeDependent in Vulkan SM5 and SM6
#rb jeannoe.morissette
#jira UE-179496

[CL 26269642 by guillaume abadie in ue5-main branch]
2023-06-27 16:32:12 -04:00
jeannoe morissette
b2d04ae516 VulkanRHI: VKRT WIP: Add bindless uniform buffer support needed by RT. Rename existing uniform buffers to "single use uniform buffers".
#rb carl.lloyd
#rnx

[CL 25818162 by jeannoe morissette in ue5-main branch]
2023-06-06 12:00:44 -04:00
jeannoe morissette
9663b51553 VulkanRHI: Fix issues with globallycoherent in Vulkan bindless, move it to heap decl for now (properly adds the "OpDecorate Coherent" in SPIRV).
#preflight 646fccb3407983b998237f01
#rnx

[CL 25629723 by jeannoe morissette in ue5-main branch]
2023-05-25 17:27:56 -04:00
jason hoerner
88d847a0ad GlobalBeginCompileShader optimizations. 3.2x improvement in performance of the function on Lyra cook:
* Early out when adding uniform buffer resource entries, by checking if uniform buffer had been processed, before processing individual entries.
* Changed resource entry list from a map to an array, saving the cost of map operations adding items to it.
* Resource entries for global uniform buffers cached once at startup.
* Resource entry member names stored in an external buffer, to avoid per-entry string memory allocation overhead.
* Miscellaneous smaller optimizations -- for example, using ByHash to avoid redundant hashing and FString construction.

#jira none
#rnx
#rb jason.nadro dan.elksnitis
#preflight 646cfdbc1134ffac7034af60

[CL 25596308 by jason hoerner in ue5-main branch]
2023-05-23 20:16:11 -04:00
christopher waters
20984328ea Removing the cvar lookup string for shader dead code removal in all shader formats. This cvar can't be loaded on SCW startup so it was causing a hash mismatch.
#rb yuriy.odonnell
#preflight 646bc8f764351d76f3c85f5e

[CL 25570191 by christopher waters in ue5-main branch]
2023-05-22 16:57:05 -04:00
jeannoe morissette
56a0d8dd97 VulkanRHI: VKRT WIP: Increase size of bitfield to track uniform buffer usage. Fix copy-paste error where acceleration structures were sent to wrong bindless descriptor set.
#fyi yuriy.odonnell,aleksander.netzel
#preflight 646797578720894fb6a3eaab
#rnx

[CL 25545955 by jeannoe morissette in ue5-main branch]
2023-05-19 12:02:01 -04:00
Steve Robb
0f44db07d5 Replaced some container operator new usage.
#rb james.hopkin
#jira none
#preflight 6459670f28155a0f41565a34

[CL 25384456 by Steve Robb in ue5-main branch]
2023-05-09 05:17:49 -04:00
jeannoe morissette
f843d3c482 VulkanRHI: VULKAN_SM6 fix for some shaders getting compiled for Vulkan 1.2 even when MinTargetEnvironment is set to 1.3.
#preflight 64501ee66538e45f75cdf65e
#rnx

[CL 25290877 by jeannoe morissette in ue5-main branch]
2023-05-01 16:39:57 -04:00
jeannoe morissette
7f0f8a8d55 VulkanRHI: Fix Vulkan shader compilation by enabling VK_EXT_scalar_block_layout in all shaders for VULKAN_SM6 (its presence is verified by the profile).
#preflight 6449923c1150e908d0b337c3
#rnx

[CL 25207366 by jeannoe morissette in ue5-main branch]
2023-04-26 17:18:51 -04:00
dan elksnitis
26464b581b [shaders] further rework of parameter parser API to simplify the independent preprocessing use case, plus adding serialization support and some minor cleanup.
#preflight 6442af0ec023bb1f734fc0d1
#rb Christopher.Waters

[CL 25148947 by dan elksnitis in ue5-main branch]
2023-04-21 13:45:43 -04:00
dan elksnitis
d934fe3be0 [shaders] move ShaderParameterParser & some related functions to RenderCore so it can be used in the core shader compilation code (forthcoming change requires this)
#preflight 643eda5473470c177c27590d
#rb Yuriy.ODonnell
#rb Christopher.Waters

[CL 25106284 by dan elksnitis in ue5-main branch]
2023-04-19 10:32:12 -04:00
jeannoe morissette
75364b7008 VulkanRHI: Add VULKAN_SM6. Move features and requirements around to match what was done on d3d.
#rb arciel.rekman, carl.lloyd
#preflight 643996128901e5ef982dc887

[CL 25045731 by jeannoe morissette in ue5-main branch]
2023-04-14 14:26:06 -04:00
carl lloyd
7a31ca4270 Enable Android Vulkan SM5 Ray Tracing
#rb jeannoe.morissette, yuriy.odonnell
#preflight 643966259566b61450eddea4

[CL 25040539 by carl lloyd in ue5-main branch]
2023-04-14 10:52:39 -04:00
Laura Hermanns
cbc4db6343 Minor improvements in shader backends.
#rb Dan.Elksnitis
#jira none
#preflight 642ad56dc6769c6082ade6cf
#rnx

[CL 24892320 by Laura Hermanns in ue5-main branch]
2023-04-03 10:17:45 -04:00
dan elksnitis
49d7985a85 [shaders] Add "compile argument" functionality for generic parameters consumed by compile backends, along with helper to set both a compile arg AND define for cases which require both. The purpose of this is to move towards enforcing that preprocessor defines should _only_ be used during the preprocessing phase itself; the subset of defines that are currently used only as arguments to the compile backends (or used as both actual preprocessor defines and backend arguments) should use this mechanism instead. This allows us to explicitly identify and hash such parameters to be included in a stable key based primarily on a hash of preprocessed/deadstripped source; without it we would need to hash all defines which will defeat most of the deduplication benefit of doing this. A subsequent change will deprecate the GetDefinitions function on the shader compilation environment to enforce that defines cannot be read by anything outside of core shader system functionality.
#rb Massimo.Tristano
#rb Laura.Hermanns
#preflight 64258c2e5e52099fe3d03625

[CL 24854110 by dan elksnitis in ue5-main branch]
2023-03-30 10:47:09 -04:00
jeannoe morissette
f812b514c3 VulkanRHI: Add VULKAN_PROFILE_SM6 definition to shaders for upcoming VULKAN_SM6.
#preflight 641b23ce76461c460b4e395c
#rnx

[CL 24751410 by jeannoe morissette in ue5-main branch]
2023-03-22 14:20:48 -04:00
jeannoe morissette
279e3fe462 VulkanRHI: Add Vulkan_1_3 support for shader compilation. (WIP towards VULKAN_SM6)
#fyi laura.hermanns, carl.lloyd
#preflight 641b05eb32723d4a200be648
#rnx

[CL 24747522 by jeannoe morissette in ue5-main branch]
2023-03-22 10:40:26 -04:00
jeannoe morissette
dcefb8ee53 VulkanRHI: Use Vulkan profiles to validate support for a feature level on startup before call to CreateRHI(). (WIP towards VULKAN_SM6)
#rb Carl.Lloyd
#preflight 641375af1c44ff98b924739a

[CL 24739245 by jeannoe morissette in ue5-main branch]
2023-03-21 16:45:53 -04:00
jeannoe morissette
29f4674898 VulkanRHI: Move to UE::RHICore::SetResourcesFromTables to match other RHIs.
#rb Mihnea.Balta
#preflight 640a3ffed778f88975c84441
#rnx

[CL 24581810 by jeannoe morissette in ue5-main branch]
2023-03-09 15:58:42 -05:00
christopher waters
364dbe3541 Fixing bad vulkan.h include.
Switching back to referencing VulkanRHI headers correctly.

[CL 24370772 by christopher waters in ue5-main branch]
2023-02-22 17:22:28 -05:00
joe kirchoff
0615aeb033 [Partial Backout] - CL24348577
[FYI] Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
Remove unnecessary private include path

#rnx
#jira UE-177808

[CL 24352016 by joe kirchoff in ue5-main branch]
2023-02-21 17:55:23 -05:00