Commit Graph

2033 Commits

Author SHA1 Message Date
Laura Hermanns
bb2c24719e Strengthen assertions in CrossCompilerCommon.h for unpacking shader headers.
#rb Carl.Lloyd
#jira UE-183113, UE-183109
#preflight 643970e7a35280ed4f2b188d
#rnx

[CL 25042898 by Laura Hermanns in ue5-main branch]
2023-04-14 12:49:17 -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
dan elksnitis
46c86419cc [shaders]
- add job cache validation functionality, enabled via cvar (will always submit all jobs for compilation even if they would be cache hits, and compare the results to that of the cache to ensure they are binary identical)
- fix poor cache hit rate due to debug group name being included in input hash (this seems to have always been the case but the hit rate was worsened by the various fixes for debug info collisions)

#preflight 6438134c3f564a05f538559a
#rb Yuriy.ODonnell

[CL 25025653 by dan elksnitis in ue5-main branch]
2023-04-13 10:57:37 -04:00
jason walter
1e7abf939f Show margin time on game and render threads.
#jira UE-181526
#rb simon.therriault
#preflight 643449eb1d61ecec3b08f7ae

[CL 25006972 by jason walter in ue5-main branch]
2023-04-12 10:33:13 -04:00
christopher waters
4195401192 Removing CopyToResolveTarget.
#rb zach.bethel
#preflight 6435a813d03b1c87dd410835

[CL 24995829 by christopher waters in ue5-main branch]
2023-04-11 15:00:07 -04:00
dan elksnitis
2971b65bc4 [shaders] deprecated FShaderPipelineCompileJob::bFailedRemovingUnused field; this is only used to append some dubiously useful information to a log message (the underlying error causing the failure is always reported as any other shader preprocess/compile error). opting to remove rather than dragging this along with forthcoming preprocessing refactoring.
#preflight 6435679c1d61ecec3b56c78d
#rb Jason.Nadro

[CL 24991496 by dan elksnitis in ue5-main branch]
2023-04-11 11:05:47 -04:00
Luke Thatcher
e6b40d3954 Major refactor of RHICreateShaderResourceView and RHICreateUnorderedAccessView functions - Merging //UE5/Dev-ParallelRendering (up to CL 24988990) to //UE5/Main
This changelist is a merge of work done in //UE5/Dev-ParallelRendering to remove tech debt in the SRV/UAV create functions. See individual changelist descriptions in that stream for further details, but a summary of the change is as follows:
 - We had multiple overloads of each of the RHICreateShaderResourceView and RHICreateUnorderedAccessView functions. Each function had a different set of supported view types and using them was complicated / ambiguous.
 - There's now only 2 create functions, and a common FRHIViewDesc descriptor struct, which is stored on the base view class.

 - FRHIView takes a reference on the underlying resource, ensuring that RHI views keep their viewed resource alive. This was not the case on some platforms, since it was previously the platform RHI implementation's responsibility.
 - Platform RHI implementations resolve an FRHIViewDesc into a full FViewInfo struct using GetViewInfo. This centralizes the logic for computing num mips / num slices / format etc so it is the same across all platforms.

 - Views must never be created with nullptr resources. This used to happen in the mesh streamer, but now all views require a real underlying resource. That resource can be a "BUF_NullResource" buffer, which is what the mesh streamer uses as a placeholder for buffers that have not streamed yet.
 - We will eventually replace FRHITextureReference with a "null texture", similar to how BUF_NullResource works for buffers. This is not yet implemented, so there is no "null view" of a texture currently.

#rb kenzo.terelst,jeannoe.morissette,dmitriy.dyomin
#preflight 643534642855180717af410e
#jira none

[CL 24989901 by Luke Thatcher in ue5-main branch]
2023-04-11 08:59:21 -04:00
christopher waters
7231cf0144 Changing vendor extensions code to use EGpuVendorId instead of hardcoded IDs.
#rb jeannoe.morissette
#preflight 64304facb4329f6f1a32206a

