From e3a6e60040b7f6ea7965e52f8f9881ed31e0347c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 7 Dec 2007 16:15:49 -0800 Subject: [965] Convert the driver to dri_bufmgr interface and enable TTM. This is currently believed to work but be a significant performance loss. Performance recovery should be soon to follow. The dri_bo_fake_disable_backing_store() call was added to allow backing store disable like bufmgr_fake.c did, which is a significant performance win (though it's missing the no-fence-subdata part). This commit is a squash merge of the 965-ttm branch, which had some history I wanted to avoid pulling due to noisiness and brokenness at many points for git-bisecting. --- src/mesa/drivers/dri/i965/brw_context.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_context.h') diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 3c227faba6..68afea111d 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -242,7 +242,7 @@ struct brw_surface_binding_table { struct brw_cache; struct brw_mem_pool { - struct buffer *buffer; + dri_bo *buffer; GLuint size; GLuint offset; /* offset of first free byte */ @@ -310,6 +310,8 @@ struct brw_state_pointers { struct brw_tracked_state { struct brw_state_flags dirty; void (*update)( struct brw_context *brw ); + void (*emit_reloc)( struct brw_context *brw ); + GLboolean always_update; }; @@ -596,16 +598,17 @@ struct brw_context GLuint input_size_masks[4]; - /* State structs + /** + * Array of sampler state uploaded at sampler_gs_offset of BRW_SAMPLER + * cache */ - struct brw_sampler_default_color sdc[BRW_MAX_TEX_UNIT]; struct brw_sampler_state sampler[BRW_MAX_TEX_UNIT]; GLuint render_surf; GLuint nr_surfaces; GLuint max_threads; - struct buffer *scratch_buffer; + dri_bo *scratch_buffer; GLuint scratch_buffer_size; GLuint sampler_count; @@ -659,6 +662,10 @@ void brw_init_state( struct brw_context *brw ); void brw_destroy_state( struct brw_context *brw ); +/*====================================================================== + * brw_state_dump.c + */ +void brw_debug_batch(struct intel_context *intel); /*====================================================================== * brw_tex.c -- cgit v1.2.3