Commit Graph

166 Commits

Author SHA1 Message Date
Nick Darnell
7b82d75b61 Slate - Inlining several small functions in Slate to save a few hundred microseconds.
[CL 2703244 by Nick Darnell in Main branch]
2015-09-23 16:17:33 -04:00
Matt Kuhlenschmidt
7badc118a0 Merged UE4-Orion->UE4. Slate hardware instancing support
2697248 Added SMeshWidget and underlying support to draw a custom mesh from Slate.
2696183 Fixed world position offset not being usable without texture coordinate in Slate Materials.
2695823 Removed some unused code
2695811 Added hardware instancing support to Slate draw elements
2695462 Added custom Slate shader type for completely custom materials that make no assumption on how they are used

[CL 2702631 by Matt Kuhlenschmidt in Main branch]
2015-09-23 11:55:14 -04:00
Marcus Wassmer
445543fd51 First pass at new RHITransitionResources API.
Rendertarget transitions are completed and validated on DX11 and PS4 RHI's.

[CL 2700116 by Marcus Wassmer in Main branch]
2015-09-21 20:07:00 -04:00
Jamie Dale
5426977603 Fixed crash in FSlate3DRenderer::DrawWindow_GameThread when the font cache was flushed
The font cache could be flushed while the render thread was still using the font atlas textures. We now flush it before we add the elements to draw to ensure that the atlas textures will be valid for the render thread to use.

#codereview Matt.Kuhlenschmidt

[CL 2695161 by Jamie Dale in Main branch]
2015-09-17 10:26:39 -04:00
Matt Kuhlenschmidt
df9b4259e7 Merging CL 2692508
Added custom UV support to Slate vertex shaders

[CL 2694651 by Matt Kuhlenschmidt in Main branch]
2015-09-16 23:13:56 -04:00
Matt Kuhlenschmidt
6337badc4d Merging CL 2684013 and 2684020 using UE4_to_UE4-Orion
Added support for vertex shaders in UI materials.  Uses "WorldPositionOffset" like regular materials.  Stubbed in support for instanced parameters although that is not hooked up to anything yet

[CL 2686783 by Matt Kuhlenschmidt in Main branch]
2015-09-10 14:54:09 -04:00
Matt Kuhlenschmidt
65e46bcce8 Merging CL 2684004 using UE4_to_UE4-Orion
Implemented a basic slate resource handle for fast access without doing map lookups from Brush -> Rendering resource.  Not hooked up to anything yet

[CL 2686668 by Matt Kuhlenschmidt in Main branch]
2015-09-10 13:50:53 -04:00
Matt Kuhlenschmidt
3ccce934a0 Merging using UE4_to_UE4-Orion
CL 2678623
Slate rendering resource access fixes.
- Removed the need for a render command per resource access.  This was unsafe when accessing resources from another thread (loading screens)
- Moved texture streaming last render time update to the actual point in time where it was rendered.  The previous location was at resource access time which was not occuring for textures in invalidation panels.

[CL 2678712 by Matt Kuhlenschmidt in Main branch]
2015-09-03 11:29:03 -04:00
Matt Kuhlenschmidt
190b803d56 Merged CL 2672323 from Orion
Fix multithreaded rendering crashes due to race conditions in the Slate renderer

[CL 2672334 by Matt Kuhlenschmidt in Main branch]
2015-08-28 11:22:48 -04:00
Matt Kuhlenschmidt
ecc50a3689 Merged CL 2671863 from Orion
Fix the number of draw buffers for slate elements being off by one by mistake

[CL 2672332 by Matt Kuhlenschmidt in Main branch]
2015-08-28 11:20:42 -04:00
Mark Satterthwaite
977542aeaa Merging general rendering & shader changes necessary to support desktop Metal.
reviewedby michael.trepka, rolando.caloca, lee.clark

[CL 2670859 by Mark Satterthwaite in Main branch]
2015-08-27 10:11:22 -04:00
Guillaume Abadie
cbeddee7e1 Changes some variable names in the view uniform buffer.
ViewWorldOrigin -> WorldViewOrigin
CameraWorldOrigin -> WorldCameraOrigin
CameraTranslatedWorldOrigin -> TranslatedWorldCameraOrigin
CameraWorldOriginDelta -> WorldCameraMovementSinceLastFrame
PrevCameraWorldOrigin -> PrevWorldCameraOrigin
PrevViewWorldOrigin -> PrevWorldViewOrigin

#code_review: Martin.Mittring

[CL 2666624 by Guillaume Abadie in Main branch]
2015-08-24 16:27:34 -04:00
Guillaume Abadie
5dd619f8f6 Exposes the view space and the camera space in the transform material expressions
#code_review: Daniel.Wright

