i965: Always check vertex program.
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 6 Nov 2008 07:25:55 +0000 (15:25 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 6 Nov 2008 07:25:55 +0000 (15:25 +0800)
Now i965 also uses the vertex program created by Mesa Core, but this vertex program
is not only depend on mesa state _NEW_PROGRAM, so always check the current vertex
program is updated or not. This fixes broken demo cubemap.

src/mesa/drivers/dri/i965/brw_state_upload.c

index 16b0496f4790852425d7d4147e3e743786879adf..7a642bd2a8f991d59c2c8fe3f38808d95d175f1b 100644 (file)
@@ -45,7 +45,6 @@ const struct brw_tracked_state *atoms[] =
 {
    &brw_check_fallback,
 
-   &brw_active_vertprog,
    &brw_wm_input_sizes,
    &brw_vs_prog,
    &brw_gs_prog, 
@@ -212,6 +211,10 @@ void brw_validate_state( struct brw_context *brw )
       brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
    }
 
+   if (brw->vertex_program != brw->attribs.VertexProgram->_Current) {
+      brw->vertex_program = brw->attribs.VertexProgram->_Current;
+      brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
+   }
 
    if (state->mesa == 0 &&
        state->cache == 0 &&