assert that program length > 1 (some code, plus END)
authorBrian <brian.paul@tungstengraphics.com>
Tue, 2 Oct 2007 22:57:19 +0000 (16:57 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 2 Oct 2007 22:57:19 +0000 (16:57 -0600)
src/mesa/state_tracker/st_atom_shader.c

index 8aa977179a2b14d61640a23c5b174b38dd111277..dc6210cd6c3f4a8b7462ee9112d016d9fb3f72f5 100644 (file)
@@ -172,6 +172,8 @@ find_translated_vp(struct st_context *st,
 
       stfp->num_input_slots = numIn;
 
+      assert(stfp->Base.Base.NumInstructions > 1);
+
       (void) st_translate_fragment_program(st, stfp,
                                            stfp->input_to_slot,
                                            stfp->tokens,
@@ -235,6 +237,7 @@ find_translated_vp(struct st_context *st,
          }
       }
 
+      assert(stvp->Base.Base.NumInstructions > 1);
 
       xvp->vs = st_translate_vertex_program(st, stvp,
                                             xvp->output_to_slot,