Commit Graph

2497 Commits

Author SHA1 Message Date
laura hermanns
3e2c99ebce [Shaders] Remove Hlslcc form GL backend; Mobile renderer fully switched to DXC.
#rnx
#rb Carl.Lloyd, Dmitriy.Dyomin, Florin.Pascu
[FYI] Rolando.Caloca, Jason.Nadro

[CL 31258039 by laura hermanns in ue5-main branch]
2024-02-07 10:32:52 -05:00
charles derousiers
15b747649b Add project settings for hair tristrip geometry as not all project are compatible with this.
#rb charles.derousiers


#changelist validated
#virtualized

[CL 31249413 by charles derousiers in ue5-main branch]
2024-02-07 01:35:42 -05:00
aleksander netzel
9c64f21aba HWRT: Check if ray tracing is enabled on current shader platform otherwise preview platforms might try to access ray tracing shaders which were not compiled.
#jira UE-205699
#rb christopher.waters, tiago.costa

[CL 31218676 by aleksander netzel in ue5-main branch]
2024-02-06 12:15:17 -05:00
tiago costa
6d5fd35573 Resubmit CL 30935187 with following changes:
- Issue 1 - UStaticMesh can be released before the proxy is destroyed:
    - delay release of FRayTracingGeometryGroup until all proxies are unregistered.
    - keep copy of RayTracingGeometryGroupHandle in render proxy

- Issue 2 - FRayTracingGeometryManager::RequestUpdateCachedRenderState(...) called when running !IsRayTracingAllowed()
    - initialize RayTracingGeometryGroupHandle to INDEX_NONE
    - only call FRayTracingGeometryManager::RequestUpdateCachedRenderState(...) if IsRayTracingAllowed()

[Original CL Desc]

Improvements to tracking of proxies requiring invalidation when raytracing geometry is streamed/built/made resident.

