From feaad189b45cafe860b5f23bf534618ff30b5bd2 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 13 Sep 2013 15:55:03 -0700 Subject: i965: Move binding table code to a new file, brw_binding_tables.c. The code to upload the binding tables for each stage was scattered across brw_{vs,gs,wm}_surface_state.c and brw_misc_state.c, which also contain a lot of code to populate individual SURFACE_STATE structures. This patch brings all the binding table upload code together, and splits it out from the code which fills in SURFACE_STATE entries. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 34 ------------------------ 1 file changed, 34 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_gs_surface_state.c') diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c index ad4c003..d0ce412 100644 --- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c @@ -87,37 +87,3 @@ const struct brw_tracked_state brw_gs_ubo_surfaces = { }, .emit = brw_upload_gs_ubo_surfaces, }; - - -/** - * Constructs the binding table for the WM surface state, which maps unit - * numbers to surface state objects. - */ -static void -brw_gs_upload_binding_table(struct brw_context *brw) -{ - struct brw_stage_state *stage_state = &brw->gs.base; - - /* If there's no GS, skip changing anything. */ - if (!brw->gs.prog_data) - return; - - /* CACHE_NEW_GS_PROG */ - const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base; - - /* BRW_NEW_SURFACES and BRW_NEW_GS_CONSTBUF */ - brw_upload_binding_table(brw, BRW_NEW_GS_BINDING_TABLE, stage_state, - prog_data->binding_table_size, - SURF_INDEX_VEC4_SHADER_TIME); -} - -const struct brw_tracked_state brw_gs_binding_table = { - .dirty = { - .mesa = 0, - .brw = (BRW_NEW_BATCH | - BRW_NEW_GS_CONSTBUF | - BRW_NEW_SURFACES), - .cache = CACHE_NEW_GS_PROG - }, - .emit = brw_gs_upload_binding_table, -}; -- cgit v1.1