Shader_IR: Implement initial code for tracking indexed samplers.

This commit is contained in:
Fernando Sahmkow 2020-01-05 15:23:24 -04:00 committed by FernandoS27
parent c0c5fa078b
commit f93bff419e
4 changed files with 139 additions and 0 deletions

View file

@ -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) {