[CL 2665951 by Guillaume Abadie in Main branch]
2015-08-24 09:53:28 -04:00
Matt Kuhlenschmidt
f15837f9b7 Merged CL 2664420
Fix cached invalidation resources not being properly deleted at shutdown.  Causes a shutdown crash

[CL 2664428 by Matt Kuhlenschmidt in Main branch]
2015-08-21 10:56:49 -04:00
Nick Darnell
0933d8f561 UMG/Slate - Continuing to itterate on performance and improving the invalidation panel. Enhanced the rendering pipeline to allow cached buffers to be passed along with an offset so that we could do a final matrix transform on it if need be. Fixing a rather large memory leak on the invalidation panels never being able to re-use old element lists because they were always being used by the render thread. Adding more stats. The PS4 BeginNamedEvent calls now properly respect the color being passed as an argument and will display it in Razor when in arguement coloring mode. Widgets now know what class created them, in all but shipping. Very useful for logging stat/debugging information in a non-editor build.
[CL 2663649 by Nick Darnell in Main branch]
2015-08-20 19:00:36 -04:00
Matt Kuhlenschmidt
532c2b8b17 Merged from Orion CL 2660007
Remove redundant present time that bloats Slate rendering time (present time is not indicative of Slate being slow).  It exists in the RHI stat and in stat scenerendering

[CL 2660009 by Matt Kuhlenschmidt in Main branch]
2015-08-18 17:05:17 -04:00
Nick Darnell
f7a425e477 UMG / Slate - Now reporting cached materials and textures to prevent garbage collection of cached resources. Additionally moving the resource proxy creation to inside of the Make* functions in order to have a better stack trace when a junk GC'ed resource is accessed.
[CL 2656118 by Nick Darnell in Main branch]
2015-08-14 10:40:05 -04:00
Nick Darnell
8607146449 UMG/Slate - The invalidation panel can now cache a GPU Buffer for a set of drawable elements, this avoids needing to go through the element batcher which can be very expensive on large UI set. Currently only supported on the RHI Renderer. This change required we introduce a sort of logical layering system into the rendering stack for Slate, so that volatile elements that could expand to be N long, could be sorted relative to their parent in terms of layer id, but without knowing that ahead of time, it became impossible to properly sort child elements that came after the volatile set. The logical layering avoids that by allowing us to sort each logical group independently, and as we traverse the tree only sort along each branch.
[CL 2655144 by Nick Darnell in Main branch]
2015-08-13 16:03:06 -04:00
Peter Sauerbrei
7c148c0415 fix for 3d widgets not being cleared properly on Metal devices
[CL 2654672 by Peter Sauerbrei in Main branch]
2015-08-13 11:01:02 -04:00
Marcus Wassmer
3f7b21006a Add a resolve to properly support fastclears.
#jira UE-19575
#codereview matt.kuhlenschmidt

[CL 2645346 by Marcus Wassmer in Main branch]
2015-08-05 15:15:04 -04:00
Nick Darnell
d24730dbf9 Slate - Whenever the game viewport is torn down, we now immediately flush the accessed resource cache so that any dynamically created materials have an opportunity to be GCed when the game is being torn down to prevent a crash when the end play code does a check against non-collected objects still referencing the dying world.
#jira UE-19382

[CL 2638945 by Nick Darnell in Main branch]
2015-07-30 12:51:53 -04:00
Matt Kuhlenschmidt
8fd85955c4 Fixed Slate material brush rendering not respecting the global scissor rect.
[CL 2631051 by Matt Kuhlenschmidt in Main branch]
2015-07-23 14:43:06 -04:00
Matt Kuhlenschmidt
5d44808402 Added a safe way to delete a dynamic slate brush that may be in use. Fixed up use cases of unsafe deletion
Fixes https://jira.ol.epicgames.net/browse/UE-18531

[CL 2620698 by Matt Kuhlenschmidt in Main branch]
2015-07-14 15:36:51 -04:00
Steve Robb
72dec33d8f ensureOnce is now ensure.
ensure is now ensureAlways.
Redundant ensureMsg removed and replaced with ensureMsgf.
'debug ensureAlways' command added.

#codereview robert.manuszewski
#platformnotify josh.adams

[CL 2616422 by Steve Robb in Main branch]
2015-07-10 05:31:32 -04:00
Marcus Wassmer
11ff098ea0 Bind clear color to rendertargets at creation time.
#codereview Rolando.caloca

[CL 2615534 by Marcus Wassmer in Main branch]
2015-07-09 15:11:37 -04:00