{{- /* -------------------------------------------------------------------------------- Template file for use with tools/src/cmd/gen to generate interpolate_attribute.h See: * tools/src/cmd/gen for structures used by this template * https://golang.org/pkg/text/template/ for documentation on the template syntax -------------------------------------------------------------------------------- */ -}} {{- Import "src/tint/templates/enums.tmpl.inc" -}} #ifndef SRC_TINT_AST_INTERPOLATE_ATTRIBUTE_H_ #define SRC_TINT_AST_INTERPOLATE_ATTRIBUTE_H_ #include #include #include "src/tint/ast/attribute.h" namespace tint::ast { /// The interpolation type. {{ Eval "DeclareEnum" (Sem.Enum "interpolation_type") }} /// The interpolation sampling. {{ Eval "DeclareEnum" (Sem.Enum "interpolation_sampling") }} /// An interpolate attribute class InterpolateAttribute final : public Castable { public: /// Create an interpolate attribute. /// @param pid the identifier of the program that owns this node /// @param nid the unique node identifier /// @param src the source of this node /// @param type the interpolation type /// @param sampling the interpolation sampling InterpolateAttribute(ProgramID pid, NodeID nid, const Source& src, InterpolationType type, InterpolationSampling sampling); ~InterpolateAttribute() override; /// @returns the WGSL name for the attribute std::string Name() const override; /// Clones this node and all transitive child nodes using the `CloneContext` /// `ctx`. /// @param ctx the clone context /// @return the newly cloned node const InterpolateAttribute* Clone(CloneContext* ctx) const override; /// The interpolation type const InterpolationType type; /// The interpolation sampling const InterpolationSampling sampling; }; } // namespace tint::ast #endif // SRC_TINT_AST_INTERPOLATE_ATTRIBUTE_H_