diff options
author | Brian Paul <[email protected]> | 2010-04-16 09:49:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-04-16 09:49:33 -0600 |
commit | 9fae289fcd098027952c6b586292214ec586a2ec (patch) | |
tree | 1e15c903fdc6a8951788b038ff5efffd4071bb98 /src | |
parent | b387f74c38178c857f6d34b500c40587d54288dc (diff) |
llvmpipe: check for dirty context state in lp_setup_update_state()
This fixes problems with the draw module's aaline, aapoint and
pstipple stages where we change some driver state after the call
to the draw module's draw_arrays() function.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 97a6b5422bd..ffbc7fc4ea0 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -37,6 +37,7 @@ #include "util/u_memory.h" #include "util/u_pack_color.h" #include "util/u_surface.h" +#include "lp_context.h" #include "lp_scene.h" #include "lp_scene_queue.h" #include "lp_texture.h" @@ -45,6 +46,7 @@ #include "lp_rast.h" #include "lp_setup_context.h" #include "lp_screen.h" +#include "lp_state.h" #include "state_tracker/sw_winsys.h" #include "draw/draw_context.h" @@ -598,6 +600,20 @@ lp_setup_update_state( struct lp_setup_context *setup ) assert(setup->fs.current.jit_function); + /* Some of the 'draw' pipeline stages may have changed some driver state. + * Make sure we've processed those state changes before anything else. + * + * XXX this is the only place where llvmpipe_context is used in the + * setup code. This may get refactored/changed... + */ + { + struct llvmpipe_context *lp = llvmpipe_context(scene->pipe); + if (lp->dirty) { + llvmpipe_update_derived(lp); + } + assert(lp->dirty == 0); + } + if(setup->dirty & LP_SETUP_NEW_BLEND_COLOR) { uint8_t *stored; unsigned i, j; |