diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-05 20:23:24 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-01-24 21:43:30 +0100 |
commit | 603c861532ed1a89254556ff84bbe121bd700765 (patch) | |
tree | 8bf8f67ff6393ce7b00b04a3b4b2d596cd8eb5bc /src/video_core/shader/node_helper.h | |
parent | Shader_IR: Address Feedback (diff) | |
download | yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar.gz yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar.bz2 yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar.lz yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar.xz yuzu-603c861532ed1a89254556ff84bbe121bd700765.tar.zst yuzu-603c861532ed1a89254556ff84bbe121bd700765.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/node_helper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/shader/node_helper.h b/src/video_core/shader/node_helper.h index 0c2aa749b..11231bbea 100644 --- a/src/video_core/shader/node_helper.h +++ b/src/video_core/shader/node_helper.h @@ -45,6 +45,12 @@ Node MakeNode(Args&&... args) { return std::make_shared<NodeData>(T(std::forward<Args>(args)...)); } +template <typename T, typename... Args> +TrackSampler MakeTrackSampler(Args&&... args) { + static_assert(std::is_convertible_v<T, TrackSamplerData>); + return std::make_shared<TrackSamplerData>(T(std::forward<Args>(args)...)); +} + template <typename... Args> Node Operation(OperationCode code, Args&&... args) { if constexpr (sizeof...(args) == 0) { |