Commit Graph

20 Commits

Author SHA1 Message Date
guillaume abadie
94c83bc743 Implements r.DumpGPU.CompressResources
#rb juan.canada
#preflight 6230d00c161b1005592ca695

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

[CL 19392836 by guillaume abadie in ue5-main branch]
2022-03-15 15:53:25 -04:00
guillaume abadie
52e8f551af Adds dump timing measurement details to log when using DumpGPU
#rb none
[FYI] juan.canada
#jira UE-144533
#preflight 6230a2951e073a48a4d1df7a

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

[CL 19389082 by guillaume abadie in ue5-main branch]
2022-03-15 13:52:36 -04:00
guillaume abadie
31f640693c Fixes black mip 0 in DumpGPU when a texture have a mip chain on D3D11 by using the capture by compute shader
#rb juan.canada
#jira none
#preflight none

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18994510 in //UE5/Release-5.0/... via CL 18994530 via CL 18994569
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18997947 by guillaume abadie in ue5-main branch]
2022-02-15 12:06:09 -05:00
guillaume abadie
9e050bfe3f Adds a UE-DumpGPUPath environment variables to dump across perforce workspaces at the same location by default on a dev machine
#rb juan.canada
#jira none
#preflight none
#lockdown juan.canada

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18978917 in //UE5/Release-5.0/... via CL 18978987 via CL 18979086
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18979099 by guillaume abadie in ue5-main branch]
2022-02-14 09:56:14 -05:00
richard wallis
c13b410b24 Fix DumpGPU on macOS. Begin Resource Dump occurs in: FSlateApplication::Get().Tick(ESlateTickType::PlatformAndInput); which is after GEngine->Tick(FApp::GetDeltaTime(), bIdleMode);. Make the defered dump command request a GPU dump for the next frame by adding an InitDump function so it's clear for any platform when to begin. Could add 1 when setting the DumpingFrameCounter_GameThread but that seems brittle across platforms.
Allow more flexibility of the Metal RHICopyToResolveTarget to include compatable texture view pixelformats.  Fixes validation error when resolving between sRGB and RGB formats.

FMetalContext: don't assert then go into the weeds on macOS when there are no render targets.

#jira UE-140658,  UE-120222
#preflight  61fd124b2839dd07cb98d771
[REVIEW] [at]will.damon,  [at]Guillaume.Abadie
#rb will.damon,  Guillaume.Abadie
#lockdown cristina.riveron
#rnx

#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 18864871 in //UE5/Release-5.0/... via CL 18864881 via CL 18865081
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18865102 by richard wallis in ue5-main branch]
2022-02-04 12:01:46 -05:00
guillaume abadie
362dfdc40e Dumps all cvars in DumpGPU captures
#rb juan.canada
[FYI] juan.canada
#jira none
#preflight 61f9217d8b4112f7cc932f3b

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18807104 in //UE5/Release-5.0/... via CL 18809178 via CL 18822216
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823245 by guillaume abadie in ue5-main branch]
2022-02-02 05:28:48 -05:00
guillaume abadie
7804f9bc28 Fixes DumpGPU's resource search by savings all resource descriptors into a single Base/ResourceDesc.json file
#rb none
[FYI] juan.canada
#preflight 61f8112d68795b2f4577da7d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18791631 in //UE5/Release-5.0/... via CL 18791880 via CL 18792459
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18792532 by guillaume abadie in ue5-main branch]
2022-01-31 12:53:35 -05:00
guillaume abadie
aac5f3f872 Dumps both GPU dumper viewer's .sh and .bat so a dump can be opened either on max, linux or windows regardless of the platform it was dumped from
#rb trivial
#jira UE-135665
[FYI] juan.canada, brandon.schaefer, will.damon, michael.sartain
#preflight trivial

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18641994 in //UE5/Release-5.0/... via CL 18642015 via CL 18642037
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18642049 by guillaume abadie in ue5-main branch]
2022-01-18 12:29:27 -05:00
michael sartain
f330699c77 Add DumpGPU viewer script for Linux + Mac
Tested by:

 a) Running Engine/Binaries/Linux/UnrealEditor Samples/Games/ShooterGame/ShooterGame.uproject
 b) Playing game in editor
 c) Running DumpGPU command in console
 d) Folder pops up populated with DumpGPU html files and data plus OpenGPUDumpViewer.sh
 e) Double click on OpenGPUDumpViewer.sh and GPU Viewer opens in chrome and appears to work

