-// Recursive template used to auto-nest conditionals. Converts dynamic boolean function
-// arguments to static template arguments.
-template <bool... ArgsB>
-struct FEDrawChooser
-{
- // Last Arg Terminator
- static PFN_FE_WORK_FUNC GetFunc(bool bArg)
- {
- if (bArg)
- {
- return ProcessDraw<ArgsB..., true>;
- }
-
- return ProcessDraw<ArgsB..., false>;
- }
-
- // Recursively parse args
- template <typename... TArgsT>
- static PFN_FE_WORK_FUNC GetFunc(bool bArg, TArgsT... remainingArgs)
- {
- if (bArg)
- {
- return FEDrawChooser<ArgsB..., true>::GetFunc(remainingArgs...);
- }
-
- return FEDrawChooser<ArgsB..., false>::GetFunc(remainingArgs...);
- }
-};
-
-// Selector for correct templated Draw front-end function
-INLINE
-static PFN_FE_WORK_FUNC GetFEDrawFunc(bool IsIndexed, bool HasTessellation, bool HasGeometryShader, bool HasStreamOut, bool RasterizerEnabled)
-{
- return FEDrawChooser<>::GetFunc(IsIndexed, HasTessellation, HasGeometryShader, HasStreamOut, RasterizerEnabled);
-}
-