[CL 24978127 by christopher waters in ue5-main branch]
2023-04-10 11:32:55 -04:00
florin pascu
802a04967e Make r.Mobile.EarlyZPassOnlyMaterialMasking be per shader platform
#rb Dmitriy.Dyomin, Jack.Porter
#preflight 642fbf244c3ccbbdf1bb96be

[CL 24976086 by florin pascu in ue5-main branch]
2023-04-10 04:06:47 -04:00
Yuriy ODonnell
d2cfaf7c50 Fix support for ray tracing PSO pre-compilation when using LogPSO workflow
* Remove MaxPayloadSizeInBytes from FPipelineFileCacheRayTracingDesc
* Always use serialized RayTracingPayloadSize from FRHIRayTracingShader
* Maintain binary compatibility with old serialized data

#jira UE-97607
#preflight 64309caa427eda5626e9d234
#rb aleksander.netzel

[CL 24972364 by Yuriy ODonnell in ue5-main branch]
2023-04-07 19:35:53 -04:00
Arciel Rekman
02d17ec186 Separate name for multisampled textures.
- A minor QoL improvement for captures.

#rb Rob.Srinivasiah, Erica.Stella
#jira none
#review @Robert.Srinivasiah, @Erica.Stella
#preflight 642f0eb6b306e98c632026f3

[CL 24965490 by Arciel Rekman in ue5-main branch]
2023-04-07 11:52:17 -04:00
arciel rekman
2b8a5076d4 Add owner name to the ensure reporting leaked SM resources as well.
#rb none
#preflight 642f106f6d46f6b1bfab1bf7

[CL 24961464 by arciel rekman in ue5-main branch]
2023-04-06 21:11:16 -04:00
guillaume abadie
18e919d7fd Compiles VisualizeTexture on test build
It made sens back in UE4 needing to do GVisualizeTexture.SetCheckPoint(), but now being fully transparent in RDG like DumpGPU it just doesn't make sens to not have it by default in test build like we do with DumpGPU

#rb trivial
#preflight 642e021cda7f958370105e26

[CL 24956650 by guillaume abadie in ue5-main branch]
2023-04-06 16:59:35 -04:00
Guillaume Abadie
5bc5350126 Fixes a bug on DumpGPU with Texture2DArray bound to FRenderTargetBinding with ArraySlice==-1
#rb trivial
#jira UE-181710
#preflight 642af2ccce01db47aca7f812

[CL 24947763 by Guillaume Abadie in ue5-main branch]
2023-04-06 13:26:04 -04:00
Guillaume Abadie
672fcb0d3c Implements a VisualizeTemporalUpscaler show flag to more quickly diagnose common problems
* All buffers are anoted with the VisualizeTexture command to see it;
* Velocity buffer is visualized with the VisualizeMotionBlur to make it obvious motion vector are important and need to be coherent, and VisualizeReprojection to make sure the reprojection lines up perfectly;
* SceneDepth is shown with the same pixel shader as the VisualizeTexture to not confuse the user;
* PostDOF translucency is shown along with it's alpha channel given how benefical it is to minimise ghosting on translucency that don't draw velocity;
* SceneColor and PostDOF translucency is shown in linear color space to make it obvious when pre-exposure arises;
* When r.PostProcessing.PropagateAlpha is enabled, alpha channel of SceneColor and temporal upscaler's output are displayed;
* The luminance used for flickering detection is also displayed for user to identify what is subject to detection of the flickering;

Summary is displayed with:
* Which temporal upscaler is being used and what anti-aliasing scalability group
* Input resolution and pixel format
* Output resolution and pixel format
* Current preexposure of the color pixel format to diagnose pre-exposure problems and also specify if it is overriden with r.EyeAdaptation.PreExposureOverride

#rb jeremy.moore
#jira UE-181976
#preflight 642ed1911d61ecec3be79488

