You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-207367 [FYI] #rb yuriy.odonnell, luke.thatcher [CL 31632949 by graham wihlidal in 5.4 branch]
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ShaderBundles.h"
|
|
#include "DataDrivenShaderPlatformInfo.h"
|
|
#include "RenderGraph.h"
|
|
#include "RenderGraphDefinitions.h"
|
|
#include "ShaderParameterMacros.h"
|
|
#include "RenderGraphFwd.h"
|
|
#include "ShaderCompilerCore.h"
|
|
|
|
IMPLEMENT_GLOBAL_SHADER(FDispatchShaderBundleCS, "/Engine/Private/ShaderBundleDispatch.usf", "DispatchShaderBundleEntry", SF_Compute);
|
|
|
|
bool FDispatchShaderBundleCS::ShouldCompilePermutation(const FGlobalShaderPermutationParameters& Parameters)
|
|
{
|
|
return RHISupportsShaderBundleDispatch(Parameters.Platform);
|
|
}
|
|
|
|
void FDispatchShaderBundleCS::ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment)
|
|
{
|
|
if (FDataDrivenShaderPlatformInfo::GetRequiresBindfulUtilityShaders(Parameters.Platform))
|
|
{
|
|
OutEnvironment.CompilerFlags.Add(CFLAG_ForceBindful);
|
|
}
|
|
|
|
OutEnvironment.CompilerFlags.Add(CFLAG_RootConstants);
|
|
|
|
OutEnvironment.SetDefine(TEXT("THREADGROUP_SIZEX"), ThreadGroupSizeX);
|
|
OutEnvironment.SetDefine(TEXT("USE_SHADER_ROOT_CONSTANTS"), RHISupportsShaderRootConstants(Parameters.Platform) ? 1 : 0);
|
|
FGlobalShader::ModifyCompilationEnvironment(Parameters, OutEnvironment);
|
|
}
|