Commit Graph

577 Commits

Author SHA1 Message Date
bob tellez
971983eb65 [Backout] - CL23624045
[FYI] christopher.waters
Original CL Desc
-----------------------------------------------------------------
RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631957 by bob tellez in ue5-main branch]
2023-01-10 15:28:15 -05:00
christopher waters
3df5dae685 RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631946 by christopher waters in ue5-main branch]
2023-01-10 15:27:33 -05:00
laura hermanns
b3a1d2a276 Fix temporary string object in D3DShaderCompiler. Related CL 20260406.
#rb Brandon.Schaefer
#preflight 63b495cc35203bc7aac92606
#rnx

[CL 23571271 by laura hermanns in ue5-main branch]
2023-01-03 17:49:20 -05:00
bryan sefcik
c998a06737 Fixes to get arm64 and arm64ec to partially compile.
#jira
#fyi josh.adams
#preflight 6392612567018b14b5af1d5f

[CL 23456665 by bryan sefcik in ue5-main branch]
2022-12-08 17:28:30 -05:00
christopher waters
6e30ddb01e Dependency cleanup around DataDrivenShaderPlatformInfo and a few other headers.
#preflight 63921e6a67018b14b5925197

[CL 23454104 by christopher waters in ue5-main branch]
2022-12-08 15:35:35 -05:00
Yuriy ODonnell
bddca76c94 ShaderMinifier - Add support for dead code removal to all shader formats
* Add code to all shader format back-ends to take dead code removal into account when computing the version ID
* Not enabled in Metal and OpenGL back-ends (require further testing)

#rb dan.elksnitis
#preflight 6390f1f15c5308d18c7364fb

[CL 23433448 by Yuriy ODonnell in ue5-main branch]
2022-12-07 15:13:42 -05:00
laura hermanns
bcf95545bd Add host machine name to OOM report in DXC backend and refactor global SCW error-code handling. Bumped ShaderCompileWorkerOutputVersion to 9.
#rb Jason.Nadro, Dan.Elksnitis, Yuriy.Odonnell, Arciel.Rekman
#preflight 638e610c255f07df8ea212f4
#rnx

[CL 23428544 by laura hermanns in ue5-main branch]
2022-12-07 10:29:08 -05:00
kate ellis
839f9f1889 [Backout] - CL23401851
[FYI] Laura.Hermanns
Original CL Desc
-----------------------------------------------------------------
Add host machine name to OOM report in DXC backend and refactor global SCW error-code handling.

#rb Jason.Nadro, Dan.Elksnitis, Yuriy.Odonnell, Arciel.Rekman
#preflight 638e610c255f07df8ea212f4
#rnx

[CL 23421737 by kate ellis in ue5-main branch]
2022-12-06 19:47:06 -05:00
laura hermanns
c17b2976f9 Add host machine name to OOM report in DXC backend and refactor global SCW error-code handling.
#rb Jason.Nadro, Dan.Elksnitis, Yuriy.Odonnell, Arciel.Rekman
#preflight 638e610c255f07df8ea212f4
#rnx

[CL 23421619 by laura hermanns in ue5-main branch]
2022-12-06 19:45:07 -05:00
christopher waters
0d2b7d75a0 Adding correct checks for SV_StencilRef support
- SM6.0+ shader reflection now checks for D3D_SHADER_REQUIRES_STENCIL_REF and sets EShaderCodeFeatures::StencilRef if it's set.
- D3D12 initialization now correctly sets GRHISupportsStencilRefFromPixelShader.
- D3D12 shader loading makes sure that EShaderCodeFeatures::StencilRef shaders are only loaded when GRHISupportsStencilRefFromPixelShader is set.

#jira none
#rb arciel.rekman, graham.wihlidal, jamie.hayes
#preflight 63869441170bc34a93e55135

[CL 23354305 by christopher waters in ue5-main branch]
2022-12-01 12:03:34 -05:00
chris kulla
408b0b8553 Ray Tracing: Compute the maximum payload size from the shader's payload type
Serialize the payload size as part of the raytracing shader so it can be examined in the RHI layer.

Validate that the RTPSO is configured with the appropriate payload size.

Add macros to ensure the payloads have the expected size

Ensure that all raytracing pipelines explicitly bind a miss shader

Add a shared shader header to implement static asserts for those shader compilers that support them (like dxc).

Fix payload type on main deferred reflection raygen shader

Fix incorrect raygen shader included in the deferred RTPSO list for RTGI

Don't add builtin shaders to the RTPSO from the RHI layer as these are unlikely to ever match the required payload type

Add new method to register payload types so that plugins can more easily describe custom payloads they may be using (up to a maximum of 32 unique payload types since we use a bitmask to represent payload sets).

#rb Yuriy.ODonnell
#jira UE-157946
#preflight 636aff4363037c102679f13a
#preflight 63869dde170bc34a93e8c90e

[CL 23337139 by chris kulla in ue5-main branch]
2022-11-30 13:53:00 -05:00
luke thatcher
ee70bc02da Remove use of FRHIBoundShaderState resources in D3D12RHI
- No longer necessary, since they were only used to find/create root signatures, which can be implemented directly in the adapter class.
 - RHICreateBoundShaderState is never called.

Remove D3D12_SUPPORTS_PARALLEL_RHI_EXECUTE
 - This is always true.

#rb Chris.Waters
#preflight 6384cd3afa053c489af10129