[CL 24947424 by Guillaume Abadie in ue5-main branch]
2023-04-06 13:15:46 -04:00
Thomas Engel
af306b5289 MediaTextureResource conversions for CharUYVY are now handled commonly with other YUV 422 formats
#rb none
#rnx
#jira none
#preflight 642de70bce01db47ace98127

[CL 24937677 by Thomas Engel in ue5-main branch]
2023-04-05 17:46:44 -04:00
Laura Hermanns
239c88929d Remove DXC rewriter invocation from D3D12 backend.
This was originally added to have parity between Vulkan and D3D12, but it only emitted a debug file and wasn't even feeding the rewritten HLSL back into the D3D compiler.
In an effort to be independent of the DXC rewriter, this is a first step as this rewriter invocation served solely a debugging purpose anyway.

#rb Dan.Elksnitis
#fyi Jason.Nadro, Rolando.Caloca
#jira none
#preflight 642ddad58f078cc7031925d3

[CL 24936708 by Laura Hermanns in ue5-main branch]
2023-04-05 17:06:22 -04:00
florin pascu
568b9363b7 Global Distance Field For Mobile
Remove bSupportsMobileDistanceField from DDSPI
#rb Dmitriy.Dyomin, Benjamin.Rouveyrol
#jira UE-103863
#preflight 642d669cf376ab43d2c75cec

[CL 24936564 by florin pascu in ue5-main branch]
2023-04-05 17:00:43 -04:00
Steve Robb
cc1b7efdb6 Removed duplicate assignment operator.
#rb none
#jira none
#preflight none

[CL 24925637 by Steve Robb in ue5-main branch]
2023-04-05 07:05:03 -04:00
Steve Robb
12c5198779 Changed FRenderTransform to use compiler-generated moves and copies, to avoid warnings about mismatched copy constructors and assignments.
#rb none
#jira none
#preflight none

[CL 24925454 by Steve Robb in ue5-main branch]
2023-04-05 06:34:14 -04:00
massimo tristano
5a97f49e87 Prevents the editor from crashing when the user selects a Material whose ShaderMap contains null shaders.
This change only makes the editor more robust and prevents the crash. Shaders in the ShaderMap may be null after loading due to external issues.

#rb josie.yang, brandon.dawson
#preflight 642b17f7ce01db47acbd65bf

[CL 24915531 by massimo tristano in ue5-main branch]
2023-04-04 15:06:09 -04:00
mihnea balta
1e426b8748 Fixed potential buffer overflows when parsing the GPU message buffer:
* use signed ints for sizes so that we don't have to check every subtraction for underflow
* make sure that we always have at least 2 ints available for reading for each message, to avoid overflow if a message is truncated before the payload size is written
* check that the payload size doesn't exceed the remaining buffer size

#jira UE-172902
#rnx
#preflight https://horde.devtools.epicgames.com/job/642c16e76a37fb35e9201b43
#rb jeannoe.morissette
#lockdown Michal.Valient

[CL 24912863 by mihnea balta in ue5-main branch]
2023-04-04 12:41:14 -04:00
dan elksnitis
bf79ca67f6 [shaders] fix uninitialized oodle compression fields on FShaderCode struct
#preflight 642c42b9f376ab43d27bf471
#rb Jason.Nadro

[CL 24912313 by dan elksnitis in ue5-main branch]
2023-04-04 12:05:21 -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
Charles deRousiers
2dd761fc54 Change Subsutrate sRGB encoding.
* Default now uses accurate sRGB value encoding.
* Lower platforms using lower shading quality (i.e., r.Substrate.ShadingQuality > 1), will continue to use the cheap sqrt/square encoding/decoding

Using proper sRGB encoding increases occupangy by 8 vgpr on ps4 and a fullscreen quad during the base pass by 0.2ms due to lower occupancy. So keep it disabled on lower platforms.

#rb none
#jira none
#preflight 642ad0058f078cc7031c1ae2
#fyi sebastien.hillaire

[CL 24891794 by Charles deRousiers in ue5-main branch]
2023-04-03 09:35:50 -04:00