Also tested script on Mac by copying entire folder to Mac and executing OpenGPUDumpViewer.sh

TODO:
  Better error messages when Chrome browser isn't installed

We appear to need the --allow-file-access-from-files chrome option and not sure how to get that functionality on other browsers via command line

#jira UE-135665
[at]Brandon.Schaefer, [at]Will.Damon
[FYI] Robert.Seiver
#preflight trivial

#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 18626412 in //UE5/Release-5.0/... via CL 18626428 via CL 18626440
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18626445 by michael sartain in ue5-main branch]
2022-01-14 21:20:42 -05:00
dmitriy dyomin
667034ee1e Fixed: DumpGPU command on mobile platforms
#jira UE-135663
#rb Guillaume.Abadie, Jack.Porter
#preflight 61dd77e18d72a407aabd881b

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 18571322 in //UE5/Release-5.0/... via CL 18571337
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18571345 by dmitriy dyomin in ue5-release-engine-test branch]
2022-01-11 09:24:45 -05:00
andrew davidson
0715ebc996 Type truncation fixes - Renderer
#rb arne.schober
#preflight 61d85ab0932a02483ce13e7d

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18544411 in //UE5/Release-5.0/... via CL 18544434
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18544466 by andrew davidson in ue5-release-engine-test branch]
2022-01-07 10:39:08 -05:00
jason hoerner
144df66f84 UE5_RELEASE: MGPU, include GPU mask per pass in DumpGPU. The GPU mask is added at the front of the pass name, making it easy to visually see in the pass browser, and also to text search for globally. The mask is only added when running on a system with multiple GPUs present (very few users), and is enabled by default for discoverability.
#rb Guillaume.Abadie
#rnx
#jira none
#preflight 61d83b345d522c9b40a54579

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18541852 in //UE5/Release-5.0/... via CL 18541856
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18541859 by jason hoerner in ue5-release-engine-test branch]
2022-01-07 08:18:56 -05:00
jason hoerner
5600dd7c35 UE5_RELEASE: MGPU, numerous fixes to get EngineTest AFR, and Virtual Production City map to run with multiple GPUs. Ultimately there were 3 crash sources (RayTracing, Nanite, Distance Field streaming), each of which required a couple fixes, plus infrastructure to support those fixes...
There remain significant visual artifacts in the Virtual Production City map.  Lumen has serious issues with multiple views in both single and multi-GPU modes -- I think Lumen data needs to be split per view family to solve this.  There is some corrupt geometry in the second view, which may be Nanite or instance rendering related (or something else entirely).  To narrow down these issues, I think I'm going to need to extend the DumpGPU feature to be able to do more effective MGPU graphical debugging, since none of PIX, RenderDoc, or NSight work.  But at least it doesn't crash now...

Full list of changes:
* CVAR (DC.MultiGPUMode) to override multi-GPU mode for Display Cluster, debug feature copied over from 4.27.
* Barrier and synchronization fixes for RHITransferTextures copied over 4.27.  Future work will make RDG handle multi-GPU transitions more seamlessly...
* CVAR (DC.ForceCrossGPUCopy) to force expensive full synchronization and copy of resources cross GPU at the end of each view family render (for debugging).  RHITransferTextures upgraded to support copying things besides 2D textures, including other texture resources and buffers.
* AFR temporal fixes from a previous CL (which I moved from my single GPU to multi GPU PC), now improved to avoid some validation asserts in Debug builds (pass inputs not declared, GetParent()->GetRHI() not working because parent not declared to pass).
* Ray tracing (hang):  acceleration buffers are branched per GPU, as GPU virtual addresses for resources internally referenced by these buffers may vary per GPU.  Needed to add infrastructure to support buffers that duplicate memory per GPU, rather than using driver aliasing of the underlying resource.
* Ray tracing (hang):  some buffer bindings weren't using a proper GPU index.
* Nanite (hang):  Force initial clear of Nanite.MainAndPostNodesAndClusterBatchesBuffer to run on all GPUs.  Solves GPU hang in shadow rendering the first frame (due to shadow rendering running across all GPUs), and later random hangs in view rendering.
* Distance field streaming (assert):  GPU readback staging buffers need to be branched per GPU, as the underlying class is single device.  GPU readback buffers and textures properly take into account the GPU they were last written on when locking and unlocking.  Includes handling an edge case where a write can be queued when a lock is active, due to the deferred way commands are played back in the render graph.
* Distance field streaming (assert):  UAV clear wasn't taking into account GPU index.
* GPU scene update needs to run across all GPUs.
* Fix for "DumpGPU" command to avoid assert with MGPU -- arbitrarily pick a GPU (last index) when the GPU mask contains multiple bits.  Hope to improve this in the future, but it works.

