diff options
author | Eric Anholt <eric@anholt.net> | 2007-12-05 16:57:27 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-12-05 16:57:27 -0800 |
commit | 125bd4cae51c6deaacd2e90f14931c2052f146ab (patch) | |
tree | 5fa172444591b667b3b8e93b90628b638d1ea4bc /src/mesa/drivers/dri/i965/brw_gs.c | |
parent | a4642f3d18bdaebaba31e5dee72fe5de9d890ffb (diff) | |
download | external_mesa3d-125bd4cae51c6deaacd2e90f14931c2052f146ab.zip external_mesa3d-125bd4cae51c6deaacd2e90f14931c2052f146ab.tar.gz external_mesa3d-125bd4cae51c6deaacd2e90f14931c2052f146ab.tar.bz2 |
Revert "[965] Add missing flagging of new stage programs for updating stage state."
I had forgotten part of brw_state_cache.c that made this fix not relevant for
master (last_addr comparison and flagging based on cache id).
This reverts commit a4642f3d18bdaebaba31e5dee72fe5de9d890ffb.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index fb41936..73263a5 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -128,6 +128,17 @@ static void compile_gs_prog( struct brw_context *brw, &brw->gs.prog_data ); } + +static GLboolean search_cache( struct brw_context *brw, + struct brw_gs_prog_key *key ) +{ + return brw_search_cache(&brw->cache[BRW_GS_PROG], + key, sizeof(*key), + &brw->gs.prog_data, + &brw->gs.prog_gs_offset); +} + + static const GLenum gs_prim[GL_POLYGON+1] = { GL_POINTS, GL_LINES, @@ -176,26 +187,8 @@ static void upload_gs_prog( struct brw_context *brw ) } if (brw->gs.prog_active) { - struct brw_gs_prog_data *prog_data; - uint32_t offset; - - if (brw_search_cache(&brw->cache[BRW_GS_PROG], - &key, sizeof(key), - &prog_data, - &offset)) { - if (offset != brw->gs.prog_gs_offset || - !brw->gs.prog_data || - memcmp(prog_data, &brw->gs.prog_data, - sizeof(*brw->gs.prog_data)) != 0) - { - brw->gs.prog_gs_offset = offset; - brw->gs.prog_data = prog_data; - brw->state.dirty.cache |= CACHE_NEW_GS_PROG; - } - } else { + if (!search_cache(brw, &key)) compile_gs_prog( brw, &key ); - brw->state.dirty.cache |= CACHE_NEW_GS_PROG; - } } } |