Merge branch 'arb_half_float_vertex'
[mesa.git] / src / mesa / state_tracker / st_atom_shader.c
index 46c8cbb30987596c3269b7c4b39854eb97a9cb36..181f88a33486bd1a9704236088173705ea106719 100644 (file)
@@ -35,8 +35,6 @@
  *   Brian Paul
  */
 
-
-
 #include "main/imports.h"
 #include "main/mtypes.h"
 #include "main/macros.h"
 #include "st_atom.h"
 #include "st_program.h"
 #include "st_atom_shader.h"
-#include "st_mesa_to_tgsi.h"
-
-
 
 
 
-/*
+/**
  * Translate fragment program if needed.
  */
 static void
@@ -83,7 +78,7 @@ translate_fp(struct st_context *st,
 
       stfp->num_input_slots = numIn;
 
-      assert(stfp->Base.Base.NumInstructions > 1);
+      assert(stfp->Base.Base.NumInstructions > 0);
 
       st_translate_fragment_program(st, stfp, stfp->input_to_slot);
    }
@@ -155,8 +150,10 @@ find_translated_vp(struct st_context *st,
 }
 
 
-
-
+/**
+ * Return pointer to a pass-through fragment shader.
+ * This shader is used when a texture is missing/incomplete.
+ */
 static void *
 get_passthrough_fs(struct st_context *st)
 {
@@ -168,6 +165,11 @@ get_passthrough_fs(struct st_context *st)
    return st->passthrough_fs;
 }
 
+
+/**
+ * Update fragment program state/atom.  This involves translating the
+ * Mesa fragment program into a gallium fragment program and binding it.
+ */
 static void
 update_fp( struct st_context *st )
 {
@@ -191,6 +193,7 @@ update_fp( struct st_context *st )
    }
 }
 
+
 const struct st_tracked_state st_update_fp = {
    "st_update_fp",                                     /* name */
    {                                                   /* dirty */
@@ -202,7 +205,10 @@ const struct st_tracked_state st_update_fp = {
 
 
 
-
+/**
+ * Update vertex program state/atom.  This involves translating the
+ * Mesa vertex program into a gallium fragment program and binding it.
+ */
 static void
 update_vp( struct st_context *st )
 {