gallium: reorder code to fix a recursive flush
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 24 Apr 2008 00:09:20 +0000 (18:09 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 24 Apr 2008 00:09:20 +0000 (18:09 -0600)
src/gallium/auxiliary/draw/draw_pipe_pstipple.c

index f8156fe731a1d2965cc500e77d809dce8d81c48f..da303a13ad133877cd7b18f5bb33f5f7297b6abc 100644 (file)
@@ -537,11 +537,9 @@ pstip_flush(struct draw_stage *stage, unsigned flags)
    stage->tri = pstip_first_tri;
    stage->next->flush( stage->next, flags );
 
-   /* restore original frag shader */
-   pstip->driver_bind_fs_state(pipe, pstip->fs->driver_fs);
-
-   /* restore original texture, sampler state */
+   /* restore original frag shader, texture, sampler state */
    draw->suspend_flushing = TRUE;
+   pstip->driver_bind_fs_state(pipe, pstip->fs->driver_fs);
    pstip->driver_bind_sampler_states(pipe, pstip->num_samplers,
                                      pstip->state.samplers);
    pstip->driver_set_sampler_textures(pipe, pstip->num_textures,