#rnx
#rb mihnea.balta juan.canada tiago.costa kenzo.terelst
#jira none
#preflight 61ba7edbdc58e54b3318fdf5

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18472819 in //UE5/Release-5.0/... via CL 18473380
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18473412 by jason hoerner in ue5-release-engine-test branch]
2021-12-15 23:12:04 -05:00
guillaume abadie
7118d3fffa Allows to automatically trigger any command (such as DumpGPU) when doing a high resolution screenshot
#rb juan.canada
#jira UE-133882

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18299389 via CL 18374100 via CL 18374160
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18374168 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 17:00:32 -05:00
guillaume abadie
93fa3896be Implements r.DumpGPU.Test.PrettifyResourceFileNames to reduce risk of running into windows file path limits
#rb trivial
[FYI] juan.canada

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18267597 via CL 18372833 via CL 18372938
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18373053 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 16:04:47 -05:00
guillaume abadie
08fa647550 Implements GRHIValidateBufferSourceCopy and use it in DumpGPU
#rb mihnea.balta

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18267540 via CL 18372827 via CL 18372934
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18373048 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 16:04:39 -05:00
guillaume abadie
dd1c4774d5 Improves DumpGPU command
Dumps improvements:
1) Bring up for consoles
2) Better out of memory resiliency during the dumping process
3) Dumps console variables in CSV
4) Dumps process' log after completion
5) Dumps mip chains through FDumpTextureCS compute shader
6) Dumps depth & stencil texture formats through the FDumpTextureCS compute shader
7) Dumps at draw granularity with FRDGBuilder::DumpDraw(); (experimental)
8) Dumps final png screenshot to the dump directory
9) Adds & Dumps the FRDGBufferDesc::Metadata for viewer to decode buffer binary automatically
10) Dumps the PassParameters with structure metadata to decode shader parameters automatically
11) Adds CTRL+SHIFT+/ shortcut

Viewer improvements:
1) Tips display onload to spread some knowledge to the user
2) Supports for opening any pass/resources in new web browser tab
3) Emulates 16 and 32 bits UINT texture visualization with multiple webgl 8bit UINT textures
4) Fixes the webpage's tab going out of memory after visualizing many large resources.
5) Fixes the webpage's tab going out of memory after loading large buffer.
6) Adds support for more texture format with RGB channel reswizzling
7) Implements UI color-sheme based on UE5's editor theme
8) Implements texel color picker capabable of decoding every pixel format.
9) Implements texture viewer zooming with the mouse wheel
10) Implements a r.DumpGPU.Viewer.Visualize to open a specific RDG output resource when opening the viewer

#rb juan.canada
#preflight 619bb638fa0b360c406c42c5
[FYI] juan.canada, zach.bethel

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18260079 via CL 18372399 via CL 18372914
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18373039 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 16:04:00 -05:00
guillaume abadie
3ba0b2bfc3 Dumps previously never dumped input RDG resources with r.DumpGPU
#rb none
#lockdown michal.valient
#preflight 61640bfc6b2cbf00019303b4

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17770764 via CL 17986022 via CL 18368155 via CL 18368229
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368262 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 10:04:40 -05:00
guillaume abadie
d1cb2685ce Packages the GPUDumpViewer in non shipping cooked builds
[FYI] yuriy.odonnell
#rb trivial
#lockdown michal.valient
#preflight 615b0b932554620001fab5fe

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17709944 via CL 17977482 via CL 18366615 via CL 18366702
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366765 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 02:42:33 -05:00
guillaume abadie
e0202048e8 Implements r.DumpGPU command
#rb yuriy.odonnell
#lockdown michal.valient
#preflight 615ace99e69d8c00011a309f

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17706889 via CL 17969938 via CL 18366598 via CL 18366692
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366749 by guillaume abadie in ue5-release-engine-test branch]
2021-12-03 02:41:52 -05:00