Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Private/RenderResource.cpp

1017 lines
28 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
RenderResource.cpp: Render resource implementation.
=============================================================================*/
#include "RenderResource.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "Misc/ScopedEvent.h"
#include "Misc/App.h"
#include "RenderingThread.h"
#include "ProfilingDebugging/LoadTimeTracker.h"
#include "CoreGlobals.h"
#include "RayTracingGeometryManager.h"
/** Whether to enable mip-level fading or not: +1.0f if enabled, -1.0f if disabled. */
float GEnableMipLevelFading = 1.0f;
Merging from //UE4/Fortnite-Staging up to CL#3673800 based on CL#3664064 from //Fortnite/Main #rb none #lockdown Nick.Penwarden ================================================================================================= THESE CHANGES TOUCH MULTIPLE PLATFORMS AND/OR RESTRICTED FOLDERS. YOU MUST REVIEW THESE MANUALLY AND APPEND THEM TO THE DESCRIPTIONS FOR THE APPROPRIATE PLATFORMS. ================================================================================================= Change 3662267 by Nick.Darnell Engine - Fixing a bug in GetAccurateRealTime, it wasn't subtracting GStartTime, which if you don't prevents accurate platform time when you try to store it in a float. #jira nojira Change 3662176 by Ben.Marsh Disable image integrity report generation if a debugger is attached, and in editor builds. #jira FORT-55656 Change 3656958 by Luke.Thatcher [FORTNITE] [CONSOLE] [+] Improved frame syncing mechanism - Improves input latency by allowing the game thread to sync to the swap chain flip of the previous frame. - Added "r.GTSyncType" CVar to control how the game thread syncs with the rest of the pipe. - r.GTSyncType 2 will sync the game thread with the flip of the swap chain, preventing the pipe from getting too long and causing excess input latency. Platforms are required to implement RHIWaitForFlip and RHISignalFlipEvent, and call RHIInitializeFlipTracking on RHI startup. A separate thread monitors the progress of frame flips and signals task graph events as they pass their corresponding frame index. In r.GTSyncType 2 mode, the game thread is signaled by this flip tracking thread. [~] Unified platform specific sync interval CVars (D3D12.SyncInterval, D3D11.SyncInterval, r.PS4FlipRate, RHI.SyncIntervalOgl) into one: rhi.SyncInterval - 1 == 60Hz - 2 == 30Hz - 3 == 20Hz [-] Removed large number in XboxOneTime. Adding this arbitrary number prevents us from comparing timestamps from FPlatformTime::Seconds() and various OS callbacks (e.g. flip timings). #jira FORT-50803 Change 3655598 by Lukasz.Furman added filtering for navmesh's low height spans to fix crash on layer partitioning % of span reductions depends on presence of stair or roof building in navmesh tile, changed failsafes in layer code to ignore entire tile if heightfield is too complex to partition instead of reallocating memory #jira FORT-35375 Change 3648972 by Keith.Judge Add analytics to help diagnose default parameter collection buffer issue. +++ REMOVE ONCE CORE ISSUE IS SOLVED +++ #jira FORT-54690 Change 3648756 by Bart.Hawthorne Integrate 3645298 from //UE4/Dev-Networking Deprecate GetNetworkObjectInfo in favor of separate FindNetworkObjectInfo and FindOrCreateNetworkObjectInfo methods. #jira none Change 3643090 by Josh.Markiewicz #UE4 - proper handling of "pending connection lost" - triggered only if a connection is lost and there no "owning actor" to deal with the connection loss -- added Rejoin and CleanedUp states to connection to make sure that the pending connection lost delegate only fires at the appropriate time - delegate returns the unique id of the player if known (still possible to be unknown if connection lost after NMT_Hello) - changed debug output on timeout if the net connection was already in the process of being destroyed -- occurs when game hitches during the pending destroy 2 second wait -- ReceivedAcks should have been called to clean things up quietly in those 2 seconds but blocking the game thread will cause the cleanup to look like a timeout - added userid to UNetConnection::Describe - bad split screen player handling of unique id -- splitscreen uniqueid was overwriting the primary player id -- only store the id on the child connection - added some clarifying comments #review-3642816 @ryan.gerleve, @bob.tellez, @sam.zamani, @bart.hawthorne, @dave.ratti #jira FORT-26776 Change 3639043 by Alex.Thurman Fix CommonTreeView SetSelection to correctly update list navigation, and behave similarly to CommonListView's SetSelectedItem. #JIRA FORT-45841 Change 3632275 by Seth.Weedin #JIRA FORT-54203 - Add clamps to ActiveSound fade interpolation to prevent unwanted volume spikes. Remove 0.01 start time for single-fire audio cues. Should remove the sudden pops sometimes heard when firing weapons, as well as smooth out fade volume in general. Change 3626944 by Josh.Markiewicz #UE4 - added "updates connection status" flag to ServiceConfigMCP - disable updates on Cloud and Friend services (Fortnite only) - removed overloaded ProcessConnectionStatus function in cloud service #jira FORT-53113 Change 3626226 by Stewart.Lynch LLM Update - Memory reductions, Summary page, enum scopes, refactor and cleanup of tags * Remove all static arrays and hard limits from LLM. Everything is now dynamically allocated using the internal LLM allocators. The overhead when LLM is disabled is now only 48K (was 40MB) * re-wrote LLMMap. Now stores an int32 index rather then pointer in the HashMap array. Also, changed the Values to be arrays for structs instead of structs of arrays. Means that the tag can be stored in a single byte. Changed the size of the allocation size from int64 to int32. All this takes the memory down from around 600MB to 100MB. It was 120 bytes per allocation, now 29 bytes. * changed all LLM scopes over to enums. This has a number of benefits; LLM can be enable in Test, less CPU overhead, stored in a byte (LLM overhead /= 8) * summary page for content creators where all lower-level stats are grouped under one Engine stat * renamed ELLMScopeTag enum to ELLMTag * renamed LLM_SCOPED_TAG_WITH_ENUM macro to LLM_SCOPE * removed Tracker arg from LLM_SCOPE and added LLM_PLATFORM_SCOPE macro * fixed GenericPlatformMallocCrash stat. Although it seems not be be used anymore * fixed BackupOOMMemoryPool stat (now shows in both default and platform pages) * added separate LLM enums for XB1, PS4 and D3D12 (PS4LLM.cpp/h etc.) * lots of changes adding/removing/renaming tags * added LLMArray and FLLMObjectAllocator classes * disabled asset tag tracking by default because it takes up so much memory even when not used * enable LLM in all non-shipping builds. In Test the on screendisplay won't show because it uses the stats system but it till still write out the csv. * all the stat macros have been left as they were and can be enabled on the LLM_STAT_TAGS_ENABLED define. These are needed for the asset tagging. * disabled LLM_TRACK_PEAK_MEMORY because there is a problem with the way it adds the peaks for multiple threads. This needs to be fixed. * added a CVar to control the csv write interval: LLM.LLMWriteInterval * added static arrays for the enum tags setup. Easier to manage and removes need for slow switch statements. * renamed FLLMThreadStateManager to FLLMTracker to make it consistent with the enum * fixed program size stat which was broken recently on PS4. This was due to initialisation order and global platform stats setup #jira NONE-01 Change 3622978 by Lukasz.Furman changed WeaponStatus BT decorator to be event driven, fixes AI trying to check ranged weapon abilities without valid weapon includes copy of CL# 3620700 #jira FORT-45914 #review-3622979 John.Abercrombie Change 3622340 by Josh.Markiewicz #UE4 - playerid netconnection variable setup properly on clients and servers for both beacons and game net drivers - ipconnection prints uniqueid with lowleveldescribe #jira fort-0 Change 3621386 by Tim.Tillotson Add the ability to retry HTTP operations by VERB. This allows us to automatically retry cloud save PUT operations. #JIRA FORT-53717 #review-3621317 @Josh.Markiewicz @Ian.Fox @Carlos.Cuello Change 3620517 by Keith.Judge Xbox One - Revert iOS behaviour for the depth bias back to how it was, and make separate XB1 change use its own define to avoid confusion. #jira FORT-53928 Change 3620248 by Lukasz.Furman changed behavior of UBTTask_MoveTo.bStopOnOverlap flag after recent AcceptanceRadius fix, updated comments to be more detailed #jira nojira Change 3616187 by Bob.Tellez #UE4 Throwing an error (for now) if you attempt to use both the malloc profiler and leak detection at the same time since it causes a deadlock. #JIRA UE-0 Change 3613935 by Peter.Knepley More logging on update launcher launching #jira nojira #robomerge rp rn Change 3613537 by Marcus.Wassmer Safety asserts around the MarkPendingKill feature for rendering classes. #jira FORT-50385 Change 3613399 by Arne.Schober Extended ShowMaterialDrawEvents to enable it only in very specific passes and default enabled Depth for Fortnite on PS4 to track down a crash. #RB Marcus.Wassmer #jira FORT-53610 Change 3610794 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce UMG class memory #jira UE-52043 #ROBOMERGE-SOURCE: CL 3610792 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3610144 by Stewart.Lynch General LLM improvements * added tracking for misc task graph tasks (moves 20MB out of Untagged) * renamed EngineTick to EngineMisc * added tracking for FName * added tracking for GC_ProcessObjectArray potential leak * renamed index & vertex buffers stat to Meshes * added hooks for MemPro to track allocations from a single category. Currently defined out. I haven't added MemPro.cpp/h. * removed AVAILABLE_PHYSICAL stat from LLM csv * csv files now include the date in the filename * fixed potential threading bug when reading stat values to csv * made IsDebugMemoryEnabled() always return false in shipping and if not runnong on a dev-kit (PS4). The reason is that the function is a bit hacky, and should only be used for debug purposes, such as displaying the on screen warning. * added lots more scopes * started changing Stat scopes to enum scopes. Stat scopes will be phased out. * added tracking of FName memory * added llmplatform tracking for XBoxSymbols * added llm tracking for CPU symbol allocations (20MB) * wrote an allocator for XBoxOneStack reading so that it doesn't go through Malloc and get tracked by LLM. * added tracking for GC * fixed tracking for TransientMemoryAllocator * added tracking for networking memory * added more audio memory tracking * added tracking for blueprints * added tracking for static meshes * show on screen warning if debug memory is enabled * added tracking for particles * renamed Phys to PhysX and added more scopes * renamed Slate to UI and added more scopes * much better coverage of networking memory * improved coverage of audio #jira FORT-53420 Change 3610136 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce size of UStaticMeshComponent by 224 bytes (cumulative, 64 bytes exclusive) Reduce size of UPrimitiveComponent by 176 bytes (cumulative, 64 bytes exclusive). Reduce size of USceneComponent by 112 bytes. Reduce size of FLightingChannels from 3 bytes to 1. Reduce size of FBodyInstance by 16 bytes. #jira FORT-52043 #ROBOMERGE-SOURCE: CL 3610134 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607937 by robomerge #ROBOMERGE-AUTHOR: paul.moore #jira FORT-53105 - Fix websocket not providing information when the peer closes the connection. #ROBOMERGE-SOURCE: CL 3607933 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607042 by Bart.Hawthorne Move replay.Loop functionality into the demo net driver and rename it demo.Loop #jira none Change 3605448 by robomerge #ROBOMERGE-AUTHOR: seth.weedin #Athena - Pass owner to ActiveSounds created using PlaySoundAtLocation/PlaySound2D to allow "Limit to Owner" concurrency rules to work. Hook up for weapon sounds. #JIRA FORT-53180 #ROBOMERGE-SOURCE: CL 3605443 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3604787 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Initial support for hotfixing live assets from .ini files - This allows clients and server to patch certain assets in memory whenever .ini file hotfixes are downloaded - Only CurveTables and DataTables are supported for now - The new asset content must be in Json format, the same format the editor uses for importing - Assets that are hotfixed will be synchronously loaded if they're not already in memory. They'll be retained in memory afterwards. - IMPORTANT: Json data must be supplied on a single line, and all double quotes must be escaped! - The changes must go in the Game.ini file and use the following syntax: [AssetHotfix] +CurveTable=("/Game/Folder/MyCurveTable","[{\"Name\":\"Default\"}]") +DataTable=("/Game/Folder2/MyDataTable","[{\"Name\":\"Foo\"}]") #jira FORT-52099 [CODEREVIEW] frank.gigliotti [FYI] peter.knepley,bob.tellez #ROBOMERGE-SOURCE: CL 3604784 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3602067 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Loading time improvements - This shaves off up to 10 seconds of load time on PS4 in Athena Details: - Fixed multiple sub-levels not being able to be enqueued for loading in a single client frame. Athena has ~300 sub-levels, so this ended up wasting up many seconds. - Fixed 3D world being rendered while loading (frees up game thread cycles for throttled streaming) - UWorld::AllowLevelLoadRequests() was not allowing load requests to go through while an async load was in progress and the match had started. It now allows this as long as the world isn't being rendered (loading screen.) - Eliminated extra 2 second delay before loading screen is dismissed (in Athena only) - Note: A side effect of this change is that the progress bar may not update as smoothly on loading screen. We'll look at tuning the throttle settings if it ends up being a problem. [CODEREVIEW] ori.cohen #jira AT-1477 #ROBOMERGE-SOURCE: CL 3602061 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3601951 by Luke.Thatcher [FORTNITE] [PS4] [!] Fix memory stats in the old PS4 memory system - Physical memory stat now includes garlic and onion allocations. CPU OOMs will result in "AvailablePhysical" being close to 0. - Added garlic, onion and defrag stats to the platform memory stats struct. - Added fixed pool sizes to platform memory stats. - Modified the Fortnite heartbeat logging to include extra details of PS4 fixed sized pools. #jira FORT-52910 Change 3600340 by robomerge #ROBOMERGE-AUTHOR: wes.hunt All Fort analytics events now contain a GameState attribute indicating the active GameState ClassName when the event is sent. Added some new context to crashreporter to help identify Athena matches near and long term. * Near Term: GameNameSuffix - set via FCoreDelegates::CrashOverrideParamsChanged * Added bools to the params to indicate WHICH ones are changing * Allows you to set only some values, and clear them out. * Hooked up in FortGameState::PostInitializeComponents. * FortGameState clears it (for returning to main menu). * FortGameStateAthena sets it (for going into an Athena match). * Only does this when it's a true GameMode GameState instance (ie, not PIE) so PIE crashes aren't modified. * Long Term: GameStateName - set via FCoreDelegates::GameStateClassChanged. * This works for ANY crash on ANY game. * Hooked up in GameState::HandleMatchIsWaitingToStart. #jira AT-1457 #jira AT-519 [CODEREVIEW] peter.knepley,josh.markiewicz #ROBOMERGE-SOURCE: CL 3600278 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3597593 by Ben.Zeigler #jira FORT-50722 Fix issues where AssetBundles weren't being correctly updated during cook, which is blocking both Noland and Abercrombie Partial copy of CL #3402335 and #3526538 #robomerge rp, rn Change 3597577 by Luke.Thatcher [FORTNITE] [PS4] [~] Modified the way memory is allocated on Playstation to make more memory available to the CPU. - Previously the amount of texture memory wasn╞t fixed due to the way the defrag memory is allocated on PS4. This meant we had to have a significant amount of slack. - With the new configuration, we have a guaranteed texture memory pool, so the slack can be significantly smaller, meaning we can give more memory to the CPU, which is where most of our memory pressure is. #jira FORT-50825 #jira FORT-49688 #jira FORT-49695 #jira FORT-50054 Change 3596556 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Enable GC clustering for actors and blueprints in Fortnite - This shaves off about 10 ms on GC frames in Athena on PS4 (~52 ms -> 42 ms) - Clustering doesn't work on building actors because they're very dynamic, but general Fort static meshes and blueprints are clustered! - This gets us into the realm of shippability on console for very large UObject counts [FYI] bob.tellez,peter.knepley,michael.noland #jira AT-1440 #ROBOMERGE-SOURCE: CL 3596552 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3593994 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Force largest distance field atlas size in Athena - We now force the largest distance field atlas size before preloading Athena content (512x512x1024 = 256 MB). This helps with load times because it's expensive to re-create this texture on consoles, and typically it gets resized over a dozen times. - Added new CVar "r.DistanceFields.ForceMaxAtlasSize" (defaults to zero) - Important: Currently we never "reset" this atlas texture. This will be a problem when going back to play Campaigns after preloading to play Athena. I will look into this soon! [CODEREVIEW] peter.knepley,marcus.wassmer,michael.noland,daniel.wright #jira AT-1477 #ROBOMERGE-SOURCE: CL 3593992 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592096 by robomerge #ROBOMERGE-AUTHOR: ben.salem Prototype of gauntlet memory soak test. Not fully fiinished, but want changes in tonight's cook so we can experiment on cooked build tomorrow morning. #jira FORT-0 #ROBOMERGE-SOURCE: CL 3592025 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592085 by robomerge #ROBOMERGE-AUTHOR: mike.fricker HLOD: Added support for a fixed distance override via CVar - Use this to force all HLODs to transition at a specific distance, regardless of their TransitionSize/MinDrawDistance/LODDrawDistance - New CVar: r.HLOD.DistanceOverride (defaults to 0) - Fortnite uses 350m for this distance, fornow [CODEREVIEW] jurre.debaare #jira AT-1462 #ROBOMERGE-SOURCE: CL 3591929 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3587391 by Michael.Noland Fortnite: Lots of memory tracking stuff - Added memory logging to game state transitions and overall health tracking for the entire session - Added support for Gauntlet-based tests to Fortnite - Enabled the Gauntlet plugin (and fixed spaces instead of tabs in the .uproject file) - Added code to set gauntlet state based on the current subclass of AFortGameState - Added a base controller and a memory report controller (WIP, ported from equivalents in Paragon) - Updated FortniteClient to use MALLOC_LEAKDETECTION=1, PLATFORM_USES_FIXED_GMalloc_CLASS=0, and AllowASLRInShipping=false in Development builds (may enable them in Test builds in a future CL, to match Paragon) #jira FORT-50567 Change 3583307 by Peter.Knepley Need non-jittered ViewToClip matrix in order to do "after tonemapper" postprocess blendable material that's positioned in view space Modify the AttachScope material function to use "ViewSpaceTransformToClipSpace" instead of going back to world space first. This also means it can utilitize the ViewToClipNoAA matrix. #jira AT-733 Change 3582378 by Luke.Thatcher [FORTNITE] [~] Unify Xbox and PS4 scalability settings and device profiles. - All Xbox and PS4 r. CVars are overriden in their platform's Scalability.ini file. The device profile only selects sg. groups. - Fixed the Neo 4K profile for Fortnite. Previously players with 4K monitors would choose the Neo_4K profile, which looks worse than Neo, but still renders at 1080p. - Console specific settings have to live in the Base/Default .ini's, as the cooker doesn't load the console specific files. This is fixed in UE4 Main. #jira FORT-50206 Change 3580934 by Luke.Thatcher [FORTNITE] [PS4] [+] Support different garlic and onion heap sizes in the old memory system for base and neo. - Neo has 512 MB more direct memory than a base kit. - Increased the garlic heap size by 416 MB on Neo, and CPU heap by 96 MB. #jira FORT-50206 Change 3576664 by Bart.Hawthorne Re-enable Oodle and add Mac implementation. Also includes fixed oodle libraries by MichaelT. #jira FORT-49986 #tests Connected to PC server with editor -game build on Mac in Athena Change 3575671 by Nick.Darnell Athena - The gameplay ability system now supports adding Gameplay Cue's with params. Now using cues instead of gameplay effects in order to notify when the bandaging/shielding begin and end. THe new method should properly show and disappear on time, b/c it's all client side. Added a way in the Athena Context to easily hook gameplay "UI" cues that are rebroadcast from the Athena Pawn. #jira AT-644 Change 3575534 by Peter.Knepley Ability montage replication optimizations #jira AT-955 Change 3573305 by Lukasz.Furman disabled path section update when crowd simulated AI is moving through navlink, fixed AI getting stuck in some corners #jira FORT-49748 Change 3566775 by John.Abercrombie Optimizations from Dev-Athena - Tested with PIE & and 2 Player local server game #ue4-athena - (merge CLs 3345771 and 3363030 from Framework) - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]. For Fortnite, set unthrottled (<= 10 player) limit to 60Hz (from 90Hz), and trying throttled at 30Hz (from 45Hz). #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545535 by Zak.Middleton on 2017/07/19 20:15:17. #ue4-athena - (merge CL 3377054 from Framework) - Fix CharacterMovementComponent updated with very high delta time on server when initially joining. Make sure the ServerTimeStamp is initialized to current world time rather than zero to prevent large delta. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545452 by Zak.Middleton on 2017/07/19 18:57:45. #athena - If network smoothing mode is not linear, don't replicate ReplicatedServerLastTransformUpdateTimeStamp. Only AI use linear smoothing in FN. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545559 by Zak.Middleton on 2017/07/19 20:47:18. #ue4-athena - Converted all RPCs on UCharacterMovementComponent to be on ACharacter instead, to avoid the bandwidth overhead of calling RPCs on a component. Existing overrides of _Implementation and _Validate functions should remain unchanged. If for some reason someone overrode the old RPC virtuals, those are now non-virtual on UCharacterMovementComponent but are still virtual on ACharacter. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3557564 by Zak.Middleton on 2017/07/26 20:13:43. #ue4-athena - Throttle character movement server corrections and acks to the client based on time since last adjustment. Cuts down on network traffic for character movement. Added configurable settings to control this. Set times to zero to disable this. - NetworkMinTimeBetweenClientAckGoodMove - NetworkMinTimeBetweenClientAdjustments - NetworkMinTimeBetweenClientAdjustmentsLargeCorrection - NetworkLargeClientCorrectionDistance #ue4-athena - Perf: (EditMerge CL 3492200 from Dev-Framework): Always reset the input array in AActor::GetComponents(), but do so without affecting allocated size. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561669 by Zak.Middleton on 2017/07/28 14:16:19. #ue4-athena - Perf: (EditMerge CL 3468253 from Dev-AnimPhys): Remove the need for calling constructors for physx PxRaycastHit in the dynamic hit result buffer. Saves 30% of the cost of doing small raycasts. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561672 by Zak.Middleton on 2017/07/28 14:17:12. #ue4-athena - Perf: (EditMerge CL 3359553 from Dev-Framework): Optimization in CharacterMovement tick to not extract transform values twice. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561674 by Zak.Middleton on 2017/07/28 14:18:04. #ue4-athena - Perf: (EditMerge CL 3426174 from Dev-Framework): Avoid call to virtual getSimulationFilterData() to only use it when needed in PreFilter if we actually have items in the IgnoreComponents list (which is rare). The sim filter data 'word2' stores the component ID. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561709 by Zak.Middleton on 2017/07/28 14:32:11. #ue4-athena - Perf: (EditMerge CL 3382054 from Dev-Framework): Optimize CharacterMovementComponent::GetPredictionData_Client_Character() and GetPredictionData_Server_Character() to remove virtual calls. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561856 by Zak.Middleton on 2017/07/28 15:11:57. #ue4-athena - Use less bandwidth for CharacterMovement RPCs when the character is not standing on any component (ie during jumps and falling). Added separate "...NoBase()" versions of ServerMove() and ServerMoveDual(). Undid part of 3557564 and restored the CMC functions to be virtual, and removed virtual keyword from matching Character functions, so that overrides are in one consistent place. Also guarantees backwards compat for licensees. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3564858 by Zak.Middleton on 2017/07/31 15:24:39. #jira Fort-1 Change 3562825 by Chris.Gagnon Added CommonCustomNavigation Widget, this widget can be used to capture navigation requests to handle in custom ways. #jira FORT-0 Change 3562098 by Josh.Markiewicz #UE4 Encryption token/ack changes - moved encryption token request/ack to delegates - moved FNetworkNotify to NetworkDelegates.h - moved connection logic out of GameInstance and back into networking code -- GameInstance sends an enum and the network code does the right thing based on that #review-3559694 @ryan.gerleve #tests PC dedicated server connections golden path and forced failures #jira FORT-0 Change 3559354 by Luke.Thatcher [FORTNITE] [PS4] [^] Merging (as edit) support for setting flip rate on PS4 (CLs 3555687 and 3558843) from //Fortnite/Dev-Athena/... to //Fortnite/Main/... - Allowed rates are now 60Hz, 30Hz and 20Hz. - Exposed by r.PS4FlipRate CVar, set to 60Hz by default. Requires r.Vsync 1. #jira FORT-49463 Change 3532644 by Jeff.Campeau Fix mapping current culture to movie audio channels using data table to map languages to track indices. Don't rewind cinematics (they all start from the begining because we load them and play them once). Seeks cause us to have to redecode video frames at a large perf cost. Delay cutscene playback by 0.5 seconds to give us time to build up a buffer of decoded video. (Temporary workaround for audio/video sync). Generic implementation for getting current languages in BP. Fix more issues with calling into media source functionality when using the source reader (potential hangs). #jira FORT-44376,FORT-48209,FORT-48040 #testedon Preflight from last night combined with Bob's changes from today clear all known issues. This change tested on Xbox and PC multiple times each. Change 3527761 by Chris.Gagnon Fixed various issues in the widget switcher, also added Advanced calls that allow the user to specify if activation/deactivation should occur. #jira FORT-47988, FORT-47984 Change 3525390 by Jeff.Campeau Remove media player log spam #jira FORT-47393 #testedon compiled client Change 3518692 by Chris.Gagnon Added CleanOperation Adding which will remove unneeded op combinations from the op queue. Also added the ability to suspend starting operation queue processing to allow complex operations to accumulate and in turn allow the Clean Op adding code to be effective. GameFeedback, and the widget switcer utilize this to avoid unnesacary activations of a screen that is immediately being deactivated. Root issue of the mentioned bug is that activation of the quest screen created a latent navigation du to the deferal of scrolling into view. This is still an issue in general, there isn't much we can do about it. Other than avoid activating a panel that will deactivated that frame as we did with the code changes in this CL. #jira FORT-47395 Change 3514658 by Jeff.Campeau Fixed a media player threading issue where the OnMediaOpened event could be called before the media Init script completed. Moved the event Cinematic used when setting up and playing media after media file load to use a delayed event from the MovieWidget so that it will always happen after the movie widget processing. Fixed an issue that could cause samples to leak in MfMedia plugin and cause ReadSample to lockup. Fixed an issue where a default texture is displayed for movies before the movie starts playing (the player may be active before the first frame of the video is decoded). Default is now all black as it is expected that this texture will be displayed for several frames. #jira FORT-46801 #testedon Xbox through rocket launch cinematic including vintertip for stairs, skill tree nodes, and victory result video Change 3507896 by Ryan.Gerleve Changed the net.UseEncryptionToken to be more useful and renamed it to net.AllowEncryption. This cvar, if 0, will prevent the PacketHandler from adding the configured encryption component, and prevent UPendingNetGame and AOnlineBeaconClient from filling out the EncryptionToken parameter of NMT_Hello - which prevents the extra encryption handshake connection step. #jira FORT-46878 #review-3507897 @josh.markiewicz Change 3503928 by Ryan.Gerleve Add safety checks around some of the encryption functionality. Fixes a server crash seen during load testing. #jira FORT-46772 #review-3503929 bob.tellez #robomerge ReleaseNext [CL 3673993 by Bob Tellez in Main branch]
2017-09-30 03:42:01 -04:00
// The maximum number of transient vertex buffer bytes to allocate before we start panic logging who is doing the allocations
int32 GMaxVertexBytesAllocatedPerFrame = 32 * 1024 * 1024;
FAutoConsoleVariableRef CVarMaxVertexBytesAllocatedPerFrame(
TEXT("r.MaxVertexBytesAllocatedPerFrame"),
GMaxVertexBytesAllocatedPerFrame,
TEXT("The maximum number of transient vertex buffer bytes to allocate before we start panic logging who is doing the allocations"));
int32 GGlobalBufferNumFramesUnusedThresold = 30;
FAutoConsoleVariableRef CVarReadBufferNumFramesUnusedThresold(
TEXT("r.NumFramesUnusedBeforeReleasingGlobalResourceBuffers"),
GGlobalBufferNumFramesUnusedThresold ,
TEXT("Number of frames after which unused global resource allocations will be discarded. Set 0 to ignore. (default=30)"));
int32 GVarDebugForceRuntimeBLAS = 0;
FAutoConsoleVariableRef CVarDebugForceRuntimeBLAS(
TEXT("r.Raytracing.DebugForceRuntimeBLAS"),
GVarDebugForceRuntimeBLAS,
TEXT("Force building BLAS at runtime."),
ECVF_ReadOnly);
FThreadSafeCounter FRenderResource::ResourceListIterationActive;
TArray<int32>& GetFreeIndicesList()
{
static TArray<int32> FreeIndicesList;
return FreeIndicesList;
}
TArray<FRenderResource*>& FRenderResource::GetResourceList()
{
static TArray<FRenderResource*> RenderResourceList;
return RenderResourceList;
}
/** Initialize all resources initialized before the RHI was initialized */
void FRenderResource::InitPreRHIResources()
{
// Notify all initialized FRenderResources that there's a valid RHI device to create their RHI resources for now.
FRenderResource::InitRHIForAllResources();
#if !PLATFORM_NEEDS_RHIRESOURCELIST
FRenderResource::GetResourceList().Empty();
#endif
}
void FRenderResource::ChangeFeatureLevel(ERHIFeatureLevel::Type NewFeatureLevel)
{
ENQUEUE_RENDER_COMMAND(FRenderResourceChangeFeatureLevel)(
[NewFeatureLevel](FRHICommandList& RHICmdList)
{
FRenderResource::ForAllResources([NewFeatureLevel](FRenderResource* Resource)
{
// Only resources configured for a specific feature level need to be updated
if (Resource->HasValidFeatureLevel() && (Resource->FeatureLevel != NewFeatureLevel))
{
Resource->ReleaseRHI();
Resource->ReleaseDynamicRHI();
Resource->FeatureLevel = NewFeatureLevel;
Resource->InitDynamicRHI();
Resource->InitRHI();
}
});
});
}
void FRenderResource::InitResource()
{
check(IsInRenderingThread());
if (ListIndex == INDEX_NONE)
{
int32 LocalListIndex = INDEX_NONE;
if (PLATFORM_NEEDS_RHIRESOURCELIST || !GIsRHIInitialized)
{
LLM_SCOPE(ELLMTag::SceneRender);
TArray<FRenderResource*>& ResourceList = GetResourceList();
TArray<int32>& FreeIndicesList = GetFreeIndicesList();
// If resource list is currently being iterated, new resources must be added to the end of the list, to ensure they're processed during the iteration
// Otherwise empty slots in the list may be re-used for new resources
if (FreeIndicesList.Num() > 0 && ResourceListIterationActive.GetValue() == 0)
{
LocalListIndex = FreeIndicesList.Pop();
check(ResourceList[LocalListIndex] == nullptr);
ResourceList[LocalListIndex] = this;
}
else
{
LocalListIndex = ResourceList.Add(this);
}
}
else
{
// Mark this resource as initialized
LocalListIndex = 0;
}
if (GIsRHIInitialized)
{
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(InitRenderResource);
InitDynamicRHI();
InitRHI();
}
FPlatformMisc::MemoryBarrier(); // there are some multithreaded reads of ListIndex
ListIndex = LocalListIndex;
}
}
void FRenderResource::ReleaseResource()
{
if ( !GIsCriticalError )
{
check(IsInRenderingThread());
if(ListIndex != INDEX_NONE)
{
if(GIsRHIInitialized)
{
ReleaseRHI();
ReleaseDynamicRHI();
}
#if PLATFORM_NEEDS_RHIRESOURCELIST
TArray<FRenderResource*>& ResourceList = GetResourceList();
TArray<int32>& FreeIndicesList = GetFreeIndicesList();
ResourceList[ListIndex] = nullptr;
FreeIndicesList.Add(ListIndex);
#endif
ListIndex = INDEX_NONE;
}
}
}
void FRenderResource::UpdateRHI()
{
check(IsInRenderingThread());
if(IsInitialized() && GIsRHIInitialized)
{
ReleaseRHI();
ReleaseDynamicRHI();
InitDynamicRHI();
InitRHI();
}
}
FRenderResource::~FRenderResource()
{
if (IsInitialized() && !GIsCriticalError)
{
// Deleting an initialized FRenderResource will result in a crash later since it is still linked
UE_LOG(LogRendererCore, Fatal,TEXT("A FRenderResource was deleted without being released first!"));
}
}
void BeginInitResource(FRenderResource* Resource)
{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3694557) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3495522 by Rolando.Caloca DR - Enable gpu skinning on Vulkan Change 3681208 by Jian.Ru Force bCastShadowAsMasked to false for opaque materials; Disable UI check box of bCastShadowAsMasked when blend mode is opaque or modulated Change 3682631 by Rolando.Caloca DR - Copy 3682626 Fix recompute tangents not being applied to different sections Change 3684812 by Arne.Schober DR - Fix a crash and a Masterfile issue Change 3684833 by Marcus.Wassmer Fix more non-unity issues Change 3685236 by Arne.Schober DR - Fix some issues with Particles e.g stride was meant to be set to repeat and also subUV needs to be taken care of Change 3685247 by Arne.Schober DR - accidentally removed bracket Change 3686764 by Daniel.Wright In uncooked Feature Level ES2, fixed reflection capture data getting tossed in PostLoad when it is needed for encoding in OnRegister. Change 3686775 by Marcus.Wassmer Fix bad merge Change 3687022 by Marcus.Wassmer Fix Win32 compiles Change 3687355 by Rolando.Caloca DR - Copy 3687334 Fix for odd Vulkan crash Change 3687537 by Arne.Schober DR - Making StaticArray faster as PSO descriptor uses them intensively (5ms in one infiltrator scene on PS4) Rewrote integer sequence to use fewer template instantiations for faster compile times and larger sequence support. Change 3687546 by Arne.Schober DR - Remove unnecessary virtuals and recounts Change 3688128 by Rolando.Caloca DR - Fix Linux compile error, rename Elements macro to GetNumArrayElements Change 3688140 by Rolando.Caloca DR - Linux warning fix Change 3688190 by Mark.Satterthwaite Use the correct #define for determining whether we are compiling for Metal in general, rather that only doing so for Metal + Mobile rendering. Should fix the skin-cache rendering. #jira UE-50912 Change 3688689 by Chris.Bunner Static analysis fixes. Change 3688948 by Chris.Bunner More static analysis fixes. Change 3689116 by Arne.Schober DR - [UE-51015] - moving alignment specifier Change 3690645 by Marcus.Wassmer Restore per-element align for TStaticArray Change 3690801 by Jian.Ru Marcus's fix FStaticMeshVertexFactories::ReleaseResources #jira UE-51093 Change 3690809 by Rolando.Caloca DR - Copy 3690806 Fix Anisotropic not working on Vulkan Change 3690874 by Benn.Gallagher Fix for index buffer overflow and clothing upgrade warnings. #jira UE-51026 Change 3691221 by Jian.Ru Fix log spam when -d3ddebug #jira UE-50977 Change 3691291 by Marcus.Wassmer Move global dynamic buffer commits to before GPU FX rendering. Fixes d3derror in ES2 preview. The more subtle issue I believe is that the d3d11statecache is leaving streams bound for too long, but that requires more investigation #jira UE-51058 Change 3691361 by Rolando.Caloca DR - Fix resources not getting destroyed at RHI destruction time #jira UE-51057 Change 3691607 by Arne.Schober DR - interface change requested by Steve Change 3691662 by Marcus.Wassmer Fix one bit of d3dwarning. Need a 16 byte minimum to make 0 stride vbuffer happy for colors. Change 3692268 by Rolando.Caloca DR - vk - Keep a reference to a buffer to avoid deletion - Fixes crash in Paragon Change 3692403 by Jian.Ru Marcus's fix on automation test failure Change 3692443 by Jian.Ru Back out changelist 3692403 Change 3692455 by Marcus.Wassmer Fix automation failure in tile rendering. Can't setdata for vertexfactories on the gamethread Change 3692566 by Marcus.Wassmer Fix clang compiles Change 3692664 by Chris.Bunner Updated default editor skeletal mesh. Change 3692675 by Marcus.Wassmer Make the behavior of FCanvasTileRendererItem::FRenderData actually match the comment. Fixes automation crash. Change 3692692 by Jian.Ru Fix a bug where only the first slice of 3d textures are cleared on XboxOne; Fix a rendering artifact when r.TranslucentLightingVolume is 0 #jira UE-50636 Change 3693043 by Arne.Schober DR - [UE-51173]- Fixing Instanced Rendering Vertexbuffer SRV Resources not getting initzialized and re-set onto the vertexfactory after the Buffer has been updated Change 3693284 by Marcus.Wassmer Duplicate 3682248. Fix for debug canvas draw randomly corrupting memory Change 3693360 by Rolando.Caloca DR - Fix material events not showing up in RenderDoc Change 3693549 by Marcus.Wassmer Fix incorrect flag check Change 3693575 by Arne.Schober DR - null size check on StaticMeshVertexData Change 3693677 by Marcus.Wassmer Make double plus sure the copy is a valid size Change 3694155 by Marcus.Wassmer Generate correct strides for vertexfactories depending on whether color will be overridden or not by the component. Fixes WEX and probably other similar bugs. ALSO fix horrible longstanding bug in OpenGL VertexDeclaration cache. Strides not part of the operator== of the key so collisions/map walks would sometimes return the wrong decl with the wrong set of streamstrides. D3D has the same problem, causing spurious D3D warnings but I haven't fixed it yet. Change 3694156 by Marcus.Wassmer This doesn't really matter because the decl is created dynamically but the stream elements might as well be right if we're gonna have them Change 3694470 by Benn.Gallagher Fixed crash fixing up clothing sections index buffers in specific Unreal Tournament asset with modified oversized index buffer. #jira UE-51207 Change 3694557 by Chris.Bunner Static analysis and potential memory leak fix. Change 3684284 by Arne.Schober Manual Vfetch for StaticMeshes Skelmeshes also use the new Layout Skelmeshes use DDC Copying //UE4/Dev-Rendering-PSO to Dev-Rendering (//UE4/Dev-Rendering) Change 3689555 by Arne.Schober DR - Fix performance regession cause by not sharing VertexFactory ptr in the static drawlist [CL 3694667 by Marcus Wassmer in Main branch]
2017-10-13 11:32:28 -04:00
ENQUEUE_RENDER_COMMAND(InitCommand)(
[Resource](FRHICommandListImmediate& RHICmdList)
{
Resource->InitResource();
});
}
void BeginUpdateResourceRHI(FRenderResource* Resource)
{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3694557) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3495522 by Rolando.Caloca DR - Enable gpu skinning on Vulkan Change 3681208 by Jian.Ru Force bCastShadowAsMasked to false for opaque materials; Disable UI check box of bCastShadowAsMasked when blend mode is opaque or modulated Change 3682631 by Rolando.Caloca DR - Copy 3682626 Fix recompute tangents not being applied to different sections Change 3684812 by Arne.Schober DR - Fix a crash and a Masterfile issue Change 3684833 by Marcus.Wassmer Fix more non-unity issues Change 3685236 by Arne.Schober DR - Fix some issues with Particles e.g stride was meant to be set to repeat and also subUV needs to be taken care of Change 3685247 by Arne.Schober DR - accidentally removed bracket Change 3686764 by Daniel.Wright In uncooked Feature Level ES2, fixed reflection capture data getting tossed in PostLoad when it is needed for encoding in OnRegister. Change 3686775 by Marcus.Wassmer Fix bad merge Change 3687022 by Marcus.Wassmer Fix Win32 compiles Change 3687355 by Rolando.Caloca DR - Copy 3687334 Fix for odd Vulkan crash Change 3687537 by Arne.Schober DR - Making StaticArray faster as PSO descriptor uses them intensively (5ms in one infiltrator scene on PS4) Rewrote integer sequence to use fewer template instantiations for faster compile times and larger sequence support. Change 3687546 by Arne.Schober DR - Remove unnecessary virtuals and recounts Change 3688128 by Rolando.Caloca DR - Fix Linux compile error, rename Elements macro to GetNumArrayElements Change 3688140 by Rolando.Caloca DR - Linux warning fix Change 3688190 by Mark.Satterthwaite Use the correct #define for determining whether we are compiling for Metal in general, rather that only doing so for Metal + Mobile rendering. Should fix the skin-cache rendering. #jira UE-50912 Change 3688689 by Chris.Bunner Static analysis fixes. Change 3688948 by Chris.Bunner More static analysis fixes. Change 3689116 by Arne.Schober DR - [UE-51015] - moving alignment specifier Change 3690645 by Marcus.Wassmer Restore per-element align for TStaticArray Change 3690801 by Jian.Ru Marcus's fix FStaticMeshVertexFactories::ReleaseResources #jira UE-51093 Change 3690809 by Rolando.Caloca DR - Copy 3690806 Fix Anisotropic not working on Vulkan Change 3690874 by Benn.Gallagher Fix for index buffer overflow and clothing upgrade warnings. #jira UE-51026 Change 3691221 by Jian.Ru Fix log spam when -d3ddebug #jira UE-50977 Change 3691291 by Marcus.Wassmer Move global dynamic buffer commits to before GPU FX rendering. Fixes d3derror in ES2 preview. The more subtle issue I believe is that the d3d11statecache is leaving streams bound for too long, but that requires more investigation #jira UE-51058 Change 3691361 by Rolando.Caloca DR - Fix resources not getting destroyed at RHI destruction time #jira UE-51057 Change 3691607 by Arne.Schober DR - interface change requested by Steve Change 3691662 by Marcus.Wassmer Fix one bit of d3dwarning. Need a 16 byte minimum to make 0 stride vbuffer happy for colors. Change 3692268 by Rolando.Caloca DR - vk - Keep a reference to a buffer to avoid deletion - Fixes crash in Paragon Change 3692403 by Jian.Ru Marcus's fix on automation test failure Change 3692443 by Jian.Ru Back out changelist 3692403 Change 3692455 by Marcus.Wassmer Fix automation failure in tile rendering. Can't setdata for vertexfactories on the gamethread Change 3692566 by Marcus.Wassmer Fix clang compiles Change 3692664 by Chris.Bunner Updated default editor skeletal mesh. Change 3692675 by Marcus.Wassmer Make the behavior of FCanvasTileRendererItem::FRenderData actually match the comment. Fixes automation crash. Change 3692692 by Jian.Ru Fix a bug where only the first slice of 3d textures are cleared on XboxOne; Fix a rendering artifact when r.TranslucentLightingVolume is 0 #jira UE-50636 Change 3693043 by Arne.Schober DR - [UE-51173]- Fixing Instanced Rendering Vertexbuffer SRV Resources not getting initzialized and re-set onto the vertexfactory after the Buffer has been updated Change 3693284 by Marcus.Wassmer Duplicate 3682248. Fix for debug canvas draw randomly corrupting memory Change 3693360 by Rolando.Caloca DR - Fix material events not showing up in RenderDoc Change 3693549 by Marcus.Wassmer Fix incorrect flag check Change 3693575 by Arne.Schober DR - null size check on StaticMeshVertexData Change 3693677 by Marcus.Wassmer Make double plus sure the copy is a valid size Change 3694155 by Marcus.Wassmer Generate correct strides for vertexfactories depending on whether color will be overridden or not by the component. Fixes WEX and probably other similar bugs. ALSO fix horrible longstanding bug in OpenGL VertexDeclaration cache. Strides not part of the operator== of the key so collisions/map walks would sometimes return the wrong decl with the wrong set of streamstrides. D3D has the same problem, causing spurious D3D warnings but I haven't fixed it yet. Change 3694156 by Marcus.Wassmer This doesn't really matter because the decl is created dynamically but the stream elements might as well be right if we're gonna have them Change 3694470 by Benn.Gallagher Fixed crash fixing up clothing sections index buffers in specific Unreal Tournament asset with modified oversized index buffer. #jira UE-51207 Change 3694557 by Chris.Bunner Static analysis and potential memory leak fix. Change 3684284 by Arne.Schober Manual Vfetch for StaticMeshes Skelmeshes also use the new Layout Skelmeshes use DDC Copying //UE4/Dev-Rendering-PSO to Dev-Rendering (//UE4/Dev-Rendering) Change 3689555 by Arne.Schober DR - Fix performance regession cause by not sharing VertexFactory ptr in the static drawlist [CL 3694667 by Marcus Wassmer in Main branch]
2017-10-13 11:32:28 -04:00
ENQUEUE_RENDER_COMMAND(UpdateCommand)(
[Resource](FRHICommandListImmediate& RHICmdList)
{
Resource->UpdateRHI();
});
}
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3345728) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3315219 on 2017/02/21 by Steve.Robb Fix for FObjectAndNameAsStringProxyArchive when serializing a TWeakObjectPtr. Change 3315285 on 2017/02/21 by Steve.Robb Explicitly pass string builder into code generation functions. Change 3315341 on 2017/02/21 by Ben.Marsh UAT: Clean up some formatting in StreamCopyDescription output - remove #fyi lines, exclude merge commits, and remove some blank lines. Change 3315350 on 2017/02/21 by Ben.Marsh Fix shared resource files not being rebuilt if the version header changes. Change 3315823 on 2017/02/21 by Ben.Marsh UAT: Use a class derived from AutomationException to return information specific to commandlets failing, rather than putting it in the base class. Change 3315826 on 2017/02/21 by Ben.Marsh UAT: Move Distiller class from general use in UAT; FileFilter provides a much safer and fully featured implementation of the same concepts. Change 3315857 on 2017/02/21 by Ben.Marsh UBT: Remove the StripBaseDirectory() and MakeRerootedFilePath() utility functions from UBT. These operations can now be done more safely with FileReference objects. Change 3315942 on 2017/02/21 by Ben.Marsh UBT: Convert FileFilter to use FileReference and DirectoryReference arguments everywhere. Change 3316236 on 2017/02/22 by Maciej.Mroz #jira UE-42045 Nativization Fixed Warning: TEnumAsByte is not intended for use with enum Change 3316253 on 2017/02/22 by Robert.Manuszewski Fixes for the async log file writer hangs and crashes. - potential fix for the logging system hang when running out of disk space while flushing log - fix for unexpected concurrency assert when flushing the log buffer to disk Change 3316293 on 2017/02/22 by Steve.Robb GetTypeHash and lexicographical comparison operators (operator<() etc.) for TTuple. Change 3316342 on 2017/02/22 by Maciej.Mroz Nativization: Wrappers (stubs) required only by other wrappers are properly generated. #codereview: Mike.Beach Change 3316344 on 2017/02/22 by Maciej.Mroz Fixed crash in nativized Odin Async loading properly handles nativized structs. Change 3316359 on 2017/02/22 by Steve.Robb GitHub #3287 : Ignore #pragma in USTRUCTs #jira UE-42248 Change 3316389 on 2017/02/22 by Matthew.Griffin Switched Installed Engine Filters to multiline properties to make them more readable Added Oodle to list of excluded plugins #jira UE-42030 Change 3316392 on 2017/02/22 by Ben.Marsh UBT: Split out FileReference/DirectoryReference classes into their own file. Change 3316394 on 2017/02/22 by Ben.Marsh UBT: Move FileReference/DirectoryReference extension methods into the appropriate file. Change 3316411 on 2017/02/22 by Ben.Marsh UAT: Remove file functions that take multiple arguments. There's not really a compelling use case for these to exist over looping from the calling code. Change 3316446 on 2017/02/22 by Ben.Marsh UAT: Try disabling function name prefix to log output from UAT, to see if it improves readability. Function names are still included in the log file for debugging. Change 3316575 on 2017/02/22 by Ben.Marsh UAT: Remove unused functionality for dealing with labels, and output a more human readable list of P4 settings at startup. Change 3318481 on 2017/02/22 by Steve.Robb Use of FMath::IsPowerOfTwo in check. Static assert to ensure that an inline set allocator will have a hash size of a power of two. Change 3318496 on 2017/02/22 by Steve.Robb Fix for TSet visualizers. Change 3318919 on 2017/02/23 by Steve.Robb Fix for hot reloading UScriptStruct-derived objects in a module, where the CDOs of these objects haven't had PrepareCppStructOps() called on them. #jira UE-42178 Change 3318942 on 2017/02/23 by Steve.Robb Removal of a redundant insertion which can cause problems on reallocation of the map. Change 3319010 on 2017/02/23 by Ben.Marsh UBT: Fix exception when a file that was previously part of the working set is deleted. Change 3319134 on 2017/02/23 by Robert.Manuszewski Better fix for a deadlock when flushing log while it's already being flushed due to flush timer on the async log writer thread. Change 3319249 on 2017/02/23 by Matthew.Griffin Added a function to check if running with debug game libs instead of checking command line in multiple places Added -RunConfig parameter, which has equivalent result to -debug if value of parameter starts with 'debug' Added -RunConfig=$(Configuration) as a default commandline argument for Mac so that editor can use debug game libs Removed -Shipping argument from VCProject generation as it's not used anymore Change 3319253 on 2017/02/23 by Maciej.Mroz #jira UE-41846 New mechanism to gather modules necessary for Nativized Assets. The modules are listed based on included headers. Previously the dependencies was gathered only in FBlueprintNativeCodeGenManifest::GatherModuleDependencies. Change 3319591 on 2017/02/23 by Ben.Marsh Don't strip prefixes beginning with WARNING: or ERROR: using the Postp filter. Change 3320357 on 2017/02/23 by Steven.Hutton Slight changes to Add Crash method - Returning select fields instead of entity objects in queries for perf reasons. Change 3320361 on 2017/02/23 by Steven.Hutton Performance improvements subsequent to the recent database changes. Change 3320446 on 2017/02/23 by Steven.Hutton adding my temporary performance tracker class - reports to a private slack channel with add crash performance data. Change 3320479 on 2017/02/23 by Ben.Marsh Fix CIS errors. Change 3320576 on 2017/02/23 by Jin.Zhang Update CrashReporter to use AWS Change 3320742 on 2017/02/23 by Jin.Zhang Merging crash caching Change 3321119 on 2017/02/24 by Robert.Manuszewski DLL injection protection support for non-monolithic builds Change 3323308 on 2017/02/27 by Matthew.Griffin Moved compilation of SwarmInterface after its dependencies so that we will see a build failure immediately if they change version in future Change 3323423 on 2017/02/27 by Chad.Garyet Adding a script to check and warn about csproj targeted .net versions being mismatched #JIRA UE-39624 Change 3323442 on 2017/02/27 by Ben.Marsh UBT: Output an error if an engine module references a game module. Change 3323743 on 2017/02/27 by Ben.Marsh PR #3303: Resolved PVS scan issues (Contributed by projectgheist) Change 3323748 on 2017/02/27 by Ben.Marsh Convert whitespace to tabs. Change 3324851 on 2017/02/28 by Chris.Wood Add Odin symbol locations to engine config for MDD on CR server. NotForLicensees Change 3324979 on 2017/02/28 by Gil.Gribb Fixed bad merge of priority change in the EDL. Change 3326889 on 2017/03/01 by Steven.Hutton Update to buggs controller to generate faster queries. Change 3326910 on 2017/03/01 by Robert.Manuszewski Removing legacy #if from PackageFileSummary. Change 3327118 on 2017/03/01 by Gil.Gribb UE4 - Fixed race that resulted in a memory leak when reading compressed paks. Change 3327633 on 2017/03/01 by Gil.Gribb UE4 - Added a cvar to control the pak precacher thottle. Change 3327674 on 2017/03/01 by Steve.Robb Unified boilerplate between all generated code files. Change 3328544 on 2017/03/01 by Chris.Wood CrashReportProcess.config update (CRP v1.2.17) Tweaks to a few values. Update website URL to explicitly point to old, non-cloud site on devweb-02. Change 3328714 on 2017/03/01 by Chris.Wood Correct CRP config regression. Point website at new cloud site. Still v1.2.17 Change 3329192 on 2017/03/02 by Matthew.Griffin Added Shared Build Id file to the list of Precompiled Build Dependencies in a target receipt so that it's brought into an installed build Change 3329285 on 2017/03/02 by Ben.Marsh UGS: Allow a project to specify a filters for the streams that should be displayed for fast-switching to. The QuickSelectStreamList seting in the [Options] section of the project settings references a depot path containing a list of strings used to filter the stream list. An option is shown to switch back to showing all available streams, if desired. Change 3330636 on 2017/03/02 by Ben.Marsh UBT: Bump version number of C++ include cache to force it to be rebuilt with additional include information for the default RC files. Change 3331262 on 2017/03/03 by Robert.Manuszewski Merging Dev-LoadTimes to Dev-Core (Garbage Collection performance improvements) - Improved GC multithreading - Improved BeginDestroy performance - Introduced ULevelActorCluster for StaticMeshActor and ReflectionCapture actor clustering (can be toggled through project settings or console command gc.ActorClusterEnabled) - A few improvements to AddReferencedObjects functions - Misc improvements to GC code - Garbage Collector now properly handles clusters which had their objects marked as pending kill - Blueprints can now create clusters too (can be toggled through project settings or console command gc.BlueprintClusteringEnabled, defaults to disabled) Change 3331285 on 2017/03/03 by Robert.Manuszewski A few fixes for the previous check-in. Change 3332001 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN file containing the valid settings for BuildConfiguration.xml. Pass -configdoc=<filename> on the command line to generate such a file. Change 3332022 on 2017/03/03 by Ben.Marsh Update documentation for where to find the BuildConfiguration settings. Change 3332031 on 2017/03/03 by Ben.Marsh Remove documentation for Windows XP support; it has been removed in the 4.16 release. Change 3332256 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN page containing module and target settings. Change 3332458 on 2017/03/03 by Ben.Marsh UBT: Improvements to generated documentation. Change 3332459 on 2017/03/03 by Ben.Marsh Add generated documentation for .target.cs files, .build.cs files, and BuildConfiguration.xml files. Change 3332460 on 2017/03/03 by Ben.Marsh UBT: Make LinkTypePrivate actually private, so it doesn't show up in the docs. Change 3332899 on 2017/03/06 by Robert.Manuszewski Making sure actor clustering is not used in the editor (fix for actors being deleted when GC runs in the editor) #jira UE-42548 Change 3332955 on 2017/03/06 by Maciej.Mroz Nativization distinguishes client and server platform: - Separated lists on additional assets, additional modules, excluded assets, excluded modules, excluded paths (in config) - Context (compilation options, nativization options and platform) is deliveren to BPCOmpilerCppBackend in FCompilerNativizationOptions struct. - Wrappers (for unconverted BPs) are created only when they are directly called. - Fortnite dedicated server can be nativized Change 3332990 on 2017/03/06 by Ben.Marsh UBT: Add more comprehensive wrapper methods for System.IO.File and System.IO.Directory to FileReference and DirectoryReference. Change 3333032 on 2017/03/06 by Ben.Marsh Documentation for build tools Change 3333037 on 2017/03/06 by Ben.Marsh Add a build step to extract UAT and UBT documentation from XML comments. Change 3333089 on 2017/03/06 by Ben.Marsh UAT: Re-enable logging the calling function to the console in UAT. Needs a pass for readability first. Change 3333651 on 2017/03/06 by Gil.Gribb UE4 - Fix a werid recursive situation where StaticLoadObject could return an object that has not finished loading. Also produces a fatal error if this sometimes happens. EDL only. Change 3335236 on 2017/03/07 by Ben.Marsh UGS: Set the sync changelist separately to the compatibility changelist. Change 3335261 on 2017/03/07 by Gil.Gribb UE4 - Fixed batched render fences when BeginDestroy calls FlushRenderingCommands. Change 3335740 on 2017/03/07 by Gil.Gribb maybe fix static analysis warning Change 3335945 on 2017/03/07 by Steve.Robb Move FFindInstancedReferenceSubobjectHelper code out of header. Add map/set property support to allow instanced members of these container types to be handled during CPFUO. https://udn.unrealengine.com/questions/349232/tmap-with-instanced-object-as-value-gets-cleared-o.html Change 3336693 on 2017/03/07 by Ben.Marsh UBT: Use shared PCHs for game plugins by default, to reduce time spent generating individual PCHs. Change 3336694 on 2017/03/07 by Steve.Robb Static assert added to TMap to prevent the use of keys which don't implement a GetTypeHash. Fixes to types which relied on implicit conversions when calling GetTypeHash. Workaround in SAssetView.h and PropertyEditorModule.h for an apparent VC bug where the compiler wrongly instantiates TPointerIsConvertibleFromTo for certain forward-declared types, causing future TSharedPtr conversions to fail. #jira UE-42441 Change 3336698 on 2017/03/07 by Steve.Robb Hardcoded endpoint handling replaced with a generic string. Obsolete .proto and .java code generation removed. Change 3336811 on 2017/03/07 by Wes.Hunt Add a game blacklist to the crash report processor. Fixed a syntax error in Config.cs, added a XML comment to shut up a warning. Change 3336973 on 2017/03/08 by Steve.Robb Fix for missing GetTypeHash in a plugin. Change 3336996 on 2017/03/08 by Steve.Robb Significant refactor of code generation, to try and make data flow more apparent. Change 3337571 on 2017/03/08 by Steve.Robb CIS fixes for missing GetTypeHash functions. Non-unity fix. Change 3337588 on 2017/03/08 by Gil.Gribb UE4 - Fixed obscure check with flushing rhi resources. Change 3337620 on 2017/03/08 by Steve.Robb WITH_HOT_RELOAD_CTORS macros removed. UseVTableConstructors config option removed. Change 3339369 on 2017/03/09 by Steve.Robb GetTypeHash overload for nn::account::Uid. Change 3339464 on 2017/03/09 by Daniel.Lamb Fixed assert in 4.15 to do with trying to gather dependency info from invalid packages. #jira UE-42583 #test Editor + Cook + Run shootergame Change 3339465 on 2017/03/09 by Maciej.Mroz Fixed serialization issue, after UserDefinedEnum was used in EnumProperty. Change 3339469 on 2017/03/09 by Maciej.Mroz Fixed Nativization problem, when default value is passed as non-const reference. Change 3340178 on 2017/03/09 by Daniel.Lamb Added support for in memory only packages. The Cooker ignores these and added core functions to recognize these packages. Other systems will need to add support where nessisary. Change 3341002 on 2017/03/10 by Maciej.Mroz Nativization: Fixed FFindHeadersToInclude. Headers necessary for owners of subobjects are properly included. Change 3341076 on 2017/03/10 by Steve.Robb Fix for FBakedTextureSourceInfo move semantics. #jira UE-42658 Change 3341160 on 2017/03/10 by Gil.Gribb UE4 - Fix hazard with SetMaterialUsage from a thread. Change 3341409 on 2017/03/10 by Steve.Robb Reduction of the generated code size for StaticRegisterNatives functions. Change 3341523 on 2017/03/10 by Steve.Robb Code generation simplified. Change 3341800 on 2017/03/10 by Ben.Marsh UnrealVS: Fix UnrealVS compatibility with RTM version of Visual Studio 2017. 2017 toolchain for extensions is no longer able to build <= 2015 extensions due to validation of the VSIX manifest, so create a separate solution for it. Change 3342034 on 2017/03/10 by Ben.Marsh Fix compiler setting not being loaded correctly into the Windows target settings dialog. #jira UE-42746 Change 3342041 on 2017/03/10 by Ben.Marsh Fix -ErrorOnEngineContentUse not being set in the cooker options correctly. Change 3342094 on 2017/03/10 by Steve.Robb Fix to deteministic name order during code generation. Change 3342251 on 2017/03/10 by Daniel.Lamb Integrate fix for resave lightmaps commandlet when upgrading from no mapbuilddatapackages to mapbuilddatapackages. #thanks Tim.Hagberg #test None Change 3342961 on 2017/03/13 by Robert.Manuszewski Fixing memory leak when playing while running -nullrhi on the commandline in cooked games caused by shader resources not being destroyed. #jira FORT-38977 Change 3343022 on 2017/03/13 by Steve.Robb GetTypeHash fixes for FUniqueNetIdLive. #jira UE-42788 Change 3343448 on 2017/03/13 by Steve.Robb Compiled-in defer object order fixed. Debuggability of the deferred registration map improved. #jira UE-42828 [CL 3345747 by Ben Marsh in Main branch]
2017-03-14 15:48:33 -04:00
struct FBatchedReleaseResources
{
enum
{
NumPerBatch = 16
};
int32 NumBatch;
FRenderResource* Resources[NumPerBatch];
FBatchedReleaseResources()
{
Reset();
}
void Reset()
{
NumBatch = 0;
}
void Execute()
{
for (int32 Index = 0; Index < NumBatch; Index++)
{
Resources[Index]->ReleaseResource();
}
Reset();
}
void Flush()
{
if (NumBatch)
{
const FBatchedReleaseResources BatchedReleaseResources = *this;
ENQUEUE_RENDER_COMMAND(BatchReleaseCommand)(
[BatchedReleaseResources](FRHICommandList& RHICmdList)
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3345728) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3315219 on 2017/02/21 by Steve.Robb Fix for FObjectAndNameAsStringProxyArchive when serializing a TWeakObjectPtr. Change 3315285 on 2017/02/21 by Steve.Robb Explicitly pass string builder into code generation functions. Change 3315341 on 2017/02/21 by Ben.Marsh UAT: Clean up some formatting in StreamCopyDescription output - remove #fyi lines, exclude merge commits, and remove some blank lines. Change 3315350 on 2017/02/21 by Ben.Marsh Fix shared resource files not being rebuilt if the version header changes. Change 3315823 on 2017/02/21 by Ben.Marsh UAT: Use a class derived from AutomationException to return information specific to commandlets failing, rather than putting it in the base class. Change 3315826 on 2017/02/21 by Ben.Marsh UAT: Move Distiller class from general use in UAT; FileFilter provides a much safer and fully featured implementation of the same concepts. Change 3315857 on 2017/02/21 by Ben.Marsh UBT: Remove the StripBaseDirectory() and MakeRerootedFilePath() utility functions from UBT. These operations can now be done more safely with FileReference objects. Change 3315942 on 2017/02/21 by Ben.Marsh UBT: Convert FileFilter to use FileReference and DirectoryReference arguments everywhere. Change 3316236 on 2017/02/22 by Maciej.Mroz #jira UE-42045 Nativization Fixed Warning: TEnumAsByte is not intended for use with enum Change 3316253 on 2017/02/22 by Robert.Manuszewski Fixes for the async log file writer hangs and crashes. - potential fix for the logging system hang when running out of disk space while flushing log - fix for unexpected concurrency assert when flushing the log buffer to disk Change 3316293 on 2017/02/22 by Steve.Robb GetTypeHash and lexicographical comparison operators (operator<() etc.) for TTuple. Change 3316342 on 2017/02/22 by Maciej.Mroz Nativization: Wrappers (stubs) required only by other wrappers are properly generated. #codereview: Mike.Beach Change 3316344 on 2017/02/22 by Maciej.Mroz Fixed crash in nativized Odin Async loading properly handles nativized structs. Change 3316359 on 2017/02/22 by Steve.Robb GitHub #3287 : Ignore #pragma in USTRUCTs #jira UE-42248 Change 3316389 on 2017/02/22 by Matthew.Griffin Switched Installed Engine Filters to multiline properties to make them more readable Added Oodle to list of excluded plugins #jira UE-42030 Change 3316392 on 2017/02/22 by Ben.Marsh UBT: Split out FileReference/DirectoryReference classes into their own file. Change 3316394 on 2017/02/22 by Ben.Marsh UBT: Move FileReference/DirectoryReference extension methods into the appropriate file. Change 3316411 on 2017/02/22 by Ben.Marsh UAT: Remove file functions that take multiple arguments. There's not really a compelling use case for these to exist over looping from the calling code. Change 3316446 on 2017/02/22 by Ben.Marsh UAT: Try disabling function name prefix to log output from UAT, to see if it improves readability. Function names are still included in the log file for debugging. Change 3316575 on 2017/02/22 by Ben.Marsh UAT: Remove unused functionality for dealing with labels, and output a more human readable list of P4 settings at startup. Change 3318481 on 2017/02/22 by Steve.Robb Use of FMath::IsPowerOfTwo in check. Static assert to ensure that an inline set allocator will have a hash size of a power of two. Change 3318496 on 2017/02/22 by Steve.Robb Fix for TSet visualizers. Change 3318919 on 2017/02/23 by Steve.Robb Fix for hot reloading UScriptStruct-derived objects in a module, where the CDOs of these objects haven't had PrepareCppStructOps() called on them. #jira UE-42178 Change 3318942 on 2017/02/23 by Steve.Robb Removal of a redundant insertion which can cause problems on reallocation of the map. Change 3319010 on 2017/02/23 by Ben.Marsh UBT: Fix exception when a file that was previously part of the working set is deleted. Change 3319134 on 2017/02/23 by Robert.Manuszewski Better fix for a deadlock when flushing log while it's already being flushed due to flush timer on the async log writer thread. Change 3319249 on 2017/02/23 by Matthew.Griffin Added a function to check if running with debug game libs instead of checking command line in multiple places Added -RunConfig parameter, which has equivalent result to -debug if value of parameter starts with 'debug' Added -RunConfig=$(Configuration) as a default commandline argument for Mac so that editor can use debug game libs Removed -Shipping argument from VCProject generation as it's not used anymore Change 3319253 on 2017/02/23 by Maciej.Mroz #jira UE-41846 New mechanism to gather modules necessary for Nativized Assets. The modules are listed based on included headers. Previously the dependencies was gathered only in FBlueprintNativeCodeGenManifest::GatherModuleDependencies. Change 3319591 on 2017/02/23 by Ben.Marsh Don't strip prefixes beginning with WARNING: or ERROR: using the Postp filter. Change 3320357 on 2017/02/23 by Steven.Hutton Slight changes to Add Crash method - Returning select fields instead of entity objects in queries for perf reasons. Change 3320361 on 2017/02/23 by Steven.Hutton Performance improvements subsequent to the recent database changes. Change 3320446 on 2017/02/23 by Steven.Hutton adding my temporary performance tracker class - reports to a private slack channel with add crash performance data. Change 3320479 on 2017/02/23 by Ben.Marsh Fix CIS errors. Change 3320576 on 2017/02/23 by Jin.Zhang Update CrashReporter to use AWS Change 3320742 on 2017/02/23 by Jin.Zhang Merging crash caching Change 3321119 on 2017/02/24 by Robert.Manuszewski DLL injection protection support for non-monolithic builds Change 3323308 on 2017/02/27 by Matthew.Griffin Moved compilation of SwarmInterface after its dependencies so that we will see a build failure immediately if they change version in future Change 3323423 on 2017/02/27 by Chad.Garyet Adding a script to check and warn about csproj targeted .net versions being mismatched #JIRA UE-39624 Change 3323442 on 2017/02/27 by Ben.Marsh UBT: Output an error if an engine module references a game module. Change 3323743 on 2017/02/27 by Ben.Marsh PR #3303: Resolved PVS scan issues (Contributed by projectgheist) Change 3323748 on 2017/02/27 by Ben.Marsh Convert whitespace to tabs. Change 3324851 on 2017/02/28 by Chris.Wood Add Odin symbol locations to engine config for MDD on CR server. NotForLicensees Change 3324979 on 2017/02/28 by Gil.Gribb Fixed bad merge of priority change in the EDL. Change 3326889 on 2017/03/01 by Steven.Hutton Update to buggs controller to generate faster queries. Change 3326910 on 2017/03/01 by Robert.Manuszewski Removing legacy #if from PackageFileSummary. Change 3327118 on 2017/03/01 by Gil.Gribb UE4 - Fixed race that resulted in a memory leak when reading compressed paks. Change 3327633 on 2017/03/01 by Gil.Gribb UE4 - Added a cvar to control the pak precacher thottle. Change 3327674 on 2017/03/01 by Steve.Robb Unified boilerplate between all generated code files. Change 3328544 on 2017/03/01 by Chris.Wood CrashReportProcess.config update (CRP v1.2.17) Tweaks to a few values. Update website URL to explicitly point to old, non-cloud site on devweb-02. Change 3328714 on 2017/03/01 by Chris.Wood Correct CRP config regression. Point website at new cloud site. Still v1.2.17 Change 3329192 on 2017/03/02 by Matthew.Griffin Added Shared Build Id file to the list of Precompiled Build Dependencies in a target receipt so that it's brought into an installed build Change 3329285 on 2017/03/02 by Ben.Marsh UGS: Allow a project to specify a filters for the streams that should be displayed for fast-switching to. The QuickSelectStreamList seting in the [Options] section of the project settings references a depot path containing a list of strings used to filter the stream list. An option is shown to switch back to showing all available streams, if desired. Change 3330636 on 2017/03/02 by Ben.Marsh UBT: Bump version number of C++ include cache to force it to be rebuilt with additional include information for the default RC files. Change 3331262 on 2017/03/03 by Robert.Manuszewski Merging Dev-LoadTimes to Dev-Core (Garbage Collection performance improvements) - Improved GC multithreading - Improved BeginDestroy performance - Introduced ULevelActorCluster for StaticMeshActor and ReflectionCapture actor clustering (can be toggled through project settings or console command gc.ActorClusterEnabled) - A few improvements to AddReferencedObjects functions - Misc improvements to GC code - Garbage Collector now properly handles clusters which had their objects marked as pending kill - Blueprints can now create clusters too (can be toggled through project settings or console command gc.BlueprintClusteringEnabled, defaults to disabled) Change 3331285 on 2017/03/03 by Robert.Manuszewski A few fixes for the previous check-in. Change 3332001 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN file containing the valid settings for BuildConfiguration.xml. Pass -configdoc=<filename> on the command line to generate such a file. Change 3332022 on 2017/03/03 by Ben.Marsh Update documentation for where to find the BuildConfiguration settings. Change 3332031 on 2017/03/03 by Ben.Marsh Remove documentation for Windows XP support; it has been removed in the 4.16 release. Change 3332256 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN page containing module and target settings. Change 3332458 on 2017/03/03 by Ben.Marsh UBT: Improvements to generated documentation. Change 3332459 on 2017/03/03 by Ben.Marsh Add generated documentation for .target.cs files, .build.cs files, and BuildConfiguration.xml files. Change 3332460 on 2017/03/03 by Ben.Marsh UBT: Make LinkTypePrivate actually private, so it doesn't show up in the docs. Change 3332899 on 2017/03/06 by Robert.Manuszewski Making sure actor clustering is not used in the editor (fix for actors being deleted when GC runs in the editor) #jira UE-42548 Change 3332955 on 2017/03/06 by Maciej.Mroz Nativization distinguishes client and server platform: - Separated lists on additional assets, additional modules, excluded assets, excluded modules, excluded paths (in config) - Context (compilation options, nativization options and platform) is deliveren to BPCOmpilerCppBackend in FCompilerNativizationOptions struct. - Wrappers (for unconverted BPs) are created only when they are directly called. - Fortnite dedicated server can be nativized Change 3332990 on 2017/03/06 by Ben.Marsh UBT: Add more comprehensive wrapper methods for System.IO.File and System.IO.Directory to FileReference and DirectoryReference. Change 3333032 on 2017/03/06 by Ben.Marsh Documentation for build tools Change 3333037 on 2017/03/06 by Ben.Marsh Add a build step to extract UAT and UBT documentation from XML comments. Change 3333089 on 2017/03/06 by Ben.Marsh UAT: Re-enable logging the calling function to the console in UAT. Needs a pass for readability first. Change 3333651 on 2017/03/06 by Gil.Gribb UE4 - Fix a werid recursive situation where StaticLoadObject could return an object that has not finished loading. Also produces a fatal error if this sometimes happens. EDL only. Change 3335236 on 2017/03/07 by Ben.Marsh UGS: Set the sync changelist separately to the compatibility changelist. Change 3335261 on 2017/03/07 by Gil.Gribb UE4 - Fixed batched render fences when BeginDestroy calls FlushRenderingCommands. Change 3335740 on 2017/03/07 by Gil.Gribb maybe fix static analysis warning Change 3335945 on 2017/03/07 by Steve.Robb Move FFindInstancedReferenceSubobjectHelper code out of header. Add map/set property support to allow instanced members of these container types to be handled during CPFUO. https://udn.unrealengine.com/questions/349232/tmap-with-instanced-object-as-value-gets-cleared-o.html Change 3336693 on 2017/03/07 by Ben.Marsh UBT: Use shared PCHs for game plugins by default, to reduce time spent generating individual PCHs. Change 3336694 on 2017/03/07 by Steve.Robb Static assert added to TMap to prevent the use of keys which don't implement a GetTypeHash. Fixes to types which relied on implicit conversions when calling GetTypeHash. Workaround in SAssetView.h and PropertyEditorModule.h for an apparent VC bug where the compiler wrongly instantiates TPointerIsConvertibleFromTo for certain forward-declared types, causing future TSharedPtr conversions to fail. #jira UE-42441 Change 3336698 on 2017/03/07 by Steve.Robb Hardcoded endpoint handling replaced with a generic string. Obsolete .proto and .java code generation removed. Change 3336811 on 2017/03/07 by Wes.Hunt Add a game blacklist to the crash report processor. Fixed a syntax error in Config.cs, added a XML comment to shut up a warning. Change 3336973 on 2017/03/08 by Steve.Robb Fix for missing GetTypeHash in a plugin. Change 3336996 on 2017/03/08 by Steve.Robb Significant refactor of code generation, to try and make data flow more apparent. Change 3337571 on 2017/03/08 by Steve.Robb CIS fixes for missing GetTypeHash functions. Non-unity fix. Change 3337588 on 2017/03/08 by Gil.Gribb UE4 - Fixed obscure check with flushing rhi resources. Change 3337620 on 2017/03/08 by Steve.Robb WITH_HOT_RELOAD_CTORS macros removed. UseVTableConstructors config option removed. Change 3339369 on 2017/03/09 by Steve.Robb GetTypeHash overload for nn::account::Uid. Change 3339464 on 2017/03/09 by Daniel.Lamb Fixed assert in 4.15 to do with trying to gather dependency info from invalid packages. #jira UE-42583 #test Editor + Cook + Run shootergame Change 3339465 on 2017/03/09 by Maciej.Mroz Fixed serialization issue, after UserDefinedEnum was used in EnumProperty. Change 3339469 on 2017/03/09 by Maciej.Mroz Fixed Nativization problem, when default value is passed as non-const reference. Change 3340178 on 2017/03/09 by Daniel.Lamb Added support for in memory only packages. The Cooker ignores these and added core functions to recognize these packages. Other systems will need to add support where nessisary. Change 3341002 on 2017/03/10 by Maciej.Mroz Nativization: Fixed FFindHeadersToInclude. Headers necessary for owners of subobjects are properly included. Change 3341076 on 2017/03/10 by Steve.Robb Fix for FBakedTextureSourceInfo move semantics. #jira UE-42658 Change 3341160 on 2017/03/10 by Gil.Gribb UE4 - Fix hazard with SetMaterialUsage from a thread. Change 3341409 on 2017/03/10 by Steve.Robb Reduction of the generated code size for StaticRegisterNatives functions. Change 3341523 on 2017/03/10 by Steve.Robb Code generation simplified. Change 3341800 on 2017/03/10 by Ben.Marsh UnrealVS: Fix UnrealVS compatibility with RTM version of Visual Studio 2017. 2017 toolchain for extensions is no longer able to build <= 2015 extensions due to validation of the VSIX manifest, so create a separate solution for it. Change 3342034 on 2017/03/10 by Ben.Marsh Fix compiler setting not being loaded correctly into the Windows target settings dialog. #jira UE-42746 Change 3342041 on 2017/03/10 by Ben.Marsh Fix -ErrorOnEngineContentUse not being set in the cooker options correctly. Change 3342094 on 2017/03/10 by Steve.Robb Fix to deteministic name order during code generation. Change 3342251 on 2017/03/10 by Daniel.Lamb Integrate fix for resave lightmaps commandlet when upgrading from no mapbuilddatapackages to mapbuilddatapackages. #thanks Tim.Hagberg #test None Change 3342961 on 2017/03/13 by Robert.Manuszewski Fixing memory leak when playing while running -nullrhi on the commandline in cooked games caused by shader resources not being destroyed. #jira FORT-38977 Change 3343022 on 2017/03/13 by Steve.Robb GetTypeHash fixes for FUniqueNetIdLive. #jira UE-42788 Change 3343448 on 2017/03/13 by Steve.Robb Compiled-in defer object order fixed. Debuggability of the deferred registration map improved. #jira UE-42828 [CL 3345747 by Ben Marsh in Main branch]
2017-03-14 15:48:33 -04:00
{
((FBatchedReleaseResources&)BatchedReleaseResources).Execute();
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3345728) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3315219 on 2017/02/21 by Steve.Robb Fix for FObjectAndNameAsStringProxyArchive when serializing a TWeakObjectPtr. Change 3315285 on 2017/02/21 by Steve.Robb Explicitly pass string builder into code generation functions. Change 3315341 on 2017/02/21 by Ben.Marsh UAT: Clean up some formatting in StreamCopyDescription output - remove #fyi lines, exclude merge commits, and remove some blank lines. Change 3315350 on 2017/02/21 by Ben.Marsh Fix shared resource files not being rebuilt if the version header changes. Change 3315823 on 2017/02/21 by Ben.Marsh UAT: Use a class derived from AutomationException to return information specific to commandlets failing, rather than putting it in the base class. Change 3315826 on 2017/02/21 by Ben.Marsh UAT: Move Distiller class from general use in UAT; FileFilter provides a much safer and fully featured implementation of the same concepts. Change 3315857 on 2017/02/21 by Ben.Marsh UBT: Remove the StripBaseDirectory() and MakeRerootedFilePath() utility functions from UBT. These operations can now be done more safely with FileReference objects. Change 3315942 on 2017/02/21 by Ben.Marsh UBT: Convert FileFilter to use FileReference and DirectoryReference arguments everywhere. Change 3316236 on 2017/02/22 by Maciej.Mroz #jira UE-42045 Nativization Fixed Warning: TEnumAsByte is not intended for use with enum Change 3316253 on 2017/02/22 by Robert.Manuszewski Fixes for the async log file writer hangs and crashes. - potential fix for the logging system hang when running out of disk space while flushing log - fix for unexpected concurrency assert when flushing the log buffer to disk Change 3316293 on 2017/02/22 by Steve.Robb GetTypeHash and lexicographical comparison operators (operator<() etc.) for TTuple. Change 3316342 on 2017/02/22 by Maciej.Mroz Nativization: Wrappers (stubs) required only by other wrappers are properly generated. #codereview: Mike.Beach Change 3316344 on 2017/02/22 by Maciej.Mroz Fixed crash in nativized Odin Async loading properly handles nativized structs. Change 3316359 on 2017/02/22 by Steve.Robb GitHub #3287 : Ignore #pragma in USTRUCTs #jira UE-42248 Change 3316389 on 2017/02/22 by Matthew.Griffin Switched Installed Engine Filters to multiline properties to make them more readable Added Oodle to list of excluded plugins #jira UE-42030 Change 3316392 on 2017/02/22 by Ben.Marsh UBT: Split out FileReference/DirectoryReference classes into their own file. Change 3316394 on 2017/02/22 by Ben.Marsh UBT: Move FileReference/DirectoryReference extension methods into the appropriate file. Change 3316411 on 2017/02/22 by Ben.Marsh UAT: Remove file functions that take multiple arguments. There's not really a compelling use case for these to exist over looping from the calling code. Change 3316446 on 2017/02/22 by Ben.Marsh UAT: Try disabling function name prefix to log output from UAT, to see if it improves readability. Function names are still included in the log file for debugging. Change 3316575 on 2017/02/22 by Ben.Marsh UAT: Remove unused functionality for dealing with labels, and output a more human readable list of P4 settings at startup. Change 3318481 on 2017/02/22 by Steve.Robb Use of FMath::IsPowerOfTwo in check. Static assert to ensure that an inline set allocator will have a hash size of a power of two. Change 3318496 on 2017/02/22 by Steve.Robb Fix for TSet visualizers. Change 3318919 on 2017/02/23 by Steve.Robb Fix for hot reloading UScriptStruct-derived objects in a module, where the CDOs of these objects haven't had PrepareCppStructOps() called on them. #jira UE-42178 Change 3318942 on 2017/02/23 by Steve.Robb Removal of a redundant insertion which can cause problems on reallocation of the map. Change 3319010 on 2017/02/23 by Ben.Marsh UBT: Fix exception when a file that was previously part of the working set is deleted. Change 3319134 on 2017/02/23 by Robert.Manuszewski Better fix for a deadlock when flushing log while it's already being flushed due to flush timer on the async log writer thread. Change 3319249 on 2017/02/23 by Matthew.Griffin Added a function to check if running with debug game libs instead of checking command line in multiple places Added -RunConfig parameter, which has equivalent result to -debug if value of parameter starts with 'debug' Added -RunConfig=$(Configuration) as a default commandline argument for Mac so that editor can use debug game libs Removed -Shipping argument from VCProject generation as it's not used anymore Change 3319253 on 2017/02/23 by Maciej.Mroz #jira UE-41846 New mechanism to gather modules necessary for Nativized Assets. The modules are listed based on included headers. Previously the dependencies was gathered only in FBlueprintNativeCodeGenManifest::GatherModuleDependencies. Change 3319591 on 2017/02/23 by Ben.Marsh Don't strip prefixes beginning with WARNING: or ERROR: using the Postp filter. Change 3320357 on 2017/02/23 by Steven.Hutton Slight changes to Add Crash method - Returning select fields instead of entity objects in queries for perf reasons. Change 3320361 on 2017/02/23 by Steven.Hutton Performance improvements subsequent to the recent database changes. Change 3320446 on 2017/02/23 by Steven.Hutton adding my temporary performance tracker class - reports to a private slack channel with add crash performance data. Change 3320479 on 2017/02/23 by Ben.Marsh Fix CIS errors. Change 3320576 on 2017/02/23 by Jin.Zhang Update CrashReporter to use AWS Change 3320742 on 2017/02/23 by Jin.Zhang Merging crash caching Change 3321119 on 2017/02/24 by Robert.Manuszewski DLL injection protection support for non-monolithic builds Change 3323308 on 2017/02/27 by Matthew.Griffin Moved compilation of SwarmInterface after its dependencies so that we will see a build failure immediately if they change version in future Change 3323423 on 2017/02/27 by Chad.Garyet Adding a script to check and warn about csproj targeted .net versions being mismatched #JIRA UE-39624 Change 3323442 on 2017/02/27 by Ben.Marsh UBT: Output an error if an engine module references a game module. Change 3323743 on 2017/02/27 by Ben.Marsh PR #3303: Resolved PVS scan issues (Contributed by projectgheist) Change 3323748 on 2017/02/27 by Ben.Marsh Convert whitespace to tabs. Change 3324851 on 2017/02/28 by Chris.Wood Add Odin symbol locations to engine config for MDD on CR server. NotForLicensees Change 3324979 on 2017/02/28 by Gil.Gribb Fixed bad merge of priority change in the EDL. Change 3326889 on 2017/03/01 by Steven.Hutton Update to buggs controller to generate faster queries. Change 3326910 on 2017/03/01 by Robert.Manuszewski Removing legacy #if from PackageFileSummary. Change 3327118 on 2017/03/01 by Gil.Gribb UE4 - Fixed race that resulted in a memory leak when reading compressed paks. Change 3327633 on 2017/03/01 by Gil.Gribb UE4 - Added a cvar to control the pak precacher thottle. Change 3327674 on 2017/03/01 by Steve.Robb Unified boilerplate between all generated code files. Change 3328544 on 2017/03/01 by Chris.Wood CrashReportProcess.config update (CRP v1.2.17) Tweaks to a few values. Update website URL to explicitly point to old, non-cloud site on devweb-02. Change 3328714 on 2017/03/01 by Chris.Wood Correct CRP config regression. Point website at new cloud site. Still v1.2.17 Change 3329192 on 2017/03/02 by Matthew.Griffin Added Shared Build Id file to the list of Precompiled Build Dependencies in a target receipt so that it's brought into an installed build Change 3329285 on 2017/03/02 by Ben.Marsh UGS: Allow a project to specify a filters for the streams that should be displayed for fast-switching to. The QuickSelectStreamList seting in the [Options] section of the project settings references a depot path containing a list of strings used to filter the stream list. An option is shown to switch back to showing all available streams, if desired. Change 3330636 on 2017/03/02 by Ben.Marsh UBT: Bump version number of C++ include cache to force it to be rebuilt with additional include information for the default RC files. Change 3331262 on 2017/03/03 by Robert.Manuszewski Merging Dev-LoadTimes to Dev-Core (Garbage Collection performance improvements) - Improved GC multithreading - Improved BeginDestroy performance - Introduced ULevelActorCluster for StaticMeshActor and ReflectionCapture actor clustering (can be toggled through project settings or console command gc.ActorClusterEnabled) - A few improvements to AddReferencedObjects functions - Misc improvements to GC code - Garbage Collector now properly handles clusters which had their objects marked as pending kill - Blueprints can now create clusters too (can be toggled through project settings or console command gc.BlueprintClusteringEnabled, defaults to disabled) Change 3331285 on 2017/03/03 by Robert.Manuszewski A few fixes for the previous check-in. Change 3332001 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN file containing the valid settings for BuildConfiguration.xml. Pass -configdoc=<filename> on the command line to generate such a file. Change 3332022 on 2017/03/03 by Ben.Marsh Update documentation for where to find the BuildConfiguration settings. Change 3332031 on 2017/03/03 by Ben.Marsh Remove documentation for Windows XP support; it has been removed in the 4.16 release. Change 3332256 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN page containing module and target settings. Change 3332458 on 2017/03/03 by Ben.Marsh UBT: Improvements to generated documentation. Change 3332459 on 2017/03/03 by Ben.Marsh Add generated documentation for .target.cs files, .build.cs files, and BuildConfiguration.xml files. Change 3332460 on 2017/03/03 by Ben.Marsh UBT: Make LinkTypePrivate actually private, so it doesn't show up in the docs. Change 3332899 on 2017/03/06 by Robert.Manuszewski Making sure actor clustering is not used in the editor (fix for actors being deleted when GC runs in the editor) #jira UE-42548 Change 3332955 on 2017/03/06 by Maciej.Mroz Nativization distinguishes client and server platform: - Separated lists on additional assets, additional modules, excluded assets, excluded modules, excluded paths (in config) - Context (compilation options, nativization options and platform) is deliveren to BPCOmpilerCppBackend in FCompilerNativizationOptions struct. - Wrappers (for unconverted BPs) are created only when they are directly called. - Fortnite dedicated server can be nativized Change 3332990 on 2017/03/06 by Ben.Marsh UBT: Add more comprehensive wrapper methods for System.IO.File and System.IO.Directory to FileReference and DirectoryReference. Change 3333032 on 2017/03/06 by Ben.Marsh Documentation for build tools Change 3333037 on 2017/03/06 by Ben.Marsh Add a build step to extract UAT and UBT documentation from XML comments. Change 3333089 on 2017/03/06 by Ben.Marsh UAT: Re-enable logging the calling function to the console in UAT. Needs a pass for readability first. Change 3333651 on 2017/03/06 by Gil.Gribb UE4 - Fix a werid recursive situation where StaticLoadObject could return an object that has not finished loading. Also produces a fatal error if this sometimes happens. EDL only. Change 3335236 on 2017/03/07 by Ben.Marsh UGS: Set the sync changelist separately to the compatibility changelist. Change 3335261 on 2017/03/07 by Gil.Gribb UE4 - Fixed batched render fences when BeginDestroy calls FlushRenderingCommands. Change 3335740 on 2017/03/07 by Gil.Gribb maybe fix static analysis warning Change 3335945 on 2017/03/07 by Steve.Robb Move FFindInstancedReferenceSubobjectHelper code out of header. Add map/set property support to allow instanced members of these container types to be handled during CPFUO. https://udn.unrealengine.com/questions/349232/tmap-with-instanced-object-as-value-gets-cleared-o.html Change 3336693 on 2017/03/07 by Ben.Marsh UBT: Use shared PCHs for game plugins by default, to reduce time spent generating individual PCHs. Change 3336694 on 2017/03/07 by Steve.Robb Static assert added to TMap to prevent the use of keys which don't implement a GetTypeHash. Fixes to types which relied on implicit conversions when calling GetTypeHash. Workaround in SAssetView.h and PropertyEditorModule.h for an apparent VC bug where the compiler wrongly instantiates TPointerIsConvertibleFromTo for certain forward-declared types, causing future TSharedPtr conversions to fail. #jira UE-42441 Change 3336698 on 2017/03/07 by Steve.Robb Hardcoded endpoint handling replaced with a generic string. Obsolete .proto and .java code generation removed. Change 3336811 on 2017/03/07 by Wes.Hunt Add a game blacklist to the crash report processor. Fixed a syntax error in Config.cs, added a XML comment to shut up a warning. Change 3336973 on 2017/03/08 by Steve.Robb Fix for missing GetTypeHash in a plugin. Change 3336996 on 2017/03/08 by Steve.Robb Significant refactor of code generation, to try and make data flow more apparent. Change 3337571 on 2017/03/08 by Steve.Robb CIS fixes for missing GetTypeHash functions. Non-unity fix. Change 3337588 on 2017/03/08 by Gil.Gribb UE4 - Fixed obscure check with flushing rhi resources. Change 3337620 on 2017/03/08 by Steve.Robb WITH_HOT_RELOAD_CTORS macros removed. UseVTableConstructors config option removed. Change 3339369 on 2017/03/09 by Steve.Robb GetTypeHash overload for nn::account::Uid. Change 3339464 on 2017/03/09 by Daniel.Lamb Fixed assert in 4.15 to do with trying to gather dependency info from invalid packages. #jira UE-42583 #test Editor + Cook + Run shootergame Change 3339465 on 2017/03/09 by Maciej.Mroz Fixed serialization issue, after UserDefinedEnum was used in EnumProperty. Change 3339469 on 2017/03/09 by Maciej.Mroz Fixed Nativization problem, when default value is passed as non-const reference. Change 3340178 on 2017/03/09 by Daniel.Lamb Added support for in memory only packages. The Cooker ignores these and added core functions to recognize these packages. Other systems will need to add support where nessisary. Change 3341002 on 2017/03/10 by Maciej.Mroz Nativization: Fixed FFindHeadersToInclude. Headers necessary for owners of subobjects are properly included. Change 3341076 on 2017/03/10 by Steve.Robb Fix for FBakedTextureSourceInfo move semantics. #jira UE-42658 Change 3341160 on 2017/03/10 by Gil.Gribb UE4 - Fix hazard with SetMaterialUsage from a thread. Change 3341409 on 2017/03/10 by Steve.Robb Reduction of the generated code size for StaticRegisterNatives functions. Change 3341523 on 2017/03/10 by Steve.Robb Code generation simplified. Change 3341800 on 2017/03/10 by Ben.Marsh UnrealVS: Fix UnrealVS compatibility with RTM version of Visual Studio 2017. 2017 toolchain for extensions is no longer able to build <= 2015 extensions due to validation of the VSIX manifest, so create a separate solution for it. Change 3342034 on 2017/03/10 by Ben.Marsh Fix compiler setting not being loaded correctly into the Windows target settings dialog. #jira UE-42746 Change 3342041 on 2017/03/10 by Ben.Marsh Fix -ErrorOnEngineContentUse not being set in the cooker options correctly. Change 3342094 on 2017/03/10 by Steve.Robb Fix to deteministic name order during code generation. Change 3342251 on 2017/03/10 by Daniel.Lamb Integrate fix for resave lightmaps commandlet when upgrading from no mapbuilddatapackages to mapbuilddatapackages. #thanks Tim.Hagberg #test None Change 3342961 on 2017/03/13 by Robert.Manuszewski Fixing memory leak when playing while running -nullrhi on the commandline in cooked games caused by shader resources not being destroyed. #jira FORT-38977 Change 3343022 on 2017/03/13 by Steve.Robb GetTypeHash fixes for FUniqueNetIdLive. #jira UE-42788 Change 3343448 on 2017/03/13 by Steve.Robb Compiled-in defer object order fixed. Debuggability of the deferred registration map improved. #jira UE-42828 [CL 3345747 by Ben Marsh in Main branch]
2017-03-14 15:48:33 -04:00
});
Reset();
}
}
void Add(FRenderResource* Resource)
{
if (NumBatch >= NumPerBatch)
{
Flush();
}
check(NumBatch < NumPerBatch);
Resources[NumBatch] = Resource;
NumBatch++;
}
bool IsEmpty()
{
return !NumBatch;
}
};
static bool GBatchedReleaseIsActive = false;
static FBatchedReleaseResources GBatchedRelease;
void StartBatchedRelease()
{
check(IsInGameThread() && !GBatchedReleaseIsActive && GBatchedRelease.IsEmpty());
GBatchedReleaseIsActive = true;
}
void EndBatchedRelease()
{
check(IsInGameThread() && GBatchedReleaseIsActive);
GBatchedRelease.Flush();
GBatchedReleaseIsActive = false;
}
void BeginReleaseResource(FRenderResource* Resource)
{
Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3345728) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3315219 on 2017/02/21 by Steve.Robb Fix for FObjectAndNameAsStringProxyArchive when serializing a TWeakObjectPtr. Change 3315285 on 2017/02/21 by Steve.Robb Explicitly pass string builder into code generation functions. Change 3315341 on 2017/02/21 by Ben.Marsh UAT: Clean up some formatting in StreamCopyDescription output - remove #fyi lines, exclude merge commits, and remove some blank lines. Change 3315350 on 2017/02/21 by Ben.Marsh Fix shared resource files not being rebuilt if the version header changes. Change 3315823 on 2017/02/21 by Ben.Marsh UAT: Use a class derived from AutomationException to return information specific to commandlets failing, rather than putting it in the base class. Change 3315826 on 2017/02/21 by Ben.Marsh UAT: Move Distiller class from general use in UAT; FileFilter provides a much safer and fully featured implementation of the same concepts. Change 3315857 on 2017/02/21 by Ben.Marsh UBT: Remove the StripBaseDirectory() and MakeRerootedFilePath() utility functions from UBT. These operations can now be done more safely with FileReference objects. Change 3315942 on 2017/02/21 by Ben.Marsh UBT: Convert FileFilter to use FileReference and DirectoryReference arguments everywhere. Change 3316236 on 2017/02/22 by Maciej.Mroz #jira UE-42045 Nativization Fixed Warning: TEnumAsByte is not intended for use with enum Change 3316253 on 2017/02/22 by Robert.Manuszewski Fixes for the async log file writer hangs and crashes. - potential fix for the logging system hang when running out of disk space while flushing log - fix for unexpected concurrency assert when flushing the log buffer to disk Change 3316293 on 2017/02/22 by Steve.Robb GetTypeHash and lexicographical comparison operators (operator<() etc.) for TTuple. Change 3316342 on 2017/02/22 by Maciej.Mroz Nativization: Wrappers (stubs) required only by other wrappers are properly generated. #codereview: Mike.Beach Change 3316344 on 2017/02/22 by Maciej.Mroz Fixed crash in nativized Odin Async loading properly handles nativized structs. Change 3316359 on 2017/02/22 by Steve.Robb GitHub #3287 : Ignore #pragma in USTRUCTs #jira UE-42248 Change 3316389 on 2017/02/22 by Matthew.Griffin Switched Installed Engine Filters to multiline properties to make them more readable Added Oodle to list of excluded plugins #jira UE-42030 Change 3316392 on 2017/02/22 by Ben.Marsh UBT: Split out FileReference/DirectoryReference classes into their own file. Change 3316394 on 2017/02/22 by Ben.Marsh UBT: Move FileReference/DirectoryReference extension methods into the appropriate file. Change 3316411 on 2017/02/22 by Ben.Marsh UAT: Remove file functions that take multiple arguments. There's not really a compelling use case for these to exist over looping from the calling code. Change 3316446 on 2017/02/22 by Ben.Marsh UAT: Try disabling function name prefix to log output from UAT, to see if it improves readability. Function names are still included in the log file for debugging. Change 3316575 on 2017/02/22 by Ben.Marsh UAT: Remove unused functionality for dealing with labels, and output a more human readable list of P4 settings at startup. Change 3318481 on 2017/02/22 by Steve.Robb Use of FMath::IsPowerOfTwo in check. Static assert to ensure that an inline set allocator will have a hash size of a power of two. Change 3318496 on 2017/02/22 by Steve.Robb Fix for TSet visualizers. Change 3318919 on 2017/02/23 by Steve.Robb Fix for hot reloading UScriptStruct-derived objects in a module, where the CDOs of these objects haven't had PrepareCppStructOps() called on them. #jira UE-42178 Change 3318942 on 2017/02/23 by Steve.Robb Removal of a redundant insertion which can cause problems on reallocation of the map. Change 3319010 on 2017/02/23 by Ben.Marsh UBT: Fix exception when a file that was previously part of the working set is deleted. Change 3319134 on 2017/02/23 by Robert.Manuszewski Better fix for a deadlock when flushing log while it's already being flushed due to flush timer on the async log writer thread. Change 3319249 on 2017/02/23 by Matthew.Griffin Added a function to check if running with debug game libs instead of checking command line in multiple places Added -RunConfig parameter, which has equivalent result to -debug if value of parameter starts with 'debug' Added -RunConfig=$(Configuration) as a default commandline argument for Mac so that editor can use debug game libs Removed -Shipping argument from VCProject generation as it's not used anymore Change 3319253 on 2017/02/23 by Maciej.Mroz #jira UE-41846 New mechanism to gather modules necessary for Nativized Assets. The modules are listed based on included headers. Previously the dependencies was gathered only in FBlueprintNativeCodeGenManifest::GatherModuleDependencies. Change 3319591 on 2017/02/23 by Ben.Marsh Don't strip prefixes beginning with WARNING: or ERROR: using the Postp filter. Change 3320357 on 2017/02/23 by Steven.Hutton Slight changes to Add Crash method - Returning select fields instead of entity objects in queries for perf reasons. Change 3320361 on 2017/02/23 by Steven.Hutton Performance improvements subsequent to the recent database changes. Change 3320446 on 2017/02/23 by Steven.Hutton adding my temporary performance tracker class - reports to a private slack channel with add crash performance data. Change 3320479 on 2017/02/23 by Ben.Marsh Fix CIS errors. Change 3320576 on 2017/02/23 by Jin.Zhang Update CrashReporter to use AWS Change 3320742 on 2017/02/23 by Jin.Zhang Merging crash caching Change 3321119 on 2017/02/24 by Robert.Manuszewski DLL injection protection support for non-monolithic builds Change 3323308 on 2017/02/27 by Matthew.Griffin Moved compilation of SwarmInterface after its dependencies so that we will see a build failure immediately if they change version in future Change 3323423 on 2017/02/27 by Chad.Garyet Adding a script to check and warn about csproj targeted .net versions being mismatched #JIRA UE-39624 Change 3323442 on 2017/02/27 by Ben.Marsh UBT: Output an error if an engine module references a game module. Change 3323743 on 2017/02/27 by Ben.Marsh PR #3303: Resolved PVS scan issues (Contributed by projectgheist) Change 3323748 on 2017/02/27 by Ben.Marsh Convert whitespace to tabs. Change 3324851 on 2017/02/28 by Chris.Wood Add Odin symbol locations to engine config for MDD on CR server. NotForLicensees Change 3324979 on 2017/02/28 by Gil.Gribb Fixed bad merge of priority change in the EDL. Change 3326889 on 2017/03/01 by Steven.Hutton Update to buggs controller to generate faster queries. Change 3326910 on 2017/03/01 by Robert.Manuszewski Removing legacy #if from PackageFileSummary. Change 3327118 on 2017/03/01 by Gil.Gribb UE4 - Fixed race that resulted in a memory leak when reading compressed paks. Change 3327633 on 2017/03/01 by Gil.Gribb UE4 - Added a cvar to control the pak precacher thottle. Change 3327674 on 2017/03/01 by Steve.Robb Unified boilerplate between all generated code files. Change 3328544 on 2017/03/01 by Chris.Wood CrashReportProcess.config update (CRP v1.2.17) Tweaks to a few values. Update website URL to explicitly point to old, non-cloud site on devweb-02. Change 3328714 on 2017/03/01 by Chris.Wood Correct CRP config regression. Point website at new cloud site. Still v1.2.17 Change 3329192 on 2017/03/02 by Matthew.Griffin Added Shared Build Id file to the list of Precompiled Build Dependencies in a target receipt so that it's brought into an installed build Change 3329285 on 2017/03/02 by Ben.Marsh UGS: Allow a project to specify a filters for the streams that should be displayed for fast-switching to. The QuickSelectStreamList seting in the [Options] section of the project settings references a depot path containing a list of strings used to filter the stream list. An option is shown to switch back to showing all available streams, if desired. Change 3330636 on 2017/03/02 by Ben.Marsh UBT: Bump version number of C++ include cache to force it to be rebuilt with additional include information for the default RC files. Change 3331262 on 2017/03/03 by Robert.Manuszewski Merging Dev-LoadTimes to Dev-Core (Garbage Collection performance improvements) - Improved GC multithreading - Improved BeginDestroy performance - Introduced ULevelActorCluster for StaticMeshActor and ReflectionCapture actor clustering (can be toggled through project settings or console command gc.ActorClusterEnabled) - A few improvements to AddReferencedObjects functions - Misc improvements to GC code - Garbage Collector now properly handles clusters which had their objects marked as pending kill - Blueprints can now create clusters too (can be toggled through project settings or console command gc.BlueprintClusteringEnabled, defaults to disabled) Change 3331285 on 2017/03/03 by Robert.Manuszewski A few fixes for the previous check-in. Change 3332001 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN file containing the valid settings for BuildConfiguration.xml. Pass -configdoc=<filename> on the command line to generate such a file. Change 3332022 on 2017/03/03 by Ben.Marsh Update documentation for where to find the BuildConfiguration settings. Change 3332031 on 2017/03/03 by Ben.Marsh Remove documentation for Windows XP support; it has been removed in the 4.16 release. Change 3332256 on 2017/03/03 by Ben.Marsh UBT: Add support for generating a UDN page containing module and target settings. Change 3332458 on 2017/03/03 by Ben.Marsh UBT: Improvements to generated documentation. Change 3332459 on 2017/03/03 by Ben.Marsh Add generated documentation for .target.cs files, .build.cs files, and BuildConfiguration.xml files. Change 3332460 on 2017/03/03 by Ben.Marsh UBT: Make LinkTypePrivate actually private, so it doesn't show up in the docs. Change 3332899 on 2017/03/06 by Robert.Manuszewski Making sure actor clustering is not used in the editor (fix for actors being deleted when GC runs in the editor) #jira UE-42548 Change 3332955 on 2017/03/06 by Maciej.Mroz Nativization distinguishes client and server platform: - Separated lists on additional assets, additional modules, excluded assets, excluded modules, excluded paths (in config) - Context (compilation options, nativization options and platform) is deliveren to BPCOmpilerCppBackend in FCompilerNativizationOptions struct. - Wrappers (for unconverted BPs) are created only when they are directly called. - Fortnite dedicated server can be nativized Change 3332990 on 2017/03/06 by Ben.Marsh UBT: Add more comprehensive wrapper methods for System.IO.File and System.IO.Directory to FileReference and DirectoryReference. Change 3333032 on 2017/03/06 by Ben.Marsh Documentation for build tools Change 3333037 on 2017/03/06 by Ben.Marsh Add a build step to extract UAT and UBT documentation from XML comments. Change 3333089 on 2017/03/06 by Ben.Marsh UAT: Re-enable logging the calling function to the console in UAT. Needs a pass for readability first. Change 3333651 on 2017/03/06 by Gil.Gribb UE4 - Fix a werid recursive situation where StaticLoadObject could return an object that has not finished loading. Also produces a fatal error if this sometimes happens. EDL only. Change 3335236 on 2017/03/07 by Ben.Marsh UGS: Set the sync changelist separately to the compatibility changelist. Change 3335261 on 2017/03/07 by Gil.Gribb UE4 - Fixed batched render fences when BeginDestroy calls FlushRenderingCommands. Change 3335740 on 2017/03/07 by Gil.Gribb maybe fix static analysis warning Change 3335945 on 2017/03/07 by Steve.Robb Move FFindInstancedReferenceSubobjectHelper code out of header. Add map/set property support to allow instanced members of these container types to be handled during CPFUO. https://udn.unrealengine.com/questions/349232/tmap-with-instanced-object-as-value-gets-cleared-o.html Change 3336693 on 2017/03/07 by Ben.Marsh UBT: Use shared PCHs for game plugins by default, to reduce time spent generating individual PCHs. Change 3336694 on 2017/03/07 by Steve.Robb Static assert added to TMap to prevent the use of keys which don't implement a GetTypeHash. Fixes to types which relied on implicit conversions when calling GetTypeHash. Workaround in SAssetView.h and PropertyEditorModule.h for an apparent VC bug where the compiler wrongly instantiates TPointerIsConvertibleFromTo for certain forward-declared types, causing future TSharedPtr conversions to fail. #jira UE-42441 Change 3336698 on 2017/03/07 by Steve.Robb Hardcoded endpoint handling replaced with a generic string. Obsolete .proto and .java code generation removed. Change 3336811 on 2017/03/07 by Wes.Hunt Add a game blacklist to the crash report processor. Fixed a syntax error in Config.cs, added a XML comment to shut up a warning. Change 3336973 on 2017/03/08 by Steve.Robb Fix for missing GetTypeHash in a plugin. Change 3336996 on 2017/03/08 by Steve.Robb Significant refactor of code generation, to try and make data flow more apparent. Change 3337571 on 2017/03/08 by Steve.Robb CIS fixes for missing GetTypeHash functions. Non-unity fix. Change 3337588 on 2017/03/08 by Gil.Gribb UE4 - Fixed obscure check with flushing rhi resources. Change 3337620 on 2017/03/08 by Steve.Robb WITH_HOT_RELOAD_CTORS macros removed. UseVTableConstructors config option removed. Change 3339369 on 2017/03/09 by Steve.Robb GetTypeHash overload for nn::account::Uid. Change 3339464 on 2017/03/09 by Daniel.Lamb Fixed assert in 4.15 to do with trying to gather dependency info from invalid packages. #jira UE-42583 #test Editor + Cook + Run shootergame Change 3339465 on 2017/03/09 by Maciej.Mroz Fixed serialization issue, after UserDefinedEnum was used in EnumProperty. Change 3339469 on 2017/03/09 by Maciej.Mroz Fixed Nativization problem, when default value is passed as non-const reference. Change 3340178 on 2017/03/09 by Daniel.Lamb Added support for in memory only packages. The Cooker ignores these and added core functions to recognize these packages. Other systems will need to add support where nessisary. Change 3341002 on 2017/03/10 by Maciej.Mroz Nativization: Fixed FFindHeadersToInclude. Headers necessary for owners of subobjects are properly included. Change 3341076 on 2017/03/10 by Steve.Robb Fix for FBakedTextureSourceInfo move semantics. #jira UE-42658 Change 3341160 on 2017/03/10 by Gil.Gribb UE4 - Fix hazard with SetMaterialUsage from a thread. Change 3341409 on 2017/03/10 by Steve.Robb Reduction of the generated code size for StaticRegisterNatives functions. Change 3341523 on 2017/03/10 by Steve.Robb Code generation simplified. Change 3341800 on 2017/03/10 by Ben.Marsh UnrealVS: Fix UnrealVS compatibility with RTM version of Visual Studio 2017. 2017 toolchain for extensions is no longer able to build <= 2015 extensions due to validation of the VSIX manifest, so create a separate solution for it. Change 3342034 on 2017/03/10 by Ben.Marsh Fix compiler setting not being loaded correctly into the Windows target settings dialog. #jira UE-42746 Change 3342041 on 2017/03/10 by Ben.Marsh Fix -ErrorOnEngineContentUse not being set in the cooker options correctly. Change 3342094 on 2017/03/10 by Steve.Robb Fix to deteministic name order during code generation. Change 3342251 on 2017/03/10 by Daniel.Lamb Integrate fix for resave lightmaps commandlet when upgrading from no mapbuilddatapackages to mapbuilddatapackages. #thanks Tim.Hagberg #test None Change 3342961 on 2017/03/13 by Robert.Manuszewski Fixing memory leak when playing while running -nullrhi on the commandline in cooked games caused by shader resources not being destroyed. #jira FORT-38977 Change 3343022 on 2017/03/13 by Steve.Robb GetTypeHash fixes for FUniqueNetIdLive. #jira UE-42788 Change 3343448 on 2017/03/13 by Steve.Robb Compiled-in defer object order fixed. Debuggability of the deferred registration map improved. #jira UE-42828 [CL 3345747 by Ben Marsh in Main branch]
2017-03-14 15:48:33 -04:00
if (GBatchedReleaseIsActive && IsInGameThread())
{
GBatchedRelease.Add(Resource);
return;
}
ENQUEUE_RENDER_COMMAND(ReleaseCommand)(
[Resource](FRHICommandList& RHICmdList)
{
Resource->ReleaseResource();
});
}
void ReleaseResourceAndFlush(FRenderResource* Resource)
{
// Send the release message.
ENQUEUE_RENDER_COMMAND(ReleaseCommand)(
[Resource](FRHICommandList& RHICmdList)
{
Resource->ReleaseResource();
});
FlushRenderingCommands();
}
FTextureReference::FTextureReference()
: TextureReferenceRHI(NULL)
{
}
FTextureReference::~FTextureReference()
{
}
void FTextureReference::BeginInit_GameThread()
{
bInitialized_GameThread = true;
BeginInitResource(this);
}
void FTextureReference::BeginRelease_GameThread()
{
BeginReleaseResource(this);
bInitialized_GameThread = false;
}
void FTextureReference::InvalidateLastRenderTime()
{
LastRenderTimeRHI.SetLastRenderTime(-FLT_MAX);
}
void FTextureReference::InitRHI()
{
SCOPED_LOADTIMER(FTextureReference_InitRHI);
TextureReferenceRHI = RHICreateTextureReference(&LastRenderTimeRHI);
}
int32 GTextureReferenceRevertsLastRenderContainer = 1;
FAutoConsoleVariableRef CVarTextureReferenceRevertsLastRenderContainer(
TEXT("r.TextureReferenceRevertsLastRenderContainer"),
GTextureReferenceRevertsLastRenderContainer,
TEXT(""));
void FTextureReference::ReleaseRHI()
{
#if PLATFORM_ANDROID
if (TextureReferenceRHI.GetReference())
{
bool bTextureReferenceRevertsLastRenderContainer = GTextureReferenceRevertsLastRenderContainer != 0;
// Check Android's config rules system so we can HF this at startup if needed.
{
static bool bConfigRulesChecked = false;
static TOptional<bool> bConfigRulesRevertsLastRenderContainer;
if (!bConfigRulesChecked)
{
const FString* ConfigRulesStr = FAndroidMisc::GetConfigRulesVariable(TEXT("TextureReferenceRevertsLastRenderContainer"));
if (ConfigRulesStr)
{
bConfigRulesRevertsLastRenderContainer = ConfigRulesStr->Equals("true", ESearchCase::IgnoreCase);
UE_LOG(LogRHI, Log, TEXT("TextureReferenceRevertsLastRenderContainer, set by config rules: %d"), (int)bConfigRulesRevertsLastRenderContainer.GetValue());
}
else
{
UE_LOG(LogRHI, Log, TEXT("TextureReferenceRevertsLastRenderContainer, no config rule set: %d"), (int)bTextureReferenceRevertsLastRenderContainer);
}
bConfigRulesChecked = true;
}
if (bConfigRulesRevertsLastRenderContainer.IsSet())
{
bTextureReferenceRevertsLastRenderContainer = bConfigRulesRevertsLastRenderContainer.GetValue();
}
}
if (bTextureReferenceRevertsLastRenderContainer && TextureReferenceRHI->GetLastRenderTimeContainer() == &LastRenderTimeRHI)
{
// we're going away, TextureReferenceRHI must swap out its (soon to be) dangling ref.
TextureReferenceRHI->SetDefaultLastRenderTimeContainer();
}
}
#endif
TextureReferenceRHI.SafeRelease();
}
FString FTextureReference::GetFriendlyName() const
{
return TEXT("FTextureReference");
}
/** The global null color vertex buffer, which is set with a stride of 0 on meshes without a color component. */
TGlobalResource<FNullColorVertexBuffer> GNullColorVertexBuffer;
/** The global null vertex buffer, which is set with a stride of 0 on meshes */
TGlobalResource<FNullVertexBuffer> GNullVertexBuffer;
/*------------------------------------------------------------------------------
FRayTracingGeometry implementation.
------------------------------------------------------------------------------*/
#if RHI_RAYTRACING
void FRayTracingGeometry::CreateRayTracingGeometry(ERTAccelerationStructureBuildPriority InBuildPriority)
{
// Release previous RHI object if any
ReleaseRHI();
check(RawData.Num() == 0 || Initializer.OfflineData == nullptr);
if (RawData.Num())
{
Initializer.OfflineData = &RawData;
}
if (GVarDebugForceRuntimeBLAS && Initializer.OfflineData != nullptr)
{
Initializer.OfflineData->Discard();
Initializer.OfflineData = nullptr;
}
bool bAllSegmentsAreValid = Initializer.Segments.Num() > 0 || Initializer.OfflineData;
for (const FRayTracingGeometrySegment& Segment : Initializer.Segments)
{
if (!Segment.VertexBuffer)
{
bAllSegmentsAreValid = false;
break;
}
}
if (bAllSegmentsAreValid)
{
RayTracingGeometryRHI = RHICreateRayTracingGeometry(Initializer);
if (Initializer.OfflineData == nullptr)
{
// Request build if not skip
if (InBuildPriority != ERTAccelerationStructureBuildPriority::Skip)
{
RayTracingBuildRequestIndex = GRayTracingGeometryManager.RequestBuildAccelerationStructure(this, InBuildPriority);
bRequiresBuild = false;
}
else
{
bRequiresBuild = true;
}
}
else
{
bRequiresBuild = false;
// Offline data ownership is transferred to the RHI, which discards it after use.
// It is no longer valid to use it after this point.
Initializer.OfflineData = nullptr;
}
}
}
void FRayTracingGeometry::InitRHI()
{
if (!IsRayTracingEnabled())
return;
CreateRayTracingGeometry(ERTAccelerationStructureBuildPriority::Normal);
}
void FRayTracingGeometry::ReleaseRHI()
{
if (HasPendingBuildRequest())
{
GRayTracingGeometryManager.RemoveBuildRequest(RayTracingBuildRequestIndex);
RayTracingBuildRequestIndex = INDEX_NONE;
}
RayTracingGeometryRHI.SafeRelease();
}
void FRayTracingGeometry::ReleaseResource()
{
// Release any resource references held by the initializer.
// This includes index and vertex buffers used for building the BLAS.
Initializer = FRayTracingGeometryInitializer {};
FRenderResource::ReleaseResource();
}
void FRayTracingGeometry::BoostBuildPriority(float InBoostValue) const
{
check(HasPendingBuildRequest());
GRayTracingGeometryManager.BoostPriority(RayTracingBuildRequestIndex, InBoostValue);
}
#endif // RHI_RAYTRACING
/*------------------------------------------------------------------------------
FGlobalDynamicVertexBuffer implementation.
------------------------------------------------------------------------------*/
/**
* An individual dynamic vertex buffer.
*/
class FDynamicVertexBuffer : public FVertexBuffer
{
public:
/** The aligned size of all dynamic vertex buffers. */
enum { ALIGNMENT = (1 << 16) }; // 64KB
/** Pointer to the vertex buffer mapped in main memory. */
uint8* MappedBuffer;
/** Size of the vertex buffer in bytes. */
uint32 BufferSize;
/** Number of bytes currently allocated from the buffer. */
uint32 AllocatedByteCount;
/** Number of successive frames for which AllocatedByteCount == 0. Used as a metric to decide when to free the allocation. */
int32 NumFramesUnused = 0;
/** Default constructor. */
explicit FDynamicVertexBuffer(uint32 InMinBufferSize)
: MappedBuffer(NULL)
, BufferSize(FMath::Max<uint32>(Align(InMinBufferSize,ALIGNMENT),ALIGNMENT))
, AllocatedByteCount(0)
{
}
/**
* Locks the vertex buffer so it may be written to.
*/
void Lock()
{
check(MappedBuffer == NULL);
check(AllocatedByteCount == 0);
check(IsValidRef(VertexBufferRHI));
MappedBuffer = (uint8*)RHILockBuffer(VertexBufferRHI, 0, BufferSize, RLM_WriteOnly);
}
/**
* Unocks the buffer so the GPU may read from it.
*/
void Unlock()
{
check(MappedBuffer != NULL);
check(IsValidRef(VertexBufferRHI));
RHIUnlockBuffer(VertexBufferRHI);
MappedBuffer = NULL;
AllocatedByteCount = 0;
NumFramesUnused = 0;
}
// FRenderResource interface.
virtual void InitRHI() override
{
check(!IsValidRef(VertexBufferRHI));
FRHIResourceCreateInfo CreateInfo(TEXT("FDynamicVertexBuffer"));
VertexBufferRHI = RHICreateVertexBuffer(BufferSize, BUF_Volatile, CreateInfo);
MappedBuffer = NULL;
AllocatedByteCount = 0;
}
virtual void ReleaseRHI() override
{
FVertexBuffer::ReleaseRHI();
MappedBuffer = NULL;
AllocatedByteCount = 0;
}
virtual FString GetFriendlyName() const override
{
return TEXT("FDynamicVertexBuffer");
}
};
/**
* A pool of dynamic vertex buffers.
*/
struct FDynamicVertexBufferPool
{
/** List of vertex buffers. */
TIndirectArray<FDynamicVertexBuffer> VertexBuffers;
/** The current buffer from which allocations are being made. */
FDynamicVertexBuffer* CurrentVertexBuffer;
/** Default constructor. */
FDynamicVertexBufferPool()
: CurrentVertexBuffer(NULL)
{
}
/** Destructor. */
~FDynamicVertexBufferPool()
{
int32 NumVertexBuffers = VertexBuffers.Num();
for (int32 BufferIndex = 0; BufferIndex < NumVertexBuffers; ++BufferIndex)
{
VertexBuffers[BufferIndex].ReleaseResource();
}
}
};
FGlobalDynamicVertexBuffer::FGlobalDynamicVertexBuffer()
Merging from //UE4/Fortnite-Staging up to CL#3673800 based on CL#3664064 from //Fortnite/Main #rb none #lockdown Nick.Penwarden ================================================================================================= THESE CHANGES TOUCH MULTIPLE PLATFORMS AND/OR RESTRICTED FOLDERS. YOU MUST REVIEW THESE MANUALLY AND APPEND THEM TO THE DESCRIPTIONS FOR THE APPROPRIATE PLATFORMS. ================================================================================================= Change 3662267 by Nick.Darnell Engine - Fixing a bug in GetAccurateRealTime, it wasn't subtracting GStartTime, which if you don't prevents accurate platform time when you try to store it in a float. #jira nojira Change 3662176 by Ben.Marsh Disable image integrity report generation if a debugger is attached, and in editor builds. #jira FORT-55656 Change 3656958 by Luke.Thatcher [FORTNITE] [CONSOLE] [+] Improved frame syncing mechanism - Improves input latency by allowing the game thread to sync to the swap chain flip of the previous frame. - Added "r.GTSyncType" CVar to control how the game thread syncs with the rest of the pipe. - r.GTSyncType 2 will sync the game thread with the flip of the swap chain, preventing the pipe from getting too long and causing excess input latency. Platforms are required to implement RHIWaitForFlip and RHISignalFlipEvent, and call RHIInitializeFlipTracking on RHI startup. A separate thread monitors the progress of frame flips and signals task graph events as they pass their corresponding frame index. In r.GTSyncType 2 mode, the game thread is signaled by this flip tracking thread. [~] Unified platform specific sync interval CVars (D3D12.SyncInterval, D3D11.SyncInterval, r.PS4FlipRate, RHI.SyncIntervalOgl) into one: rhi.SyncInterval - 1 == 60Hz - 2 == 30Hz - 3 == 20Hz [-] Removed large number in XboxOneTime. Adding this arbitrary number prevents us from comparing timestamps from FPlatformTime::Seconds() and various OS callbacks (e.g. flip timings). #jira FORT-50803 Change 3655598 by Lukasz.Furman added filtering for navmesh's low height spans to fix crash on layer partitioning % of span reductions depends on presence of stair or roof building in navmesh tile, changed failsafes in layer code to ignore entire tile if heightfield is too complex to partition instead of reallocating memory #jira FORT-35375 Change 3648972 by Keith.Judge Add analytics to help diagnose default parameter collection buffer issue. +++ REMOVE ONCE CORE ISSUE IS SOLVED +++ #jira FORT-54690 Change 3648756 by Bart.Hawthorne Integrate 3645298 from //UE4/Dev-Networking Deprecate GetNetworkObjectInfo in favor of separate FindNetworkObjectInfo and FindOrCreateNetworkObjectInfo methods. #jira none Change 3643090 by Josh.Markiewicz #UE4 - proper handling of "pending connection lost" - triggered only if a connection is lost and there no "owning actor" to deal with the connection loss -- added Rejoin and CleanedUp states to connection to make sure that the pending connection lost delegate only fires at the appropriate time - delegate returns the unique id of the player if known (still possible to be unknown if connection lost after NMT_Hello) - changed debug output on timeout if the net connection was already in the process of being destroyed -- occurs when game hitches during the pending destroy 2 second wait -- ReceivedAcks should have been called to clean things up quietly in those 2 seconds but blocking the game thread will cause the cleanup to look like a timeout - added userid to UNetConnection::Describe - bad split screen player handling of unique id -- splitscreen uniqueid was overwriting the primary player id -- only store the id on the child connection - added some clarifying comments #review-3642816 @ryan.gerleve, @bob.tellez, @sam.zamani, @bart.hawthorne, @dave.ratti #jira FORT-26776 Change 3639043 by Alex.Thurman Fix CommonTreeView SetSelection to correctly update list navigation, and behave similarly to CommonListView's SetSelectedItem. #JIRA FORT-45841 Change 3632275 by Seth.Weedin #JIRA FORT-54203 - Add clamps to ActiveSound fade interpolation to prevent unwanted volume spikes. Remove 0.01 start time for single-fire audio cues. Should remove the sudden pops sometimes heard when firing weapons, as well as smooth out fade volume in general. Change 3626944 by Josh.Markiewicz #UE4 - added "updates connection status" flag to ServiceConfigMCP - disable updates on Cloud and Friend services (Fortnite only) - removed overloaded ProcessConnectionStatus function in cloud service #jira FORT-53113 Change 3626226 by Stewart.Lynch LLM Update - Memory reductions, Summary page, enum scopes, refactor and cleanup of tags * Remove all static arrays and hard limits from LLM. Everything is now dynamically allocated using the internal LLM allocators. The overhead when LLM is disabled is now only 48K (was 40MB) * re-wrote LLMMap. Now stores an int32 index rather then pointer in the HashMap array. Also, changed the Values to be arrays for structs instead of structs of arrays. Means that the tag can be stored in a single byte. Changed the size of the allocation size from int64 to int32. All this takes the memory down from around 600MB to 100MB. It was 120 bytes per allocation, now 29 bytes. * changed all LLM scopes over to enums. This has a number of benefits; LLM can be enable in Test, less CPU overhead, stored in a byte (LLM overhead /= 8) * summary page for content creators where all lower-level stats are grouped under one Engine stat * renamed ELLMScopeTag enum to ELLMTag * renamed LLM_SCOPED_TAG_WITH_ENUM macro to LLM_SCOPE * removed Tracker arg from LLM_SCOPE and added LLM_PLATFORM_SCOPE macro * fixed GenericPlatformMallocCrash stat. Although it seems not be be used anymore * fixed BackupOOMMemoryPool stat (now shows in both default and platform pages) * added separate LLM enums for XB1, PS4 and D3D12 (PS4LLM.cpp/h etc.) * lots of changes adding/removing/renaming tags * added LLMArray and FLLMObjectAllocator classes * disabled asset tag tracking by default because it takes up so much memory even when not used * enable LLM in all non-shipping builds. In Test the on screendisplay won't show because it uses the stats system but it till still write out the csv. * all the stat macros have been left as they were and can be enabled on the LLM_STAT_TAGS_ENABLED define. These are needed for the asset tagging. * disabled LLM_TRACK_PEAK_MEMORY because there is a problem with the way it adds the peaks for multiple threads. This needs to be fixed. * added a CVar to control the csv write interval: LLM.LLMWriteInterval * added static arrays for the enum tags setup. Easier to manage and removes need for slow switch statements. * renamed FLLMThreadStateManager to FLLMTracker to make it consistent with the enum * fixed program size stat which was broken recently on PS4. This was due to initialisation order and global platform stats setup #jira NONE-01 Change 3622978 by Lukasz.Furman changed WeaponStatus BT decorator to be event driven, fixes AI trying to check ranged weapon abilities without valid weapon includes copy of CL# 3620700 #jira FORT-45914 #review-3622979 John.Abercrombie Change 3622340 by Josh.Markiewicz #UE4 - playerid netconnection variable setup properly on clients and servers for both beacons and game net drivers - ipconnection prints uniqueid with lowleveldescribe #jira fort-0 Change 3621386 by Tim.Tillotson Add the ability to retry HTTP operations by VERB. This allows us to automatically retry cloud save PUT operations. #JIRA FORT-53717 #review-3621317 @Josh.Markiewicz @Ian.Fox @Carlos.Cuello Change 3620517 by Keith.Judge Xbox One - Revert iOS behaviour for the depth bias back to how it was, and make separate XB1 change use its own define to avoid confusion. #jira FORT-53928 Change 3620248 by Lukasz.Furman changed behavior of UBTTask_MoveTo.bStopOnOverlap flag after recent AcceptanceRadius fix, updated comments to be more detailed #jira nojira Change 3616187 by Bob.Tellez #UE4 Throwing an error (for now) if you attempt to use both the malloc profiler and leak detection at the same time since it causes a deadlock. #JIRA UE-0 Change 3613935 by Peter.Knepley More logging on update launcher launching #jira nojira #robomerge rp rn Change 3613537 by Marcus.Wassmer Safety asserts around the MarkPendingKill feature for rendering classes. #jira FORT-50385 Change 3613399 by Arne.Schober Extended ShowMaterialDrawEvents to enable it only in very specific passes and default enabled Depth for Fortnite on PS4 to track down a crash. #RB Marcus.Wassmer #jira FORT-53610 Change 3610794 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce UMG class memory #jira UE-52043 #ROBOMERGE-SOURCE: CL 3610792 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3610144 by Stewart.Lynch General LLM improvements * added tracking for misc task graph tasks (moves 20MB out of Untagged) * renamed EngineTick to EngineMisc * added tracking for FName * added tracking for GC_ProcessObjectArray potential leak * renamed index & vertex buffers stat to Meshes * added hooks for MemPro to track allocations from a single category. Currently defined out. I haven't added MemPro.cpp/h. * removed AVAILABLE_PHYSICAL stat from LLM csv * csv files now include the date in the filename * fixed potential threading bug when reading stat values to csv * made IsDebugMemoryEnabled() always return false in shipping and if not runnong on a dev-kit (PS4). The reason is that the function is a bit hacky, and should only be used for debug purposes, such as displaying the on screen warning. * added lots more scopes * started changing Stat scopes to enum scopes. Stat scopes will be phased out. * added tracking of FName memory * added llmplatform tracking for XBoxSymbols * added llm tracking for CPU symbol allocations (20MB) * wrote an allocator for XBoxOneStack reading so that it doesn't go through Malloc and get tracked by LLM. * added tracking for GC * fixed tracking for TransientMemoryAllocator * added tracking for networking memory * added more audio memory tracking * added tracking for blueprints * added tracking for static meshes * show on screen warning if debug memory is enabled * added tracking for particles * renamed Phys to PhysX and added more scopes * renamed Slate to UI and added more scopes * much better coverage of networking memory * improved coverage of audio #jira FORT-53420 Change 3610136 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce size of UStaticMeshComponent by 224 bytes (cumulative, 64 bytes exclusive) Reduce size of UPrimitiveComponent by 176 bytes (cumulative, 64 bytes exclusive). Reduce size of USceneComponent by 112 bytes. Reduce size of FLightingChannels from 3 bytes to 1. Reduce size of FBodyInstance by 16 bytes. #jira FORT-52043 #ROBOMERGE-SOURCE: CL 3610134 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607937 by robomerge #ROBOMERGE-AUTHOR: paul.moore #jira FORT-53105 - Fix websocket not providing information when the peer closes the connection. #ROBOMERGE-SOURCE: CL 3607933 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607042 by Bart.Hawthorne Move replay.Loop functionality into the demo net driver and rename it demo.Loop #jira none Change 3605448 by robomerge #ROBOMERGE-AUTHOR: seth.weedin #Athena - Pass owner to ActiveSounds created using PlaySoundAtLocation/PlaySound2D to allow "Limit to Owner" concurrency rules to work. Hook up for weapon sounds. #JIRA FORT-53180 #ROBOMERGE-SOURCE: CL 3605443 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3604787 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Initial support for hotfixing live assets from .ini files - This allows clients and server to patch certain assets in memory whenever .ini file hotfixes are downloaded - Only CurveTables and DataTables are supported for now - The new asset content must be in Json format, the same format the editor uses for importing - Assets that are hotfixed will be synchronously loaded if they're not already in memory. They'll be retained in memory afterwards. - IMPORTANT: Json data must be supplied on a single line, and all double quotes must be escaped! - The changes must go in the Game.ini file and use the following syntax: [AssetHotfix] +CurveTable=("/Game/Folder/MyCurveTable","[{\"Name\":\"Default\"}]") +DataTable=("/Game/Folder2/MyDataTable","[{\"Name\":\"Foo\"}]") #jira FORT-52099 [CODEREVIEW] frank.gigliotti [FYI] peter.knepley,bob.tellez #ROBOMERGE-SOURCE: CL 3604784 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3602067 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Loading time improvements - This shaves off up to 10 seconds of load time on PS4 in Athena Details: - Fixed multiple sub-levels not being able to be enqueued for loading in a single client frame. Athena has ~300 sub-levels, so this ended up wasting up many seconds. - Fixed 3D world being rendered while loading (frees up game thread cycles for throttled streaming) - UWorld::AllowLevelLoadRequests() was not allowing load requests to go through while an async load was in progress and the match had started. It now allows this as long as the world isn't being rendered (loading screen.) - Eliminated extra 2 second delay before loading screen is dismissed (in Athena only) - Note: A side effect of this change is that the progress bar may not update as smoothly on loading screen. We'll look at tuning the throttle settings if it ends up being a problem. [CODEREVIEW] ori.cohen #jira AT-1477 #ROBOMERGE-SOURCE: CL 3602061 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3601951 by Luke.Thatcher [FORTNITE] [PS4] [!] Fix memory stats in the old PS4 memory system - Physical memory stat now includes garlic and onion allocations. CPU OOMs will result in "AvailablePhysical" being close to 0. - Added garlic, onion and defrag stats to the platform memory stats struct. - Added fixed pool sizes to platform memory stats. - Modified the Fortnite heartbeat logging to include extra details of PS4 fixed sized pools. #jira FORT-52910 Change 3600340 by robomerge #ROBOMERGE-AUTHOR: wes.hunt All Fort analytics events now contain a GameState attribute indicating the active GameState ClassName when the event is sent. Added some new context to crashreporter to help identify Athena matches near and long term. * Near Term: GameNameSuffix - set via FCoreDelegates::CrashOverrideParamsChanged * Added bools to the params to indicate WHICH ones are changing * Allows you to set only some values, and clear them out. * Hooked up in FortGameState::PostInitializeComponents. * FortGameState clears it (for returning to main menu). * FortGameStateAthena sets it (for going into an Athena match). * Only does this when it's a true GameMode GameState instance (ie, not PIE) so PIE crashes aren't modified. * Long Term: GameStateName - set via FCoreDelegates::GameStateClassChanged. * This works for ANY crash on ANY game. * Hooked up in GameState::HandleMatchIsWaitingToStart. #jira AT-1457 #jira AT-519 [CODEREVIEW] peter.knepley,josh.markiewicz #ROBOMERGE-SOURCE: CL 3600278 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3597593 by Ben.Zeigler #jira FORT-50722 Fix issues where AssetBundles weren't being correctly updated during cook, which is blocking both Noland and Abercrombie Partial copy of CL #3402335 and #3526538 #robomerge rp, rn Change 3597577 by Luke.Thatcher [FORTNITE] [PS4] [~] Modified the way memory is allocated on Playstation to make more memory available to the CPU. - Previously the amount of texture memory wasn╞t fixed due to the way the defrag memory is allocated on PS4. This meant we had to have a significant amount of slack. - With the new configuration, we have a guaranteed texture memory pool, so the slack can be significantly smaller, meaning we can give more memory to the CPU, which is where most of our memory pressure is. #jira FORT-50825 #jira FORT-49688 #jira FORT-49695 #jira FORT-50054 Change 3596556 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Enable GC clustering for actors and blueprints in Fortnite - This shaves off about 10 ms on GC frames in Athena on PS4 (~52 ms -> 42 ms) - Clustering doesn't work on building actors because they're very dynamic, but general Fort static meshes and blueprints are clustered! - This gets us into the realm of shippability on console for very large UObject counts [FYI] bob.tellez,peter.knepley,michael.noland #jira AT-1440 #ROBOMERGE-SOURCE: CL 3596552 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3593994 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Force largest distance field atlas size in Athena - We now force the largest distance field atlas size before preloading Athena content (512x512x1024 = 256 MB). This helps with load times because it's expensive to re-create this texture on consoles, and typically it gets resized over a dozen times. - Added new CVar "r.DistanceFields.ForceMaxAtlasSize" (defaults to zero) - Important: Currently we never "reset" this atlas texture. This will be a problem when going back to play Campaigns after preloading to play Athena. I will look into this soon! [CODEREVIEW] peter.knepley,marcus.wassmer,michael.noland,daniel.wright #jira AT-1477 #ROBOMERGE-SOURCE: CL 3593992 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592096 by robomerge #ROBOMERGE-AUTHOR: ben.salem Prototype of gauntlet memory soak test. Not fully fiinished, but want changes in tonight's cook so we can experiment on cooked build tomorrow morning. #jira FORT-0 #ROBOMERGE-SOURCE: CL 3592025 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592085 by robomerge #ROBOMERGE-AUTHOR: mike.fricker HLOD: Added support for a fixed distance override via CVar - Use this to force all HLODs to transition at a specific distance, regardless of their TransitionSize/MinDrawDistance/LODDrawDistance - New CVar: r.HLOD.DistanceOverride (defaults to 0) - Fortnite uses 350m for this distance, fornow [CODEREVIEW] jurre.debaare #jira AT-1462 #ROBOMERGE-SOURCE: CL 3591929 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3587391 by Michael.Noland Fortnite: Lots of memory tracking stuff - Added memory logging to game state transitions and overall health tracking for the entire session - Added support for Gauntlet-based tests to Fortnite - Enabled the Gauntlet plugin (and fixed spaces instead of tabs in the .uproject file) - Added code to set gauntlet state based on the current subclass of AFortGameState - Added a base controller and a memory report controller (WIP, ported from equivalents in Paragon) - Updated FortniteClient to use MALLOC_LEAKDETECTION=1, PLATFORM_USES_FIXED_GMalloc_CLASS=0, and AllowASLRInShipping=false in Development builds (may enable them in Test builds in a future CL, to match Paragon) #jira FORT-50567 Change 3583307 by Peter.Knepley Need non-jittered ViewToClip matrix in order to do "after tonemapper" postprocess blendable material that's positioned in view space Modify the AttachScope material function to use "ViewSpaceTransformToClipSpace" instead of going back to world space first. This also means it can utilitize the ViewToClipNoAA matrix. #jira AT-733 Change 3582378 by Luke.Thatcher [FORTNITE] [~] Unify Xbox and PS4 scalability settings and device profiles. - All Xbox and PS4 r. CVars are overriden in their platform's Scalability.ini file. The device profile only selects sg. groups. - Fixed the Neo 4K profile for Fortnite. Previously players with 4K monitors would choose the Neo_4K profile, which looks worse than Neo, but still renders at 1080p. - Console specific settings have to live in the Base/Default .ini's, as the cooker doesn't load the console specific files. This is fixed in UE4 Main. #jira FORT-50206 Change 3580934 by Luke.Thatcher [FORTNITE] [PS4] [+] Support different garlic and onion heap sizes in the old memory system for base and neo. - Neo has 512 MB more direct memory than a base kit. - Increased the garlic heap size by 416 MB on Neo, and CPU heap by 96 MB. #jira FORT-50206 Change 3576664 by Bart.Hawthorne Re-enable Oodle and add Mac implementation. Also includes fixed oodle libraries by MichaelT. #jira FORT-49986 #tests Connected to PC server with editor -game build on Mac in Athena Change 3575671 by Nick.Darnell Athena - The gameplay ability system now supports adding Gameplay Cue's with params. Now using cues instead of gameplay effects in order to notify when the bandaging/shielding begin and end. THe new method should properly show and disappear on time, b/c it's all client side. Added a way in the Athena Context to easily hook gameplay "UI" cues that are rebroadcast from the Athena Pawn. #jira AT-644 Change 3575534 by Peter.Knepley Ability montage replication optimizations #jira AT-955 Change 3573305 by Lukasz.Furman disabled path section update when crowd simulated AI is moving through navlink, fixed AI getting stuck in some corners #jira FORT-49748 Change 3566775 by John.Abercrombie Optimizations from Dev-Athena - Tested with PIE & and 2 Player local server game #ue4-athena - (merge CLs 3345771 and 3363030 from Framework) - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]. For Fortnite, set unthrottled (<= 10 player) limit to 60Hz (from 90Hz), and trying throttled at 30Hz (from 45Hz). #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545535 by Zak.Middleton on 2017/07/19 20:15:17. #ue4-athena - (merge CL 3377054 from Framework) - Fix CharacterMovementComponent updated with very high delta time on server when initially joining. Make sure the ServerTimeStamp is initialized to current world time rather than zero to prevent large delta. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545452 by Zak.Middleton on 2017/07/19 18:57:45. #athena - If network smoothing mode is not linear, don't replicate ReplicatedServerLastTransformUpdateTimeStamp. Only AI use linear smoothing in FN. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545559 by Zak.Middleton on 2017/07/19 20:47:18. #ue4-athena - Converted all RPCs on UCharacterMovementComponent to be on ACharacter instead, to avoid the bandwidth overhead of calling RPCs on a component. Existing overrides of _Implementation and _Validate functions should remain unchanged. If for some reason someone overrode the old RPC virtuals, those are now non-virtual on UCharacterMovementComponent but are still virtual on ACharacter. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3557564 by Zak.Middleton on 2017/07/26 20:13:43. #ue4-athena - Throttle character movement server corrections and acks to the client based on time since last adjustment. Cuts down on network traffic for character movement. Added configurable settings to control this. Set times to zero to disable this. - NetworkMinTimeBetweenClientAckGoodMove - NetworkMinTimeBetweenClientAdjustments - NetworkMinTimeBetweenClientAdjustmentsLargeCorrection - NetworkLargeClientCorrectionDistance #ue4-athena - Perf: (EditMerge CL 3492200 from Dev-Framework): Always reset the input array in AActor::GetComponents(), but do so without affecting allocated size. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561669 by Zak.Middleton on 2017/07/28 14:16:19. #ue4-athena - Perf: (EditMerge CL 3468253 from Dev-AnimPhys): Remove the need for calling constructors for physx PxRaycastHit in the dynamic hit result buffer. Saves 30% of the cost of doing small raycasts. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561672 by Zak.Middleton on 2017/07/28 14:17:12. #ue4-athena - Perf: (EditMerge CL 3359553 from Dev-Framework): Optimization in CharacterMovement tick to not extract transform values twice. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561674 by Zak.Middleton on 2017/07/28 14:18:04. #ue4-athena - Perf: (EditMerge CL 3426174 from Dev-Framework): Avoid call to virtual getSimulationFilterData() to only use it when needed in PreFilter if we actually have items in the IgnoreComponents list (which is rare). The sim filter data 'word2' stores the component ID. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561709 by Zak.Middleton on 2017/07/28 14:32:11. #ue4-athena - Perf: (EditMerge CL 3382054 from Dev-Framework): Optimize CharacterMovementComponent::GetPredictionData_Client_Character() and GetPredictionData_Server_Character() to remove virtual calls. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561856 by Zak.Middleton on 2017/07/28 15:11:57. #ue4-athena - Use less bandwidth for CharacterMovement RPCs when the character is not standing on any component (ie during jumps and falling). Added separate "...NoBase()" versions of ServerMove() and ServerMoveDual(). Undid part of 3557564 and restored the CMC functions to be virtual, and removed virtual keyword from matching Character functions, so that overrides are in one consistent place. Also guarantees backwards compat for licensees. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3564858 by Zak.Middleton on 2017/07/31 15:24:39. #jira Fort-1 Change 3562825 by Chris.Gagnon Added CommonCustomNavigation Widget, this widget can be used to capture navigation requests to handle in custom ways. #jira FORT-0 Change 3562098 by Josh.Markiewicz #UE4 Encryption token/ack changes - moved encryption token request/ack to delegates - moved FNetworkNotify to NetworkDelegates.h - moved connection logic out of GameInstance and back into networking code -- GameInstance sends an enum and the network code does the right thing based on that #review-3559694 @ryan.gerleve #tests PC dedicated server connections golden path and forced failures #jira FORT-0 Change 3559354 by Luke.Thatcher [FORTNITE] [PS4] [^] Merging (as edit) support for setting flip rate on PS4 (CLs 3555687 and 3558843) from //Fortnite/Dev-Athena/... to //Fortnite/Main/... - Allowed rates are now 60Hz, 30Hz and 20Hz. - Exposed by r.PS4FlipRate CVar, set to 60Hz by default. Requires r.Vsync 1. #jira FORT-49463 Change 3532644 by Jeff.Campeau Fix mapping current culture to movie audio channels using data table to map languages to track indices. Don't rewind cinematics (they all start from the begining because we load them and play them once). Seeks cause us to have to redecode video frames at a large perf cost. Delay cutscene playback by 0.5 seconds to give us time to build up a buffer of decoded video. (Temporary workaround for audio/video sync). Generic implementation for getting current languages in BP. Fix more issues with calling into media source functionality when using the source reader (potential hangs). #jira FORT-44376,FORT-48209,FORT-48040 #testedon Preflight from last night combined with Bob's changes from today clear all known issues. This change tested on Xbox and PC multiple times each. Change 3527761 by Chris.Gagnon Fixed various issues in the widget switcher, also added Advanced calls that allow the user to specify if activation/deactivation should occur. #jira FORT-47988, FORT-47984 Change 3525390 by Jeff.Campeau Remove media player log spam #jira FORT-47393 #testedon compiled client Change 3518692 by Chris.Gagnon Added CleanOperation Adding which will remove unneeded op combinations from the op queue. Also added the ability to suspend starting operation queue processing to allow complex operations to accumulate and in turn allow the Clean Op adding code to be effective. GameFeedback, and the widget switcer utilize this to avoid unnesacary activations of a screen that is immediately being deactivated. Root issue of the mentioned bug is that activation of the quest screen created a latent navigation du to the deferal of scrolling into view. This is still an issue in general, there isn't much we can do about it. Other than avoid activating a panel that will deactivated that frame as we did with the code changes in this CL. #jira FORT-47395 Change 3514658 by Jeff.Campeau Fixed a media player threading issue where the OnMediaOpened event could be called before the media Init script completed. Moved the event Cinematic used when setting up and playing media after media file load to use a delayed event from the MovieWidget so that it will always happen after the movie widget processing. Fixed an issue that could cause samples to leak in MfMedia plugin and cause ReadSample to lockup. Fixed an issue where a default texture is displayed for movies before the movie starts playing (the player may be active before the first frame of the video is decoded). Default is now all black as it is expected that this texture will be displayed for several frames. #jira FORT-46801 #testedon Xbox through rocket launch cinematic including vintertip for stairs, skill tree nodes, and victory result video Change 3507896 by Ryan.Gerleve Changed the net.UseEncryptionToken to be more useful and renamed it to net.AllowEncryption. This cvar, if 0, will prevent the PacketHandler from adding the configured encryption component, and prevent UPendingNetGame and AOnlineBeaconClient from filling out the EncryptionToken parameter of NMT_Hello - which prevents the extra encryption handshake connection step. #jira FORT-46878 #review-3507897 @josh.markiewicz Change 3503928 by Ryan.Gerleve Add safety checks around some of the encryption functionality. Fixes a server crash seen during load testing. #jira FORT-46772 #review-3503929 bob.tellez #robomerge ReleaseNext [CL 3673993 by Bob Tellez in Main branch]
2017-09-30 03:42:01 -04:00
: TotalAllocatedSinceLastCommit(0)
{
Pool = new FDynamicVertexBufferPool();
}
FGlobalDynamicVertexBuffer::~FGlobalDynamicVertexBuffer()
{
delete Pool;
Pool = NULL;
}
FGlobalDynamicVertexBuffer::FAllocation FGlobalDynamicVertexBuffer::Allocate(uint32 SizeInBytes)
{
FAllocation Allocation;
Merging from //UE4/Fortnite-Staging up to CL#3673800 based on CL#3664064 from //Fortnite/Main #rb none #lockdown Nick.Penwarden ================================================================================================= THESE CHANGES TOUCH MULTIPLE PLATFORMS AND/OR RESTRICTED FOLDERS. YOU MUST REVIEW THESE MANUALLY AND APPEND THEM TO THE DESCRIPTIONS FOR THE APPROPRIATE PLATFORMS. ================================================================================================= Change 3662267 by Nick.Darnell Engine - Fixing a bug in GetAccurateRealTime, it wasn't subtracting GStartTime, which if you don't prevents accurate platform time when you try to store it in a float. #jira nojira Change 3662176 by Ben.Marsh Disable image integrity report generation if a debugger is attached, and in editor builds. #jira FORT-55656 Change 3656958 by Luke.Thatcher [FORTNITE] [CONSOLE] [+] Improved frame syncing mechanism - Improves input latency by allowing the game thread to sync to the swap chain flip of the previous frame. - Added "r.GTSyncType" CVar to control how the game thread syncs with the rest of the pipe. - r.GTSyncType 2 will sync the game thread with the flip of the swap chain, preventing the pipe from getting too long and causing excess input latency. Platforms are required to implement RHIWaitForFlip and RHISignalFlipEvent, and call RHIInitializeFlipTracking on RHI startup. A separate thread monitors the progress of frame flips and signals task graph events as they pass their corresponding frame index. In r.GTSyncType 2 mode, the game thread is signaled by this flip tracking thread. [~] Unified platform specific sync interval CVars (D3D12.SyncInterval, D3D11.SyncInterval, r.PS4FlipRate, RHI.SyncIntervalOgl) into one: rhi.SyncInterval - 1 == 60Hz - 2 == 30Hz - 3 == 20Hz [-] Removed large number in XboxOneTime. Adding this arbitrary number prevents us from comparing timestamps from FPlatformTime::Seconds() and various OS callbacks (e.g. flip timings). #jira FORT-50803 Change 3655598 by Lukasz.Furman added filtering for navmesh's low height spans to fix crash on layer partitioning % of span reductions depends on presence of stair or roof building in navmesh tile, changed failsafes in layer code to ignore entire tile if heightfield is too complex to partition instead of reallocating memory #jira FORT-35375 Change 3648972 by Keith.Judge Add analytics to help diagnose default parameter collection buffer issue. +++ REMOVE ONCE CORE ISSUE IS SOLVED +++ #jira FORT-54690 Change 3648756 by Bart.Hawthorne Integrate 3645298 from //UE4/Dev-Networking Deprecate GetNetworkObjectInfo in favor of separate FindNetworkObjectInfo and FindOrCreateNetworkObjectInfo methods. #jira none Change 3643090 by Josh.Markiewicz #UE4 - proper handling of "pending connection lost" - triggered only if a connection is lost and there no "owning actor" to deal with the connection loss -- added Rejoin and CleanedUp states to connection to make sure that the pending connection lost delegate only fires at the appropriate time - delegate returns the unique id of the player if known (still possible to be unknown if connection lost after NMT_Hello) - changed debug output on timeout if the net connection was already in the process of being destroyed -- occurs when game hitches during the pending destroy 2 second wait -- ReceivedAcks should have been called to clean things up quietly in those 2 seconds but blocking the game thread will cause the cleanup to look like a timeout - added userid to UNetConnection::Describe - bad split screen player handling of unique id -- splitscreen uniqueid was overwriting the primary player id -- only store the id on the child connection - added some clarifying comments #review-3642816 @ryan.gerleve, @bob.tellez, @sam.zamani, @bart.hawthorne, @dave.ratti #jira FORT-26776 Change 3639043 by Alex.Thurman Fix CommonTreeView SetSelection to correctly update list navigation, and behave similarly to CommonListView's SetSelectedItem. #JIRA FORT-45841 Change 3632275 by Seth.Weedin #JIRA FORT-54203 - Add clamps to ActiveSound fade interpolation to prevent unwanted volume spikes. Remove 0.01 start time for single-fire audio cues. Should remove the sudden pops sometimes heard when firing weapons, as well as smooth out fade volume in general. Change 3626944 by Josh.Markiewicz #UE4 - added "updates connection status" flag to ServiceConfigMCP - disable updates on Cloud and Friend services (Fortnite only) - removed overloaded ProcessConnectionStatus function in cloud service #jira FORT-53113 Change 3626226 by Stewart.Lynch LLM Update - Memory reductions, Summary page, enum scopes, refactor and cleanup of tags * Remove all static arrays and hard limits from LLM. Everything is now dynamically allocated using the internal LLM allocators. The overhead when LLM is disabled is now only 48K (was 40MB) * re-wrote LLMMap. Now stores an int32 index rather then pointer in the HashMap array. Also, changed the Values to be arrays for structs instead of structs of arrays. Means that the tag can be stored in a single byte. Changed the size of the allocation size from int64 to int32. All this takes the memory down from around 600MB to 100MB. It was 120 bytes per allocation, now 29 bytes. * changed all LLM scopes over to enums. This has a number of benefits; LLM can be enable in Test, less CPU overhead, stored in a byte (LLM overhead /= 8) * summary page for content creators where all lower-level stats are grouped under one Engine stat * renamed ELLMScopeTag enum to ELLMTag * renamed LLM_SCOPED_TAG_WITH_ENUM macro to LLM_SCOPE * removed Tracker arg from LLM_SCOPE and added LLM_PLATFORM_SCOPE macro * fixed GenericPlatformMallocCrash stat. Although it seems not be be used anymore * fixed BackupOOMMemoryPool stat (now shows in both default and platform pages) * added separate LLM enums for XB1, PS4 and D3D12 (PS4LLM.cpp/h etc.) * lots of changes adding/removing/renaming tags * added LLMArray and FLLMObjectAllocator classes * disabled asset tag tracking by default because it takes up so much memory even when not used * enable LLM in all non-shipping builds. In Test the on screendisplay won't show because it uses the stats system but it till still write out the csv. * all the stat macros have been left as they were and can be enabled on the LLM_STAT_TAGS_ENABLED define. These are needed for the asset tagging. * disabled LLM_TRACK_PEAK_MEMORY because there is a problem with the way it adds the peaks for multiple threads. This needs to be fixed. * added a CVar to control the csv write interval: LLM.LLMWriteInterval * added static arrays for the enum tags setup. Easier to manage and removes need for slow switch statements. * renamed FLLMThreadStateManager to FLLMTracker to make it consistent with the enum * fixed program size stat which was broken recently on PS4. This was due to initialisation order and global platform stats setup #jira NONE-01 Change 3622978 by Lukasz.Furman changed WeaponStatus BT decorator to be event driven, fixes AI trying to check ranged weapon abilities without valid weapon includes copy of CL# 3620700 #jira FORT-45914 #review-3622979 John.Abercrombie Change 3622340 by Josh.Markiewicz #UE4 - playerid netconnection variable setup properly on clients and servers for both beacons and game net drivers - ipconnection prints uniqueid with lowleveldescribe #jira fort-0 Change 3621386 by Tim.Tillotson Add the ability to retry HTTP operations by VERB. This allows us to automatically retry cloud save PUT operations. #JIRA FORT-53717 #review-3621317 @Josh.Markiewicz @Ian.Fox @Carlos.Cuello Change 3620517 by Keith.Judge Xbox One - Revert iOS behaviour for the depth bias back to how it was, and make separate XB1 change use its own define to avoid confusion. #jira FORT-53928 Change 3620248 by Lukasz.Furman changed behavior of UBTTask_MoveTo.bStopOnOverlap flag after recent AcceptanceRadius fix, updated comments to be more detailed #jira nojira Change 3616187 by Bob.Tellez #UE4 Throwing an error (for now) if you attempt to use both the malloc profiler and leak detection at the same time since it causes a deadlock. #JIRA UE-0 Change 3613935 by Peter.Knepley More logging on update launcher launching #jira nojira #robomerge rp rn Change 3613537 by Marcus.Wassmer Safety asserts around the MarkPendingKill feature for rendering classes. #jira FORT-50385 Change 3613399 by Arne.Schober Extended ShowMaterialDrawEvents to enable it only in very specific passes and default enabled Depth for Fortnite on PS4 to track down a crash. #RB Marcus.Wassmer #jira FORT-53610 Change 3610794 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce UMG class memory #jira UE-52043 #ROBOMERGE-SOURCE: CL 3610792 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3610144 by Stewart.Lynch General LLM improvements * added tracking for misc task graph tasks (moves 20MB out of Untagged) * renamed EngineTick to EngineMisc * added tracking for FName * added tracking for GC_ProcessObjectArray potential leak * renamed index & vertex buffers stat to Meshes * added hooks for MemPro to track allocations from a single category. Currently defined out. I haven't added MemPro.cpp/h. * removed AVAILABLE_PHYSICAL stat from LLM csv * csv files now include the date in the filename * fixed potential threading bug when reading stat values to csv * made IsDebugMemoryEnabled() always return false in shipping and if not runnong on a dev-kit (PS4). The reason is that the function is a bit hacky, and should only be used for debug purposes, such as displaying the on screen warning. * added lots more scopes * started changing Stat scopes to enum scopes. Stat scopes will be phased out. * added tracking of FName memory * added llmplatform tracking for XBoxSymbols * added llm tracking for CPU symbol allocations (20MB) * wrote an allocator for XBoxOneStack reading so that it doesn't go through Malloc and get tracked by LLM. * added tracking for GC * fixed tracking for TransientMemoryAllocator * added tracking for networking memory * added more audio memory tracking * added tracking for blueprints * added tracking for static meshes * show on screen warning if debug memory is enabled * added tracking for particles * renamed Phys to PhysX and added more scopes * renamed Slate to UI and added more scopes * much better coverage of networking memory * improved coverage of audio #jira FORT-53420 Change 3610136 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce size of UStaticMeshComponent by 224 bytes (cumulative, 64 bytes exclusive) Reduce size of UPrimitiveComponent by 176 bytes (cumulative, 64 bytes exclusive). Reduce size of USceneComponent by 112 bytes. Reduce size of FLightingChannels from 3 bytes to 1. Reduce size of FBodyInstance by 16 bytes. #jira FORT-52043 #ROBOMERGE-SOURCE: CL 3610134 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607937 by robomerge #ROBOMERGE-AUTHOR: paul.moore #jira FORT-53105 - Fix websocket not providing information when the peer closes the connection. #ROBOMERGE-SOURCE: CL 3607933 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607042 by Bart.Hawthorne Move replay.Loop functionality into the demo net driver and rename it demo.Loop #jira none Change 3605448 by robomerge #ROBOMERGE-AUTHOR: seth.weedin #Athena - Pass owner to ActiveSounds created using PlaySoundAtLocation/PlaySound2D to allow "Limit to Owner" concurrency rules to work. Hook up for weapon sounds. #JIRA FORT-53180 #ROBOMERGE-SOURCE: CL 3605443 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3604787 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Initial support for hotfixing live assets from .ini files - This allows clients and server to patch certain assets in memory whenever .ini file hotfixes are downloaded - Only CurveTables and DataTables are supported for now - The new asset content must be in Json format, the same format the editor uses for importing - Assets that are hotfixed will be synchronously loaded if they're not already in memory. They'll be retained in memory afterwards. - IMPORTANT: Json data must be supplied on a single line, and all double quotes must be escaped! - The changes must go in the Game.ini file and use the following syntax: [AssetHotfix] +CurveTable=("/Game/Folder/MyCurveTable","[{\"Name\":\"Default\"}]") +DataTable=("/Game/Folder2/MyDataTable","[{\"Name\":\"Foo\"}]") #jira FORT-52099 [CODEREVIEW] frank.gigliotti [FYI] peter.knepley,bob.tellez #ROBOMERGE-SOURCE: CL 3604784 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3602067 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Loading time improvements - This shaves off up to 10 seconds of load time on PS4 in Athena Details: - Fixed multiple sub-levels not being able to be enqueued for loading in a single client frame. Athena has ~300 sub-levels, so this ended up wasting up many seconds. - Fixed 3D world being rendered while loading (frees up game thread cycles for throttled streaming) - UWorld::AllowLevelLoadRequests() was not allowing load requests to go through while an async load was in progress and the match had started. It now allows this as long as the world isn't being rendered (loading screen.) - Eliminated extra 2 second delay before loading screen is dismissed (in Athena only) - Note: A side effect of this change is that the progress bar may not update as smoothly on loading screen. We'll look at tuning the throttle settings if it ends up being a problem. [CODEREVIEW] ori.cohen #jira AT-1477 #ROBOMERGE-SOURCE: CL 3602061 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3601951 by Luke.Thatcher [FORTNITE] [PS4] [!] Fix memory stats in the old PS4 memory system - Physical memory stat now includes garlic and onion allocations. CPU OOMs will result in "AvailablePhysical" being close to 0. - Added garlic, onion and defrag stats to the platform memory stats struct. - Added fixed pool sizes to platform memory stats. - Modified the Fortnite heartbeat logging to include extra details of PS4 fixed sized pools. #jira FORT-52910 Change 3600340 by robomerge #ROBOMERGE-AUTHOR: wes.hunt All Fort analytics events now contain a GameState attribute indicating the active GameState ClassName when the event is sent. Added some new context to crashreporter to help identify Athena matches near and long term. * Near Term: GameNameSuffix - set via FCoreDelegates::CrashOverrideParamsChanged * Added bools to the params to indicate WHICH ones are changing * Allows you to set only some values, and clear them out. * Hooked up in FortGameState::PostInitializeComponents. * FortGameState clears it (for returning to main menu). * FortGameStateAthena sets it (for going into an Athena match). * Only does this when it's a true GameMode GameState instance (ie, not PIE) so PIE crashes aren't modified. * Long Term: GameStateName - set via FCoreDelegates::GameStateClassChanged. * This works for ANY crash on ANY game. * Hooked up in GameState::HandleMatchIsWaitingToStart. #jira AT-1457 #jira AT-519 [CODEREVIEW] peter.knepley,josh.markiewicz #ROBOMERGE-SOURCE: CL 3600278 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3597593 by Ben.Zeigler #jira FORT-50722 Fix issues where AssetBundles weren't being correctly updated during cook, which is blocking both Noland and Abercrombie Partial copy of CL #3402335 and #3526538 #robomerge rp, rn Change 3597577 by Luke.Thatcher [FORTNITE] [PS4] [~] Modified the way memory is allocated on Playstation to make more memory available to the CPU. - Previously the amount of texture memory wasn╞t fixed due to the way the defrag memory is allocated on PS4. This meant we had to have a significant amount of slack. - With the new configuration, we have a guaranteed texture memory pool, so the slack can be significantly smaller, meaning we can give more memory to the CPU, which is where most of our memory pressure is. #jira FORT-50825 #jira FORT-49688 #jira FORT-49695 #jira FORT-50054 Change 3596556 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Enable GC clustering for actors and blueprints in Fortnite - This shaves off about 10 ms on GC frames in Athena on PS4 (~52 ms -> 42 ms) - Clustering doesn't work on building actors because they're very dynamic, but general Fort static meshes and blueprints are clustered! - This gets us into the realm of shippability on console for very large UObject counts [FYI] bob.tellez,peter.knepley,michael.noland #jira AT-1440 #ROBOMERGE-SOURCE: CL 3596552 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3593994 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Force largest distance field atlas size in Athena - We now force the largest distance field atlas size before preloading Athena content (512x512x1024 = 256 MB). This helps with load times because it's expensive to re-create this texture on consoles, and typically it gets resized over a dozen times. - Added new CVar "r.DistanceFields.ForceMaxAtlasSize" (defaults to zero) - Important: Currently we never "reset" this atlas texture. This will be a problem when going back to play Campaigns after preloading to play Athena. I will look into this soon! [CODEREVIEW] peter.knepley,marcus.wassmer,michael.noland,daniel.wright #jira AT-1477 #ROBOMERGE-SOURCE: CL 3593992 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592096 by robomerge #ROBOMERGE-AUTHOR: ben.salem Prototype of gauntlet memory soak test. Not fully fiinished, but want changes in tonight's cook so we can experiment on cooked build tomorrow morning. #jira FORT-0 #ROBOMERGE-SOURCE: CL 3592025 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592085 by robomerge #ROBOMERGE-AUTHOR: mike.fricker HLOD: Added support for a fixed distance override via CVar - Use this to force all HLODs to transition at a specific distance, regardless of their TransitionSize/MinDrawDistance/LODDrawDistance - New CVar: r.HLOD.DistanceOverride (defaults to 0) - Fortnite uses 350m for this distance, fornow [CODEREVIEW] jurre.debaare #jira AT-1462 #ROBOMERGE-SOURCE: CL 3591929 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3587391 by Michael.Noland Fortnite: Lots of memory tracking stuff - Added memory logging to game state transitions and overall health tracking for the entire session - Added support for Gauntlet-based tests to Fortnite - Enabled the Gauntlet plugin (and fixed spaces instead of tabs in the .uproject file) - Added code to set gauntlet state based on the current subclass of AFortGameState - Added a base controller and a memory report controller (WIP, ported from equivalents in Paragon) - Updated FortniteClient to use MALLOC_LEAKDETECTION=1, PLATFORM_USES_FIXED_GMalloc_CLASS=0, and AllowASLRInShipping=false in Development builds (may enable them in Test builds in a future CL, to match Paragon) #jira FORT-50567 Change 3583307 by Peter.Knepley Need non-jittered ViewToClip matrix in order to do "after tonemapper" postprocess blendable material that's positioned in view space Modify the AttachScope material function to use "ViewSpaceTransformToClipSpace" instead of going back to world space first. This also means it can utilitize the ViewToClipNoAA matrix. #jira AT-733 Change 3582378 by Luke.Thatcher [FORTNITE] [~] Unify Xbox and PS4 scalability settings and device profiles. - All Xbox and PS4 r. CVars are overriden in their platform's Scalability.ini file. The device profile only selects sg. groups. - Fixed the Neo 4K profile for Fortnite. Previously players with 4K monitors would choose the Neo_4K profile, which looks worse than Neo, but still renders at 1080p. - Console specific settings have to live in the Base/Default .ini's, as the cooker doesn't load the console specific files. This is fixed in UE4 Main. #jira FORT-50206 Change 3580934 by Luke.Thatcher [FORTNITE] [PS4] [+] Support different garlic and onion heap sizes in the old memory system for base and neo. - Neo has 512 MB more direct memory than a base kit. - Increased the garlic heap size by 416 MB on Neo, and CPU heap by 96 MB. #jira FORT-50206 Change 3576664 by Bart.Hawthorne Re-enable Oodle and add Mac implementation. Also includes fixed oodle libraries by MichaelT. #jira FORT-49986 #tests Connected to PC server with editor -game build on Mac in Athena Change 3575671 by Nick.Darnell Athena - The gameplay ability system now supports adding Gameplay Cue's with params. Now using cues instead of gameplay effects in order to notify when the bandaging/shielding begin and end. THe new method should properly show and disappear on time, b/c it's all client side. Added a way in the Athena Context to easily hook gameplay "UI" cues that are rebroadcast from the Athena Pawn. #jira AT-644 Change 3575534 by Peter.Knepley Ability montage replication optimizations #jira AT-955 Change 3573305 by Lukasz.Furman disabled path section update when crowd simulated AI is moving through navlink, fixed AI getting stuck in some corners #jira FORT-49748 Change 3566775 by John.Abercrombie Optimizations from Dev-Athena - Tested with PIE & and 2 Player local server game #ue4-athena - (merge CLs 3345771 and 3363030 from Framework) - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]. For Fortnite, set unthrottled (<= 10 player) limit to 60Hz (from 90Hz), and trying throttled at 30Hz (from 45Hz). #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545535 by Zak.Middleton on 2017/07/19 20:15:17. #ue4-athena - (merge CL 3377054 from Framework) - Fix CharacterMovementComponent updated with very high delta time on server when initially joining. Make sure the ServerTimeStamp is initialized to current world time rather than zero to prevent large delta. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545452 by Zak.Middleton on 2017/07/19 18:57:45. #athena - If network smoothing mode is not linear, don't replicate ReplicatedServerLastTransformUpdateTimeStamp. Only AI use linear smoothing in FN. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545559 by Zak.Middleton on 2017/07/19 20:47:18. #ue4-athena - Converted all RPCs on UCharacterMovementComponent to be on ACharacter instead, to avoid the bandwidth overhead of calling RPCs on a component. Existing overrides of _Implementation and _Validate functions should remain unchanged. If for some reason someone overrode the old RPC virtuals, those are now non-virtual on UCharacterMovementComponent but are still virtual on ACharacter. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3557564 by Zak.Middleton on 2017/07/26 20:13:43. #ue4-athena - Throttle character movement server corrections and acks to the client based on time since last adjustment. Cuts down on network traffic for character movement. Added configurable settings to control this. Set times to zero to disable this. - NetworkMinTimeBetweenClientAckGoodMove - NetworkMinTimeBetweenClientAdjustments - NetworkMinTimeBetweenClientAdjustmentsLargeCorrection - NetworkLargeClientCorrectionDistance #ue4-athena - Perf: (EditMerge CL 3492200 from Dev-Framework): Always reset the input array in AActor::GetComponents(), but do so without affecting allocated size. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561669 by Zak.Middleton on 2017/07/28 14:16:19. #ue4-athena - Perf: (EditMerge CL 3468253 from Dev-AnimPhys): Remove the need for calling constructors for physx PxRaycastHit in the dynamic hit result buffer. Saves 30% of the cost of doing small raycasts. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561672 by Zak.Middleton on 2017/07/28 14:17:12. #ue4-athena - Perf: (EditMerge CL 3359553 from Dev-Framework): Optimization in CharacterMovement tick to not extract transform values twice. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561674 by Zak.Middleton on 2017/07/28 14:18:04. #ue4-athena - Perf: (EditMerge CL 3426174 from Dev-Framework): Avoid call to virtual getSimulationFilterData() to only use it when needed in PreFilter if we actually have items in the IgnoreComponents list (which is rare). The sim filter data 'word2' stores the component ID. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561709 by Zak.Middleton on 2017/07/28 14:32:11. #ue4-athena - Perf: (EditMerge CL 3382054 from Dev-Framework): Optimize CharacterMovementComponent::GetPredictionData_Client_Character() and GetPredictionData_Server_Character() to remove virtual calls. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561856 by Zak.Middleton on 2017/07/28 15:11:57. #ue4-athena - Use less bandwidth for CharacterMovement RPCs when the character is not standing on any component (ie during jumps and falling). Added separate "...NoBase()" versions of ServerMove() and ServerMoveDual(). Undid part of 3557564 and restored the CMC functions to be virtual, and removed virtual keyword from matching Character functions, so that overrides are in one consistent place. Also guarantees backwards compat for licensees. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3564858 by Zak.Middleton on 2017/07/31 15:24:39. #jira Fort-1 Change 3562825 by Chris.Gagnon Added CommonCustomNavigation Widget, this widget can be used to capture navigation requests to handle in custom ways. #jira FORT-0 Change 3562098 by Josh.Markiewicz #UE4 Encryption token/ack changes - moved encryption token request/ack to delegates - moved FNetworkNotify to NetworkDelegates.h - moved connection logic out of GameInstance and back into networking code -- GameInstance sends an enum and the network code does the right thing based on that #review-3559694 @ryan.gerleve #tests PC dedicated server connections golden path and forced failures #jira FORT-0 Change 3559354 by Luke.Thatcher [FORTNITE] [PS4] [^] Merging (as edit) support for setting flip rate on PS4 (CLs 3555687 and 3558843) from //Fortnite/Dev-Athena/... to //Fortnite/Main/... - Allowed rates are now 60Hz, 30Hz and 20Hz. - Exposed by r.PS4FlipRate CVar, set to 60Hz by default. Requires r.Vsync 1. #jira FORT-49463 Change 3532644 by Jeff.Campeau Fix mapping current culture to movie audio channels using data table to map languages to track indices. Don't rewind cinematics (they all start from the begining because we load them and play them once). Seeks cause us to have to redecode video frames at a large perf cost. Delay cutscene playback by 0.5 seconds to give us time to build up a buffer of decoded video. (Temporary workaround for audio/video sync). Generic implementation for getting current languages in BP. Fix more issues with calling into media source functionality when using the source reader (potential hangs). #jira FORT-44376,FORT-48209,FORT-48040 #testedon Preflight from last night combined with Bob's changes from today clear all known issues. This change tested on Xbox and PC multiple times each. Change 3527761 by Chris.Gagnon Fixed various issues in the widget switcher, also added Advanced calls that allow the user to specify if activation/deactivation should occur. #jira FORT-47988, FORT-47984 Change 3525390 by Jeff.Campeau Remove media player log spam #jira FORT-47393 #testedon compiled client Change 3518692 by Chris.Gagnon Added CleanOperation Adding which will remove unneeded op combinations from the op queue. Also added the ability to suspend starting operation queue processing to allow complex operations to accumulate and in turn allow the Clean Op adding code to be effective. GameFeedback, and the widget switcer utilize this to avoid unnesacary activations of a screen that is immediately being deactivated. Root issue of the mentioned bug is that activation of the quest screen created a latent navigation du to the deferal of scrolling into view. This is still an issue in general, there isn't much we can do about it. Other than avoid activating a panel that will deactivated that frame as we did with the code changes in this CL. #jira FORT-47395 Change 3514658 by Jeff.Campeau Fixed a media player threading issue where the OnMediaOpened event could be called before the media Init script completed. Moved the event Cinematic used when setting up and playing media after media file load to use a delayed event from the MovieWidget so that it will always happen after the movie widget processing. Fixed an issue that could cause samples to leak in MfMedia plugin and cause ReadSample to lockup. Fixed an issue where a default texture is displayed for movies before the movie starts playing (the player may be active before the first frame of the video is decoded). Default is now all black as it is expected that this texture will be displayed for several frames. #jira FORT-46801 #testedon Xbox through rocket launch cinematic including vintertip for stairs, skill tree nodes, and victory result video Change 3507896 by Ryan.Gerleve Changed the net.UseEncryptionToken to be more useful and renamed it to net.AllowEncryption. This cvar, if 0, will prevent the PacketHandler from adding the configured encryption component, and prevent UPendingNetGame and AOnlineBeaconClient from filling out the EncryptionToken parameter of NMT_Hello - which prevents the extra encryption handshake connection step. #jira FORT-46878 #review-3507897 @josh.markiewicz Change 3503928 by Ryan.Gerleve Add safety checks around some of the encryption functionality. Fixes a server crash seen during load testing. #jira FORT-46772 #review-3503929 bob.tellez #robomerge ReleaseNext [CL 3673993 by Bob Tellez in Main branch]
2017-09-30 03:42:01 -04:00
TotalAllocatedSinceLastCommit += SizeInBytes;
if (IsRenderAlarmLoggingEnabled())
{
UE_LOG(LogRendererCore, Warning, TEXT("FGlobalDynamicVertexBuffer::Allocate(%u), will have allocated %u total this frame"), SizeInBytes, TotalAllocatedSinceLastCommit);
}
FDynamicVertexBuffer* VertexBuffer = Pool->CurrentVertexBuffer;
if (VertexBuffer == NULL || VertexBuffer->AllocatedByteCount + SizeInBytes > VertexBuffer->BufferSize)
{
// Find a buffer in the pool big enough to service the request.
VertexBuffer = NULL;
for (int32 BufferIndex = 0, NumBuffers = Pool->VertexBuffers.Num(); BufferIndex < NumBuffers; ++BufferIndex)
{
FDynamicVertexBuffer& VertexBufferToCheck = Pool->VertexBuffers[BufferIndex];
if (VertexBufferToCheck.AllocatedByteCount + SizeInBytes <= VertexBufferToCheck.BufferSize)
{
VertexBuffer = &VertexBufferToCheck;
break;
}
}
// Create a new vertex buffer if needed.
if (VertexBuffer == NULL)
{
VertexBuffer = new FDynamicVertexBuffer(SizeInBytes);
Pool->VertexBuffers.Add(VertexBuffer);
VertexBuffer->InitResource();
}
// Lock the buffer if needed.
if (VertexBuffer->MappedBuffer == NULL)
{
VertexBuffer->Lock();
}
// Remember this buffer, we'll try to allocate out of it in the future.
Pool->CurrentVertexBuffer = VertexBuffer;
}
check(VertexBuffer != NULL);
checkf(VertexBuffer->AllocatedByteCount + SizeInBytes <= VertexBuffer->BufferSize, TEXT("Global vertex buffer allocation failed: BufferSize=%d AllocatedByteCount=%d SizeInBytes=%d"), VertexBuffer->BufferSize, VertexBuffer->AllocatedByteCount, SizeInBytes);
Allocation.Buffer = VertexBuffer->MappedBuffer + VertexBuffer->AllocatedByteCount;
Allocation.VertexBuffer = VertexBuffer;
Allocation.VertexOffset = VertexBuffer->AllocatedByteCount;
VertexBuffer->AllocatedByteCount += SizeInBytes;
return Allocation;
}
Merging from //UE4/Fortnite-Staging up to CL#3673800 based on CL#3664064 from //Fortnite/Main #rb none #lockdown Nick.Penwarden ================================================================================================= THESE CHANGES TOUCH MULTIPLE PLATFORMS AND/OR RESTRICTED FOLDERS. YOU MUST REVIEW THESE MANUALLY AND APPEND THEM TO THE DESCRIPTIONS FOR THE APPROPRIATE PLATFORMS. ================================================================================================= Change 3662267 by Nick.Darnell Engine - Fixing a bug in GetAccurateRealTime, it wasn't subtracting GStartTime, which if you don't prevents accurate platform time when you try to store it in a float. #jira nojira Change 3662176 by Ben.Marsh Disable image integrity report generation if a debugger is attached, and in editor builds. #jira FORT-55656 Change 3656958 by Luke.Thatcher [FORTNITE] [CONSOLE] [+] Improved frame syncing mechanism - Improves input latency by allowing the game thread to sync to the swap chain flip of the previous frame. - Added "r.GTSyncType" CVar to control how the game thread syncs with the rest of the pipe. - r.GTSyncType 2 will sync the game thread with the flip of the swap chain, preventing the pipe from getting too long and causing excess input latency. Platforms are required to implement RHIWaitForFlip and RHISignalFlipEvent, and call RHIInitializeFlipTracking on RHI startup. A separate thread monitors the progress of frame flips and signals task graph events as they pass their corresponding frame index. In r.GTSyncType 2 mode, the game thread is signaled by this flip tracking thread. [~] Unified platform specific sync interval CVars (D3D12.SyncInterval, D3D11.SyncInterval, r.PS4FlipRate, RHI.SyncIntervalOgl) into one: rhi.SyncInterval - 1 == 60Hz - 2 == 30Hz - 3 == 20Hz [-] Removed large number in XboxOneTime. Adding this arbitrary number prevents us from comparing timestamps from FPlatformTime::Seconds() and various OS callbacks (e.g. flip timings). #jira FORT-50803 Change 3655598 by Lukasz.Furman added filtering for navmesh's low height spans to fix crash on layer partitioning % of span reductions depends on presence of stair or roof building in navmesh tile, changed failsafes in layer code to ignore entire tile if heightfield is too complex to partition instead of reallocating memory #jira FORT-35375 Change 3648972 by Keith.Judge Add analytics to help diagnose default parameter collection buffer issue. +++ REMOVE ONCE CORE ISSUE IS SOLVED +++ #jira FORT-54690 Change 3648756 by Bart.Hawthorne Integrate 3645298 from //UE4/Dev-Networking Deprecate GetNetworkObjectInfo in favor of separate FindNetworkObjectInfo and FindOrCreateNetworkObjectInfo methods. #jira none Change 3643090 by Josh.Markiewicz #UE4 - proper handling of "pending connection lost" - triggered only if a connection is lost and there no "owning actor" to deal with the connection loss -- added Rejoin and CleanedUp states to connection to make sure that the pending connection lost delegate only fires at the appropriate time - delegate returns the unique id of the player if known (still possible to be unknown if connection lost after NMT_Hello) - changed debug output on timeout if the net connection was already in the process of being destroyed -- occurs when game hitches during the pending destroy 2 second wait -- ReceivedAcks should have been called to clean things up quietly in those 2 seconds but blocking the game thread will cause the cleanup to look like a timeout - added userid to UNetConnection::Describe - bad split screen player handling of unique id -- splitscreen uniqueid was overwriting the primary player id -- only store the id on the child connection - added some clarifying comments #review-3642816 @ryan.gerleve, @bob.tellez, @sam.zamani, @bart.hawthorne, @dave.ratti #jira FORT-26776 Change 3639043 by Alex.Thurman Fix CommonTreeView SetSelection to correctly update list navigation, and behave similarly to CommonListView's SetSelectedItem. #JIRA FORT-45841 Change 3632275 by Seth.Weedin #JIRA FORT-54203 - Add clamps to ActiveSound fade interpolation to prevent unwanted volume spikes. Remove 0.01 start time for single-fire audio cues. Should remove the sudden pops sometimes heard when firing weapons, as well as smooth out fade volume in general. Change 3626944 by Josh.Markiewicz #UE4 - added "updates connection status" flag to ServiceConfigMCP - disable updates on Cloud and Friend services (Fortnite only) - removed overloaded ProcessConnectionStatus function in cloud service #jira FORT-53113 Change 3626226 by Stewart.Lynch LLM Update - Memory reductions, Summary page, enum scopes, refactor and cleanup of tags * Remove all static arrays and hard limits from LLM. Everything is now dynamically allocated using the internal LLM allocators. The overhead when LLM is disabled is now only 48K (was 40MB) * re-wrote LLMMap. Now stores an int32 index rather then pointer in the HashMap array. Also, changed the Values to be arrays for structs instead of structs of arrays. Means that the tag can be stored in a single byte. Changed the size of the allocation size from int64 to int32. All this takes the memory down from around 600MB to 100MB. It was 120 bytes per allocation, now 29 bytes. * changed all LLM scopes over to enums. This has a number of benefits; LLM can be enable in Test, less CPU overhead, stored in a byte (LLM overhead /= 8) * summary page for content creators where all lower-level stats are grouped under one Engine stat * renamed ELLMScopeTag enum to ELLMTag * renamed LLM_SCOPED_TAG_WITH_ENUM macro to LLM_SCOPE * removed Tracker arg from LLM_SCOPE and added LLM_PLATFORM_SCOPE macro * fixed GenericPlatformMallocCrash stat. Although it seems not be be used anymore * fixed BackupOOMMemoryPool stat (now shows in both default and platform pages) * added separate LLM enums for XB1, PS4 and D3D12 (PS4LLM.cpp/h etc.) * lots of changes adding/removing/renaming tags * added LLMArray and FLLMObjectAllocator classes * disabled asset tag tracking by default because it takes up so much memory even when not used * enable LLM in all non-shipping builds. In Test the on screendisplay won't show because it uses the stats system but it till still write out the csv. * all the stat macros have been left as they were and can be enabled on the LLM_STAT_TAGS_ENABLED define. These are needed for the asset tagging. * disabled LLM_TRACK_PEAK_MEMORY because there is a problem with the way it adds the peaks for multiple threads. This needs to be fixed. * added a CVar to control the csv write interval: LLM.LLMWriteInterval * added static arrays for the enum tags setup. Easier to manage and removes need for slow switch statements. * renamed FLLMThreadStateManager to FLLMTracker to make it consistent with the enum * fixed program size stat which was broken recently on PS4. This was due to initialisation order and global platform stats setup #jira NONE-01 Change 3622978 by Lukasz.Furman changed WeaponStatus BT decorator to be event driven, fixes AI trying to check ranged weapon abilities without valid weapon includes copy of CL# 3620700 #jira FORT-45914 #review-3622979 John.Abercrombie Change 3622340 by Josh.Markiewicz #UE4 - playerid netconnection variable setup properly on clients and servers for both beacons and game net drivers - ipconnection prints uniqueid with lowleveldescribe #jira fort-0 Change 3621386 by Tim.Tillotson Add the ability to retry HTTP operations by VERB. This allows us to automatically retry cloud save PUT operations. #JIRA FORT-53717 #review-3621317 @Josh.Markiewicz @Ian.Fox @Carlos.Cuello Change 3620517 by Keith.Judge Xbox One - Revert iOS behaviour for the depth bias back to how it was, and make separate XB1 change use its own define to avoid confusion. #jira FORT-53928 Change 3620248 by Lukasz.Furman changed behavior of UBTTask_MoveTo.bStopOnOverlap flag after recent AcceptanceRadius fix, updated comments to be more detailed #jira nojira Change 3616187 by Bob.Tellez #UE4 Throwing an error (for now) if you attempt to use both the malloc profiler and leak detection at the same time since it causes a deadlock. #JIRA UE-0 Change 3613935 by Peter.Knepley More logging on update launcher launching #jira nojira #robomerge rp rn Change 3613537 by Marcus.Wassmer Safety asserts around the MarkPendingKill feature for rendering classes. #jira FORT-50385 Change 3613399 by Arne.Schober Extended ShowMaterialDrawEvents to enable it only in very specific passes and default enabled Depth for Fortnite on PS4 to track down a crash. #RB Marcus.Wassmer #jira FORT-53610 Change 3610794 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce UMG class memory #jira UE-52043 #ROBOMERGE-SOURCE: CL 3610792 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3610144 by Stewart.Lynch General LLM improvements * added tracking for misc task graph tasks (moves 20MB out of Untagged) * renamed EngineTick to EngineMisc * added tracking for FName * added tracking for GC_ProcessObjectArray potential leak * renamed index & vertex buffers stat to Meshes * added hooks for MemPro to track allocations from a single category. Currently defined out. I haven't added MemPro.cpp/h. * removed AVAILABLE_PHYSICAL stat from LLM csv * csv files now include the date in the filename * fixed potential threading bug when reading stat values to csv * made IsDebugMemoryEnabled() always return false in shipping and if not runnong on a dev-kit (PS4). The reason is that the function is a bit hacky, and should only be used for debug purposes, such as displaying the on screen warning. * added lots more scopes * started changing Stat scopes to enum scopes. Stat scopes will be phased out. * added tracking of FName memory * added llmplatform tracking for XBoxSymbols * added llm tracking for CPU symbol allocations (20MB) * wrote an allocator for XBoxOneStack reading so that it doesn't go through Malloc and get tracked by LLM. * added tracking for GC * fixed tracking for TransientMemoryAllocator * added tracking for networking memory * added more audio memory tracking * added tracking for blueprints * added tracking for static meshes * show on screen warning if debug memory is enabled * added tracking for particles * renamed Phys to PhysX and added more scopes * renamed Slate to UI and added more scopes * much better coverage of networking memory * improved coverage of audio #jira FORT-53420 Change 3610136 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce size of UStaticMeshComponent by 224 bytes (cumulative, 64 bytes exclusive) Reduce size of UPrimitiveComponent by 176 bytes (cumulative, 64 bytes exclusive). Reduce size of USceneComponent by 112 bytes. Reduce size of FLightingChannels from 3 bytes to 1. Reduce size of FBodyInstance by 16 bytes. #jira FORT-52043 #ROBOMERGE-SOURCE: CL 3610134 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607937 by robomerge #ROBOMERGE-AUTHOR: paul.moore #jira FORT-53105 - Fix websocket not providing information when the peer closes the connection. #ROBOMERGE-SOURCE: CL 3607933 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607042 by Bart.Hawthorne Move replay.Loop functionality into the demo net driver and rename it demo.Loop #jira none Change 3605448 by robomerge #ROBOMERGE-AUTHOR: seth.weedin #Athena - Pass owner to ActiveSounds created using PlaySoundAtLocation/PlaySound2D to allow "Limit to Owner" concurrency rules to work. Hook up for weapon sounds. #JIRA FORT-53180 #ROBOMERGE-SOURCE: CL 3605443 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3604787 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Initial support for hotfixing live assets from .ini files - This allows clients and server to patch certain assets in memory whenever .ini file hotfixes are downloaded - Only CurveTables and DataTables are supported for now - The new asset content must be in Json format, the same format the editor uses for importing - Assets that are hotfixed will be synchronously loaded if they're not already in memory. They'll be retained in memory afterwards. - IMPORTANT: Json data must be supplied on a single line, and all double quotes must be escaped! - The changes must go in the Game.ini file and use the following syntax: [AssetHotfix] +CurveTable=("/Game/Folder/MyCurveTable","[{\"Name\":\"Default\"}]") +DataTable=("/Game/Folder2/MyDataTable","[{\"Name\":\"Foo\"}]") #jira FORT-52099 [CODEREVIEW] frank.gigliotti [FYI] peter.knepley,bob.tellez #ROBOMERGE-SOURCE: CL 3604784 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3602067 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Loading time improvements - This shaves off up to 10 seconds of load time on PS4 in Athena Details: - Fixed multiple sub-levels not being able to be enqueued for loading in a single client frame. Athena has ~300 sub-levels, so this ended up wasting up many seconds. - Fixed 3D world being rendered while loading (frees up game thread cycles for throttled streaming) - UWorld::AllowLevelLoadRequests() was not allowing load requests to go through while an async load was in progress and the match had started. It now allows this as long as the world isn't being rendered (loading screen.) - Eliminated extra 2 second delay before loading screen is dismissed (in Athena only) - Note: A side effect of this change is that the progress bar may not update as smoothly on loading screen. We'll look at tuning the throttle settings if it ends up being a problem. [CODEREVIEW] ori.cohen #jira AT-1477 #ROBOMERGE-SOURCE: CL 3602061 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3601951 by Luke.Thatcher [FORTNITE] [PS4] [!] Fix memory stats in the old PS4 memory system - Physical memory stat now includes garlic and onion allocations. CPU OOMs will result in "AvailablePhysical" being close to 0. - Added garlic, onion and defrag stats to the platform memory stats struct. - Added fixed pool sizes to platform memory stats. - Modified the Fortnite heartbeat logging to include extra details of PS4 fixed sized pools. #jira FORT-52910 Change 3600340 by robomerge #ROBOMERGE-AUTHOR: wes.hunt All Fort analytics events now contain a GameState attribute indicating the active GameState ClassName when the event is sent. Added some new context to crashreporter to help identify Athena matches near and long term. * Near Term: GameNameSuffix - set via FCoreDelegates::CrashOverrideParamsChanged * Added bools to the params to indicate WHICH ones are changing * Allows you to set only some values, and clear them out. * Hooked up in FortGameState::PostInitializeComponents. * FortGameState clears it (for returning to main menu). * FortGameStateAthena sets it (for going into an Athena match). * Only does this when it's a true GameMode GameState instance (ie, not PIE) so PIE crashes aren't modified. * Long Term: GameStateName - set via FCoreDelegates::GameStateClassChanged. * This works for ANY crash on ANY game. * Hooked up in GameState::HandleMatchIsWaitingToStart. #jira AT-1457 #jira AT-519 [CODEREVIEW] peter.knepley,josh.markiewicz #ROBOMERGE-SOURCE: CL 3600278 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3597593 by Ben.Zeigler #jira FORT-50722 Fix issues where AssetBundles weren't being correctly updated during cook, which is blocking both Noland and Abercrombie Partial copy of CL #3402335 and #3526538 #robomerge rp, rn Change 3597577 by Luke.Thatcher [FORTNITE] [PS4] [~] Modified the way memory is allocated on Playstation to make more memory available to the CPU. - Previously the amount of texture memory wasn╞t fixed due to the way the defrag memory is allocated on PS4. This meant we had to have a significant amount of slack. - With the new configuration, we have a guaranteed texture memory pool, so the slack can be significantly smaller, meaning we can give more memory to the CPU, which is where most of our memory pressure is. #jira FORT-50825 #jira FORT-49688 #jira FORT-49695 #jira FORT-50054 Change 3596556 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Enable GC clustering for actors and blueprints in Fortnite - This shaves off about 10 ms on GC frames in Athena on PS4 (~52 ms -> 42 ms) - Clustering doesn't work on building actors because they're very dynamic, but general Fort static meshes and blueprints are clustered! - This gets us into the realm of shippability on console for very large UObject counts [FYI] bob.tellez,peter.knepley,michael.noland #jira AT-1440 #ROBOMERGE-SOURCE: CL 3596552 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3593994 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Force largest distance field atlas size in Athena - We now force the largest distance field atlas size before preloading Athena content (512x512x1024 = 256 MB). This helps with load times because it's expensive to re-create this texture on consoles, and typically it gets resized over a dozen times. - Added new CVar "r.DistanceFields.ForceMaxAtlasSize" (defaults to zero) - Important: Currently we never "reset" this atlas texture. This will be a problem when going back to play Campaigns after preloading to play Athena. I will look into this soon! [CODEREVIEW] peter.knepley,marcus.wassmer,michael.noland,daniel.wright #jira AT-1477 #ROBOMERGE-SOURCE: CL 3593992 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592096 by robomerge #ROBOMERGE-AUTHOR: ben.salem Prototype of gauntlet memory soak test. Not fully fiinished, but want changes in tonight's cook so we can experiment on cooked build tomorrow morning. #jira FORT-0 #ROBOMERGE-SOURCE: CL 3592025 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592085 by robomerge #ROBOMERGE-AUTHOR: mike.fricker HLOD: Added support for a fixed distance override via CVar - Use this to force all HLODs to transition at a specific distance, regardless of their TransitionSize/MinDrawDistance/LODDrawDistance - New CVar: r.HLOD.DistanceOverride (defaults to 0) - Fortnite uses 350m for this distance, fornow [CODEREVIEW] jurre.debaare #jira AT-1462 #ROBOMERGE-SOURCE: CL 3591929 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3587391 by Michael.Noland Fortnite: Lots of memory tracking stuff - Added memory logging to game state transitions and overall health tracking for the entire session - Added support for Gauntlet-based tests to Fortnite - Enabled the Gauntlet plugin (and fixed spaces instead of tabs in the .uproject file) - Added code to set gauntlet state based on the current subclass of AFortGameState - Added a base controller and a memory report controller (WIP, ported from equivalents in Paragon) - Updated FortniteClient to use MALLOC_LEAKDETECTION=1, PLATFORM_USES_FIXED_GMalloc_CLASS=0, and AllowASLRInShipping=false in Development builds (may enable them in Test builds in a future CL, to match Paragon) #jira FORT-50567 Change 3583307 by Peter.Knepley Need non-jittered ViewToClip matrix in order to do "after tonemapper" postprocess blendable material that's positioned in view space Modify the AttachScope material function to use "ViewSpaceTransformToClipSpace" instead of going back to world space first. This also means it can utilitize the ViewToClipNoAA matrix. #jira AT-733 Change 3582378 by Luke.Thatcher [FORTNITE] [~] Unify Xbox and PS4 scalability settings and device profiles. - All Xbox and PS4 r. CVars are overriden in their platform's Scalability.ini file. The device profile only selects sg. groups. - Fixed the Neo 4K profile for Fortnite. Previously players with 4K monitors would choose the Neo_4K profile, which looks worse than Neo, but still renders at 1080p. - Console specific settings have to live in the Base/Default .ini's, as the cooker doesn't load the console specific files. This is fixed in UE4 Main. #jira FORT-50206 Change 3580934 by Luke.Thatcher [FORTNITE] [PS4] [+] Support different garlic and onion heap sizes in the old memory system for base and neo. - Neo has 512 MB more direct memory than a base kit. - Increased the garlic heap size by 416 MB on Neo, and CPU heap by 96 MB. #jira FORT-50206 Change 3576664 by Bart.Hawthorne Re-enable Oodle and add Mac implementation. Also includes fixed oodle libraries by MichaelT. #jira FORT-49986 #tests Connected to PC server with editor -game build on Mac in Athena Change 3575671 by Nick.Darnell Athena - The gameplay ability system now supports adding Gameplay Cue's with params. Now using cues instead of gameplay effects in order to notify when the bandaging/shielding begin and end. THe new method should properly show and disappear on time, b/c it's all client side. Added a way in the Athena Context to easily hook gameplay "UI" cues that are rebroadcast from the Athena Pawn. #jira AT-644 Change 3575534 by Peter.Knepley Ability montage replication optimizations #jira AT-955 Change 3573305 by Lukasz.Furman disabled path section update when crowd simulated AI is moving through navlink, fixed AI getting stuck in some corners #jira FORT-49748 Change 3566775 by John.Abercrombie Optimizations from Dev-Athena - Tested with PIE & and 2 Player local server game #ue4-athena - (merge CLs 3345771 and 3363030 from Framework) - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]. For Fortnite, set unthrottled (<= 10 player) limit to 60Hz (from 90Hz), and trying throttled at 30Hz (from 45Hz). #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545535 by Zak.Middleton on 2017/07/19 20:15:17. #ue4-athena - (merge CL 3377054 from Framework) - Fix CharacterMovementComponent updated with very high delta time on server when initially joining. Make sure the ServerTimeStamp is initialized to current world time rather than zero to prevent large delta. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545452 by Zak.Middleton on 2017/07/19 18:57:45. #athena - If network smoothing mode is not linear, don't replicate ReplicatedServerLastTransformUpdateTimeStamp. Only AI use linear smoothing in FN. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545559 by Zak.Middleton on 2017/07/19 20:47:18. #ue4-athena - Converted all RPCs on UCharacterMovementComponent to be on ACharacter instead, to avoid the bandwidth overhead of calling RPCs on a component. Existing overrides of _Implementation and _Validate functions should remain unchanged. If for some reason someone overrode the old RPC virtuals, those are now non-virtual on UCharacterMovementComponent but are still virtual on ACharacter. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3557564 by Zak.Middleton on 2017/07/26 20:13:43. #ue4-athena - Throttle character movement server corrections and acks to the client based on time since last adjustment. Cuts down on network traffic for character movement. Added configurable settings to control this. Set times to zero to disable this. - NetworkMinTimeBetweenClientAckGoodMove - NetworkMinTimeBetweenClientAdjustments - NetworkMinTimeBetweenClientAdjustmentsLargeCorrection - NetworkLargeClientCorrectionDistance #ue4-athena - Perf: (EditMerge CL 3492200 from Dev-Framework): Always reset the input array in AActor::GetComponents(), but do so without affecting allocated size. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561669 by Zak.Middleton on 2017/07/28 14:16:19. #ue4-athena - Perf: (EditMerge CL 3468253 from Dev-AnimPhys): Remove the need for calling constructors for physx PxRaycastHit in the dynamic hit result buffer. Saves 30% of the cost of doing small raycasts. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561672 by Zak.Middleton on 2017/07/28 14:17:12. #ue4-athena - Perf: (EditMerge CL 3359553 from Dev-Framework): Optimization in CharacterMovement tick to not extract transform values twice. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561674 by Zak.Middleton on 2017/07/28 14:18:04. #ue4-athena - Perf: (EditMerge CL 3426174 from Dev-Framework): Avoid call to virtual getSimulationFilterData() to only use it when needed in PreFilter if we actually have items in the IgnoreComponents list (which is rare). The sim filter data 'word2' stores the component ID. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561709 by Zak.Middleton on 2017/07/28 14:32:11. #ue4-athena - Perf: (EditMerge CL 3382054 from Dev-Framework): Optimize CharacterMovementComponent::GetPredictionData_Client_Character() and GetPredictionData_Server_Character() to remove virtual calls. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561856 by Zak.Middleton on 2017/07/28 15:11:57. #ue4-athena - Use less bandwidth for CharacterMovement RPCs when the character is not standing on any component (ie during jumps and falling). Added separate "...NoBase()" versions of ServerMove() and ServerMoveDual(). Undid part of 3557564 and restored the CMC functions to be virtual, and removed virtual keyword from matching Character functions, so that overrides are in one consistent place. Also guarantees backwards compat for licensees. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3564858 by Zak.Middleton on 2017/07/31 15:24:39. #jira Fort-1 Change 3562825 by Chris.Gagnon Added CommonCustomNavigation Widget, this widget can be used to capture navigation requests to handle in custom ways. #jira FORT-0 Change 3562098 by Josh.Markiewicz #UE4 Encryption token/ack changes - moved encryption token request/ack to delegates - moved FNetworkNotify to NetworkDelegates.h - moved connection logic out of GameInstance and back into networking code -- GameInstance sends an enum and the network code does the right thing based on that #review-3559694 @ryan.gerleve #tests PC dedicated server connections golden path and forced failures #jira FORT-0 Change 3559354 by Luke.Thatcher [FORTNITE] [PS4] [^] Merging (as edit) support for setting flip rate on PS4 (CLs 3555687 and 3558843) from //Fortnite/Dev-Athena/... to //Fortnite/Main/... - Allowed rates are now 60Hz, 30Hz and 20Hz. - Exposed by r.PS4FlipRate CVar, set to 60Hz by default. Requires r.Vsync 1. #jira FORT-49463 Change 3532644 by Jeff.Campeau Fix mapping current culture to movie audio channels using data table to map languages to track indices. Don't rewind cinematics (they all start from the begining because we load them and play them once). Seeks cause us to have to redecode video frames at a large perf cost. Delay cutscene playback by 0.5 seconds to give us time to build up a buffer of decoded video. (Temporary workaround for audio/video sync). Generic implementation for getting current languages in BP. Fix more issues with calling into media source functionality when using the source reader (potential hangs). #jira FORT-44376,FORT-48209,FORT-48040 #testedon Preflight from last night combined with Bob's changes from today clear all known issues. This change tested on Xbox and PC multiple times each. Change 3527761 by Chris.Gagnon Fixed various issues in the widget switcher, also added Advanced calls that allow the user to specify if activation/deactivation should occur. #jira FORT-47988, FORT-47984 Change 3525390 by Jeff.Campeau Remove media player log spam #jira FORT-47393 #testedon compiled client Change 3518692 by Chris.Gagnon Added CleanOperation Adding which will remove unneeded op combinations from the op queue. Also added the ability to suspend starting operation queue processing to allow complex operations to accumulate and in turn allow the Clean Op adding code to be effective. GameFeedback, and the widget switcer utilize this to avoid unnesacary activations of a screen that is immediately being deactivated. Root issue of the mentioned bug is that activation of the quest screen created a latent navigation du to the deferal of scrolling into view. This is still an issue in general, there isn't much we can do about it. Other than avoid activating a panel that will deactivated that frame as we did with the code changes in this CL. #jira FORT-47395 Change 3514658 by Jeff.Campeau Fixed a media player threading issue where the OnMediaOpened event could be called before the media Init script completed. Moved the event Cinematic used when setting up and playing media after media file load to use a delayed event from the MovieWidget so that it will always happen after the movie widget processing. Fixed an issue that could cause samples to leak in MfMedia plugin and cause ReadSample to lockup. Fixed an issue where a default texture is displayed for movies before the movie starts playing (the player may be active before the first frame of the video is decoded). Default is now all black as it is expected that this texture will be displayed for several frames. #jira FORT-46801 #testedon Xbox through rocket launch cinematic including vintertip for stairs, skill tree nodes, and victory result video Change 3507896 by Ryan.Gerleve Changed the net.UseEncryptionToken to be more useful and renamed it to net.AllowEncryption. This cvar, if 0, will prevent the PacketHandler from adding the configured encryption component, and prevent UPendingNetGame and AOnlineBeaconClient from filling out the EncryptionToken parameter of NMT_Hello - which prevents the extra encryption handshake connection step. #jira FORT-46878 #review-3507897 @josh.markiewicz Change 3503928 by Ryan.Gerleve Add safety checks around some of the encryption functionality. Fixes a server crash seen during load testing. #jira FORT-46772 #review-3503929 bob.tellez #robomerge ReleaseNext [CL 3673993 by Bob Tellez in Main branch]
2017-09-30 03:42:01 -04:00
bool FGlobalDynamicVertexBuffer::IsRenderAlarmLoggingEnabled() const
{
return GMaxVertexBytesAllocatedPerFrame > 0 && TotalAllocatedSinceLastCommit >= (size_t)GMaxVertexBytesAllocatedPerFrame;
}
void FGlobalDynamicVertexBuffer::Commit()
{
for (int32 BufferIndex = 0, NumBuffers = Pool->VertexBuffers.Num(); BufferIndex < NumBuffers; ++BufferIndex)
{
FDynamicVertexBuffer& VertexBuffer = Pool->VertexBuffers[BufferIndex];
if (VertexBuffer.MappedBuffer != NULL)
{
VertexBuffer.Unlock();
}
else if (GGlobalBufferNumFramesUnusedThresold && !VertexBuffer.AllocatedByteCount)
{
++VertexBuffer.NumFramesUnused;
if (VertexBuffer.NumFramesUnused >= GGlobalBufferNumFramesUnusedThresold)
{
// Remove the buffer, assumes they are unordered.
VertexBuffer.ReleaseResource();
Pool->VertexBuffers.RemoveAtSwap(BufferIndex);
--BufferIndex;
--NumBuffers;
}
}
}
Pool->CurrentVertexBuffer = NULL;
Merging from //UE4/Fortnite-Staging up to CL#3673800 based on CL#3664064 from //Fortnite/Main #rb none #lockdown Nick.Penwarden ================================================================================================= THESE CHANGES TOUCH MULTIPLE PLATFORMS AND/OR RESTRICTED FOLDERS. YOU MUST REVIEW THESE MANUALLY AND APPEND THEM TO THE DESCRIPTIONS FOR THE APPROPRIATE PLATFORMS. ================================================================================================= Change 3662267 by Nick.Darnell Engine - Fixing a bug in GetAccurateRealTime, it wasn't subtracting GStartTime, which if you don't prevents accurate platform time when you try to store it in a float. #jira nojira Change 3662176 by Ben.Marsh Disable image integrity report generation if a debugger is attached, and in editor builds. #jira FORT-55656 Change 3656958 by Luke.Thatcher [FORTNITE] [CONSOLE] [+] Improved frame syncing mechanism - Improves input latency by allowing the game thread to sync to the swap chain flip of the previous frame. - Added "r.GTSyncType" CVar to control how the game thread syncs with the rest of the pipe. - r.GTSyncType 2 will sync the game thread with the flip of the swap chain, preventing the pipe from getting too long and causing excess input latency. Platforms are required to implement RHIWaitForFlip and RHISignalFlipEvent, and call RHIInitializeFlipTracking on RHI startup. A separate thread monitors the progress of frame flips and signals task graph events as they pass their corresponding frame index. In r.GTSyncType 2 mode, the game thread is signaled by this flip tracking thread. [~] Unified platform specific sync interval CVars (D3D12.SyncInterval, D3D11.SyncInterval, r.PS4FlipRate, RHI.SyncIntervalOgl) into one: rhi.SyncInterval - 1 == 60Hz - 2 == 30Hz - 3 == 20Hz [-] Removed large number in XboxOneTime. Adding this arbitrary number prevents us from comparing timestamps from FPlatformTime::Seconds() and various OS callbacks (e.g. flip timings). #jira FORT-50803 Change 3655598 by Lukasz.Furman added filtering for navmesh's low height spans to fix crash on layer partitioning % of span reductions depends on presence of stair or roof building in navmesh tile, changed failsafes in layer code to ignore entire tile if heightfield is too complex to partition instead of reallocating memory #jira FORT-35375 Change 3648972 by Keith.Judge Add analytics to help diagnose default parameter collection buffer issue. +++ REMOVE ONCE CORE ISSUE IS SOLVED +++ #jira FORT-54690 Change 3648756 by Bart.Hawthorne Integrate 3645298 from //UE4/Dev-Networking Deprecate GetNetworkObjectInfo in favor of separate FindNetworkObjectInfo and FindOrCreateNetworkObjectInfo methods. #jira none Change 3643090 by Josh.Markiewicz #UE4 - proper handling of "pending connection lost" - triggered only if a connection is lost and there no "owning actor" to deal with the connection loss -- added Rejoin and CleanedUp states to connection to make sure that the pending connection lost delegate only fires at the appropriate time - delegate returns the unique id of the player if known (still possible to be unknown if connection lost after NMT_Hello) - changed debug output on timeout if the net connection was already in the process of being destroyed -- occurs when game hitches during the pending destroy 2 second wait -- ReceivedAcks should have been called to clean things up quietly in those 2 seconds but blocking the game thread will cause the cleanup to look like a timeout - added userid to UNetConnection::Describe - bad split screen player handling of unique id -- splitscreen uniqueid was overwriting the primary player id -- only store the id on the child connection - added some clarifying comments #review-3642816 @ryan.gerleve, @bob.tellez, @sam.zamani, @bart.hawthorne, @dave.ratti #jira FORT-26776 Change 3639043 by Alex.Thurman Fix CommonTreeView SetSelection to correctly update list navigation, and behave similarly to CommonListView's SetSelectedItem. #JIRA FORT-45841 Change 3632275 by Seth.Weedin #JIRA FORT-54203 - Add clamps to ActiveSound fade interpolation to prevent unwanted volume spikes. Remove 0.01 start time for single-fire audio cues. Should remove the sudden pops sometimes heard when firing weapons, as well as smooth out fade volume in general. Change 3626944 by Josh.Markiewicz #UE4 - added "updates connection status" flag to ServiceConfigMCP - disable updates on Cloud and Friend services (Fortnite only) - removed overloaded ProcessConnectionStatus function in cloud service #jira FORT-53113 Change 3626226 by Stewart.Lynch LLM Update - Memory reductions, Summary page, enum scopes, refactor and cleanup of tags * Remove all static arrays and hard limits from LLM. Everything is now dynamically allocated using the internal LLM allocators. The overhead when LLM is disabled is now only 48K (was 40MB) * re-wrote LLMMap. Now stores an int32 index rather then pointer in the HashMap array. Also, changed the Values to be arrays for structs instead of structs of arrays. Means that the tag can be stored in a single byte. Changed the size of the allocation size from int64 to int32. All this takes the memory down from around 600MB to 100MB. It was 120 bytes per allocation, now 29 bytes. * changed all LLM scopes over to enums. This has a number of benefits; LLM can be enable in Test, less CPU overhead, stored in a byte (LLM overhead /= 8) * summary page for content creators where all lower-level stats are grouped under one Engine stat * renamed ELLMScopeTag enum to ELLMTag * renamed LLM_SCOPED_TAG_WITH_ENUM macro to LLM_SCOPE * removed Tracker arg from LLM_SCOPE and added LLM_PLATFORM_SCOPE macro * fixed GenericPlatformMallocCrash stat. Although it seems not be be used anymore * fixed BackupOOMMemoryPool stat (now shows in both default and platform pages) * added separate LLM enums for XB1, PS4 and D3D12 (PS4LLM.cpp/h etc.) * lots of changes adding/removing/renaming tags * added LLMArray and FLLMObjectAllocator classes * disabled asset tag tracking by default because it takes up so much memory even when not used * enable LLM in all non-shipping builds. In Test the on screendisplay won't show because it uses the stats system but it till still write out the csv. * all the stat macros have been left as they were and can be enabled on the LLM_STAT_TAGS_ENABLED define. These are needed for the asset tagging. * disabled LLM_TRACK_PEAK_MEMORY because there is a problem with the way it adds the peaks for multiple threads. This needs to be fixed. * added a CVar to control the csv write interval: LLM.LLMWriteInterval * added static arrays for the enum tags setup. Easier to manage and removes need for slow switch statements. * renamed FLLMThreadStateManager to FLLMTracker to make it consistent with the enum * fixed program size stat which was broken recently on PS4. This was due to initialisation order and global platform stats setup #jira NONE-01 Change 3622978 by Lukasz.Furman changed WeaponStatus BT decorator to be event driven, fixes AI trying to check ranged weapon abilities without valid weapon includes copy of CL# 3620700 #jira FORT-45914 #review-3622979 John.Abercrombie Change 3622340 by Josh.Markiewicz #UE4 - playerid netconnection variable setup properly on clients and servers for both beacons and game net drivers - ipconnection prints uniqueid with lowleveldescribe #jira fort-0 Change 3621386 by Tim.Tillotson Add the ability to retry HTTP operations by VERB. This allows us to automatically retry cloud save PUT operations. #JIRA FORT-53717 #review-3621317 @Josh.Markiewicz @Ian.Fox @Carlos.Cuello Change 3620517 by Keith.Judge Xbox One - Revert iOS behaviour for the depth bias back to how it was, and make separate XB1 change use its own define to avoid confusion. #jira FORT-53928 Change 3620248 by Lukasz.Furman changed behavior of UBTTask_MoveTo.bStopOnOverlap flag after recent AcceptanceRadius fix, updated comments to be more detailed #jira nojira Change 3616187 by Bob.Tellez #UE4 Throwing an error (for now) if you attempt to use both the malloc profiler and leak detection at the same time since it causes a deadlock. #JIRA UE-0 Change 3613935 by Peter.Knepley More logging on update launcher launching #jira nojira #robomerge rp rn Change 3613537 by Marcus.Wassmer Safety asserts around the MarkPendingKill feature for rendering classes. #jira FORT-50385 Change 3613399 by Arne.Schober Extended ShowMaterialDrawEvents to enable it only in very specific passes and default enabled Depth for Fortnite on PS4 to track down a crash. #RB Marcus.Wassmer #jira FORT-53610 Change 3610794 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce UMG class memory #jira UE-52043 #ROBOMERGE-SOURCE: CL 3610792 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3610144 by Stewart.Lynch General LLM improvements * added tracking for misc task graph tasks (moves 20MB out of Untagged) * renamed EngineTick to EngineMisc * added tracking for FName * added tracking for GC_ProcessObjectArray potential leak * renamed index & vertex buffers stat to Meshes * added hooks for MemPro to track allocations from a single category. Currently defined out. I haven't added MemPro.cpp/h. * removed AVAILABLE_PHYSICAL stat from LLM csv * csv files now include the date in the filename * fixed potential threading bug when reading stat values to csv * made IsDebugMemoryEnabled() always return false in shipping and if not runnong on a dev-kit (PS4). The reason is that the function is a bit hacky, and should only be used for debug purposes, such as displaying the on screen warning. * added lots more scopes * started changing Stat scopes to enum scopes. Stat scopes will be phased out. * added tracking of FName memory * added llmplatform tracking for XBoxSymbols * added llm tracking for CPU symbol allocations (20MB) * wrote an allocator for XBoxOneStack reading so that it doesn't go through Malloc and get tracked by LLM. * added tracking for GC * fixed tracking for TransientMemoryAllocator * added tracking for networking memory * added more audio memory tracking * added tracking for blueprints * added tracking for static meshes * show on screen warning if debug memory is enabled * added tracking for particles * renamed Phys to PhysX and added more scopes * renamed Slate to UI and added more scopes * much better coverage of networking memory * improved coverage of audio #jira FORT-53420 Change 3610136 by robomerge #ROBOMERGE-AUTHOR: marc.audy Reduce size of UStaticMeshComponent by 224 bytes (cumulative, 64 bytes exclusive) Reduce size of UPrimitiveComponent by 176 bytes (cumulative, 64 bytes exclusive). Reduce size of USceneComponent by 112 bytes. Reduce size of FLightingChannels from 3 bytes to 1. Reduce size of FBodyInstance by 16 bytes. #jira FORT-52043 #ROBOMERGE-SOURCE: CL 3610134 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607937 by robomerge #ROBOMERGE-AUTHOR: paul.moore #jira FORT-53105 - Fix websocket not providing information when the peer closes the connection. #ROBOMERGE-SOURCE: CL 3607933 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3607042 by Bart.Hawthorne Move replay.Loop functionality into the demo net driver and rename it demo.Loop #jira none Change 3605448 by robomerge #ROBOMERGE-AUTHOR: seth.weedin #Athena - Pass owner to ActiveSounds created using PlaySoundAtLocation/PlaySound2D to allow "Limit to Owner" concurrency rules to work. Hook up for weapon sounds. #JIRA FORT-53180 #ROBOMERGE-SOURCE: CL 3605443 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3604787 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Initial support for hotfixing live assets from .ini files - This allows clients and server to patch certain assets in memory whenever .ini file hotfixes are downloaded - Only CurveTables and DataTables are supported for now - The new asset content must be in Json format, the same format the editor uses for importing - Assets that are hotfixed will be synchronously loaded if they're not already in memory. They'll be retained in memory afterwards. - IMPORTANT: Json data must be supplied on a single line, and all double quotes must be escaped! - The changes must go in the Game.ini file and use the following syntax: [AssetHotfix] +CurveTable=("/Game/Folder/MyCurveTable","[{\"Name\":\"Default\"}]") +DataTable=("/Game/Folder2/MyDataTable","[{\"Name\":\"Foo\"}]") #jira FORT-52099 [CODEREVIEW] frank.gigliotti [FYI] peter.knepley,bob.tellez #ROBOMERGE-SOURCE: CL 3604784 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3602067 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Loading time improvements - This shaves off up to 10 seconds of load time on PS4 in Athena Details: - Fixed multiple sub-levels not being able to be enqueued for loading in a single client frame. Athena has ~300 sub-levels, so this ended up wasting up many seconds. - Fixed 3D world being rendered while loading (frees up game thread cycles for throttled streaming) - UWorld::AllowLevelLoadRequests() was not allowing load requests to go through while an async load was in progress and the match had started. It now allows this as long as the world isn't being rendered (loading screen.) - Eliminated extra 2 second delay before loading screen is dismissed (in Athena only) - Note: A side effect of this change is that the progress bar may not update as smoothly on loading screen. We'll look at tuning the throttle settings if it ends up being a problem. [CODEREVIEW] ori.cohen #jira AT-1477 #ROBOMERGE-SOURCE: CL 3602061 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3601951 by Luke.Thatcher [FORTNITE] [PS4] [!] Fix memory stats in the old PS4 memory system - Physical memory stat now includes garlic and onion allocations. CPU OOMs will result in "AvailablePhysical" being close to 0. - Added garlic, onion and defrag stats to the platform memory stats struct. - Added fixed pool sizes to platform memory stats. - Modified the Fortnite heartbeat logging to include extra details of PS4 fixed sized pools. #jira FORT-52910 Change 3600340 by robomerge #ROBOMERGE-AUTHOR: wes.hunt All Fort analytics events now contain a GameState attribute indicating the active GameState ClassName when the event is sent. Added some new context to crashreporter to help identify Athena matches near and long term. * Near Term: GameNameSuffix - set via FCoreDelegates::CrashOverrideParamsChanged * Added bools to the params to indicate WHICH ones are changing * Allows you to set only some values, and clear them out. * Hooked up in FortGameState::PostInitializeComponents. * FortGameState clears it (for returning to main menu). * FortGameStateAthena sets it (for going into an Athena match). * Only does this when it's a true GameMode GameState instance (ie, not PIE) so PIE crashes aren't modified. * Long Term: GameStateName - set via FCoreDelegates::GameStateClassChanged. * This works for ANY crash on ANY game. * Hooked up in GameState::HandleMatchIsWaitingToStart. #jira AT-1457 #jira AT-519 [CODEREVIEW] peter.knepley,josh.markiewicz #ROBOMERGE-SOURCE: CL 3600278 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3597593 by Ben.Zeigler #jira FORT-50722 Fix issues where AssetBundles weren't being correctly updated during cook, which is blocking both Noland and Abercrombie Partial copy of CL #3402335 and #3526538 #robomerge rp, rn Change 3597577 by Luke.Thatcher [FORTNITE] [PS4] [~] Modified the way memory is allocated on Playstation to make more memory available to the CPU. - Previously the amount of texture memory wasn╞t fixed due to the way the defrag memory is allocated on PS4. This meant we had to have a significant amount of slack. - With the new configuration, we have a guaranteed texture memory pool, so the slack can be significantly smaller, meaning we can give more memory to the CPU, which is where most of our memory pressure is. #jira FORT-50825 #jira FORT-49688 #jira FORT-49695 #jira FORT-50054 Change 3596556 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Enable GC clustering for actors and blueprints in Fortnite - This shaves off about 10 ms on GC frames in Athena on PS4 (~52 ms -> 42 ms) - Clustering doesn't work on building actors because they're very dynamic, but general Fort static meshes and blueprints are clustered! - This gets us into the realm of shippability on console for very large UObject counts [FYI] bob.tellez,peter.knepley,michael.noland #jira AT-1440 #ROBOMERGE-SOURCE: CL 3596552 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3593994 by robomerge #ROBOMERGE-AUTHOR: mike.fricker Force largest distance field atlas size in Athena - We now force the largest distance field atlas size before preloading Athena content (512x512x1024 = 256 MB). This helps with load times because it's expensive to re-create this texture on consoles, and typically it gets resized over a dozen times. - Added new CVar "r.DistanceFields.ForceMaxAtlasSize" (defaults to zero) - Important: Currently we never "reset" this atlas texture. This will be a problem when going back to play Campaigns after preloading to play Athena. I will look into this soon! [CODEREVIEW] peter.knepley,marcus.wassmer,michael.noland,daniel.wright #jira AT-1477 #ROBOMERGE-SOURCE: CL 3593992 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592096 by robomerge #ROBOMERGE-AUTHOR: ben.salem Prototype of gauntlet memory soak test. Not fully fiinished, but want changes in tonight's cook so we can experiment on cooked build tomorrow morning. #jira FORT-0 #ROBOMERGE-SOURCE: CL 3592025 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3592085 by robomerge #ROBOMERGE-AUTHOR: mike.fricker HLOD: Added support for a fixed distance override via CVar - Use this to force all HLODs to transition at a specific distance, regardless of their TransitionSize/MinDrawDistance/LODDrawDistance - New CVar: r.HLOD.DistanceOverride (defaults to 0) - Fortnite uses 350m for this distance, fornow [CODEREVIEW] jurre.debaare #jira AT-1462 #ROBOMERGE-SOURCE: CL 3591929 in //Fortnite/Release-Prep/... #ROBOMERGE-BOT: FORTNITE (Release-Prep -> Main) Change 3587391 by Michael.Noland Fortnite: Lots of memory tracking stuff - Added memory logging to game state transitions and overall health tracking for the entire session - Added support for Gauntlet-based tests to Fortnite - Enabled the Gauntlet plugin (and fixed spaces instead of tabs in the .uproject file) - Added code to set gauntlet state based on the current subclass of AFortGameState - Added a base controller and a memory report controller (WIP, ported from equivalents in Paragon) - Updated FortniteClient to use MALLOC_LEAKDETECTION=1, PLATFORM_USES_FIXED_GMalloc_CLASS=0, and AllowASLRInShipping=false in Development builds (may enable them in Test builds in a future CL, to match Paragon) #jira FORT-50567 Change 3583307 by Peter.Knepley Need non-jittered ViewToClip matrix in order to do "after tonemapper" postprocess blendable material that's positioned in view space Modify the AttachScope material function to use "ViewSpaceTransformToClipSpace" instead of going back to world space first. This also means it can utilitize the ViewToClipNoAA matrix. #jira AT-733 Change 3582378 by Luke.Thatcher [FORTNITE] [~] Unify Xbox and PS4 scalability settings and device profiles. - All Xbox and PS4 r. CVars are overriden in their platform's Scalability.ini file. The device profile only selects sg. groups. - Fixed the Neo 4K profile for Fortnite. Previously players with 4K monitors would choose the Neo_4K profile, which looks worse than Neo, but still renders at 1080p. - Console specific settings have to live in the Base/Default .ini's, as the cooker doesn't load the console specific files. This is fixed in UE4 Main. #jira FORT-50206 Change 3580934 by Luke.Thatcher [FORTNITE] [PS4] [+] Support different garlic and onion heap sizes in the old memory system for base and neo. - Neo has 512 MB more direct memory than a base kit. - Increased the garlic heap size by 416 MB on Neo, and CPU heap by 96 MB. #jira FORT-50206 Change 3576664 by Bart.Hawthorne Re-enable Oodle and add Mac implementation. Also includes fixed oodle libraries by MichaelT. #jira FORT-49986 #tests Connected to PC server with editor -game build on Mac in Athena Change 3575671 by Nick.Darnell Athena - The gameplay ability system now supports adding Gameplay Cue's with params. Now using cues instead of gameplay effects in order to notify when the bandaging/shielding begin and end. THe new method should properly show and disappear on time, b/c it's all client side. Added a way in the Athena Context to easily hook gameplay "UI" cues that are rebroadcast from the Athena Pawn. #jira AT-644 Change 3575534 by Peter.Knepley Ability montage replication optimizations #jira AT-955 Change 3573305 by Lukasz.Furman disabled path section update when crowd simulated AI is moving through navlink, fixed AI getting stuck in some corners #jira FORT-49748 Change 3566775 by John.Abercrombie Optimizations from Dev-Athena - Tested with PIE & and 2 Player local server game #ue4-athena - (merge CLs 3345771 and 3363030 from Framework) - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]. For Fortnite, set unthrottled (<= 10 player) limit to 60Hz (from 90Hz), and trying throttled at 30Hz (from 45Hz). #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545535 by Zak.Middleton on 2017/07/19 20:15:17. #ue4-athena - (merge CL 3377054 from Framework) - Fix CharacterMovementComponent updated with very high delta time on server when initially joining. Make sure the ServerTimeStamp is initialized to current world time rather than zero to prevent large delta. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545452 by Zak.Middleton on 2017/07/19 18:57:45. #athena - If network smoothing mode is not linear, don't replicate ReplicatedServerLastTransformUpdateTimeStamp. Only AI use linear smoothing in FN. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3545559 by Zak.Middleton on 2017/07/19 20:47:18. #ue4-athena - Converted all RPCs on UCharacterMovementComponent to be on ACharacter instead, to avoid the bandwidth overhead of calling RPCs on a component. Existing overrides of _Implementation and _Validate functions should remain unchanged. If for some reason someone overrode the old RPC virtuals, those are now non-virtual on UCharacterMovementComponent but are still virtual on ACharacter. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3557564 by Zak.Middleton on 2017/07/26 20:13:43. #ue4-athena - Throttle character movement server corrections and acks to the client based on time since last adjustment. Cuts down on network traffic for character movement. Added configurable settings to control this. Set times to zero to disable this. - NetworkMinTimeBetweenClientAckGoodMove - NetworkMinTimeBetweenClientAdjustments - NetworkMinTimeBetweenClientAdjustmentsLargeCorrection - NetworkLargeClientCorrectionDistance #ue4-athena - Perf: (EditMerge CL 3492200 from Dev-Framework): Always reset the input array in AActor::GetComponents(), but do so without affecting allocated size. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561669 by Zak.Middleton on 2017/07/28 14:16:19. #ue4-athena - Perf: (EditMerge CL 3468253 from Dev-AnimPhys): Remove the need for calling constructors for physx PxRaycastHit in the dynamic hit result buffer. Saves 30% of the cost of doing small raycasts. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561672 by Zak.Middleton on 2017/07/28 14:17:12. #ue4-athena - Perf: (EditMerge CL 3359553 from Dev-Framework): Optimization in CharacterMovement tick to not extract transform values twice. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561674 by Zak.Middleton on 2017/07/28 14:18:04. #ue4-athena - Perf: (EditMerge CL 3426174 from Dev-Framework): Avoid call to virtual getSimulationFilterData() to only use it when needed in PreFilter if we actually have items in the IgnoreComponents list (which is rare). The sim filter data 'word2' stores the component ID. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561709 by Zak.Middleton on 2017/07/28 14:32:11. #ue4-athena - Perf: (EditMerge CL 3382054 from Dev-Framework): Optimize CharacterMovementComponent::GetPredictionData_Client_Character() and GetPredictionData_Server_Character() to remove virtual calls. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3561856 by Zak.Middleton on 2017/07/28 15:11:57. #ue4-athena - Use less bandwidth for CharacterMovement RPCs when the character is not standing on any component (ie during jumps and falling). Added separate "...NoBase()" versions of ServerMove() and ServerMoveDual(). Undid part of 3557564 and restored the CMC functions to be virtual, and removed virtual keyword from matching Character functions, so that overrides are in one consistent place. Also guarantees backwards compat for licensees. #AUTOMERGE using branch //Fortnite/Main-To-//Fortnite/Dev-Athena (reversed) of change#3564858 by Zak.Middleton on 2017/07/31 15:24:39. #jira Fort-1 Change 3562825 by Chris.Gagnon Added CommonCustomNavigation Widget, this widget can be used to capture navigation requests to handle in custom ways. #jira FORT-0 Change 3562098 by Josh.Markiewicz #UE4 Encryption token/ack changes - moved encryption token request/ack to delegates - moved FNetworkNotify to NetworkDelegates.h - moved connection logic out of GameInstance and back into networking code -- GameInstance sends an enum and the network code does the right thing based on that #review-3559694 @ryan.gerleve #tests PC dedicated server connections golden path and forced failures #jira FORT-0 Change 3559354 by Luke.Thatcher [FORTNITE] [PS4] [^] Merging (as edit) support for setting flip rate on PS4 (CLs 3555687 and 3558843) from //Fortnite/Dev-Athena/... to //Fortnite/Main/... - Allowed rates are now 60Hz, 30Hz and 20Hz. - Exposed by r.PS4FlipRate CVar, set to 60Hz by default. Requires r.Vsync 1. #jira FORT-49463 Change 3532644 by Jeff.Campeau Fix mapping current culture to movie audio channels using data table to map languages to track indices. Don't rewind cinematics (they all start from the begining because we load them and play them once). Seeks cause us to have to redecode video frames at a large perf cost. Delay cutscene playback by 0.5 seconds to give us time to build up a buffer of decoded video. (Temporary workaround for audio/video sync). Generic implementation for getting current languages in BP. Fix more issues with calling into media source functionality when using the source reader (potential hangs). #jira FORT-44376,FORT-48209,FORT-48040 #testedon Preflight from last night combined with Bob's changes from today clear all known issues. This change tested on Xbox and PC multiple times each. Change 3527761 by Chris.Gagnon Fixed various issues in the widget switcher, also added Advanced calls that allow the user to specify if activation/deactivation should occur. #jira FORT-47988, FORT-47984 Change 3525390 by Jeff.Campeau Remove media player log spam #jira FORT-47393 #testedon compiled client Change 3518692 by Chris.Gagnon Added CleanOperation Adding which will remove unneeded op combinations from the op queue. Also added the ability to suspend starting operation queue processing to allow complex operations to accumulate and in turn allow the Clean Op adding code to be effective. GameFeedback, and the widget switcer utilize this to avoid unnesacary activations of a screen that is immediately being deactivated. Root issue of the mentioned bug is that activation of the quest screen created a latent navigation du to the deferal of scrolling into view. This is still an issue in general, there isn't much we can do about it. Other than avoid activating a panel that will deactivated that frame as we did with the code changes in this CL. #jira FORT-47395 Change 3514658 by Jeff.Campeau Fixed a media player threading issue where the OnMediaOpened event could be called before the media Init script completed. Moved the event Cinematic used when setting up and playing media after media file load to use a delayed event from the MovieWidget so that it will always happen after the movie widget processing. Fixed an issue that could cause samples to leak in MfMedia plugin and cause ReadSample to lockup. Fixed an issue where a default texture is displayed for movies before the movie starts playing (the player may be active before the first frame of the video is decoded). Default is now all black as it is expected that this texture will be displayed for several frames. #jira FORT-46801 #testedon Xbox through rocket launch cinematic including vintertip for stairs, skill tree nodes, and victory result video Change 3507896 by Ryan.Gerleve Changed the net.UseEncryptionToken to be more useful and renamed it to net.AllowEncryption. This cvar, if 0, will prevent the PacketHandler from adding the configured encryption component, and prevent UPendingNetGame and AOnlineBeaconClient from filling out the EncryptionToken parameter of NMT_Hello - which prevents the extra encryption handshake connection step. #jira FORT-46878 #review-3507897 @josh.markiewicz Change 3503928 by Ryan.Gerleve Add safety checks around some of the encryption functionality. Fixes a server crash seen during load testing. #jira FORT-46772 #review-3503929 bob.tellez #robomerge ReleaseNext [CL 3673993 by Bob Tellez in Main branch]
2017-09-30 03:42:01 -04:00
TotalAllocatedSinceLastCommit = 0;
}
FGlobalDynamicVertexBuffer InitViewDynamicVertexBuffer;
FGlobalDynamicVertexBuffer InitShadowViewDynamicVertexBuffer;
/*------------------------------------------------------------------------------
FGlobalDynamicIndexBuffer implementation.
------------------------------------------------------------------------------*/
/**
* An individual dynamic index buffer.
*/
class FDynamicIndexBuffer : public FIndexBuffer
{
public:
/** The aligned size of all dynamic index buffers. */
enum { ALIGNMENT = (1 << 16) }; // 64KB
/** Pointer to the index buffer mapped in main memory. */
uint8* MappedBuffer;
/** Size of the index buffer in bytes. */
uint32 BufferSize;
/** Number of bytes currently allocated from the buffer. */
uint32 AllocatedByteCount;
/** Stride of the buffer in bytes. */
uint32 Stride;
/** Number of successive frames for which AllocatedByteCount == 0. Used as a metric to decide when to free the allocation. */
int32 NumFramesUnused = 0;
/** Initialization constructor. */
explicit FDynamicIndexBuffer(uint32 InMinBufferSize, uint32 InStride)
: MappedBuffer(NULL)
, BufferSize(FMath::Max<uint32>(Align(InMinBufferSize,ALIGNMENT),ALIGNMENT))
, AllocatedByteCount(0)
, Stride(InStride)
{
}
/**
* Locks the vertex buffer so it may be written to.
*/
void Lock()
{
check(MappedBuffer == NULL);
check(AllocatedByteCount == 0);
check(IsValidRef(IndexBufferRHI));
MappedBuffer = (uint8*)RHILockBuffer(IndexBufferRHI, 0, BufferSize, RLM_WriteOnly);
}
/**
* Unocks the buffer so the GPU may read from it.
*/
void Unlock()
{
check(MappedBuffer != NULL);
check(IsValidRef(IndexBufferRHI));
RHIUnlockBuffer(IndexBufferRHI);
MappedBuffer = NULL;
AllocatedByteCount = 0;
NumFramesUnused = 0;
}
// FRenderResource interface.
virtual void InitRHI() override
{
check(!IsValidRef(IndexBufferRHI));
FRHIResourceCreateInfo CreateInfo(TEXT("FDynamicIndexBuffer"));
IndexBufferRHI = RHICreateIndexBuffer(Stride, BufferSize, BUF_Volatile, CreateInfo);
MappedBuffer = NULL;
AllocatedByteCount = 0;
}
virtual void ReleaseRHI() override
{
FIndexBuffer::ReleaseRHI();
MappedBuffer = NULL;
AllocatedByteCount = 0;
}
virtual FString GetFriendlyName() const override
{
return TEXT("FDynamicIndexBuffer");
}
};
/**
* A pool of dynamic index buffers.
*/
struct FDynamicIndexBufferPool
{
/** List of index buffers. */
TIndirectArray<FDynamicIndexBuffer> IndexBuffers;
/** The current buffer from which allocations are being made. */
FDynamicIndexBuffer* CurrentIndexBuffer;
/** Stride of buffers in this pool. */
uint32 BufferStride;
/** Initialization constructor. */
explicit FDynamicIndexBufferPool(uint32 InBufferStride)
: CurrentIndexBuffer(NULL)
, BufferStride(InBufferStride)
{
}
/** Destructor. */
~FDynamicIndexBufferPool()
{
int32 NumIndexBuffers = IndexBuffers.Num();
for (int32 BufferIndex = 0; BufferIndex < NumIndexBuffers; ++BufferIndex)
{
IndexBuffers[BufferIndex].ReleaseResource();
}
}
};
FGlobalDynamicIndexBuffer::FGlobalDynamicIndexBuffer()
{
Pools[0] = new FDynamicIndexBufferPool(sizeof(uint16));
Pools[1] = new FDynamicIndexBufferPool(sizeof(uint32));
}
FGlobalDynamicIndexBuffer::~FGlobalDynamicIndexBuffer()
{
for (int32 i = 0; i < 2; ++i)
{
delete Pools[i];
Pools[i] = NULL;
}
}
FGlobalDynamicIndexBuffer::FAllocation FGlobalDynamicIndexBuffer::Allocate(uint32 NumIndices, uint32 IndexStride)
{
FAllocation Allocation;
if (IndexStride != 2 && IndexStride != 4)
{
return Allocation;
}
FDynamicIndexBufferPool* Pool = Pools[IndexStride >> 2]; // 2 -> 0, 4 -> 1
uint32 SizeInBytes = NumIndices * IndexStride;
FDynamicIndexBuffer* IndexBuffer = Pool->CurrentIndexBuffer;
if (IndexBuffer == NULL || IndexBuffer->AllocatedByteCount + SizeInBytes > IndexBuffer->BufferSize)
{
// Find a buffer in the pool big enough to service the request.
IndexBuffer = NULL;
for (int32 BufferIndex = 0, NumBuffers = Pool->IndexBuffers.Num(); BufferIndex < NumBuffers; ++BufferIndex)
{
FDynamicIndexBuffer& IndexBufferToCheck = Pool->IndexBuffers[BufferIndex];
if (IndexBufferToCheck.AllocatedByteCount + SizeInBytes <= IndexBufferToCheck.BufferSize)
{
IndexBuffer = &IndexBufferToCheck;
break;
}
}
// Create a new index buffer if needed.
if (IndexBuffer == NULL)
{
IndexBuffer = new FDynamicIndexBuffer(SizeInBytes, Pool->BufferStride);
Pool->IndexBuffers.Add(IndexBuffer);
IndexBuffer->InitResource();
}
// Lock the buffer if needed.
if (IndexBuffer->MappedBuffer == NULL)
{
IndexBuffer->Lock();
}
Pool->CurrentIndexBuffer = IndexBuffer;
}
check(IndexBuffer != NULL);
checkf(IndexBuffer->AllocatedByteCount + SizeInBytes <= IndexBuffer->BufferSize, TEXT("Global index buffer allocation failed: BufferSize=%d AllocatedByteCount=%d SizeInBytes=%d"), IndexBuffer->BufferSize, IndexBuffer->AllocatedByteCount, SizeInBytes);
Allocation.Buffer = IndexBuffer->MappedBuffer + IndexBuffer->AllocatedByteCount;
Allocation.IndexBuffer = IndexBuffer;
Allocation.FirstIndex = IndexBuffer->AllocatedByteCount / IndexStride;
IndexBuffer->AllocatedByteCount += SizeInBytes;
return Allocation;
}
void FGlobalDynamicIndexBuffer::Commit()
{
for (int32 i = 0; i < 2; ++i)
{
FDynamicIndexBufferPool* Pool = Pools[i];
for (int32 BufferIndex = 0, NumBuffers = Pool->IndexBuffers.Num(); BufferIndex < NumBuffers; ++BufferIndex)
{
FDynamicIndexBuffer& IndexBuffer = Pool->IndexBuffers[BufferIndex];
if (IndexBuffer.MappedBuffer != NULL)
{
IndexBuffer.Unlock();
}
else if (GGlobalBufferNumFramesUnusedThresold && !IndexBuffer.AllocatedByteCount)
{
++IndexBuffer.NumFramesUnused;
if (IndexBuffer.NumFramesUnused >= GGlobalBufferNumFramesUnusedThresold)
{
// Remove the buffer, assumes they are unordered.
IndexBuffer.ReleaseResource();
Pool->IndexBuffers.RemoveAtSwap(BufferIndex);
--BufferIndex;
--NumBuffers;
}
}
}
Pool->CurrentIndexBuffer = NULL;
}
}
/*=============================================================================
FMipBiasFade class
=============================================================================*/
/** Global mip fading settings, indexed by EMipFadeSettings. */
FMipFadeSettings GMipFadeSettings[MipFade_NumSettings] =
{
FMipFadeSettings(0.3f, 0.1f), // MipFade_Normal
FMipFadeSettings(2.0f, 1.0f) // MipFade_Slow
};
/** How "old" a texture must be to be considered a "new texture", in seconds. */
float GMipLevelFadingAgeThreshold = 0.5f;
/**
* Sets up a new interpolation target for the mip-bias.
* @param ActualMipCount Number of mip-levels currently in memory
* @param TargetMipCount Number of mip-levels we're changing to
* @param LastRenderTime Timestamp when it was last rendered (FApp::CurrentTime time space)
* @param FadeSetting Which fade speed settings to use
*/
void FMipBiasFade::SetNewMipCount( float ActualMipCount, float TargetMipCount, double LastRenderTime, EMipFadeSettings FadeSetting )
{
check( ActualMipCount >=0 && TargetMipCount <= ActualMipCount );
float TimeSinceLastRendered = float(FApp::GetCurrentTime() - LastRenderTime);
// Is this a new texture or is this not in-game?
if ( TotalMipCount == 0 || TimeSinceLastRendered >= GMipLevelFadingAgeThreshold || GEnableMipLevelFading < 0.0f )
{
// No fading.
TotalMipCount = ActualMipCount;
MipCountDelta = 0.0f;
MipCountFadingRate = 0.0f;
StartTime = GRenderingRealtimeClock.GetCurrentTime();
BiasOffset = 0.0f;
return;
}
// Calculate the mipcount we're interpolating towards.
float CurrentTargetMipCount = TotalMipCount - BiasOffset + MipCountDelta;
// Is there no change?
if ( FMath::IsNearlyEqual(TotalMipCount, ActualMipCount) && FMath::IsNearlyEqual(TargetMipCount, CurrentTargetMipCount) )
{
return;
}
// Calculate the mip-count at our current interpolation point.
float CurrentInterpolatedMipCount = TotalMipCount - CalcMipBias();
// Clamp it against the available mip-levels.
CurrentInterpolatedMipCount = FMath::Clamp<float>(CurrentInterpolatedMipCount, 0, ActualMipCount);
// Set up a new interpolation from CurrentInterpolatedMipCount to TargetMipCount.
StartTime = GRenderingRealtimeClock.GetCurrentTime();
TotalMipCount = ActualMipCount;
MipCountDelta = TargetMipCount - CurrentInterpolatedMipCount;
// Don't fade if we're already at the target mip-count.
if ( FMath::IsNearlyZero(MipCountDelta) )
{
MipCountDelta = 0.0f;
BiasOffset = 0.0f;
MipCountFadingRate = 0.0f;
}
else
{
BiasOffset = TotalMipCount - CurrentInterpolatedMipCount;
if ( MipCountDelta > 0.0f )
{
MipCountFadingRate = 1.0f / (GMipFadeSettings[FadeSetting].FadeInSpeed * MipCountDelta);
}
else
{
MipCountFadingRate = -1.0f / (GMipFadeSettings[FadeSetting].FadeOutSpeed * MipCountDelta);
}
}
}
class FTextureSamplerStateCache : public FRenderResource
{
public:
TMap<FSamplerStateInitializerRHI, FRHISamplerState*> Samplers;
virtual void ReleaseRHI() override
{
for (auto Pair : Samplers)
{
Pair.Value->Release();
}
Samplers.Empty();
}
};
TGlobalResource<FTextureSamplerStateCache> GTextureSamplerStateCache;
FRHISamplerState* FTexture::GetOrCreateSamplerState(const FSamplerStateInitializerRHI& Initializer)
{
// This sampler cache is supposed to be used only from RT
// Add a lock here if it's used from multiple threads
check(IsInRenderingThread());
FRHISamplerState** Found = GTextureSamplerStateCache.Samplers.Find(Initializer);
if (Found)
{
return *Found;
}
FSamplerStateRHIRef NewState = RHICreateSamplerState(Initializer);
// Add an extra reference so we don't have TRefCountPtr in the maps
NewState->AddRef();
GTextureSamplerStateCache.Samplers.Add(Initializer, NewState);
return NewState;
}
bool IsRayTracingEnabled()
{
checkf(GIsRHIInitialized, TEXT("IsRayTracingEnabled() may only be called once RHI is initialized."));
#if DO_CHECK && WITH_EDITOR
{
// This function must not be called while cooking
if (IsRunningCookCommandlet())
{
return false;
}
}
#endif // DO_CHECK && WITH_EDITOR
extern RENDERCORE_API bool GUseRayTracing;
return GUseRayTracing;
}