Add gl_ClipDistance in fragment shader
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Apr 2010 23:47:44 +0000 (16:47 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Apr 2010 23:49:25 +0000 (16:49 -0700)
ir_variable.cpp

index d81e0568508f97c6ede78ed58d6270e5bdb2d340..29f3fc5a632b27a9bbb472c5cd34d2bca540268b 100644 (file)
@@ -228,10 +228,13 @@ generate_130_fs_variables(exec_list *instructions,
 {
    generate_120_fs_variables(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_in, clip_distance_array_type,
+               instructions, symtab);
 }
 
 static void