Context:
- The existing CachedRayTracingStateProxiesMap mapped [UStaticMesh -> Array of Proxies that need to be invalidated], however there was no way to map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] since FRayTracingGeometry doesn't have a pointer to which UStaticMesh owns it. On top of that, not every FRayTracingGeometry is associated with a UStaticMesh.
- An alternative approach could be having a map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] however that would require significantly more memory - O(#proxies x #LODs) instead of O(#proxies).

Change:
- Modified CachedRayTracingStateProxiesMap to use a more generic RayTracing::GeometryGroupHandle (int32) as key.
- Store RayTracing::GeometryGroupHandle in FRayTracingGeometry.

[FYI] aleksander.netzel

[CL 31210259 by tiago costa in ue5-main branch]
2024-02-06 06:58:03 -05:00
jason hoerner
13762ae08d VisualizeTexture.cpp static analysis fix -- last else condition always true. Original code suppressed this error in its last else, as it's there deliberately -- just needed to move the error suppression markup.
#rnx

[CL 31161066 by jason hoerner in ue5-main branch]
2024-02-03 20:57:53 -05:00
jason hoerner
2b0f208938 Visualize Texture: Performance and feature upgrades.
* Visualize texture system starts out in an inactive state until a command is issued, avoiding overhead of tracking views and scene textures, saving 1.4% on the render thread.
* Visualization overhead eliminated for views besides the one currently being visualized.
* Support for visualization of textures from scene captures, via "view=N" option (specifying the unique ID of the view), with "view=?" displaying a list of views for reference.
* Improved visualization for cube maps.  PIP uses 2:1 aspect for the longitudinal render to match resource viewer display, and pixel perfect option shows tiled flat cube map faces (actual pixels) rather than running a projection.
* Padding for scene or screen pass textures is removed in the visualization -- the padding otherwise shows up as garbage or blank space.

To remove scene texture padding, it's necessary to add a field to RDG textures to provide an option to track the viewport sizes that were rendered for a given texture.  If not set, the assumption is the whole texture was rendered.  The field is set for FSceneTextures and FScreenPassTexture, covering the vast majority of cases, plus the denoiser was spot fixed -- worst case if any other cases are missed, you still see the padding.  You can tell padding was present when visualizing by contrasting the texture size with the viewport size.

Padding was always a potential issue for the visualizer, but is exacerbated by scene captures, as the padded scene textures are set to a size that's a union of the main view and any scene captures.  Padding is also exacerbated by dynamic resolution scaling, as the buffers will be padded to the maximum resolution.  For example, a cube map rendering at 512x512 will have 93% of the pixel area as padding if the front buffer is at 1440p, or the default dynamic resolution setup will have 70% of the pixels as padding at minimum res.

#rb Jason.Nadro

[CL 31160232 by jason hoerner in ue5-main branch]
2024-02-03 16:07:46 -05:00
arciel rekman
d61e2cf74c Fix shader code stats being output in gigabytes instead of megabytes.
- Thanks to Dan Elksnitis for noticing!

#rb Dan.Elksnitis

[CL 31147346 by arciel rekman in ue5-main branch]
2024-02-02 18:15:30 -05:00
arciel rekman
9b1b932d44 Add per-shader-type itemization for shader libraries.
- At the end of the cook, produces stats like

Unique shaders itemization (sorted by compressed size):
SF_Compute: 3202 shaders (65.59%), compressed size: 0.06 MB (19.70 KB avg per shader), uncompressed size: 0.09 MB (29.44 KB avg per shader)
SF_Pixel: 1238 shaders (25.36%), compressed size: 0.02 MB (16.65 KB avg per shader), uncompressed size: 0.03 MB (24.99 KB avg per shader)
SF_RayGen: 296 shaders (6.06%), compressed size: 0.01 MB (37.48 KB avg per shader), uncompressed size: 0.02 MB (55.79 KB avg per shader)
SF_Vertex: 115 shaders (2.36%), compressed size: 0.00 MB (6.97 KB avg per shader), uncompressed size: 0.00 MB (10.78 KB avg per shader)
SF_RayHitGroup: 18 shaders (0.37%), compressed size: 0.00 MB (5.12 KB avg per shader), uncompressed size: 0.00 MB (7.84 KB avg per shader)
SF_RayMiss: 9 shaders (0.18%), compressed size: 0.00 MB (7.63 KB avg per shader), uncompressed size: 0.00 MB (11.81 KB avg per shader)
SF_Geometry: 3 shaders (0.06%), compressed size: 0.00 MB (2.63 KB avg per shader), uncompressed size: 0.00 MB (4.78 KB avg per shader)
SF_RayCallable: 1 shaders (0.02%), compressed size: 0.00 MB (1.68 KB avg per shader), uncompressed size: 0.00 MB (2.71 KB avg per shader)

#rb dan.elksnitis
[REVIEW] [at]Dan.Elksnitis

[CL 31141673 by arciel rekman in ue5-main branch]
2024-02-02 16:40:20 -05:00
guillaume abadie
e9eb11ef4e Comments an ensure() in DumpGPU to unblock automated tests
#jira UE-205749

[CL 31131433 by guillaume abadie in ue5-main branch]
2024-02-02 13:01:51 -05:00
zach bethel
f51df31ee1 Fixing RDG insights scopes.
[CL 31129347 by zach bethel in ue5-main branch]
2024-02-02 12:15:46 -05:00
guillaume abadie
b7425a4813 Fix DumpGPU scopes
[FYI] Luke.Thatcher

[CL 31102738 by guillaume abadie in ue5-main branch]
2024-02-01 16:27:42 -05:00
zach bethel
75e48eba41 Removed RDG wait stat to work around crash in CSV profiler
[CL 31067782 by zach bethel in ue5-main branch]
2024-01-31 17:19:44 -05:00
jason hoerner
09d92e02f8 RDG: Event name fix -- an integration changed the FRDGEventName::GetTCHAR() implementation to not return the raw format string when the dynamic formatted string is missing -- an optimization in a previous CL made it so only the raw string is stored where no formatting is necessary, so this results in missing event names for that case, breaking bread crumbs and GPU captures.
#rnx
#rb zach.bethel

[CL 31059546 by jason hoerner in ue5-main branch]
2024-01-31 14:50:03 -05:00
ben woodhouse
7fd6828752 Re-enable the realtime GPU profiler by default, but disable in editor. This is a more targeted workaround for UE-205211
#jira UE-205211
[FYI] luke.thatcher
#tests tested in editor and with a replayrun preflight with the cvar disabled

[CL 31055966 by ben woodhouse in ue5-main branch]
2024-01-31 13:28:32 -05:00
zach bethel
1218f41c3a Fixed RHI validation error when transitioning back to ERHIAccess::Discard.
#jira UE-205031

[CL 31052471 by zach bethel in ue5-main branch]
2024-01-31 12:08:00 -05:00
tiantian xie
54d97f0f45 [Backout] - CL30934199
[FYI] tiago.costa
Original CL Desc
-----------------------------------------------------------------
Improvements to tracking of proxies requiring invalidation when raytracing geometry is streamed/built/made resident.

Context:
- The existing CachedRayTracingStateProxiesMap mapped [UStaticMesh -> Array of Proxies that need to be invalidated], however there was no way to map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] since FRayTracingGeometry doesn't have a pointer to which UStaticMesh owns it. On top of that, not every FRayTracingGeometry is associated with a UStaticMesh.
- An alternative approach could be having a map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] however that would require significantly more memory - O(#proxies x #LODs) instead of O(#proxies).

Change:
- Modified CachedRayTracingStateProxiesMap to use a more generic RayTracing::GeometryGroupHandle (int32) as key.
- Store RayTracing::GeometryGroupHandle in FRayTracingGeometry.

#rb aleksander.netzel

[CL 31016413 by tiantian xie in ue5-main branch]
2024-01-30 14:40:56 -05:00
bob tellez
bb4b933b0b [Backout] - CL30979008
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL30976715
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
 - r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
 - STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
 - This is a delete-only change.

#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro

[CL 30987478 by bob tellez in ue5-main branch]
2024-01-29 23:48:09 -05:00
jason hoerner
bf28c778a3 RHI pool resource debug name optimization: Opportunistically skip updating the debug name if it's the same as it was last time the pooled resource (Buffer or Texture) was used. In testing, 82% of buffers and 90% of textures fall under this category, and the optimization saved 2% frame wide. In the future, we could consider an exhaustive search or hash lookup by debug name, but this works well enough for now.
#rnx
#rb zach.bethel

[CL 30984874 by jason hoerner in ue5-main branch]
2024-01-29 21:57:05 -05:00
zach bethel
ed52df29e8 Fixed bad robomerge.
[CL 30984434 by zach bethel in ue5-main branch]
2024-01-29 21:37:12 -05:00
zach bethel
1747ae9c34 Fixed build break.
[CL 30983529 by zach bethel in ue5-main branch]
2024-01-29 20:59:31 -05:00
zach bethel
f238fac4d9 Fixed race condition between RDG builder and async destruction task. Added a sync point with scene render clean-up to fix race condition with scene extension context.
#jira UE-204879

[CL 30983204 by zach bethel in ue5-main branch]
2024-01-29 20:46:43 -05:00
zach bethel
4f9d3be993 Fixed race condition between RDG builder and async destruction task. Added a sync point with scene render clean-up to fix race condition with scene extension context.
#jira UE-204879

[CL 30981309 by zach bethel in ue5-main branch]
2024-01-29 19:13:40 -05:00
bob tellez
9abacf237b [Backout] - CL30976715
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
 - r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
 - STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
 - This is a delete-only change.

#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro

[CL 30979008 by bob tellez in ue5-main branch]
2024-01-29 17:22:09 -05:00
Luke Thatcher
fe30e6c37b Temporarily disable the realtime GPU profiler
- It's causing crashes when loading large levels in the editor: "Assertion failed: !OverflowEventCount".

#rb Zach.Bethel
#jira UE-205211

[CL 30978249 by Luke Thatcher in ue5-main branch]
2024-01-29 16:47:11 -05:00
Luke Thatcher
4eb84944ad Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
 - STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
 - This is a delete-only change.

#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro

[CL 30976715 by Luke Thatcher in ue5-main branch]
2024-01-29 15:42:08 -05:00