[shaders] deprecating old PreprocessShader and IShaderFormat::CompileShader APIs now that all shader formats have been migrated

#rb Jason.Nadro

[CL 28452658 by dan elksnitis in ue5-main branch]
This commit is contained in:
dan elksnitis
2023-10-04 09:22:36 -04:00
parent d3e2c90a86
commit 5518e3d9f3
3 changed files with 3 additions and 8 deletions
@@ -34,6 +34,7 @@ enum class EDumpShaderDefines : uint8
* @param bShaderDumpDefinesAsCommentedCode - Whether to add shader definitions as comments.
* @returns true if the shader is preprocessed without error.
*/
UE_DEPRECATED(5.4, "Please use overload of PreprocessShader accepting a FShaderPreprocessOutput struct.")
extern SHADERPREPROCESSOR_API bool PreprocessShader(
FString& OutPreprocessedShader,
FShaderCompilerOutput& ShaderOutput,
@@ -28,6 +28,7 @@ public:
* @param Output The output from shader compiler.
* @param WorkingDirectory The working directory.
*/
UE_DEPRECATED(5.4, "Monolithic CompileShader is deprecated. Please implement separate compilation and preprocess via PreprocessShader/CompilePreprocessedShader")
virtual void CompileShader(FName Format, const FShaderCompilerInput& Input, FShaderCompilerOutput& Output, const FString& WorkingDirectory) const {};
/**
@@ -1305,14 +1305,7 @@ public:
check(Job.SecondaryPreprocessOutput.IsValid());
Compiler->CompilePreprocessedShader(Job.Input, Job.PreprocessOutput, *Job.SecondaryPreprocessOutput, Job.Output, *Job.SecondaryOutput, WorkingDirectory);
}
else if (Compiler->SupportsIndependentPreprocessing())
{
Compiler->CompilePreprocessedShader(Job.Input, Job.PreprocessOutput, Job.Output, WorkingDirectory);
}
else
{
Compiler->CompileShader(Job.Input.ShaderFormat, Job.Input, Job.Output, WorkingDirectory);
}
Compiler->CompilePreprocessedShader(Job.Input, Job.PreprocessOutput, Job.Output, WorkingDirectory);
}
#if PLATFORM_WINDOWS
__except(HandleShaderCompileException(GetExceptionInformation(), OutExceptionMsg, OutExceptionCallstack))