From 125bd4cae51c6deaacd2e90f14931c2052f146ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 5 Dec 2007 16:57:27 -0800 Subject: 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. --- src/mesa/drivers/dri/i965/brw_clip.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_clip.c') diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index c548681aca5..8287fd9edf3 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -128,14 +128,25 @@ static void compile_clip_prog( struct brw_context *brw, &brw->clip.prog_data ); } + +static GLboolean search_cache( struct brw_context *brw, + struct brw_clip_prog_key *key ) +{ + return brw_search_cache(&brw->cache[BRW_CLIP_PROG], + key, sizeof(*key), + &brw->clip.prog_data, + &brw->clip.prog_gs_offset); +} + + + + /* Calculate interpolants for triangle and line rasterization. */ static void upload_clip_prog( struct brw_context *brw ) { GLcontext *ctx = &brw->intel.ctx; struct brw_clip_prog_key key; - struct brw_clip_prog_data *prog_data; - uint32_t offset; memset(&key, 0, sizeof(key)); @@ -241,23 +252,8 @@ static void upload_clip_prog( struct brw_context *brw ) } } - if (brw_search_cache(&brw->cache[BRW_CLIP_PROG], - &key, sizeof(key), - &prog_data, - &offset)) { - if (offset != brw->clip.prog_gs_offset || - !brw->clip.prog_data || - memcmp(prog_data, &brw->clip.prog_data, - sizeof(*brw->clip.prog_data)) != 0) - { - brw->clip.prog_gs_offset = offset; - brw->clip.prog_data = prog_data; - brw->state.dirty.cache |= CACHE_NEW_CLIP_PROG; - } - } else { - compile_clip_prog(brw, &key); - brw->state.dirty.cache |= CACHE_NEW_CLIP_PROG; - } + if (!search_cache(brw, &key)) + compile_clip_prog( brw, &key ); } -- cgit v1.2.3