st/mesa: move assert on nr vs insns until after pos_invarient expansion
authorKeith Whitwell <keithw@vmware.com>
Fri, 18 Dec 2009 18:39:44 +0000 (18:39 +0000)
committerKeith Whitwell <keithw@vmware.com>
Fri, 18 Dec 2009 18:39:44 +0000 (18:39 +0000)
It is possible to have a 1-instruction vertex shader before expanding
pos_invarient.  Not sure what this assert achieved, but at least move
it where it is correct.

src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_program.c

index 6e311e537efbf290fa01bb5f149002bdbaf3fc44..9208f3f446fa36c6a70f8d185671d819a627606d 100644 (file)
@@ -287,8 +287,6 @@ find_translated_vp(struct st_context *st,
 #endif
       }
 
-      assert(stvp->Base.Base.NumInstructions > 1);
-
       st_translate_vertex_program(st, stvp, xvp->output_to_slot,
                                   xvp->output_to_semantic_name,
                                   xvp->output_to_semantic_index);
index 190b6a5526ddf614a99b9d7e570a6b8d25c007c5..cf19f8f1a8e48049df9fa94f546110d37616ed1b 100644 (file)
@@ -87,6 +87,8 @@ st_translate_vertex_program(struct st_context *st,
    if (stvp->Base.IsPositionInvariant)
       _mesa_insert_mvp_code(st->ctx, &stvp->Base);
 
+   assert(stvp->Base.Base.NumInstructions > 1);
+
    /*
     * Determine number of inputs, the mappings between VERT_ATTRIB_x
     * and TGSI generic input indexes, plus input attrib semantic info.