Add definition of gl_ClipDistance[]
authorEric Anholt <eric@anholt.net>
Sat, 3 Apr 2010 06:47:06 +0000 (23:47 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 5 Apr 2010 23:45:02 +0000 (16:45 -0700)
ir_variable.cpp

index 0edb19e28fbedb78b148574dbb2a5ea509f8f991..d81e0568508f97c6ede78ed58d6270e5bdb2d340 100644 (file)
@@ -151,10 +151,14 @@ generate_130_vs_variables(exec_list *instructions,
                           instructions, symtab);
    }
 
-   /* FINISHME: Add support fo gl_ClipDistance.  The size of this array is
-    * FINISHME: implementation dependent based on the value of
-    * FINISHME: GL_MAX_CLIP_DISTANCES.
+   /* FINISHME: The size of this array is implementation dependent based on
+    * FINISHME: the value of GL_MAX_CLIP_DISTANCES.
     */
+   const glsl_type *const clip_distance_array_type =
+      glsl_type::get_array_instance(glsl_type::float_type, 8);
+   add_variable("gl_ClipDistance", ir_var_out, clip_distance_array_type,
+               instructions, symtab);
+
 }