1 #ifndef __HALIDE_VARYING_ATTRIBUTES__H
2 #define __HALIDE_VARYING_ATTRIBUTES__H
3 
4 /** \file
5  * This file contains functions that detect expressions in a GLSL scheduled
6  * function that may be evaluated per vertex and interpolated across the domain
7  * instead of being evaluated at each pixel location across the image.
8  */
9 
10 #include "Expr.h"
11 
12 namespace Halide {
13 namespace Internal {
14 
15 /** find_linear_expressions(Stmt s) identifies expressions that may be moved
16  * out of the generated fragment shader into a varying attribute. These
17  * expressions are tagged by wrapping them in a glsl_varying intrinsic
18  */
19 Stmt find_linear_expressions(const Stmt &s);
20 
21 /** Compute a set of 2D mesh coordinates based on the behavior of varying
22  * attribute expressions contained within a GLSL scheduled for loop. This
23  * method is called during lowering to extract varying attribute
24  * expressions and generate code to evalue them at each mesh vertex
25  * location. The operation is performed on the host before the draw call
26  * to invoke the shader
27  */
28 Stmt setup_gpu_vertex_buffer(const Stmt &s);
29 
30 }  // namespace Internal
31 }  // namespace Halide
32 
33 #endif
34