summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-11-28 21:16:18 -0800
committerKenneth Graunke <[email protected]>2014-01-31 17:50:06 -0800
commit2184b519cd2cbb7163d4757afb8d8dc193864c4d (patch)
treecc93b59ade28481b5738241434a0993c13606e44 /src/mesa/drivers/dri/i965
parentf51ca46f0c7c3b87b62f6047b266faeffbaae619 (diff)
i965: Duplicate gen7_atoms to gen8_atoms.
It's going to diverge significantly. Starting out with a copy allows future patches to change atoms one by one. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c80
1 files changed, 79 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index ca256c2e73c..65fea722945 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -251,6 +251,81 @@ static const struct brw_tracked_state *gen7_atoms[] =
&haswell_cut_index,
};
+static const struct brw_tracked_state *gen8_atoms[] =
+{
+ &brw_vs_prog,
+ &brw_gs_prog,
+ &brw_wm_prog,
+
+ /* Command packets: */
+ &brw_state_base_address,
+
+ &brw_cc_vp,
+ &gen7_cc_viewport_state_pointer, /* must do after brw_cc_vp */
+ &gen7_sf_clip_viewport,
+
+ &gen7_push_constant_space,
+ &gen7_urb,
+ &gen6_blend_state,
+ &gen6_color_calc_state,
+ &gen6_depth_stencil_state,
+
+ &gen6_vs_push_constants, /* Before vs_state */
+ &gen7_gs_push_constants, /* Before gs_state */
+ &gen6_wm_push_constants, /* Before wm_surfaces and constant_buffer */
+
+ /* Surface state setup. Must come before the VS/WM unit. The binding
+ * table upload must be last.
+ */
+ &brw_vs_pull_constants,
+ &brw_vs_ubo_surfaces,
+ &brw_vs_abo_surfaces,
+ &brw_gs_pull_constants,
+ &brw_gs_ubo_surfaces,
+ &brw_gs_abo_surfaces,
+ &brw_wm_pull_constants,
+ &brw_wm_ubo_surfaces,
+ &brw_wm_abo_surfaces,
+ &gen6_renderbuffer_surfaces,
+ &brw_texture_surfaces,
+ &brw_vs_binding_table,
+ &brw_gs_binding_table,
+ &brw_wm_binding_table,
+
+ &brw_fs_samplers,
+ &brw_vs_samplers,
+ &brw_gs_samplers,
+ &gen6_multisample_state,
+
+ &gen7_disable_stages,
+ &gen7_vs_state,
+ &gen7_gs_state,
+ &gen7_sol_state,
+ &gen7_clip_state,
+ &gen7_sbe_state,
+ &gen7_sf_state,
+ &gen7_wm_state,
+ &gen7_ps_state,
+
+ &gen6_scissor_state,
+
+ &gen7_depthbuffer,
+
+ &brw_polygon_stipple,
+ &brw_polygon_stipple_offset,
+
+ &brw_line_stipple,
+ &brw_aa_line_parameters,
+
+ &brw_drawing_rect,
+
+ &brw_indices,
+ &brw_index_buffer,
+ &brw_vertices,
+
+ &haswell_cut_index,
+};
+
static void
brw_upload_initial_gpu_state(struct brw_context *brw)
{
@@ -272,7 +347,10 @@ void brw_init_state( struct brw_context *brw )
brw_init_caches(brw);
- if (brw->gen >= 7) {
+ if (brw->gen >= 8) {
+ atoms = gen8_atoms;
+ num_atoms = ARRAY_SIZE(gen8_atoms);
+ } else if (brw->gen == 7) {
atoms = gen7_atoms;
num_atoms = ARRAY_SIZE(gen7_atoms);
} else if (brw->gen == 6) {