From 54107a097904129ff794534542acd09ed152ea2e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 14:53:49 -0700 Subject: i965: Clean up some mess with the batch cache. Its flagging of extra state that's already flagged by the vtbl new_batch when appropriate was confusing my tracking down of the OA clear bug. --- src/mesa/drivers/dri/i965/brw_state.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_state.h') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 78572356a3..5335eac895 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -86,9 +86,6 @@ const struct brw_tracked_state brw_psp_urb_cbs; const struct brw_tracked_state brw_pipe_control; -const struct brw_tracked_state brw_clear_surface_cache; -const struct brw_tracked_state brw_clear_batch_cache; - const struct brw_tracked_state brw_drawing_rect; const struct brw_tracked_state brw_indices; const struct brw_tracked_state brw_vertices; @@ -165,7 +162,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw, const void *data, GLuint sz ); void brw_destroy_batch_cache( struct brw_context *brw ); -void brw_clear_batch_cache_flush( struct brw_context *brw ); +void brw_clear_batch_cache( struct brw_context *brw ); /* brw_wm_surface_state.c */ dri_bo * -- cgit v1.2.3 From 49fbdd18ed738feaf73b7faba4d3577cd9cc3e59 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 Feb 2009 03:54:58 -0800 Subject: i965: Fix massive memory allocation for streaming texture usage. Once we've freed a miptree, we won't see any more state cache requests that would hit the things that pointed at it until we've let the miptree get released back into the BO cache to be reused. By leaving those surface state and binding table pointers that pointed at it around, we would end up with up to (500 * texture size) in memory uselessly consumed by the state cache. Bug #20057 Bug #23530 --- src/mesa/drivers/dri/i965/brw_state.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/drivers/dri/i965/brw_state.h') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 5335eac895..d639656b9d 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -151,6 +151,7 @@ void brw_state_cache_check_size( struct brw_context *brw ); void brw_init_caches( struct brw_context *brw ); void brw_destroy_caches( struct brw_context *brw ); +void brw_state_cache_bo_delete(struct brw_cache *cache, dri_bo *bo); /*********************************************************************** * brw_state_batch.c -- cgit v1.2.3 From 8395da2e8af40367714c70afe299568272f36cc8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 5 Nov 2009 10:25:34 -0800 Subject: i965: Always pass the size argument to brw_cache_data. This keeps the individual state files from having to export their structures for brw_state_cache initialization. --- src/mesa/drivers/dri/i965/brw_state.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_state.h') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index d639656b9d..ab6f158080 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -119,16 +119,10 @@ void brw_destroy_state(struct brw_context *brw); dri_bo *brw_cache_data(struct brw_cache *cache, enum brw_cache_id cache_id, const void *data, + GLuint size, dri_bo **reloc_bufs, GLuint nr_reloc_bufs); -dri_bo *brw_cache_data_sz(struct brw_cache *cache, - enum brw_cache_id cache_id, - const void *data, - GLuint data_size, - dri_bo **reloc_bufs, - GLuint nr_reloc_bufs); - dri_bo *brw_upload_cache( struct brw_cache *cache, enum brw_cache_id cache_id, const void *key, -- cgit v1.2.3 From 8451b29d9628f09b65962385bfbd95cd7f26427f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 21 Nov 2009 13:33:21 +0100 Subject: i965: Fix several memory leaks on exit. Bug #25194. --- src/mesa/drivers/dri/i965/brw_state.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/drivers/dri/i965/brw_state.h') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index ab6f158080..b129b1f1c3 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -112,6 +112,7 @@ void brw_validate_state(struct brw_context *brw); void brw_upload_state(struct brw_context *brw); void brw_init_state(struct brw_context *brw); void brw_destroy_state(struct brw_context *brw); +void brw_clear_validated_bos(struct brw_context *brw); /*********************************************************************** * brw_state_cache.c -- cgit v1.2.3