Files
UnrealEngineUWP/Engine/Source/Programs/CrossCompilerTool/Private/CrossCompilerUtils.cpp

415 lines
11 KiB
C++
Raw Normal View History

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "CrossCompilerTool.h"
namespace CCT
{
FRunInfo::FRunInfo() :
Frequency(HSF_InvalidFrequency),
Target(HCT_InvalidTarget),
Entry(""),
InputFile(""),
OutputFile(""),
BackEnd(BE_Invalid),
bValidate(true),
bRunCPP(true),
bUseNew(false),
bList(false),
bPreprocessOnly(false),
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 2967470) #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2943963 on 2016/04/14 by Daniel.Wright Shader compile errors are unsuppressed Change 2943978 on 2016/04/14 by Gil.Gribb UE4 - First pass at async loading improvements....mostly disabled. Change 2944021 on 2016/04/14 by Martin.Mittring fixed HLSL compiler warning Change 2944031 on 2016/04/14 by Martin.Mittring fixed ensures, wrapped some members behind get accessor functions Change 2944086 on 2016/04/14 by Martin.Mittring cleanup: removed not needed code Change 2944177 on 2016/04/14 by Daniel.Wright Clamp on FarShadowCascadeCount, prevents crashing from huge values Change 2944182 on 2016/04/14 by Martin.Mittring removed not needed code Change 2944250 on 2016/04/14 by Rolando.Caloca DR - vk - Minor fixes Change 2944286 on 2016/04/14 by Daniel.Wright Added bRenderSceneTwoSided to planar reflections, which can be useful to limit leaking Added ShowOnlyActors and HiddenActors to SceneCaptureComponent for easy use without having to call BP functions Added bShowPreviewPlane to planar reflection actors The view state is recreated on planar reflection edit, which resets the Temporal AA history, allowing instant previewing of changes Change 2944288 on 2016/04/14 by Daniel.Wright Fixed refraction with a world space normal Change 2944291 on 2016/04/14 by Daniel.Wright Panner nodes have an optional speed input Change 2944346 on 2016/04/14 by Rolando.Caloca DR - Fix Vulkan shader platform on Android - Added more info on checks() Change 2945007 on 2016/04/15 by Gil.Gribb Merging //UE4/Dev-Main@2944911 to Dev-Rendering (//UE4/Dev-Rendering) Change 2945348 on 2016/04/15 by Daniel.Wright Fixed compile error Change 2945358 on 2016/04/15 by Olaf.Piesche #jira UE-29241 Sequential particle selection code was all sorts of weird. Rewrote and simplified. Change 2945941 on 2016/04/15 by Martin.Mittring added r.DisplayInternals to debug determinism for screen shot comparison Change 2945999 on 2016/04/15 by Martin.Mittring improved r.DisplayInternal output Change 2946023 on 2016/04/15 by Olaf.Piesche Adding missing call to Super::PostEditChangeProperty; UDN 286717 Change 2947155 on 2016/04/18 by Martin.Mittring started minor cleanup of transluceny rendering, use Sort key to support SeparateTransluceny, not fully hooked up #test:PC Change 2947207 on 2016/04/18 by Martin.Mittring fixed engine compiling in shipping/test #code_review:Uriel.Doyan Change 2947212 on 2016/04/18 by Uriel.Doyon Lightmap density viewmode now shows the wanted resolution when the lighting isn't build. #jira UE-29317 Change 2947374 on 2016/04/18 by Uriel.Doyon Fixed support for resolution scale for the PostProcessVisualizeComplexity #jira UE-29473 Change 2947903 on 2016/04/19 by Gil.Gribb Merging //UE4/Dev-Main@2947728 to Dev-Rendering (//UE4/Dev-Rendering) Change 2948019 on 2016/04/19 by Rolando.Caloca DR - Allow vk format as a target format for win Change 2948162 on 2016/04/19 by Simon.Tovey Fix for crash with Collision visualization. Change 2948419 on 2016/04/19 by Martin.Mittring fixed sort priority of translucent rendering (caused by recent checkin) Change 2948433 on 2016/04/19 by Martin.Mittring fixed memory handling of FRendererViewExtension Change 2948631 on 2016/04/19 by Martin.Mittring fixed compile error on Mac Change 2948832 on 2016/04/19 by Martin.Mittring fixed UE-29572 (should result in less CPU cost and it might even fix some rendeirng issues) Change 2949013 on 2016/04/19 by Martin.Mittring refactored Transluceny rendering, SepTrans and non SepTrans is now in the same container, sorted by that critera first and rendered with ranges. This makes it easier to extend it to more transluceny types e.g. after TemporalAA, after Tonemapping this is useful for MeshDecals #test:PC, parallel on and off Change 2949620 on 2016/04/20 by Martin.Mittring fixed compiler warning Change 2949639 on 2016/04/20 by Uriel.Doyon Fixed Material TexCoord Analysis not compiling when sampling textures for shader frequency other than PixelShader Change 2949721 on 2016/04/20 by Chris.Bunner Avoid creating additional inline code fragment casting matching uniform types. #jira UE-29089 Change 2949722 on 2016/04/20 by Chris.Bunner Prevent nullptr crash and added additional logging. #jira UE-28387 Change 2949913 on 2016/04/20 by Martin.Mittring marked ccommand as cheat Change 2950064 on 2016/04/20 by Martin.Mittring added MatineeTime to r.DisplayInternals to track down rendering determinsim issues, added dark background Change 2950065 on 2016/04/20 by Martin.Mittring nicer debug printout Change 2950201 on 2016/04/20 by Martin.Mittring fixed UE-29752 Console commands input with " = " should display an error message Change 2950531 on 2016/04/20 by Martin.Mittring fixed comment Change 2951737 on 2016/04/21 by HaarmPieter.Duiker Adds support forHDR displays using Dolby PQ output Change 2951869 on 2016/04/21 by Martin.Mittring polish r.DisplayInternal Change 2951950 on 2016/04/21 by HaarmPieter.Duiker Reordered variable definition to address build warning Change 2951996 on 2016/04/21 by Martin.Mittring fixed PerformanceCapture code, added AutomationTest "Rendering.RenderOutputValidation", changed directory order to run locally it currently requires "r.ScreenshotDelegate=0" #code_review:Ben.Salem, Michael.Noland Change 2952146 on 2016/04/21 by Olaf.Piesche make sure that ST PDI primitives render through regular translucency if ST is disabled; fixes light shapes in scene/reflection captures Change 2952230 on 2016/04/21 by Martin.Mittring * Fixed automated ScreenshotVerify difference because of not streamed in texture, wait for up to 5sec . * changed some GFrameNumberRenderThread usage to ViewFamily.FrameNumber #code_review:Daniel.Wright Change 2953173 on 2016/04/22 by Olaf.Piesche Adding UI for easilly browsing and switching in a folder full of stats dumps Change 2953213 on 2016/04/22 by Olaf.Piesche Renaming a stat to be more descriptive Change 2953393 on 2016/04/22 by Zabir.Hoque Get DX12 running again: - Port Shader Resource Table change - Line up VS outputs and ps inputs - Fix incorrectly defining a static global in a .h Change 2953453 on 2016/04/22 by Martin.Mittring polished r.DisplayInternal Change 2954618 on 2016/04/25 by Zabir.Hoque 2 Fixes: - GLSL does not understand "unsigned int", converted to "uint" - Refactored problematic prev buffer allocation code to be more inline with proper level of abstraction. Change 2955369 on 2016/04/25 by Rolando.Caloca DR - hlslcc - Fix some memory leaks in the frontend Change 2955403 on 2016/04/25 by Uriel.Doyon Fixed texture streaming build on OpenGL. Probably more likely to work on other platforms like Mac and Linux. Enabled debug view shaders on PCD3D_SM4 and OPENGL_SM4 #jira UE-28840 Change 2955419 on 2016/04/25 by Rolando.Caloca DR - hlslcc - Reenabled support for static global variables being not const Change 2955432 on 2016/04/25 by Zabir.Hoque Fix build break from not undef'ing LOCTEXT_NAMESPACE Change 2955459 on 2016/04/25 by Zabir.Hoque TEMP Fix: On server enqued render thread work is dropped. So on server release Reflection capture resouce immediately instead of trying to defer enque. Change 2956292 on 2016/04/26 by Zabir.Hoque Fix OpenGL shader compile break from CL: 2951737 (Adds support forHDR displays using Dolby PQ output). #CodeReview: Jack.Porter, Allan.Bentham Change 2956662 on 2016/04/26 by Chris.Bunner Temporary fix for new Tonemapper issues. #jira UE-29935 Change 2957614 on 2016/04/27 by Marcus.Wassmer Fix PS4 shader compiler errors. Change 2958468 on 2016/04/27 by Rolando.Caloca DR - Fix hlslcc validation issue - Show error on SCW if shader format not found when running with -directcompile #jira UE-29982 Change 2959105 on 2016/04/28 by Rolando.Caloca DR - Rebuilt hlslcc for Mac Change 2959891 on 2016/04/28 by Daniel.Wright Shader compiler does a recreate render state even during blocking compile - fixes saving a material giving different behavior from applying changes with global distance fields Change 2959895 on 2016/04/28 by Daniel.Wright Work around build machine string matching heuristics that will cause a cook to fail Change 2959902 on 2016/04/28 by Daniel.Wright Added LowerHemisphereSolidColor to sky lights Change 2959930 on 2016/04/28 by Daniel.Wright Added OpacitySourceMode to SubUVAnimation, which is useful with textures created for additive particles Change 2959933 on 2016/04/28 by Daniel.Wright Substring matching for console command suggestions * Only implemented in the editor, game uses UConsole which needs an entirely different implementation * Not sorting starting matches first, although that is desired Change 2959942 on 2016/04/28 by Daniel.Wright Gracefully handle when input string doesn't match search results Change 2960743 on 2016/04/29 by Gil.Gribb UE4 - UAT - Add map name to editortest command line. Change 2960940 on 2016/04/29 by Chris.Bunner Allow custom material nodes to be used with tessellation outputs. #jira UE-29586 Change 2960955 on 2016/04/29 by Gil.Gribb UE4 - Improved the CPU burden of loading in several places. Made substantial progress on the complete loading revamp (currently disabled). Change 2960961 on 2016/04/29 by Chris.Bunner Potential material translator Lerp node pre-computations/optimizations. #jira OR-20138 Change 2961087 on 2016/04/29 by Gil.Gribb Fixed compile error in preflight relating to load time test rig Change 2962565 on 2016/05/02 by Gil.Gribb Merging //UE4/Dev-Main@2962478 to Dev-Rendering (//UE4/Dev-Rendering) Change 2965058 on 2016/05/03 by Chris.Bunner Shader version bump. #lockdown Gil.Gribb #jira UE-30206 Change 2966554 on 2016/05/04 by Chris.Bunner Bumping shader version again, unintentionally polluted DDC previously. #lockdown Gil.Gribb #jira UE-30329 Change 2967183 on 2016/05/05 by Gil.Gribb UE4 - Fixed a bad hash on landscape grass components. Simple, safe. #lockdown nick.penwarden [CL 2967480 by Gil Gribb in Main branch]
2016-05-05 12:13:26 -04:00
bTestRemoveUnused(false),
bPackIntoUBs(false),
bUseDX11Clip(false),
bFlattenUBs(false),
bFlattenUBStructs(false),
bGroupFlattenUBs(false),
bCSE(false),
bExpandExpressions(false),
bFixAtomics(false),
bSeparateShaders(false)
{
}
void PrintUsage()
{
UE_LOG(LogCrossCompilerTool, Display, TEXT("Usage:"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\tCrossCompilerTool.exe input.[usf|hlsl] {options}"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\tOptions:"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-o=file\tOutput filename"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-entry=function\tMain entry point (defaults to Main())"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-cpp\tOnly run C preprocessor"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\tFlags:"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-nocpp\tDo not run C preprocessor"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-novalidate\tDo not run AST/IR validation"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-dx11clip\tUse DX11 Clip space fixup at end of VS"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-flattenub\tRemoves/flattens UBs and puts them in a global packed array"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-flattenubstruct\tFlatten UB structures"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-groupflatub\tGroup flattened UBs"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-cse\tRun common subexpression elimination"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-xpxpr\tExpand expressions"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-separateshaders\tUse the separate shaders flags"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-packintoubs\tMove packed global uniform arrays into a uniform buffer"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-fixatomics\tConvert accesses to atomic variable into intrinsics"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\tProfiles:"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-vs\tCompile as a Vertex Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-ps\tCompile as a Pixel Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-cs\tCompile as a Compute Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-gs\tCompile as a Geometry Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-hs\tCompile as a Hull Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-ds\tCompile as a Domain Shader"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\tTargets:"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-metal\tCompile for Metal"));
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
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-vulkan\tCompile for Vulkan ES3.1"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-vulkansm4\tCompile for Vulkan SM4"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-vulkansm5\tCompile for Vulkan SM5"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-es2\tCompile for OpenGL ES 2"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-es31ext\tCompile for OpenGL ES 3.1 with AEP"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-gl3\tCompile for OpenGL 3.2"));
UE_LOG(LogCrossCompilerTool, Display, TEXT("\t\t\t-gl4\tCompile for OpenGL 4.3"));
}
EHlslShaderFrequency FRunInfo::ParseFrequency(TArray<FString>& InOutSwitches)
{
TArray<FString> OutSwitches;
EHlslShaderFrequency Frequency = HSF_InvalidFrequency;
// Validate profile and target
for(FString& Switch : InOutSwitches)
{
if (Switch == "vs")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -vs!"));
}
else
{
Frequency = HSF_VertexShader;
}
}
else if (Switch == "ps")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -ps!"));
}
else
{
Frequency = HSF_PixelShader;
}
}
else if (Switch == "cs")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -cs!"));
}
else
{
Frequency = HSF_ComputeShader;
}
}
else if (Switch == "gs")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -gs!"));
}
else
{
Frequency = HSF_GeometryShader;
}
}
else if (Switch == "hs")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -hs!"));
}
else
{
Frequency = HSF_HullShader;
}
}
else if (Switch == "ds")
{
if (Frequency != HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -ds!"));
}
else
{
Frequency = HSF_HullShader;
}
}
else
{
OutSwitches.Add(Switch);
}
}
// Default to PS
if (Frequency == HSF_InvalidFrequency)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("No profile given, assuming Pixel Shader (-ps)!"));
Frequency = HSF_PixelShader;
}
Swap(InOutSwitches, OutSwitches);
return Frequency;
}
EHlslCompileTarget FRunInfo::ParseTarget(TArray<FString>& InOutSwitches, EBackend& OutBackEnd)
{
TArray<FString> OutSwitches;
EHlslCompileTarget Target = HCT_InvalidTarget;
// Validate profile and target
for (FString& Switch : InOutSwitches)
{
if (Switch == "es2")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -es2!"));
}
else
{
Target = HCT_FeatureLevelES2;
OutBackEnd = BE_OpenGL;
}
}
else if (Switch == "es31ext")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -es31ext!"));
}
else
{
Target = HCT_FeatureLevelES3_1Ext;
OutBackEnd = BE_OpenGL;
}
}
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 (Switch == "vulkan")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -vulkan!"));
}
else
{
Target = HCT_FeatureLevelES3_1;
OutBackEnd = BE_Vulkan;
}
}
else if (Switch == "vulkansm4")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -vulkansm4!"));
}
else
{
Target = HCT_FeatureLevelSM4;
OutBackEnd = BE_Vulkan;
}
}
else if (Switch == "vulkansm5")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -vulkansm5!"));
}
else
{
Target = HCT_FeatureLevelSM5;
OutBackEnd = BE_Vulkan;
}
}
else if (Switch == "metal")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -metal!"));
}
else
{
Target = HCT_FeatureLevelES3_1;
OutBackEnd = BE_Metal;
}
}
else if (Switch == "metalmrt" || Switch == "metalsm4")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -%s!"), *Switch);
}
else
{
Target = HCT_FeatureLevelSM4;
OutBackEnd = BE_Metal;
}
}
else if (Switch == "metalsm5")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -metalsm5!"));
}
else
{
Target = HCT_FeatureLevelSM5;
OutBackEnd = BE_Metal;
}
}
else if (Switch == "gl3")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -gl3!"));
}
else
{
Target = HCT_FeatureLevelSM4;
OutBackEnd = BE_OpenGL;
}
}
else if (Switch == "gl4")
{
if (Target != HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -gl4!"));
}
else
{
Target = HCT_FeatureLevelSM5;
OutBackEnd = BE_OpenGL;
}
}
else
{
OutSwitches.Add(Switch);
}
}
// Defaults to Metal
if (Target == HCT_InvalidTarget)
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("No profile given, assuming (-gl4)!"));
Target = HCT_FeatureLevelSM5;
OutBackEnd = BE_OpenGL;
}
check(OutBackEnd != BE_Invalid);
Swap(InOutSwitches, OutSwitches);
return Target;
}
bool FRunInfo::Setup(const FString& InFilename, const TArray<FString>& InSwitches)
{
TArray<FString> Switches = InSwitches;
Frequency = ParseFrequency(Switches);
Target = ParseTarget(Switches, BackEnd);
InputFile = InFilename;
bRunCPP = true;
// Now find entry point and output filename
for (const FString& Switch : InSwitches)
{
if (Switch.StartsWith(TEXT("o=")))
{
if (OutputFile != "")
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -o!"));
}
else
{
OutputFile = Switch.Mid(2);
}
}
else if (Switch.StartsWith(TEXT("entry=")))
{
if (Entry != TEXT(""))
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("Ignoring extra command line argument -entry!"));
}
else
{
Entry = Switch.Mid(6);
}
}
else if (Switch.StartsWith(TEXT("nocpp")))
{
bRunCPP = false;
}
else if (Switch.StartsWith(TEXT("cpp")))
{
bPreprocessOnly = true;
}
else if (Switch.StartsWith(TEXT("new")))
{
bUseNew = true;
}
else if (Switch.StartsWith(TEXT("list")))
{
bList = true;
}
else if (Switch.StartsWith(TEXT("flattenubstruct")))
{
bFlattenUBStructs = true;
}
else if (Switch.StartsWith(TEXT("flattenub")))
{
bFlattenUBs = true;
}
else if (Switch.StartsWith(TEXT("groupflatub")))
{
bGroupFlattenUBs = true;
}
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 2967470) #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2943963 on 2016/04/14 by Daniel.Wright Shader compile errors are unsuppressed Change 2943978 on 2016/04/14 by Gil.Gribb UE4 - First pass at async loading improvements....mostly disabled. Change 2944021 on 2016/04/14 by Martin.Mittring fixed HLSL compiler warning Change 2944031 on 2016/04/14 by Martin.Mittring fixed ensures, wrapped some members behind get accessor functions Change 2944086 on 2016/04/14 by Martin.Mittring cleanup: removed not needed code Change 2944177 on 2016/04/14 by Daniel.Wright Clamp on FarShadowCascadeCount, prevents crashing from huge values Change 2944182 on 2016/04/14 by Martin.Mittring removed not needed code Change 2944250 on 2016/04/14 by Rolando.Caloca DR - vk - Minor fixes Change 2944286 on 2016/04/14 by Daniel.Wright Added bRenderSceneTwoSided to planar reflections, which can be useful to limit leaking Added ShowOnlyActors and HiddenActors to SceneCaptureComponent for easy use without having to call BP functions Added bShowPreviewPlane to planar reflection actors The view state is recreated on planar reflection edit, which resets the Temporal AA history, allowing instant previewing of changes Change 2944288 on 2016/04/14 by Daniel.Wright Fixed refraction with a world space normal Change 2944291 on 2016/04/14 by Daniel.Wright Panner nodes have an optional speed input Change 2944346 on 2016/04/14 by Rolando.Caloca DR - Fix Vulkan shader platform on Android - Added more info on checks() Change 2945007 on 2016/04/15 by Gil.Gribb Merging //UE4/Dev-Main@2944911 to Dev-Rendering (//UE4/Dev-Rendering) Change 2945348 on 2016/04/15 by Daniel.Wright Fixed compile error Change 2945358 on 2016/04/15 by Olaf.Piesche #jira UE-29241 Sequential particle selection code was all sorts of weird. Rewrote and simplified. Change 2945941 on 2016/04/15 by Martin.Mittring added r.DisplayInternals to debug determinism for screen shot comparison Change 2945999 on 2016/04/15 by Martin.Mittring improved r.DisplayInternal output Change 2946023 on 2016/04/15 by Olaf.Piesche Adding missing call to Super::PostEditChangeProperty; UDN 286717 Change 2947155 on 2016/04/18 by Martin.Mittring started minor cleanup of transluceny rendering, use Sort key to support SeparateTransluceny, not fully hooked up #test:PC Change 2947207 on 2016/04/18 by Martin.Mittring fixed engine compiling in shipping/test #code_review:Uriel.Doyan Change 2947212 on 2016/04/18 by Uriel.Doyon Lightmap density viewmode now shows the wanted resolution when the lighting isn't build. #jira UE-29317 Change 2947374 on 2016/04/18 by Uriel.Doyon Fixed support for resolution scale for the PostProcessVisualizeComplexity #jira UE-29473 Change 2947903 on 2016/04/19 by Gil.Gribb Merging //UE4/Dev-Main@2947728 to Dev-Rendering (//UE4/Dev-Rendering) Change 2948019 on 2016/04/19 by Rolando.Caloca DR - Allow vk format as a target format for win Change 2948162 on 2016/04/19 by Simon.Tovey Fix for crash with Collision visualization. Change 2948419 on 2016/04/19 by Martin.Mittring fixed sort priority of translucent rendering (caused by recent checkin) Change 2948433 on 2016/04/19 by Martin.Mittring fixed memory handling of FRendererViewExtension Change 2948631 on 2016/04/19 by Martin.Mittring fixed compile error on Mac Change 2948832 on 2016/04/19 by Martin.Mittring fixed UE-29572 (should result in less CPU cost and it might even fix some rendeirng issues) Change 2949013 on 2016/04/19 by Martin.Mittring refactored Transluceny rendering, SepTrans and non SepTrans is now in the same container, sorted by that critera first and rendered with ranges. This makes it easier to extend it to more transluceny types e.g. after TemporalAA, after Tonemapping this is useful for MeshDecals #test:PC, parallel on and off Change 2949620 on 2016/04/20 by Martin.Mittring fixed compiler warning Change 2949639 on 2016/04/20 by Uriel.Doyon Fixed Material TexCoord Analysis not compiling when sampling textures for shader frequency other than PixelShader Change 2949721 on 2016/04/20 by Chris.Bunner Avoid creating additional inline code fragment casting matching uniform types. #jira UE-29089 Change 2949722 on 2016/04/20 by Chris.Bunner Prevent nullptr crash and added additional logging. #jira UE-28387 Change 2949913 on 2016/04/20 by Martin.Mittring marked ccommand as cheat Change 2950064 on 2016/04/20 by Martin.Mittring added MatineeTime to r.DisplayInternals to track down rendering determinsim issues, added dark background Change 2950065 on 2016/04/20 by Martin.Mittring nicer debug printout Change 2950201 on 2016/04/20 by Martin.Mittring fixed UE-29752 Console commands input with " = " should display an error message Change 2950531 on 2016/04/20 by Martin.Mittring fixed comment Change 2951737 on 2016/04/21 by HaarmPieter.Duiker Adds support forHDR displays using Dolby PQ output Change 2951869 on 2016/04/21 by Martin.Mittring polish r.DisplayInternal Change 2951950 on 2016/04/21 by HaarmPieter.Duiker Reordered variable definition to address build warning Change 2951996 on 2016/04/21 by Martin.Mittring fixed PerformanceCapture code, added AutomationTest "Rendering.RenderOutputValidation", changed directory order to run locally it currently requires "r.ScreenshotDelegate=0" #code_review:Ben.Salem, Michael.Noland Change 2952146 on 2016/04/21 by Olaf.Piesche make sure that ST PDI primitives render through regular translucency if ST is disabled; fixes light shapes in scene/reflection captures Change 2952230 on 2016/04/21 by Martin.Mittring * Fixed automated ScreenshotVerify difference because of not streamed in texture, wait for up to 5sec . * changed some GFrameNumberRenderThread usage to ViewFamily.FrameNumber #code_review:Daniel.Wright Change 2953173 on 2016/04/22 by Olaf.Piesche Adding UI for easilly browsing and switching in a folder full of stats dumps Change 2953213 on 2016/04/22 by Olaf.Piesche Renaming a stat to be more descriptive Change 2953393 on 2016/04/22 by Zabir.Hoque Get DX12 running again: - Port Shader Resource Table change - Line up VS outputs and ps inputs - Fix incorrectly defining a static global in a .h Change 2953453 on 2016/04/22 by Martin.Mittring polished r.DisplayInternal Change 2954618 on 2016/04/25 by Zabir.Hoque 2 Fixes: - GLSL does not understand "unsigned int", converted to "uint" - Refactored problematic prev buffer allocation code to be more inline with proper level of abstraction. Change 2955369 on 2016/04/25 by Rolando.Caloca DR - hlslcc - Fix some memory leaks in the frontend Change 2955403 on 2016/04/25 by Uriel.Doyon Fixed texture streaming build on OpenGL. Probably more likely to work on other platforms like Mac and Linux. Enabled debug view shaders on PCD3D_SM4 and OPENGL_SM4 #jira UE-28840 Change 2955419 on 2016/04/25 by Rolando.Caloca DR - hlslcc - Reenabled support for static global variables being not const Change 2955432 on 2016/04/25 by Zabir.Hoque Fix build break from not undef'ing LOCTEXT_NAMESPACE Change 2955459 on 2016/04/25 by Zabir.Hoque TEMP Fix: On server enqued render thread work is dropped. So on server release Reflection capture resouce immediately instead of trying to defer enque. Change 2956292 on 2016/04/26 by Zabir.Hoque Fix OpenGL shader compile break from CL: 2951737 (Adds support forHDR displays using Dolby PQ output). #CodeReview: Jack.Porter, Allan.Bentham Change 2956662 on 2016/04/26 by Chris.Bunner Temporary fix for new Tonemapper issues. #jira UE-29935 Change 2957614 on 2016/04/27 by Marcus.Wassmer Fix PS4 shader compiler errors. Change 2958468 on 2016/04/27 by Rolando.Caloca DR - Fix hlslcc validation issue - Show error on SCW if shader format not found when running with -directcompile #jira UE-29982 Change 2959105 on 2016/04/28 by Rolando.Caloca DR - Rebuilt hlslcc for Mac Change 2959891 on 2016/04/28 by Daniel.Wright Shader compiler does a recreate render state even during blocking compile - fixes saving a material giving different behavior from applying changes with global distance fields Change 2959895 on 2016/04/28 by Daniel.Wright Work around build machine string matching heuristics that will cause a cook to fail Change 2959902 on 2016/04/28 by Daniel.Wright Added LowerHemisphereSolidColor to sky lights Change 2959930 on 2016/04/28 by Daniel.Wright Added OpacitySourceMode to SubUVAnimation, which is useful with textures created for additive particles Change 2959933 on 2016/04/28 by Daniel.Wright Substring matching for console command suggestions * Only implemented in the editor, game uses UConsole which needs an entirely different implementation * Not sorting starting matches first, although that is desired Change 2959942 on 2016/04/28 by Daniel.Wright Gracefully handle when input string doesn't match search results Change 2960743 on 2016/04/29 by Gil.Gribb UE4 - UAT - Add map name to editortest command line. Change 2960940 on 2016/04/29 by Chris.Bunner Allow custom material nodes to be used with tessellation outputs. #jira UE-29586 Change 2960955 on 2016/04/29 by Gil.Gribb UE4 - Improved the CPU burden of loading in several places. Made substantial progress on the complete loading revamp (currently disabled). Change 2960961 on 2016/04/29 by Chris.Bunner Potential material translator Lerp node pre-computations/optimizations. #jira OR-20138 Change 2961087 on 2016/04/29 by Gil.Gribb Fixed compile error in preflight relating to load time test rig Change 2962565 on 2016/05/02 by Gil.Gribb Merging //UE4/Dev-Main@2962478 to Dev-Rendering (//UE4/Dev-Rendering) Change 2965058 on 2016/05/03 by Chris.Bunner Shader version bump. #lockdown Gil.Gribb #jira UE-30206 Change 2966554 on 2016/05/04 by Chris.Bunner Bumping shader version again, unintentionally polluted DDC previously. #lockdown Gil.Gribb #jira UE-30329 Change 2967183 on 2016/05/05 by Gil.Gribb UE4 - Fixed a bad hash on landscape grass components. Simple, safe. #lockdown nick.penwarden [CL 2967480 by Gil Gribb in Main branch]
2016-05-05 12:13:26 -04:00
else if (Switch.StartsWith(TEXT("removeunused")))
{
bTestRemoveUnused = true;
}
else if (Switch.StartsWith(TEXT("packintoubs")))
{
bPackIntoUBs = true;
}
else if (Switch.StartsWith(TEXT("fixatomics")))
{
bFixAtomics = true;
}
else if (Switch.StartsWith(TEXT("cse")))
{
bCSE = true;
}
else if (Switch.StartsWith(TEXT("novalidate")))
{
bValidate = false;
}
else if (Switch.StartsWith(TEXT("dx11clip")))
{
bUseDX11Clip = true;
}
else if (Switch.StartsWith(TEXT("xpxpr")))
{
bExpandExpressions = true;
}
else if (Switch.StartsWith(TEXT("separateshaders")))
{
bSeparateShaders = true;
}
}
// Default to PS
if (Entry == TEXT(""))
{
UE_LOG(LogCrossCompilerTool, Warning, TEXT("No entry point given, assuming Main (-entry=Main)!"));
Entry = TEXT("Main");
}
return true;
}
}