[CL 23300192 by luke thatcher in ue5-main branch]
2022-11-28 19:13:10 -05:00
christopher waters
0e8e4d0dd6 After extracting all parameters from D3D12 reflection, the "bSucceeded" flag was being forced to true which would prevent any parameter validation from being reported. Most notably, this would hide errors caused by missing global parameters when using shader parameter structs.
Bumping D3D_SM5 and D3D_SM6 versions.

#jira none
#rb jason.nadro
#preflight 6384f5d2170bc34a935c960c

[CL 23298219 by christopher waters in ue5-main branch]
2022-11-28 17:06:24 -05:00
Luke Thatcher
f5136f75e2 Unify code that binds shader resources from uniform buffers across platform RHIs
- All platforms were extending FBaseShaderResourceTable to add a TArray<uint32> TextureMap member, along with copies of the same RHI code to bind these resources.
 - Moved the TextureMap member into the base shader table type, and removed all platform versions. They are all serializer-compatible with the original code, so no shader DDC keys need to be bumped.
 - Also moved the "ResourceTable" array of RHI resources into the base FRHIUniformBuffer class.
 - Added a SetResourcesFromTables function in RHICoreShader.h

Removed GetD3D11TextureFromRHITexture in D3D11RHI, replaced with a ResourceCast.
 - The ResourceCast function for FRHITexture types now always follows the texture reference pointer via the vtable call, like other platforms.

#jira none
#rb Chris.Waters
#preflight 637e6cd43377450900f10fd2

[CL 23252815 by Luke Thatcher in ue5-main branch]
2022-11-23 14:17:01 -05:00
Tim Smith
29f509cf8d Fixed compile issue
#rb self
#rnx
#jira UE-170534
#preflight 63779f5faa2fe2b05f8d73c5

[CL 23194313 by Tim Smith in ue5-main branch]
2022-11-18 10:10:41 -05:00
Laura Hermanns
6cac5e04e5 Allow allocation of zero bytes in DXC custom allocator, use portable STDCALL declaration, and add error code translation for DXC specific HRESULT values.
#rb Yuriy.Odonnell
#fyi Dan.Elksnitis, Jason.Nadro
#jira none
#preflight 63779846f514e1ded9af11b0
#rnx

[CL 23194073 by Laura Hermanns in ue5-main branch]
2022-11-18 09:43:23 -05:00
Tim Smith
9f52c3aa2d Fix to allow settings objects to be properly handled by LiveCoding and HotReload.
#rb matt.peters
#jira UE-169808
#preflight 6373dbaf232e3d12cbd1e9a0

[CL 23139425 by Tim Smith in ue5-main branch]
2022-11-15 13:39:47 -05:00
laura hermanns
58e529b618 Use custom memory allocator for DXC to report better callstack on OOM event.
#rb Yuriy.ODonnell
[FYI] Jason.Nadro, Dan.Elksnitis, Carl.Lloyd
#preflight none
#rnx

[CL 23072013 by laura hermanns in ue5-main branch]
2022-11-10 01:18:07 -05:00
laura hermanns
b3e8c553e3 Fix "Compile failed without errors" message and unify this error report for FXC and DXC.
#rb Dan.Elksnitis
#rnx

[CL 23034307 by laura hermanns in ue5-main branch]
2022-11-08 14:20:14 -05:00
laura hermanns
b32256418b Log available system memory when DXC crashes on E_OUTOFMEMORY to verify system is in fact out of memory.
#rb Jason.Nadro, Yuriy.Odonnell
[FYI] Dan.Elksnitis
#preflight 636924014d3c1d9d925e05ab
#rnx

[CL 23029673 by laura hermanns in ue5-main branch]
2022-11-08 11:15:46 -05:00
Tim Smith
684a5edf74 Fixed issue where Live Coding Console would fail to properly enable when it is started on demand.
#rb self
#jira UE-169199
#preflight 63655cf1882365b859bea5e4

[CL 22992274 by Tim Smith in ue5-main branch]
2022-11-04 14:48:13 -04:00
Zak Middleton
73efd27f6c #ue5 - Truncation fixes for modules:
StatsViewer
StatusBar
TargetDeviceServices
TargetPlatform
Teleporter
TimeManagement
TranslationEditor
ViewportInteraction
Virtualization
WindowsPlatformFeatures
WindowsTargetPlatform

#jira UE-160837, UE-160843
#rb Andrew.Davidson, Dave.Jones2
#preflight 636024751c75ff834a526197

[CL 22873932 by Zak Middleton in ue5-main branch]
2022-10-31 18:33:27 -04:00
yuriy odonnell
9de862ab0b Add UE::ShaderCompilerCommon::RemoveDeadCode() high-level wrapper for shader minifier, to be consistently used in all shader compiler back-ends
#preflight 635af3aa1b7de936a5295629
#rb jason.nadro

[CL 22850483 by yuriy odonnell in ue5-main branch]
2022-10-29 01:51:27 -04:00
dan elksnitis
ecab3b4a9a [shaders] refactor usf/directcompile.txt dump into a utility in ShaderCompilerCommon to reduce code duplication in the shader backends
#rb Jason.Nadro
#rb Christopher.Waters
#preflight 635bf1e1df01edd149f5727e

[CL 22829548 by dan elksnitis in ue5-main branch]
2022-10-28 11:45:49 -04:00
laura hermanns
7785c20330 Abstract number of instructions for complexity visualization by estimated metric.
#preflight 6356f6b30313c24974fc5535
#jira UE-168166
#rb jason.nadro

[CL 22788160 by laura hermanns in ue5-main branch]
2022-10-26 16:15:17 -04:00