Files
UnrealEngineUWP/Engine/Source/Developer/VulkanShaderFormat/Private/VulkanShaderFormat.cpp

130 lines
3.5 KiB
C++
Raw Normal View History

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3169859) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3134663 on 2016/09/21 by Chris.Bunner Merging Dev-MaterialLayers to Dev-Rendering, CL 3134208. Initial material attribute extensibility changes. #jira UE-34347 Change 3142292 on 2016/09/27 by Rolando.Caloca DR - hlslcc - Fix for warning X3206: implicit truncation of vector type causing error #jira UE-31438 Change 3143557 on 2016/09/28 by Rolando.Caloca DR - Back out changelist 3142292 Change 3145354 on 2016/09/29 by Benjamin.Hyder Updating Tm-ContactShadows Change 3154832 on 2016/10/07 by Rolando.Caloca DR - vk - Fix crash on framebuffers with missing textures Change 3154838 on 2016/10/07 by Rolando.Caloca DR - vk - Enable clip distance Change 3154840 on 2016/10/07 by Rolando.Caloca DR - Remove branch per codereview Change 3155118 on 2016/10/07 by Rolando.Caloca DR - vk - Compute pipeline fixes Change 3155129 on 2016/10/07 by Rolando.Caloca DR - Added draw events for reflection captures Change 3155167 on 2016/10/07 by Rolando.Caloca DR - Use shader clear for platforms that can't use viewport or scissor Change 3155168 on 2016/10/07 by Rolando.Caloca DR - vk - Added submit gpu - Some fixes for Geometry and Compute Change 3155595 on 2016/10/07 by Rolando.Caloca DR - vk - Use new render pass system Change 3155720 on 2016/10/07 by Rolando.Caloca DR - vk - static analysis fix Change 3155732 on 2016/10/07 by Rolando.Caloca DR - Fix clears for platforms that can't use viewports, excluderects or scissor on clear Change 3156787 on 2016/10/10 by Rolando.Caloca DR - Fix mem leaks Change 3156805 on 2016/10/10 by Rolando.Caloca DR - Improve check msg per licensee Change 3156815 on 2016/10/10 by Rolando.Caloca DR - Fix infinite recursion Change 3157041 on 2016/10/10 by Rolando.Caloca DR - vk - Fix key access from multiple threads Change 3158253 on 2016/10/11 by Rolando.Caloca DR - Fix comment #jira UE-37128 PR #2852 Change 3158606 on 2016/10/11 by Rolando.Caloca DR - vk - Accessors Change 3160418 on 2016/10/12 by Daniel.Wright Lightmap textures are now outered to UMapBuildDataRegistry so that the UMapBuildDataRegistry can be moved in the content browser Change 3160644 on 2016/10/12 by Arne.Schober DR - [UE-32613] - OpenGL used to have custom code in the compiler to modify the source so that the same data and matricies can be used as DirectX, unfortunately that causes precission problem. Fortunately there is an extension available (glClipControl) which enables DirectX behaviour in OpenGL and it is widely supported. We only tested Linux and Windows and therfore only default enable on those platforms. Change 3161219 on 2016/10/13 by Luke.Thatcher [RENDERING] [!] Fix incorrect shader used in GPU Benchmark causing crash in OpenGL. Change 3161838 on 2016/10/13 by Daniel.Wright Fixed level getting added to the dirty list twice when legacy lightmaps are present Change 3161884 on 2016/10/13 by Arne.Schober DR - Fix Mac and DCC build Change 3162206 on 2016/10/13 by Chris.Bunner Merging Dev-MaterialLayers to Dev-Rendering, CL 3161593: Material expressions; Trig, fast-trig, saturate, round, truncate, pre-skinned normal. Added CustomEyeTangent to material attributes. Resolved some hard-coded attribute typing and other minor fixes. Change 3162491 on 2016/10/13 by Chris.Bunner Merging Dev-MaterialLayers to Dev-Rendering, CL 3162397: More fixed type-casting on material attributes. Swapped compiler::forcecast booleans to flags (and fixed a regression). Change 3163266 on 2016/10/14 by Daniel.Wright Fixed sublevels with legacy lighting data being added to the dirty packages list redundantly Change 3163524 on 2016/10/14 by Mark.Satterthwaite Bring over specific changes from Unicorn branch that increases the size of shader optional data so that it is considerably more useful. Change 3163529 on 2016/10/14 by Mark.Satterthwaite Move the Metal shader source code and compilation path into the newly enlarged shader optional data. Change 3163553 on 2016/10/14 by Mark.Satterthwaite Speculative fix for FORT-31590 also seen by a licensee - the Metal command buffer handler will be called from a dispatch queue thread that won't be registered with the stats system. #jira FORT-31590 Change 3163562 on 2016/10/14 by Mark.Satterthwaite Tidy up and extend the Metal debugging options: - Added rhi.Metal.BufferScribble which when enabled will fill freed buffer regions with 0xCD to help identify any areas where we are writing to a buffer while it is still being processed on the GPU. - Added rhi.Metal.BufferZeroFill which will zero-fill newly allocated buffer regions before any other data is read/written. Useful for catching cases where we might be reading uninitialised memory. - Added rhi.Metal.ResourcePurgeOnDelete which will purge the backing store of resources prior to releasing them back to the system or the respective pool. This will make any use-after-free conditions much more likely. - Added rhi.Metal.ResourceDeferDeleteNumFrames to defer releasing resources to the system or the resource pool by the specified number of frames (in addition to the current policy of waiting for the current end of frame & command-buffer completion). Useful for tracking down resource lifetime errors. - Fixed a number of bugs related to the modifications to vertex stream handling and addition of the SetShaderBytes API. - Track the start & end of FRingBuffer ranges - it appeared that the ring-buffer usage was invalid but it was in fact only my assumptions about the range that needed to be scribbled for rhi.Metal.BufferScribble. There is still the possibility that command-buffers that are implicitly parallelised by the driver may cause the ring-buffer range tracking to go awry - but with our data dependencies and the separation of the async. compute context I don't believe this is likely. - Fix up the "nometalv2" flag so that we can disable the features only available on iOS/tvOS-10/macOS-10.12 on newer devices to save having to reboot all the time. - Fixed the flickering geometry when enabling rhi.Metal.RuntimeDebugLevel=4 which breaks render passes into separate command-buffers - the occlusion query was waiting on the wrong command buffer in this case. Change 3163752 on 2016/10/14 by Mark.Satterthwaite Add missing parenthesis to fix compile error on iOS. Change 3164151 on 2016/10/16 by Benjamin.Hyder Submitting TM-AutoLOD level to QAGame #jira UE-29618 Change 3164190 on 2016/10/16 by Uriel.Doyon Materials now hold texture streaming data in the form of (UV scale X UV channel) for each texture. This data can be disabled through "r.Streaming.UseMaterialData" Defined a common framework in MeshComponent for texture streaming, used by both StaticMeshes and SkeletalMeshes. Simplified component interface for using the texture streaming build framework. Removed intermediate texture streaming build data from the static mesh components. Fixed shader compilation errors with the decals (from merge with main). Change 3164636 on 2016/10/17 by Rolando.Caloca DR - vk - Fix validation spam Change 3164679 on 2016/10/17 by Arne.Schober DR - [OR-28457] Part1, Scene View Refactoring - Removed Previous VewMatrices from SceneInfo and pass in Previous and Current ViewMatrices into Uniform Buffer creation to uniform UseCase for Shadows and CustomDepth, Fixed a Bug in Shadows with help of Daniel where the SceneView was copied unnecessary copied again. Also simplified the code in that area. Change 3164705 on 2016/10/17 by Daniel.Wright When new levels are loaded, only the Indirect Lighting Cache Allocations intersecting the level's light probes are updated to minimize hitches. This optimization requires a lighting build to compute PrecomputedLightVolume bounds. Change 3164834 on 2016/10/17 by Daniel.Wright Support directional light dynamic shadows in any channel with forward shading, which can happen with multiple shadow casting stationary directional lights (even though only the lighting of one will appear) Change 3164870 on 2016/10/17 by Arne.Schober DR - [OR-28457] Part2, Custom Depth Jitter - Allowed to overwite the viewconstant buffer in the custom depth pass. There ia also a new Project Setting available. The default constructor of the ContextDataType has been explicitly deleted to enforce compile errors when the templated code like the StaticMeshDrawList accidently tries to create a context without ViewUniformBuffer. Change 3164949 on 2016/10/17 by Rolando.Caloca DR - vk - First version of pooled occlusion queries Change 3165100 on 2016/10/17 by Rolando.Caloca DR - vk - Added driver version for Nvidia. AMD doesn't have one yet. Change 3165160 on 2016/10/17 by Rolando.Caloca DR - vk - Fix for queries not ready Change 3165230 on 2016/10/17 by Rolando.Caloca DR - vk - More fixes for occlusion queries Change 3165839 on 2016/10/18 by Rolando.Caloca DR - hlslcc - Fix default parameters getting wrong values Change 3166029 on 2016/10/18 by Rolando.Caloca DR - Switch some clears to DrawClearQuad() Change 3166066 on 2016/10/18 by Mark.Satterthwaite Update ShaderVersion due to CL #3163524 Change 3166067 on 2016/10/18 by Mark.Satterthwaite Update Mac hlslcc for RCO's 3165839. Change 3166370 on 2016/10/18 by Brian.Karis Improved hair AA Change 3166389 on 2016/10/18 by Uriel.Doyon Fixed lightmap having bigger resolutions than the engine can handle #jira UE-34737 #review-3166193 @daniel.wright Change 3166495 on 2016/10/18 by Rolando.Caloca DR - vk - Fix occlusion queries Change 3166516 on 2016/10/18 by Arne.Schober DR - Fix shaderbuild issue Change 3166650 on 2016/10/18 by Rolando.Caloca DR - vk - Enable GRHISupportsFirstInstance Change 3166799 on 2016/10/18 by Arne.Schober DR - [OR-28508] - The velocity Rendering pass was missing the adjustment for the PDO Change 3167855 on 2016/10/19 by Rolando.Caloca DR - vk - Implemented texture streaming Change 3168365 on 2016/10/19 by Rolando.Caloca DR - Fix static analysis Change 3168405 on 2016/10/19 by Mark.Satterthwaite Fix the optional shader data changes from Unicorn to prevent FindOptionalData from erronesouly testing against the trailing optional data size, which can match the tag for optional data entries if you are unlucky. #jira UE-37489 Change 3169467 on 2016/10/20 by Arne.Schober DR - UE-28039 - Fixed flickering cached shadows on dynamic objects: Adding preshadows whose depths are cached so that GatherDynamicMeshElements will still happen, which is necessary for preshadow receiver stenciling. Change 3169478 on 2016/10/20 by Arne.Schober DR - UE-28039 - missing comment Change 3169845 on 2016/10/20 by Arne.Schober DR - UE-35937 - readd Merged out check Change 3169859 on 2016/10/20 by Rolando.Caloca DR - vk - Stop popping up dialog on every run as the device name in the API doesn't match our driver database [CL 3170066 by Marcus Wassmer in Main branch]
2016-10-20 20:09:22 -04:00
// .
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3006421) #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2998081 on 2016/06/02 by Rolando.Caloca DR - Update vulkan headers to 1.0.13.0 Change 2998087 on 2016/06/02 by Rolando.Caloca DR - Added r.DumpShaderDebugWorkerCommandLine to dump a batch file containing a command line for SCW's -directcompile mode Change 2998092 on 2016/06/02 by Rolando.Caloca DR - Updated ThirdParty/glslang to 1.0.13.0 Change 2998113 on 2016/06/02 by Martin.Mittring Added -Deterministic and -BuildName=... as command line option for Screenshot verification Change 2998115 on 2016/06/02 by Martin.Mittring optimied Tonemapper sharpen 25->17 instructions fixes: very bright HDR pixel appeared to not be antialiased no blonger blurs very bright pixels (we could bring that back if needed but counters the sharpen) moved one multipy into C++ Added debug visualization (HLSL define) Change 2998132 on 2016/06/02 by Rolando.Caloca DR - Remove auto from VulkanRHI wherever possible Change 2998148 on 2016/06/02 by Rolando.Caloca DR - Move FVulkanPendingState out of device and into cmd list for more RHI thread fixes Change 2998180 on 2016/06/02 by Rolando.Caloca DR - Temp fix for (bogus?) fence validation warning using VULKAN_REUSE_FENCES=0 - Check we are not asking for a VkFormat out of bounds (ie only works with core formats) Change 2998293 on 2016/06/02 by Rolando.Caloca DR - Add support for BC6H & BC7 in desktop Vulkan Change 2998419 on 2016/06/02 by Brian.Karis Optimized CountBits Change 2998480 on 2016/06/02 by Rolando.Caloca DR - Fix for RHI thread failing in an ensure on es31 (doesn't happen on bypass as the ensure is inside RHI cmd list) Change 2998486 on 2016/06/02 by Martin.Mittring fixed ES2 shader compile Change 2998527 on 2016/06/02 by Daniel.Wright Added cvar r.StencilForLODDither, which is compiled into shaders and forces a full prepass when enabled. This allows r.EarlyZPass to remain changeable at runtime (when not forced to a value by features that are enabled). Change 2998531 on 2016/06/02 by Daniel.Wright Fixed Pixel Normal Offset refraction mode with materials using world space normals Change 2998568 on 2016/06/02 by Rolando.Caloca DR - Fix typo Change 2998630 on 2016/06/02 by Rolando.Caloca DR - Relaxed glslang strictness to get Pos tCombineLUTs working - Reenabled Post CombineLUTs on Vulkan - Removed some extra glsl output from Vulkan backend - Fixed RHI thread uniform buffer assert Change 2998639 on 2016/06/02 by Brian.Karis Fix for crash when removing instances while lighting is building Change 2998640 on 2016/06/02 by Martin.Mittring added r.ResetViewState to allow for more deterministic rendering made SSR FrameRandom resetable by not using FrameNumber (Note: SSR on a view without state was flickering before, not it's stabele and doesn't flicker) Change 2998790 on 2016/06/02 by Martin.Mittring minor optimization to SSR Change 2999849 on 2016/06/03 by Martin.Mittring fixed issue with sort order Change 3000340 on 2016/06/03 by Rolando.Caloca DR - Integrate change from 3000177 Workaround for random crash shutting down D3D11/NV driver jira UE-18906 Change 3000422 on 2016/06/03 by Rolando.Caloca DR - Mirror change in Odin Change 3000571 on 2016/06/03 by Rolando.Caloca DR - Vulkan SM4 prep Change 3001652 on 2016/06/06 by Gil.Gribb Merging //UE4/Dev-Main@3001532 to Dev-Rendering (//UE4/Dev-Rendering) Change 3001935 on 2016/06/06 by Gil.Gribb UE4 - Fixed botched merge Change 3002390 on 2016/06/06 by Gil.Gribb UE4 - Added code to prevent flooding of rendering thread with heartbeats. Change 3002442 on 2016/06/06 by Martin.Mittring Moved ImageInvalidator out of NotForLicensees - V1.0 works well enough Change 3002460 on 2016/06/06 by Martin.Mittring fixed missing file in ImageValidator added .exe to extras Change 3002514 on 2016/06/06 by Martin.Mittring added OpenSubDiv 3.0.2, not yet used Change 3002536 on 2016/06/06 by Martin.Mittring fixed help text on cvar Change 3002647 on 2016/06/06 by Martin.Mittring adding r.ResetViewState to RenderOutputValidation added r.Streaming.FramesForFullUpdate to r.DisplayInternals #code_review:Benjamin.Hyder Change 3002945 on 2016/06/06 by Rolando.Caloca DR - Fix hlslcc issue with access to matrix elements: This would fail: M._m30 += f; - Fixed IRDump for matrix swizzled - Fix hlslcc_exe not linking Change 3002979 on 2016/06/06 by John.Billon DDS unsupported format error #Jira UE-24529 Change 3002983 on 2016/06/06 by Martin.Mittring split FPixelShaderInOut in in and out Change 3003011 on 2016/06/06 by Martin.Mittring updated OpenSubDiv to 3.0.2 Fixed SubDivisonRendring by using OpenSubDiv Change 3003264 on 2016/06/06 by Daniel.Wright Fixed bUseSingleSampleShadowFromStationaryLights on particles Change 3003296 on 2016/06/06 by Daniel.Wright Renamed files Forward* to Mobile* Change 3003350 on 2016/06/06 by Daniel.Wright Improved "Repaired Painted Vertex Colors" log message. This is now done once on levels at load in the editor, instead of for every component (massive log spam). Total load time caused by the fixup is reported. Change 3003815 on 2016/06/07 by Chris.Bunner Updating to more recent D3DCompiler DLL, seeing up to 2x speed-up in testing. Removed compiler override cvar. #jira UE-28574 Change 3003827 on 2016/06/07 by Gil.Gribb UE4 - Increased stack sizes for thread pools. Change 3003971 on 2016/06/07 by Martin.Mittring fixed compiler warnings Change 3004028 on 2016/06/07 by Rolando.Caloca DR - Update glslang exe Change 3004555 on 2016/06/07 by Rolando.Caloca DR - vk - Fix validation warning Change 3004637 on 2016/06/07 by Martin.Mittring fixed compiler warning Change 3004841 on 2016/06/07 by Daniel.Wright Fix for shadowed variable Change 3005044 on 2016/06/07 by Daniel.Wright SubUV Animations can get opacity information from any channel of the source texture Change 3005057 on 2016/06/07 by Daniel.Wright Renamed ForwardShading* to Mobile* Change 3005135 on 2016/06/07 by Uriel.Doyon Moving wanted mip computation (according to budget) to async task. Update "stat streaming" to show visible mips and also loading progression. Fixed overly wanted mip issue cause be max range clamping. Optimized cost of the texture streamer on the gamethread. Character, Terrain and Forced Load are now loaded with priority in the AsyncIO Reduced streaming temp memory requirements on PS4. Async streaming task now runs in parallel to the incremental update. Fixed bug with bProcessEverything not working as expected in UpdateResourceStreaming. Fixed metrics with HiddenScale being applied in addition to overbudget limitation. Improved budget stability when using split load request (one for visible mips + one for hidden mips) Implemented a more agressive visibility test (used to be a seen in the last 5 sec, now closer to .5) Streaming stats are now within a single class named FTextureStreamingStats and updated in a single function. Cleanup of FStreamingTexture state update into a single function (UpdateDynamicData). Retention logic now drops texture based on the last render time (for non visible textures) to reduce looping effects. Change 3005207 on 2016/06/07 by Uriel.Doyon Fixed warning [CL 3006426 by Gil Gribb in Main branch]
2016-06-08 16:02:23 -04:00
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
#include "VulkanShaderFormat.h"
#include "ModuleInterface.h"
#include "ModuleManager.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 "Interfaces/IShaderFormat.h"
#include "Interfaces/IShaderFormatModule.h"
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
#include "hlslcc.h"
#include "ShaderCore.h"
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) (Source: //UE4/Dev-Rendering @ 2943238) #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2932679 on 2016/04/04 by Martin.Mittring remove hack/cvar that is not longer needed as we fixed the bug #rb:Bob.Tellez #code_review:Bob.Tellez Change 2932681 on 2016/04/04 by Martin.Mittring fixed cvars in consolevariables.ini can affect engine even if marked with cheat (no longer load consolevariables.ini in shipping and test), unified 3 code path, added testcase, cvars with cheat in ini file other than consolevariables.ini now trigger ensure, =on/off/true/false/.. works in all ini files, added enure if non scalability setting are used in ScalabilityIni (get now ignored) #rb:David.Hill #code_review:Marcus.Wassmer, Michael.Noland Change 2932719 on 2016/04/04 by Marcus.Wassmer Merge 3 band SH back to DevRendering #rb Daniel.Wright Change 2932760 on 2016/04/04 by Zabir.Hoque Migrating high resolution cubemaps for skylight and reflection probes. #rb: Daniel.Wright Change 2933121 on 2016/04/05 by Rolando.Caloca DR - vk - Fix free blocks not getting joined - Fix compile issue Change 2933122 on 2016/04/05 by Rolando.Caloca DR - Do not shorten dumped shaders path Change 2933126 on 2016/04/05 by Rolando.Caloca DR - vk - Index Buffers using new resource management Change 2933127 on 2016/04/05 by Rolando.Caloca DR - vk - Extract multibuffer off index buffer Change 2933131 on 2016/04/05 by Rolando.Caloca DR - vk - Transition to vb's using mutlibuffer Change 2933136 on 2016/04/05 by Rolando.Caloca DR - vk - Change staging buffers to use resource allocation system - Fix free block not getting joined - Remove define Change 2933140 on 2016/04/05 by Rolando.Caloca DR - vk - 'static' textures now use resource mgmt - Release free pages back to the OS - Remove ensure Change 2933152 on 2016/04/05 by Rolando.Caloca DR - vk - Fix aliasing granularity - Fix renderpass end/copy buffer ensure Change 2933155 on 2016/04/05 by Rolando.Caloca DR - SCW - Fix for -directcompile to directly load file for preprocessor Change 2933158 on 2016/04/05 by Rolando.Caloca DR - hlslcc - Error on Metal if trying to R & W on RWTextures - Fix indices on RW reads to be unsigned #codereview Mark.Satterthwaite, Michael.Trepka Change 2933169 on 2016/04/05 by Rolando.Caloca DR - vk - Move header to public to match changes on DevMobile Change 2933173 on 2016/04/05 by David.Hill Deferred decal rendering with negative scale #rb:Matrin.Mittring #jira:UE-27389 Change 2933273 on 2016/04/05 by Rolando.Caloca DR - vk - Fix renderdoc markers Change 2933274 on 2016/04/05 by Rolando.Caloca DR - Support for -AttachDebugger Change 2933316 on 2016/04/05 by Rolando.Caloca DR - vk - Compile fix whene enabling define Change 2933334 on 2016/04/05 by Rolando.Caloca DR - Compile fix #codereview Martin.Mittring Change 2933805 on 2016/04/05 by Brian.Karis Temporal AA dynamic antighosting. Fixed DOF Change 2933811 on 2016/04/05 by Brian.Karis Fixed area light NaNs. Improvements to area lights. Horizen handling for wrap around. Change 2933812 on 2016/04/05 by Brian.Karis Fixed fresnel on SSS skin. Change 2933813 on 2016/04/05 by Brian.Karis Tessellation fix Change 2933816 on 2016/04/05 by Brian.Karis Improved forward shading support [CL 2943241 by Gil Gribb in Main branch]
2016-04-13 21:24:38 -04:00
static FName NAME_VULKAN_ES3_1_ANDROID(TEXT("SF_VULKAN_ES31_ANDROID"));
static FName NAME_VULKAN_ES3_1(TEXT("SF_VULKAN_ES31"));
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
static FName NAME_VULKAN_SM4_UB(TEXT("SF_VULKAN_SM4_UB"));
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
static FName NAME_VULKAN_SM4(TEXT("SF_VULKAN_SM4"));
static FName NAME_VULKAN_SM5(TEXT("SF_VULKAN_SM5"));
class FShaderFormatVulkan : public IShaderFormat
{
enum
{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3219450) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3148067 on 2016/10/01 by Daniel.Wright Support for ReflectionEnvironment and light type show flags with ForwardShading Change 3149085 on 2016/10/03 by Daniel.Wright Support for ReflectionEnvironment show flag in base pass reflections without any shader overhead Change 3162206 on 2016/10/13 by Chris.Bunner Merging Dev-MaterialLayers to Dev-Rendering, CL 3161593: Material expressions; Trig, fast-trig, saturate, round, truncate, pre-skinned normal. Added CustomEyeTangent to material attributes. Resolved some hard-coded attribute typing and other minor fixes. Change 3186067 on 2016/11/03 by Daniel.Wright Updated Stationary primitive tooltip to indicate that it allows the primitive to be changed, but not moved Change 3186069 on 2016/11/03 by Daniel.Wright Using a weighted geometric mean to combine multiple Distance Field Indirect Shadows, greatly reduces over-occlusion when overlap is high Change 3186084 on 2016/11/03 by Mark.Satterthwaite Duplicate 3172511: Don't set Metal resource option fields on texture descriptors when running on an OS that doesn't support them. #jira UE-37481 Change 3186089 on 2016/11/03 by Mark.Satterthwaite Duplicate CL #3169764: Fixed automatic conversion of G8_sRGB into RGBA8_sRGB required for Mac Metal, which fixes FORT-27627. #jira FORT-27627 Change 3186113 on 2016/11/03 by Mark.Satterthwaite Duplicate CL #3183807: Change the way we access the Metal viewport's backbuffer, to reduce possible causes of FORT-31649: - Added console variable "rhi.Metal.SupportsIntermediateBackBuffer" to control whether to use an extra render-target so we can support screenshots & movie capture, or render directly to the back-buffer to save memory & GPU performance. Still defaults to ON for Mac & OFF for iOS/tvOS. - Change the way we handle updates to the back-buffer size to ensure that the different threads access their intended version. #jira FORT-31649 Change 3186116 on 2016/11/03 by Mark.Satterthwaite Duplicate CL #3183823: Record Metal resource & state objects used in a command-buffer when rhi.Metal.RuntimeDebugLevel is set to 3 or higher. The object labels, types & descriptions will be printed on failure - if the object is deleted prior to this then we have a lifetime error and it will crash at this point and can be debugged further using our -metalretainrefs command-line option or Xcode's zombie-objects. Used to verify that FORT-31649 is not a simple resource lifetime error and thereby speed up Apple/vendor investigations. #jira FORT-31649 Change 3186818 on 2016/11/04 by Chris.Bunner PR #2907 Export UMaterialExpressionNoise (contributed by kayosiii). Change 3186979 on 2016/11/04 by Rolando.Caloca DR - Misc minor cleanup Change 3187169 on 2016/11/04 by Uriel.Doyon Incremental insertion of level data between PostLoad and AddToWorld Change 3187205 on 2016/11/04 by Mark.Satterthwaite Compile fixes for iOS. Change 3187389 on 2016/11/04 by Uriel.Doyon Fix for possible stall when loading hidden level Change 3187598 on 2016/11/04 by Michael.Trepka MetalViewport compile fix Change 3187678 on 2016/11/04 by Uriel.Doyon Fix for landscape grass textures not being streamed in correctly. Change 3187731 on 2016/11/04 by Rolando.Caloca DR - Start making type safe some cross compiler enums Change 3187824 on 2016/11/04 by Rolando.Caloca DR - clang compile fix Change 3187953 on 2016/11/04 by Rolando.Caloca DR - vk - Mac compile fix Change 3188696 on 2016/11/07 by Mark.Satterthwaite Another iOS compile fix for new MetalViewport validation code. Change 3188906 on 2016/11/07 by Rolando.Caloca DR - Show permutation of LUTBlender Change 3189094 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3189134 on 2016/11/07 by Daniel.Wright Fix for CreateRenderTarget2D called in construction script during cooking Change 3189145 on 2016/11/07 by Chris.Bunner Follow-up to CL 3186818, export UMaterialExpressionVectorNoise. Change 3189239 on 2016/11/07 by Daniel.Wright Added show flag for Contact Shadows, disabled in planar reflections Change 3189252 on 2016/11/07 by Daniel.Wright Support for Reflection Capture intensity with simple reflections, which are the default with Forward Shading Change 3189406 on 2016/11/07 by Mark.Satterthwaite Really fix the last of the iOS compile errors from changes to the MetalViewport code. Change 3190854 on 2016/11/08 by Ben.Woodhouse XB1: Fix memory corruption with RHICreateVertexBuffer and RHICreateIndexBuffer when using initial data (Procedural Mesh Component crash) #jira UE-34264 #fyi james.golding #fyi keith.judge Change 3190962 on 2016/11/08 by Olaf.Piesche Unshelved from pending changelist '3176615' - Gil's fix for race condiiton with particle vertex factory reuse across different passes; potential to fix a number of issues Change 3191959 on 2016/11/09 by Uriel.Doyon Removed some static primitives from the dynamic primitive handler for texture streaming. Change 3193122 on 2016/11/10 by Chris.Bunner Always update non-preview material resources for use in code preview. #jira UE-38223 Change 3193190 on 2016/11/10 by Gil.Gribb UE4 - Fixed rare bug with shadow groups rendering things that have not been setup to render this frame. #jira UE-36379 Change 3193523 on 2016/11/10 by Uriel.Doyon Fixed incorrect section bounds used for texture streaming. Change 3193962 on 2016/11/10 by Uriel.Doyon Added defrag of dynamic bounds used for the texture streaming. Allows to remove unused bounds over time. Change 3193974 on 2016/11/10 by Uriel.Doyon New "Required Texture Resolution" view mode. Showing the ratio between the currently streamed texture resolution and the resolution wanted by the GPU. Change 3194109 on 2016/11/10 by Uriel.Doyon Another patch on material bounds used for texture streaming. Change 3194665 on 2016/11/11 by Chris.Bunner Duplicated behavior for inherited velocity scaling scaling to vert/surface spawned particles. Change 3194734 on 2016/11/11 by Rolando.Caloca DR - vk - Simplified some texture casting Change 3194867 on 2016/11/11 by Rolando.Caloca DR - vk - SM5 fixes Change 3195176 on 2016/11/11 by Chris.Bunner Fixed incorrectly updated NVAPI error. Change 3195425 on 2016/11/11 by Uriel.Doyon Fixed possible invalid level reference in the texture streamer Change 3196512 on 2016/11/14 by Gil.Gribb Merging //UE4/Dev-Main@3196156 to Dev-Rendering (//UE4/Dev-Rendering) Change 3196750 on 2016/11/14 by Marcus.Wassmer Fix ordering problem with GPU cache transitions Change 3196815 on 2016/11/14 by Daniel.Wright Suppressed 'Instanced stereo rendering is not supported' warning showing up in CIS Change 3196818 on 2016/11/14 by Daniel.Wright Fixed FIndirectLightingCache::UpdateCachePrimitivesInternal churning through a bunch of temporary memory Change 3196819 on 2016/11/14 by Daniel.Wright Volume lighting samples are allowed outside of the importance volume if their influence affects the volume. Fixes black indirect lighting on movable components in maps with small importance volumes. Volume lighting samples placed on surfaces use a radius that covers the layer height spacing, which prevents an uncovered region between layers Change 3197243 on 2016/11/14 by Uriel.Doyon Async Task For Updating static component LastRender time #jira UE-24268 Change 3197359 on 2016/11/14 by Daniel.Wright Added Inscattering Texture controls to ExponentialHeightFog * When InscatteringColorCubemap is specified, directional light inscattering is disabled * Lerps betwen 1x1 mip at NonDirectionalInscatteringColorDistance to mip 0 at FullyDirectionalInscatteringColorDistance * Added FogCutoffDistance, so artists can prevent fog on skyboxes (requires fog to be setup matching the fog that was rendered into the sky texture so that distant mountains match) * Fog shader permutations based on what feature is enabled Change 3198419 on 2016/11/15 by Chris.Bunner PS4 HDR: Runtime toggle (backbuffer recreation on resize matching), UI composition. Matches PC behavior and controls. HDR: Generalized buffer formats, cvar consistency pass, LUT for UI composition, refactoring common functions. Exposed RHICreateTargetableShaderResource3D. Moved some (translucent) volume rendering helpers to allow access in Slate. Change 3198822 on 2016/11/15 by Daniel.Wright Mac compile fix Change 3199509 on 2016/11/15 by Uriel.Doyon Added support for viewmode param asset name (and note just param value). Used to investigate texture streamer behavior. Change 3199578 on 2016/11/15 by Rolando.Caloca DR - Add some shader resource tables to SCW when running with -directcompile Change 3199698 on 2016/11/15 by Rolando.Caloca DR - vk - Refactor shader & descriptor bindings Change 3199712 on 2016/11/15 by Rolando.Caloca DR - vk - r.Vulkan.StripGlsl to always strip glsl at runtime to save memory per shader Change 3199717 on 2016/11/15 by Rolando.Caloca DR - vk - Show hitching PSO info again Change 3199750 on 2016/11/15 by Rolando.Caloca DR - SCW clang compile fixes Change 3200353 on 2016/11/16 by Rolando.Caloca DR - vk - Mac fix Change 3200358 on 2016/11/16 by Chris.Bunner Only allow UI composition on platforms we currently use it. Change 3200823 on 2016/11/16 by Chris.Bunner Remove expression key attribute ID when not translating an attribute output to allow intended expression sharing. #jira UE-38699 Change 3200947 on 2016/11/16 by Mark.Satterthwaite Fix UE-38695 by not trying to resize the viewport on the wrong thread. #jira UE-38695 Change 3201069 on 2016/11/16 by Daniel.Wright Fog inscattering texture limited to SM4 and above, fixes ES2 compile errors Change 3201346 on 2016/11/16 by Brian.Karis Temporal AA fix for correct edge gradients. Filtering now combined with importance sampling. Enabled Catmull-Rom resolve filter. Results are now slightly sharper. Fixed antighosting. Will yet require a dilation to be perfect. Optimized bicubic filtering to 5 taps instead of 9. Cleaned out unused code. Change 3201369 on 2016/11/16 by Brian.Karis Bicubic texture sample Change 3201522 on 2016/11/16 by Rolando.Caloca DR - vk - Fix static analysis issues Change 3201878 on 2016/11/17 by Chris.Bunner Temporarily disable Nvapi HDR error logging. #jira UE-38529 Change 3202108 on 2016/11/17 by Simon.Tovey Assets with easy repro for flickering particles bug Change 3202181 on 2016/11/17 by Rolando.Caloca DR - vk - CIS android fix Change 3202325 on 2016/11/17 by Ben.Woodhouse Integrate 4.14.1 fix from 14 //UE4/Release-4.14 (@3201850) Fix CreateVertexbuffer and CreateIndexBuffer memory corruption (Procedural Mesh Component crash) #jira UE-34264 Change 3204394 on 2016/11/18 by Guillaume.Abadie PR #2808: AlphaComposite Fog Opacity fix (Contributed by moritz-wundke) #br Ben.Woodhouse Change 3204428 on 2016/11/18 by Guillaume.Abadie Fixes a couple of issues in decals: * Crash in FDecalDrawingPolicyFactory::DrawMesh() * ActorPostion material expression * PixelNormalWS material expression * Missing renaming from DEFERRED_DECAL to DECAL_PRIMITIVE #jira UE-38327, UE-38158, UE-37818, UE-37350 Change 3204429 on 2016/11/18 by Uriel.Doyon Darker default undefined accuracy. Reenabled the texture streaming build in the build all. Change 3204458 on 2016/11/18 by Chris.Bunner Shader truncation warnings fix. Change 3204459 on 2016/11/18 by Chris.Bunner Engine 'Passthrough' material fuction fix. V4 is now actually a V4. Change 3204460 on 2016/11/18 by Chris.Bunner Correctly handle some known Nvapi warnings. #jira UE-38529 Change 3204653 on 2016/11/18 by Marc.Olano Helper functions for tiled textures Checking in for Ryan Brucks Change 3204863 on 2016/11/18 by Arne.Schober DR - Replaced ENQUEUE_UNIQUE_RENDER_COMMAND with a Debuggable template Implementation Change 3204939 on 2016/11/18 by Arne.Schober DR - Make clang happy Change 3204968 on 2016/11/18 by Arne.Schober DR - UE-38494 - Fixed SpeedTree Wind crash, when force deleting the Asset. Change 3206293 on 2016/11/21 by Uriel.Doyon New member bHasStreamingUpdatePending in UTexture2D to delay update of global distance fields. Set to true when the streamer can possibly load a mip in the near future. #jira UE-37787 Change 3206551 on 2016/11/21 by Chris.Bunner Added material update context when forcing all shaders to recompile. #jira UE-38481 Change 3206644 on 2016/11/21 by Benjamin.Hyder Updating Planar Reflection example in TM-Shadermodels. Change 3206899 on 2016/11/21 by Rolando.Caloca DR - vk - SM5 fixes Change 3206900 on 2016/11/21 by Rolando.Caloca DR - Added missing strings for shader formats Change 3206983 on 2016/11/21 by Rolando.Caloca DR - vk - Support for SV_Coverage Change 3207237 on 2016/11/22 by Simon.Tovey Exporting particle module base and a couple of child classes as it's commonly requested. #test compiles Change 3207241 on 2016/11/22 by Gil.Gribb Merging //UE4/Dev-Main@3206998 to Dev-Rendering (//UE4/Dev-Rendering) Change 3207520 on 2016/11/22 by Ben.Woodhouse Cherry picked from //Fortnite/Main@3206301 Fixed GPU hang in Zone Map view. Was an issue with RenderThread using the device context without appropriate RHIThread flushes. #jira FORT-31616 #code_review keith.judge Change 3207541 on 2016/11/22 by Ben.Woodhouse Cherry picked from //fortnite/Main@3207422 * Fix UpdateTexture3D to create a staging texture of the region to update rather than the whole texture. This prevents distance fields crashing during update (allocating 18GB per frame in some cases) * Put UpdateTexture2D DMA support onto a cvar, disabled by default (corruption issues reported by licensees, plus not sure it's actually faster - could be slower due to reduced bandwidth; issues reported by licensees) * Fix UpdateTexture2D to only create a staging texture of the region to update, saving memory #jira UE-38609 Change 3207654 on 2016/11/22 by Chris.Bunner Don't flag 16-bit PNG/JPG textures as sRGB on import. #jira UE-30279 Change 3208434 on 2016/11/22 by Rolando.Caloca DR - vk - UAV transitions Change 3208490 on 2016/11/22 by Chris.Bunner Break material code sharing when we detect an unresolvable loop. By default change IsResultMA loop detection to stop on functions as we can determine type definitively. Unified IsResultMA detection across switch nodes. Change 3208860 on 2016/11/23 by Rolando.Caloca DR - vk - Fix some format issues Change 3209265 on 2016/11/23 by Arne.Schober DR - originally unshelved from 3153924 - Made Depth and Velocity Rendering Passes to use PSO only RHI interface, We are now passing down two structs that collect all the necessary information for the drawing policies to construct a PSO object. One during construction of the Policy, which contains information abouyt the CullMode, FillMode and PrimType. And another during rendering that passes infomation like BlendState and DepthStencilState down to the low levelrenderer into SetSharedState. Performance of the static drawlist ist slightly slower (less than 0.1ms on Consoles) due to some addtional branches and copies. The branches in the FDrawingPolicyRenderState will go away as soon as everything is converted to use the PSO interface. Performace of the GPU is slightly better due to less context rolls (mainly CullMode sorts in differently now) Change 3209305 on 2016/11/23 by Guillaume.Abadie Fix contact shadow's assemption on objects thickness Change 3209334 on 2016/11/23 by Brian.Karis Fixed TAA handling of alpha. Switched the meaning of AA_ALPHA to make sense. Change 3209903 on 2016/11/24 by Guillaume.Abadie Cherry picks alpha through post processing changelists 3201959, 3204143 and 3209883 from //UE4/Private-Partner-NREAL Change 3209973 on 2016/11/24 by Ben.Woodhouse Fix D3D11 and 12 static analysis warnings reported by Rob Troughton of Coconut Lizard (http://coconutlizard.co.uk/blog/ue4/pvs-studio-part5/) Change 3210023 on 2016/11/24 by Uriel.Doyon Fixed an issue with DropDetail when FixedFrameRate was set to a value smaller than MinDesiredFrameRate. #jira UE-37210 Change 3210026 on 2016/11/24 by Ben.Woodhouse Disable renderthread hang detection if a debugger is present, so we can debug the renderthread without crashing Change 3210049 on 2016/11/24 by Ben.Woodhouse Fix mac build Change 3210071 on 2016/11/24 by Uriel.Doyon Fixed an issue with masked materials and shader complexity viewmode when DBuffer Decals are enabled. #jira UE-37542 Change 3210374 on 2016/11/25 by Ben.Woodhouse * Fix issues with fast cleared dbuffer targets not being resolved when no decals are in the scene. This caused graphical corruption on XB1 and ensure failures on PS4 (with RHIThread disabled) * Move Decal rendertarget manager function implementations out of the header. #jira UE-38879 Change 3210390 on 2016/11/25 by Uriel.Doyon Fixed cubemap resourcesize not taking into account mipgen settings #jira UE-37045 Change 3210407 on 2016/11/25 by Uriel.Doyon "resavepackages" commandlet now supports -buildtexturestreaming that rebuilds the map texture streaming data. That can be used in combination with -buildlighting. Change 3210563 on 2016/11/27 by Rolando.Caloca DR - vk - Integrate cached memory fixes and PF_D24 format fix #jira UE-39025 PR #2974 Change 3210564 on 2016/11/27 by Rolando.Caloca DR - Fix for GL linker PR #2975 #jira UE-39029 Change 3210592 on 2016/11/27 by Rolando.Caloca DR - vk - SM5 fixes Change 3210597 on 2016/11/27 by Rolando.Caloca DR - vk - Prep for staging UB copies to GPU memory Change 3210600 on 2016/11/27 by Rolando.Caloca DR - vk - Extract generic range code Change 3210613 on 2016/11/27 by Rolando.Caloca DR - vk - Added r.Vulkan.SubmitOnDispatch Change 3211054 on 2016/11/28 by Rolando.Caloca DR - vk - Missing reference Change 3211330 on 2016/11/28 by Chris.Bunner Shader compile error for max texture coordinate count on skinned meshes. Change 3211384 on 2016/11/28 by Arne.Schober DR - Enforce move on EnqueueRenderCommand Lambda Change 3211431 on 2016/11/28 by Gil.Gribb Merging //UE4/Dev-Main@3211016 to Dev-Rendering (//UE4/Dev-Rendering) Change 3211738 on 2016/11/28 by Gil.Gribb IWYU fixes after merge Change 3212231 on 2016/11/28 by Richard.Wallis Fix build errors Change 3212253 on 2016/11/28 by Richard.Wallis Remove MacGraphicsSwitching plugin. #jira UE-37640 Change 3212310 on 2016/11/28 by Rolando.Caloca DR - vk - Update glslang to 1.0.33.0 Change 3212446 on 2016/11/28 by Guillaume.Abadie Implements PreviousFrameSwitch material expression Change 3212594 on 2016/11/28 by Arne.Schober DR - Fix missing include Change 3212681 on 2016/11/29 by Rolando.Caloca DR - vk - Auto flush for compute shader Change 3213000 on 2016/11/29 by Gil.Gribb temp fix for PF_MAX Change 3213161 on 2016/11/29 by Ben.Woodhouse Integrate latest D3D12 changes from //depot/Partners/Microsoft/UE4-DX12/...@3211714 Using: - p4 integrate //depot/Partners/Microsoft/UE4-DX12/Engine/Source/Runtime/D3D12RHI/...@3211714 //UE4/Dev-Rendering/Engine/Source/Runtime/D3D12RHI/... - p4 integrate //depot/Partners/Microsoft/UE4-DX12/Engine/Source/ThirdParty/Windows/DirectX/...@3211714 //UE4/Dev-Rendering/Engine/Source/ThirdParty/Windows/DirectX/... - p4 integrate //depot/Partners/Microsoft/UE4-DX12/Engine/Source/Programs/UnrealBuildTool/...@3211714 //UE4/Dev-Rendering/Engine/Source/Programs/UnrealBuildTool/... Changes from UE4-DX12: *** CL 3183818 *** Update D3D12 RHI to 4.14: - Merged changes from Epic up until 10/20/16 - Fixed an issue where command allocators where resetting too early. I changed to aggressive command list batching by default now that more SubmitCommandListHint calls exist in the upper engine, we don't need to worry about starving the GPU. Fewer ExecuteCommandLists calls means better performance and fewer Signals() so this change provides a GPU perf win. I had to fix an issue with aggressive batching where we would sometimes hold on to a command list long enough (in the pending list) but hadn't executed it yet. The command allocator was being put back in the queue of allocators during ReleaseCommandAllocator() without a syncpoint set and was thus being reset too early. I added a simple counter to the command allocator so it could track how many command lists were using it. It doesn't need to be thread safe since only one thread uses a command allocator at a time. I also added some stats around the # command lists and # command allocators since it would be possible to leak command allocators now if it's pending command list count isn't decremented correctly. In that case we'd keep creating new command allocators and eventually run out of memory. -Remove clear during allocate in the FD3D12FastConstantAllocator and FD3D12FastAllocator. The supplied resource locations are assumed to be new and thus don't need to be cleared. -Cleanup D3D12RHI stats. There were some unused stats as well as some missing ones. -Mark shader resource table uniform buffers as dirty only when the shader changes. Cleanup SetComputeShader calls and Dispatch calls to not set/unset the CS for each Dispatch. -Remove unused Check SRV resolved code that epic added to the D3D11 RHI and was brought over. We dont need it and we won't use this. -Remove "always on" cycle counters for high frequency RHI methods like RHISetShaderTexture. These should use the engine's stat macros as they are removed on TEST + SHIPPING builds. On Xbox a significant amount of CPU time is spent in things like QueryPerformanceCounter even when STATS aren't enabled. Currently 1% of an entire capture on XBOX is spent inside this call. I improved and cleaned up high freqency call stacks like: - RHISetShaderTexture - RHISetShaderResourceViewParameter - RHISetShaderParameter - RHISetUAVParameter In general I moved to use templated functions, removed unused parameters, unnecessary copies, etc. -Change D3D12 PIX profiling enable/disable to match Xbox and handle logic in the UEBuildWindows.cs for UBT. Also add a static assert to inform the developer when PIX profiling is requested but the engine is compiling out draw events. -Resources should be associated with the rendering thread's frame that it's currently recording command lists for and they shouldnt be cleaned up until those command lists have been translated to D3D12 command lists on the RHI thread AND completed executing on the GPU. This was confirmed to resolve an issue where CBV resources were being released too early. This work involved a couple changes: 1) Move the "frame" fence to be incremented on the rendering thread (during RHIAdvanceFrameForGetViewportBackBuffer()) so that resources that are deleted from the rendering thread are assosicated with the correct frame count 2) Queue up a command from the rendering thread to signal the "frame" fence. It needs to be queued to ensure that it's signaled at the correct time on the RHI thread (after that frame's command lists have been executed). -Disable GRHIRequiresEarlyBackBufferRenderTarget. Metal/Vulkan/Xbox11.x already do this. This is used by the Slate renderer during BeginRenderFrame and avoids a SetRenderTargets call. -Enable GRHISupportsMSAADepthSampleAccess (used in the Editor). This was enabled for D3D11 on SM5, but not for D3D12. -Delay load D3D12.dll and add root signature 1.1 support. -Add explicit flush calls to improve resource barrier batching instead of implict flushes inside FConditionalScopeResourceBarrier and FScopeResourceBarrier. Also update those classes with const members. *** CL 3183824 *** Fix the D3D12 RHI after integrating UE 4.14 updates: - Fixed a bug where we would try to get the PSO of a nullptr in SetPipelineState if we needed to reset the current PSO on the cmd list. - Fixed a spelling error - Removed the need for bForceState, we use dirty bits now *** CL 3183830 *** - GetDebugFlags RHI extension, needed by XB1 movie player. - Only query memory info if stats are enabled - Add support for the engine's new RHISubmitCommandsAndFlushGPU function - Update CommitPendingPipelineState to be Graphics/Compute specific and avoid the need for a IsCompute parameter. *** CL 3183837 *** Made PipelineState caches contain pointers to FD3D12PipelineState objects to avoid issues with using pointers to after Find/Add to the maps. TMap indicates that the pointer to the value associated with a key "is only valid until the next change to any key in the map." The lifetime of the PSO pointers is managed by the low level caches (graphics and compute). Added stat for the number of Pipeline State Objects. *** CL 3183931 *** Update Windows D3D12 headers and libs to RS1 release bits (10.0.14393.0) *** CL 3183978 *** Update UBT Windows build settings: - Change D3D12 PIX profiling enable/disable to match Xbox and handle logic in the UEBuildWindows.cs for UBT. Also add a static assert to inform the developer when PIX profiling is requested but the engine is compiling out draw events. -Delay load D3D12.dll and add root signature 1.1 support. *** CL 3184132 *** Fix Xbox PSO cache code where it could leak PSOs. Related to change 3183837. *** Changelist 3211714 *** Update D3D12 RHI with fixes: - Check if we can reserve slots in GatherUniqueSamplerTables - DirtyState more often in StateCache - Remove InternalSetSamplerState. The alternate function isn't used. - Allow MRTClear for arrays with holes in them - Fix uninitialized descriptors. This was causing a GPU hang on Xbox. We need to set dirty bits for resources bound to slots outside of the current descriptor table's range - Cleanup SetDescriptorHeap code. Move setting descriptor heap logic to the descriptor cache since it also owns things like the sampler maps. Added members to the descriptor cache to track the last heaps that were set on the command list to avoid dirtying bit unnecessarily. - Resource transitions: go through Common between queues (3D <--> Compute) - Fix initial state for placed resources. - Merging epic Change 3213250 on 2016/11/29 by Chris.Bunner GBufferHints tooltip fix. #jira UE-39103 Change 3213345 on 2016/11/29 by Gil.Gribb more IWYU fallout Change 3213676 on 2016/11/29 by Rolando.Caloca DR - Fix incorrect texture getting cleared Change 3213728 on 2016/11/29 by Rolando.Caloca DR - Lambda-ize Change 3214461 on 2016/11/29 by Ben.Woodhouse Rollout August QFE4 XDK (required for latest DX12 changes on XB1) Change 3215317 on 2016/11/30 by Daniel.Wright PS4 compile fix Change 3216343 on 2016/11/30 by Arne.Schober DR - UE-39155 - after talking to Brian it occurred to us that flipping the world space normal is non sensical. And indeed the Grass was using world space normals. Change 3216844 on 2016/12/01 by Ben.Woodhouse Fix for static analysis warnings after discussion with Microsoft Change 3216916 on 2016/12/01 by Gil.Gribb Merging //UE4/Dev-Main@3216539 to Dev-Rendering (//UE4/Dev-Rendering) Change 3217385 on 2016/12/01 by Arne.Schober DR - UE-39218, UE-39221, UE-39224 and potentially UE-39214 - The Stencil bits for Light channels and decal application were not set in the dynamic basepass Change 3217464 on 2016/12/01 by Ben.Woodhouse Fix for reflection capture resize assert. The assert is only valid in cooked builds, so disable it in editor #jira UE-39225 Change 3217534 on 2016/12/01 by Arne.Schober DR - Fix Merge conflict Change 3217581 on 2016/12/01 by Rolando.Caloca DR - Fix assert on debug Change 3217741 on 2016/12/01 by Benjamin.Hyder Duplicate audio fix. Change 3217890 on 2016/12/01 by Rolando.Caloca DR - Fix widget not rendering properly when hidden #jira UE-39221 Change 3218129 on 2016/12/01 by Arne.Schober DR - UE-39214 - Lod dither value as accidently cached accross the static draw list. Change 3218759 on 2016/12/02 by Guillaume.Abadie Fixes editor compositing bug caused by alpha through post processing change 3209903 #jira UE-39221 [CL 3219854 by Marcus Wassmer in Main branch]
2016-12-02 16:43:04 -05:00
UE_SHADER_VULKAN_ES3_1_VER = 8,
UE_SHADER_VULKAN_ES3_1_ANDROID_VER = 8,
UE_SHADER_VULKAN_SM4_VER = 8,
UE_SHADER_VULKAN_SM4_UB_VER = 8,
UE_SHADER_VULKAN_SM5_VER = 9,
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
};
int32 InternalGetVersion(FName Format) const
{
if (Format == NAME_VULKAN_SM4)
{
return UE_SHADER_VULKAN_SM4_VER;
}
else if (Format == NAME_VULKAN_SM5)
{
return UE_SHADER_VULKAN_SM5_VER;
}
else if (Format == NAME_VULKAN_ES3_1_ANDROID)
{
return UE_SHADER_VULKAN_ES3_1_ANDROID_VER;
}
else if (Format == NAME_VULKAN_ES3_1)
{
return UE_SHADER_VULKAN_ES3_1_VER;
}
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
else if (Format == NAME_VULKAN_SM4_UB)
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
return UE_SHADER_VULKAN_SM4_UB_VER;
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
}
check(0);
return -1;
}
public:
virtual uint16 GetVersion(FName Format) const override
{
const uint8 HLSLCCVersion = ((HLSLCC_VersionMajor & 0x0f) << 4) | (HLSLCC_VersionMinor & 0x0f);
const uint16 Version = ((HLSLCCVersion & 0xff) << 8) | (InternalGetVersion(Format) & 0xff);
return Version;
}
virtual void GetSupportedFormats(TArray<FName>& OutFormats) const
{
OutFormats.Add(NAME_VULKAN_SM4);
OutFormats.Add(NAME_VULKAN_SM5);
OutFormats.Add(NAME_VULKAN_ES3_1_ANDROID);
OutFormats.Add(NAME_VULKAN_ES3_1);
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
OutFormats.Add(NAME_VULKAN_SM4_UB);
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
}
virtual void CompileShader(FName Format, const struct FShaderCompilerInput& Input, struct FShaderCompilerOutput& Output,const FString& WorkingDirectory) const
{
check(InternalGetVersion(Format) >= 0);
if (Format == NAME_VULKAN_ES3_1)
{
CompileShader_Windows_Vulkan(Input, Output, WorkingDirectory, EVulkanShaderVersion::ES3_1);
}
else if (Format == NAME_VULKAN_ES3_1_ANDROID)
{
CompileShader_Windows_Vulkan(Input, Output, WorkingDirectory, EVulkanShaderVersion::ES3_1_ANDROID);
}
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
else if (Format == NAME_VULKAN_SM4_UB)
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3185985) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3170391 on 2016/10/21 by Ben.Woodhouse Remove the wait on end of frame ensure, because we can't rely on all the the underlying codepaths to never miss a call to flush RHI resources. The consequences of missing a flush on a given frame are not serious now, since we enforce the synchronisation with a fence, preventing the rendering thread from getting too far ahead. We will simply accumulate resources for an additional frame when this happens. #jira UE-37437 #fyi rolando.caloca, marcus.wassmer Change 3170659 on 2016/10/21 by Rolando.Caloca DR - vk - Prep work for state key changes Change 3170676 on 2016/10/21 by Rolando.Caloca DR - vk - Reworked blend state keys - Added depth/stencil to pipeline key Change 3170848 on 2016/10/21 by Daniel.Wright Level viewport 'show stats' option is now enabled by default, which avoids confusion with artists thinking lighting is built, when really the message is hidden. Change 3170849 on 2016/10/21 by Daniel.Wright Split FProjectedShadowInfo::RenderProjection into smaller functions which make the algorithm structure clear Change 3170995 on 2016/10/21 by Rolando.Caloca DR - vk - Show object on vulkan validation msgs Change 3171085 on 2016/10/21 by Rolando.Caloca DR - vk - Fix pipelines being used with incompatible renderpasses Change 3171159 on 2016/10/21 by Rolando.Caloca DR - vk - Fix layout when reading textures on CPU Change 3171167 on 2016/10/21 by Rolando.Caloca DR - vk - compile fix Change 3172462 on 2016/10/24 by Daniel.Wright Added a warning about shader compile times to the material tooltip Change 3172463 on 2016/10/24 by Daniel.Wright Reduced MinUnoccludedFraction to avoid artitfacts when a stationary light touches only a tiny part of a mesh Change 3172716 on 2016/10/24 by Brian.Karis Fix for crash UE-37369 when reimporting over a generated LOD. Change 3172967 on 2016/10/24 by Rolando.Caloca DR - vk - Fix writing buffers while GPU was using them Change 3174187 on 2016/10/25 by Olaf.Piesche UE-37020 Change 3174718 on 2016/10/26 by Rolando.Caloca DR - vk - Remove old timestamp queries, increase occlusion queries per pool to 4k Change 3175960 on 2016/10/26 by Rolando.Caloca DR - Added support for hlslcc header to have custom parsing Change 3176611 on 2016/10/27 by David.Hill DrawWireCone confusion: In response to a UDN, I'm updating confusing parameter names and comments for DrawWireCone() and DrawWireSphereCappedCone() Change 3177111 on 2016/10/27 by Rolando.Caloca DR - vk - Fix timestamps for frame Change 3177192 on 2016/10/27 by Arne.Schober DR - DitherLOD refactor - moved computation of the DepthStencil state out of SetMeshRenderState into GetDitheredLODTransitionState this is a prerequisite of further PSO work where we want to move up State setting in a similar war and reuse FMeshDrawingRenderState Change 3177278 on 2016/10/27 by Olaf.Piesche UE-37484 Change 3177297 on 2016/10/27 by Rolando.Caloca DR - vk - Enable GRHISupportsBaseVertexIndex Change 3177607 on 2016/10/27 by Rolando.Caloca DR - vk - SM4 UB prep Change 3178052 on 2016/10/28 by Arne.Schober DR - fix WebGL - the WebGL compiler is very picky on double underscores and does want the presission to be defined before any function definition. Change 3178156 on 2016/10/28 by Rolando.Caloca DR - vk - Added query timer - Fixed inline issues Change 3178158 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for out of stencil bits Change 3178462 on 2016/10/28 by Rolando.Caloca DR - vk - Fixes for Elemental Change 3179131 on 2016/10/28 by Rolando.Caloca DR - vk - Fix for r.Vulkan.UseRealUBs Change 3179139 on 2016/10/28 by Rolando.Caloca DR - vk - Move UB ring buffer to context Change 3179145 on 2016/10/28 by Rolando.Caloca DR - vk - Fix buffer barriers Change 3179888 on 2016/10/31 by Rolando.Caloca DR - vk - Align buffers to 16 bytes as we sometimes write to them with SIMD Change 3179923 on 2016/10/31 by Rolando.Caloca DR - vk - Wait for swapchain counter Change 3180430 on 2016/10/31 by Rolando.Caloca DR - vk - Properly wait for occlusion queries/cmd buffer - Actual log error if trying to use occlusion queries out of order Change 3180746 on 2016/10/31 by Rolando.Caloca DR - vk - Undo some waiting as it was on the wrong thread Change 3182115 on 2016/11/01 by Rolando.Caloca DR - hlslcc Linux path fix Change 3182118 on 2016/11/01 by Daniel.Wright Fixed global distance field seam artifacts from landscapes with no subsections Change 3182368 on 2016/11/01 by Daniel.Wright Dynamic Indirect Shadows for static meshes using distance fields * These Distance Field indirect shadows use the same tile culled and downsampled framework that capsule shadows use, with similar GPU cost * Individual StaticMesh assets can enable bGenerateMeshDistanceField to compute a distance field, without the memory cost of enabling for the whole project * New StaticMeshComponent properties bCastDynamicIndirectShadow and DynamicIndirectShadowMinVisibility * New WorldSettings property DynamicIndirectShadowsSelfShadowingIntensity which replaces the cvar * The GBuffer now stores HasDynamicIndirectShadowCasterRepresentation instead of HasHeightfieldRepresentation * DFAO from landscape is now done through the global distance field entirely. Landscape contribution to the global distance field is deferred to attempt to workaround texture streaming issues. Change 3182408 on 2016/11/01 by Rolando.Caloca DR - vk - Reworked occlusion queries, fixes flickering on AMD Change 3182585 on 2016/11/01 by Daniel.Wright PS4 compile fix Change 3183151 on 2016/11/02 by Rolando.Caloca DR - vk - Fix issue when processing super quick cmd buffers Change 3183160 on 2016/11/02 by Rolando.Caloca Dr - vk - Call reset queries outside render pass Change 3183182 on 2016/11/02 by Rolando.Caloca DR - Switch clear Change 3183194 on 2016/11/02 by Rolando.Caloca DR - Try to catch crash ahead of time Change 3183268 on 2016/11/02 by Rolando.Caloca DR - vk - Rename RenderPassState to TransitionState Change 3183440 on 2016/11/02 by Daniel.Wright Renamed 'Dynamic Indirect Shadow' to 'Distance Field Indirect Shadow' Change 3183793 on 2016/11/02 by Daniel.Wright Added ShadowResolutionScale to lightcomponent Change 3183796 on 2016/11/02 by Daniel.Wright Improved bSimulatePhysics comment, with info on why it might be greyed out Change 3183797 on 2016/11/02 by Daniel.Wright Precomputed shadowmaps no longer enable Force2To1Aspect, which is only needed for lightmaps. Improves shadowmap utilization. Change 3183915 on 2016/11/02 by Rolando.Caloca DR - vk - Remove redundant renderpasses Change 3183991 on 2016/11/02 by Daniel.Wright Added r.ReflectionEnvironmentLightmapMixLargestWeight, useful for restricting lightmap mixing to darkening only Change 3184001 on 2016/11/02 by Daniel.Wright Better draw event for IndirectCapsuleShadows in stereo Change 3184096 on 2016/11/02 by Chris.Bunner HDR for D3D11 - NVAPI toggle and encoding, UI compositing. Removed some outdated tonemamping cvars and modes. Change 3184399 on 2016/11/02 by Daniel.Wright Static analysis workaround Change 3184455 on 2016/11/02 by Mark.Satterthwaite Fix missing log10 from FCompositePS on hlslcc shader platforms so that QA can continue their integration. #jira UE-38164 Change 3184953 on 2016/11/03 by Chris.Bunner Fixing CIS warnings. [CL 3186011 by Marcus Wassmer in Main branch]
2016-11-03 16:55:27 -04:00
CompileShader_Windows_Vulkan(Input, Output, WorkingDirectory, EVulkanShaderVersion::SM4_UB);
Copying //UE4/Dev-Mobile to Dev-Main (//UE4/Dev-Main) @2911599 #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2854295 on 2016/02/03 by Gareth.Martin@gareth.martin Added support for Landscape grass to use the landscape's light/shadow maps (original github pull request #1798 by Frugality) Change 2875167 on 2016/02/21 by Rolando.Caloca@Home_DM DM - glslang Change 2875650 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Common RHI changes Change 2876429 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Initial rhi check-in. Tappy & SunTemple working on PC. #codereview Jack.Porter, Chris.Babcock, Josh.Adams Change 2876665 on 2016/02/22 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Split Immediate command list off RHI Change 2881242 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream changes to exclude LPV shaders from Vulkan (reapplied with edit instead of integrate records) Change 2881356 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Static shadowing + dynamic-object CSM Change 2881359 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Mobile GPU particles Change 2881360 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Planar reflections very WIP Change 2881363 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream Separate Translucency very WIP Change 2881365 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream ProtoStar engine changes Change 2881371 on 2016/02/25 by Jack.Porter@Jack.Porter_UE4_Stream HACK for Max Texture Samplers hardcoded to 8 on ES2 Should be cleaned up better with UE-24419. Change 2884295 on 2016/02/26 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Integrate pipeline cache Change 2887043 on 2016/02/29 by Rolando.Caloca@Home_DM DM - Initial CCT support Change 2887572 on 2016/03/01 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Empty bound shader states cache - Only used currently on Vulkan Change 2889114 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Added GRHINeedsExtraDeletionLatency from 4.11 Change 2889115 on 2016/03/01 by Rolando.Caloca@Home_DM DM - Remove batched elements quads (was not been used at least since UE3!) Change 2895373 on 2016/03/04 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Fence mgr (disabled) Change 2898926 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Resource management (disabled) Change 2899937 on 2016/03/08 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Expand number of stencil op bits Change 2901132 on 2016/03/09 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Add support for more MaxSimultaneousRenderTargets Change 2903074 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Support for 3d staging textures Change 2903211 on 2016/03/10 by Jack.Porter@Jack.Porter_UE4_Stream Vulkan RHI stub for new SharedResourceView RHI call Change 2904014 on 2016/03/10 by Rolando.Caloca@rolando.caloca_T3903_DM DM - SM4 preq Change 2905389 on 2016/03/11 by Jack.Porter@Jack.Porter_UE4_Stream Android Vulkan support initial checkin Change 2908458 on 2016/03/14 by Allan.Bentham@Dev-Mobile Reinstate vertex fog, fixes UE-28166 Change 2910294 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Use fence manager Change 2910801 on 2016/03/15 by Rolando.Caloca@rolando.caloca_T3903_DM DM - Descriptor pool [CL 2912606 by Peter Sauerbrei in Main branch]
2016-03-16 21:16:51 -04:00
}
else if (Format == NAME_VULKAN_SM4)
{
CompileShader_Windows_Vulkan(Input, Output, WorkingDirectory, EVulkanShaderVersion::SM4);
}
else if (Format == NAME_VULKAN_SM5)
{
CompileShader_Windows_Vulkan(Input, Output, WorkingDirectory, EVulkanShaderVersion::SM5);
}
}
//virtual bool CreateLanguage(FName Format, ILanguageSpec*& OutSpec, FCodeBackend*& OutBackend, uint32 InHlslCompileFlags) override
//{
// OutSpec = new FVulkanLanguageSpec(false);
// OutBackend = new FVulkanCodeBackend(InHlslCompileFlags, HCT_FeatureLevelSM4);
// return false;
//}
};
/**
* Module for Vulkan shaders
*/
static IShaderFormat* Singleton = NULL;
class FVulkanShaderFormatModule : public IShaderFormatModule
{
public:
virtual ~FVulkanShaderFormatModule()
{
delete Singleton;
Singleton = NULL;
}
virtual IShaderFormat* GetShaderFormat()
{
if (!Singleton)
{
Singleton = new FShaderFormatVulkan();
}
return Singleton;
}
};
IMPLEMENT_MODULE( FVulkanShaderFormatModule, VulkanShaderFormat);