Commit Graph

167 Commits

Author SHA1 Message Date
Jeremy Moore
07188d9a76 Remove USE_WPO_PRECISE
Instead make the output VelocityPrevScreenPosition interpolant INVARIANT which is a better match for the other approaches to INVARIANT in the shader code.
Initially the USE_WPO_PRECISE code was added for DXBC only, to prevent mismatch between depth and base pass. This type of error was later more widely fixed by 19392831.
This fix led to another need for USE_WPO_PRECISE. That came from the output position now being (correctly) INVARIANT but the output VelocityPrevScreenPosition didn't have INVARIANT. This could lead to very different calculations between current and previous position and therefore incorrect velocity vectors.
#preflight 62755e8be31cfc52d5c5d21d

[CL 20080347 by Jeremy Moore in ue5-main branch]
2022-05-06 14:03:50 -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
Laura Hermanns
f73012d4af Rebuild ShaderConductor as appendix to CL 19924020. Bumped GUID numbers in *Common.ush headers.
#rb Christopher.Waters
#jira none
#rnx
#preflight 62685030853fdb6fddd3992f

[CL 19927891 by Laura Hermanns in ue5-main branch]
2022-04-26 16:27:45 -04:00
Laura Hermanns
c951912300 Rebuild ShaderConductor for Win64, Mac, and Linux with DXC update from Apr 2022.
Replace outdated DXC API headers from DirectX SDK folder with primary DXC source folder.

#review-19909455 19605490
#fyi Mihnea.Balta, Rolando.Caloca, Jeannoe.Morissette, Will.Damon, Brandon.Schaefer, Michael.Sartain, Guillaume.Abadie, Graham.Wihlidal, Christopher.Waters
#jira none
#rnx
#preflight 6267ec17853fdb6fddb97dd5

[CL 19924020 by Laura Hermanns in ue5-main branch]
2022-04-26 13:29:01 -04:00
Jeremy Moore
1b2a1e57ea #jira UE-149712
Use MakePrecise() on WPO
This was happening for FXC compiler but not DXC compiler.
It was causing broken velocity vectors, and broken editor outlines on SM6.
#preflight 6260629add47b4ad2180eb83

[CL 19837321 by Jeremy Moore in ue5-main branch]
2022-04-20 16:18:10 -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
Laura Hermanns
8559b47f2f Allow environment variable FXC to be used with shader debugging batch scripts to avoid hardcoded system path.
#rb Arciel.Rekman
#fyi Christopher.Waters, Rolando.Caloca
#jira none
#rnx
#preflight 6230dc44fc4d442f893619c1

[CL 19793860 by Laura Hermanns in ue5-main branch]
2022-04-18 16:37:06 -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
Jason Nadro
e76f354daa Set InstructionCount when compiling shaders with DXC
- This fixes an issue where all SM6 compiles were reporting 0 instructions.

#rb christopher.waters
#jira FORT-468097
#preflight none

[CL 19742347 by Jason Nadro in ue5-main branch]
2022-04-13 13:37:00 -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
guillaume abadie
dc0b2fa6e9 Works arround a bunch of HLSL2021 bugs
DXC is missing some override of select()
DXC's -spirv is missing and() and or() intrinsics
Fixes CFLAG_WarningsAsErrors that would cause a compilation failure if rewritted HLSL for FXC had warning
Adds a COMPILER_SUPPORTS_HLSL2021

#rb rune.stubbe
#preflight 622aaaf2f44b0772ad9f743a

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 19352013 via CL 19352023
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19356591 by guillaume abadie in ue5-main branch]
2022-03-11 12:09:32 -05: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
Lukas Hermanns
bb4b53d95d Patch separate atomic counter resource in HLSL precompilation step.
#rb Jamie.Hayes
#fyi Arciel.Rekman, Christopher.Waters
#jira none
#preflight 62265976123eef55e6f49362
#rnx

[CL 19302341 by Lukas Hermanns in ue5-main branch]
2022-03-08 09:39:42 -05:00
christopher waters
b7f30cbbaf Adding minimal interfaces to D3D11 and D3D12 RHIs
- Adding ID3D12DynamicRHI and ID3D11DynamicRHI interfaces for plugins that want to touch DirectX resources/devices directly.
- Adding specific headers for including DirectX headers: D3D12ThirdParty.h and D3D11ThirdParty.h
- Modifying plugins that were using D3D11RHIPrivate.h and D3D12RHIPrivate.h to use the interfaces instead.
- Removing plugin references to UE Modules and ThirdParty libraries that were only needed because they included the private RHI headers.
- Removing D3D11RHI/Private and D3D12RHI/Private from plugin include paths.

#jira none
#rb jeannoe.morissette, kenzo.terelst, mihnea.balta, eric.mcdaniel
#preflight 6222395bb066ef60bbad004a

[CL 19267223 by christopher waters in ue5-main branch]
2022-03-04 11:34:00 -05:00
lukas hermanns
35efe2a2e0 Allow DXC precompilation for selected shaders.
Patch SPIR-V and HLSL intermediate source when DXC precompilation is used.
Workaround HLSL cross-compilation packing issue by rearranging members in FVolumetricFogGlobalData.

#rb michal.valient
#jira UE-142918
#preflight 620d8c8b7e2cef4bf1c34ab1
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 19029598 in //UE5/Release-5.0/... via CL 19059758
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066338 by lukas hermanns in ue5-main branch]
2022-02-21 02:06:52 -05:00
lukas hermanns
1191c5566c Use DXC re-compilation when FXC crashed or ran out of memory.
#rb Rolando.Caloca
#jira UE-142759
#preflight 620be47901253d2e19e2c0c4
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 19002613 in //UE5/Release-5.0/... via CL 19003108 via CL 19004533
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 19004719 by lukas hermanns in ue5-main branch]
2022-02-15 17:08:37 -05: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
mark lintott
c604aff49b Fix for HRESULT return value
#rb trivial
#jira none
#preflight 61ee86a3ef289ffc6de12b99

#ROBOMERGE-AUTHOR: mark.lintott
#ROBOMERGE-SOURCE: CL 18706928 in //UE5/Release-5.0/... via CL 18706930 via CL 18706941
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18706945 by mark lintott in ue5-main branch]
2022-01-24 06:12:09 -05:00
christopher waters
cb6d99d667 Switching ERHIFeatureLevel:SM6 from SM6.5 to SM6.6 which allows us to use the built-in 64bit atomics.
AMD still has issues with SM6.6 but we can't wait on their fixes much longer.

#jira none
#rb mihnea.balta, lukas.hermanns
#preflight 61eb15ae731e3b40889d249c

[CL 18697016 by christopher waters in ue5-main branch]
2022-01-21 16:50:04 -05:00
mark lintott
bc890828d2 Status Analysis fix.
[FYI] christopher.waters
#rb none
#jira none
#preflight 61eadd9eea0da8133dce0e29

#ROBOMERGE-AUTHOR: mark.lintott
#ROBOMERGE-SOURCE: CL 18690463 in //UE5/Release-5.0/... via CL 18690505 via CL 18690525
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18690546 by mark lintott in ue5-main branch]
2022-01-21 11:40:12 -05:00