Files
UnrealEngineUWP/Engine/Source/Developer/TargetPlatform
dan elksnitis 00685561cc [shaders]
- Add option to independent preprocessing IShaderFormat API to allow a "secondary" preprocess & compile if a RequiresSecondaryCompile predicate implemented in the shader format returns true; this predicate takes as input the compile input, environment,  and the output of the first execution of the preprocess function. This is intended to handle the usage of UESHADERMETADATA pragmas (set in the preprocess output) by some backends to indicate a secondary compilation is required to target the variant hardware (setting additional #defines and potentially different compiler arguments). Other backends have an additional requirement that any stereo shaders also require separate compilation for each target, which can be handled by querying the FShaderCompilerEnvironment in this same predicate.
- Move the combining of outputs in the secondary compile case into the core shader system so it doesn't need to be copypasta'd in any shader format backends which require the aforementioned secondary compilation, exposing an API function which returns the particular "key" used to identify these combined shader outputs in the RHI.
- Rework the internal compilation/preprocess functions so a minimal amount of code needs to be wrapped in __try/__except (allowing objects with destructors to be created in the higher level functions).

#rb Massimo.Tristano

[CL 25977467 by dan elksnitis in ue5-main branch]
2023-06-14 10:11:27 -04:00
..
2023-06-13 15:15:40 -04:00
2023-06-14 10:11:27 -04:00