i965: Alphabetize brw_tracked_state flags and use a consistent style.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Nov 2014 07:16:56 +0000 (23:16 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 29 Nov 2014 10:18:36 +0000 (02:18 -0800)
Most of the dirty flags were listed in some arbitrary order.  Some used
bonus parenthesis.  Some put multiple flags on one line, others put one
per line.  Some used tabs instead of spaces...but only on some lines.

This patch settles on one flag per line, in alphabetical order, using
spaces instead of tabs, and sheds the unnecessary parentheses.

Sorting was mostly done with vim's visual block feature and !sort,
although I alphabetized short lists by hand; it was pretty manual.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
52 files changed:
src/mesa/drivers/dri/i965/brw_binding_tables.c
src/mesa/drivers/dri/i965/brw_cc.c
src/mesa/drivers/dri/i965/brw_clip.c
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_curbe.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_ff_gs.c
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_gs_state.c
src/mesa/drivers/dri/i965/brw_gs_surface_state.c
src/mesa/drivers/dri/i965/brw_interpolation_map.c
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_sf.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_urb.c
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_vs_state.c
src/mesa/drivers/dri/i965/brw_vs_surface_state.c
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm_state.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen6_cc.c
src/mesa/drivers/dri/i965/gen6_clip_state.c
src/mesa/drivers/dri/i965/gen6_depthstencil.c
src/mesa/drivers/dri/i965/gen6_gs_state.c
src/mesa/drivers/dri/i965/gen6_multisample_state.c
src/mesa/drivers/dri/i965/gen6_sampler_state.c
src/mesa/drivers/dri/i965/gen6_scissor_state.c
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen6_sol.c
src/mesa/drivers/dri/i965/gen6_urb.c
src/mesa/drivers/dri/i965/gen6_viewport_state.c
src/mesa/drivers/dri/i965/gen6_vs_state.c
src/mesa/drivers/dri/i965/gen6_wm_state.c
src/mesa/drivers/dri/i965/gen7_gs_state.c
src/mesa/drivers/dri/i965/gen7_misc_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c
src/mesa/drivers/dri/i965/gen7_sol_state.c
src/mesa/drivers/dri/i965/gen7_urb.c
src/mesa/drivers/dri/i965/gen7_viewport_state.c
src/mesa/drivers/dri/i965/gen7_vs_state.c
src/mesa/drivers/dri/i965/gen7_wm_state.c
src/mesa/drivers/dri/i965/gen8_blend_state.c
src/mesa/drivers/dri/i965/gen8_draw_upload.c
src/mesa/drivers/dri/i965/gen8_gs_state.c
src/mesa/drivers/dri/i965/gen8_misc_state.c
src/mesa/drivers/dri/i965/gen8_multisample_state.c
src/mesa/drivers/dri/i965/gen8_ps_state.c
src/mesa/drivers/dri/i965/gen8_sf_state.c
src/mesa/drivers/dri/i965/gen8_viewport_state.c
src/mesa/drivers/dri/i965/gen8_vs_state.c
src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c

index cb50d3b8ddf7bdcfb5ae2976a580629a101b4fa1..bf996899e81407dd659b3b465f692038c75dde84 100644 (file)
@@ -130,7 +130,8 @@ brw_upload_wm_binding_table(struct brw_context *brw)
 const struct brw_tracked_state brw_wm_binding_table = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_BATCH | BRW_NEW_SURFACES,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_SURFACES,
       .cache = CACHE_NEW_WM_PROG
    },
    .emit = brw_upload_wm_binding_table,
@@ -189,11 +190,11 @@ gen4_upload_binding_table_pointers(struct brw_context *brw)
 const struct brw_tracked_state brw_binding_table_pointers = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-              BRW_NEW_STATE_BASE_ADDRESS |
-              BRW_NEW_VS_BINDING_TABLE |
-              BRW_NEW_GS_BINDING_TABLE |
-              BRW_NEW_PS_BINDING_TABLE),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_GS_BINDING_TABLE |
+             BRW_NEW_PS_BINDING_TABLE |
+             BRW_NEW_STATE_BASE_ADDRESS |
+             BRW_NEW_VS_BINDING_TABLE,
       .cache = 0,
    },
    .emit = gen4_upload_binding_table_pointers,
@@ -226,11 +227,11 @@ gen6_upload_binding_table_pointers(struct brw_context *brw)
 const struct brw_tracked_state gen6_binding_table_pointers = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-              BRW_NEW_STATE_BASE_ADDRESS |
-              BRW_NEW_VS_BINDING_TABLE |
-              BRW_NEW_GS_BINDING_TABLE |
-              BRW_NEW_PS_BINDING_TABLE),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_GS_BINDING_TABLE |
+             BRW_NEW_PS_BINDING_TABLE |
+             BRW_NEW_STATE_BASE_ADDRESS |
+             BRW_NEW_VS_BINDING_TABLE,
       .cache = 0,
    },
    .emit = gen6_upload_binding_table_pointers,
index 289f65b5a8a9834296066acef78f3ae61f22ff5b..62c9261e44888b3ceba034addd88858b1c9013cf 100644 (file)
@@ -67,7 +67,8 @@ brw_upload_cc_vp(struct brw_context *brw)
 
 const struct brw_tracked_state brw_cc_vp = {
    .dirty = {
-      .mesa = _NEW_VIEWPORT | _NEW_TRANSFORM,
+      .mesa = _NEW_TRANSFORM |
+              _NEW_VIEWPORT,
       .brw = BRW_NEW_BATCH,
       .cache = 0
    },
@@ -235,8 +236,12 @@ static void upload_cc_unit(struct brw_context *brw)
 
 const struct brw_tracked_state brw_cc_unit = {
    .dirty = {
-      .mesa = _NEW_STENCIL | _NEW_COLOR | _NEW_DEPTH | _NEW_BUFFERS,
-      .brw = BRW_NEW_BATCH | BRW_NEW_STATS_WM,
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR |
+              _NEW_DEPTH |
+              _NEW_STENCIL,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATS_WM,
       .cache = CACHE_NEW_CC_VP
    },
    .emit = upload_cc_unit,
index d6ccfa42fa262028213b3720b37e0183eec7da75..debeee5ccc91fab9baa63fd150e2b28a722e1ba1 100644 (file)
@@ -258,13 +258,13 @@ brw_upload_clip_prog(struct brw_context *brw)
 
 const struct brw_tracked_state brw_clip_prog = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT |
-               _NEW_TRANSFORM |
-               _NEW_POLYGON |
-               _NEW_BUFFERS),
-      .brw   = (BRW_NEW_REDUCED_PRIMITIVE |
-                BRW_NEW_VUE_MAP_GEOM_OUT |
-                BRW_NEW_INTERPOLATION_MAP)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_POLYGON |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_INTERPOLATION_MAP |
+               BRW_NEW_REDUCED_PRIMITIVE |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = brw_upload_clip_prog
 };
index 0d153c00143f3b163637ec423f459a766f4c943a..a1f2e3338cb9e96963708869ebd68efb24b7f986 100644 (file)
@@ -163,11 +163,13 @@ brw_upload_clip_unit(struct brw_context *brw)
 
 const struct brw_tracked_state brw_clip_unit = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_BUFFERS | _NEW_VIEWPORT,
-      .brw   = (BRW_NEW_BATCH |
-               BRW_NEW_PROGRAM_CACHE |
-               BRW_NEW_CURBE_OFFSETS |
-               BRW_NEW_URB_FENCE),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_TRANSFORM |
+               _NEW_VIEWPORT,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CURBE_OFFSETS |
+               BRW_NEW_PROGRAM_CACHE |
+               BRW_NEW_URB_FENCE,
       .cache = CACHE_NEW_CLIP_PROG
    },
    .emit = brw_upload_clip_unit,
index fea5d332c239ca88d1c1d01847ddab4d04bfc4d1..56c4316effac94b5aa654231d82ce34ab2c7e11d 100644 (file)
@@ -143,7 +143,8 @@ const struct brw_tracked_state brw_curbe_offsets = {
    .dirty = {
       .mesa = _NEW_TRANSFORM,
       .brw  = BRW_NEW_CONTEXT,
-      .cache = CACHE_NEW_VS_PROG | CACHE_NEW_WM_PROG
+      .cache = CACHE_NEW_VS_PROG |
+               CACHE_NEW_WM_PROG
    },
    .emit = calculate_curbe_offsets
 };
@@ -308,12 +309,12 @@ emit:
 const struct brw_tracked_state brw_constant_buffer = {
    .dirty = {
       .mesa = _NEW_PROGRAM_CONSTANTS,
-      .brw  = (BRW_NEW_URB_FENCE |
-              BRW_NEW_PSP | /* Implicit - hardware requires this, not used above */
-              BRW_NEW_CURBE_OFFSETS |
-              BRW_NEW_BATCH),
-      .cache = (CACHE_NEW_VS_PROG |
-                CACHE_NEW_WM_PROG)
+      .brw  = BRW_NEW_BATCH |
+              BRW_NEW_CURBE_OFFSETS |
+              BRW_NEW_PSP | /* Implicit - hardware requires this, not used above */
+              BRW_NEW_URB_FENCE,
+      .cache = CACHE_NEW_VS_PROG |
+               CACHE_NEW_WM_PROG
    },
    .emit = brw_upload_constant_buffer,
 };
index 5a12439e8f3d278639c4d20e74e231f3bf8e0606..7bf9163136693df9ce4f4dd046230d30fed311b1 100644 (file)
@@ -869,7 +869,8 @@ static void brw_emit_vertices(struct brw_context *brw)
 const struct brw_tracked_state brw_vertices = {
    .dirty = {
       .mesa = _NEW_POLYGON,
-      .brw = BRW_NEW_BATCH | BRW_NEW_VERTICES,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_VERTICES,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = brw_emit_vertices,
@@ -987,7 +988,8 @@ static void brw_emit_index_buffer(struct brw_context *brw)
 const struct brw_tracked_state brw_index_buffer = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_BATCH | BRW_NEW_INDEX_BUFFER,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_INDEX_BUFFER,
       .cache = 0,
    },
    .emit = brw_emit_index_buffer,
index 6ca9e7f51e9784ca9cf21a68a2335e2783bf67a2..377e1faa24d7b38754216f15c08a31d3c383b890 100644 (file)
@@ -250,9 +250,9 @@ void gen6_brw_upload_ff_gs_prog(struct brw_context *brw)
 
 const struct brw_tracked_state brw_ff_gs_prog = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT),
-      .brw   = (BRW_NEW_PRIMITIVE |
-                BRW_NEW_TRANSFORM_FEEDBACK),
+      .mesa  = _NEW_LIGHT,
+      .brw   = BRW_NEW_PRIMITIVE |
+               BRW_NEW_TRANSFORM_FEEDBACK,
       .cache = CACHE_NEW_VS_PROG
    },
    .emit = brw_upload_ff_gs_prog
index d51500effba7d3ad8fd12e092dbe244937e44d95..4b61646acfa4ab1d50dc08f408d6d206bef3e537 100644 (file)
@@ -364,10 +364,12 @@ brw_upload_gs_prog(struct brw_context *brw)
 
 const struct brw_tracked_state brw_gs_prog = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT | _NEW_BUFFERS | _NEW_TEXTURE),
-      .brw   = (BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_VUE_MAP_VS |
-                BRW_NEW_TRANSFORM_FEEDBACK),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_TEXTURE,
+      .brw   = BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_TRANSFORM_FEEDBACK |
+               BRW_NEW_VUE_MAP_VS,
    },
    .emit = brw_upload_gs_prog
 };
index d0c92fafd0b2d5374703fbed301710847b5a2eb5..698f7eedfdb35cffe5814d6371131f591cc20316 100644 (file)
@@ -91,10 +91,10 @@ brw_upload_gs_unit(struct brw_context *brw)
 const struct brw_tracked_state brw_gs_unit = {
    .dirty = {
       .mesa  = 0,
-      .brw   = (BRW_NEW_BATCH |
-               BRW_NEW_PROGRAM_CACHE |
-               BRW_NEW_CURBE_OFFSETS |
-               BRW_NEW_URB_FENCE),
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CURBE_OFFSETS |
+               BRW_NEW_PROGRAM_CACHE |
+               BRW_NEW_URB_FENCE,
       .cache = CACHE_NEW_FF_GS_PROG
    },
    .emit = brw_upload_gs_unit,
index 2c2ba56b6af70805e1332c38e99ab5685ed3997f..34505994af74cf63e0bcae28796b98380e67c025 100644 (file)
@@ -56,8 +56,9 @@ brw_upload_gs_pull_constants(struct brw_context *brw)
 
 const struct brw_tracked_state brw_gs_pull_constants = {
    .dirty = {
-      .mesa = (_NEW_PROGRAM_CONSTANTS),
-      .brw = (BRW_NEW_BATCH | BRW_NEW_GEOMETRY_PROGRAM),
+      .mesa = _NEW_PROGRAM_CONSTANTS,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_GEOMETRY_PROGRAM,
       .cache = CACHE_NEW_GS_PROG,
    },
    .emit = brw_upload_gs_pull_constants,
@@ -83,7 +84,8 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_gs_ubo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_UNIFORM_BUFFER,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_UNIFORM_BUFFER,
       .cache = CACHE_NEW_GS_PROG,
    },
    .emit = brw_upload_gs_ubo_surfaces,
@@ -107,7 +109,8 @@ brw_upload_gs_abo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_gs_abo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_ATOMIC_BUFFER,
+      .brw = BRW_NEW_ATOMIC_BUFFER |
+             BRW_NEW_BATCH,
       .cache = CACHE_NEW_GS_PROG,
    },
    .emit = brw_upload_gs_abo_surfaces,
index e700108d95ef939c83ddb750558106a300f66d7c..8ab17aaa50516f35ecf2ab86278c19c34a7034ba 100644 (file)
@@ -105,8 +105,8 @@ brw_setup_vue_interpolation(struct brw_context *brw)
 const struct brw_tracked_state brw_interpolation_map = {
    .dirty = {
       .mesa  = _NEW_LIGHT,
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-                BRW_NEW_VUE_MAP_GEOM_OUT)
+      .brw   = BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = brw_setup_vue_interpolation
 };
index 2c408148ad801570c60f7ec4baf492f5bea2e8b3..a6b3e9f05f633b433eb4c4db3b4ed24bdbaceced 100644 (file)
@@ -116,16 +116,16 @@ static void upload_psp_urb_cbs(struct brw_context *brw )
 const struct brw_tracked_state brw_psp_urb_cbs = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_URB_FENCE |
-             BRW_NEW_BATCH |
-             BRW_NEW_STATE_BASE_ADDRESS),
-      .cache = (CACHE_NEW_VS_UNIT |
-               CACHE_NEW_FF_GS_UNIT |
-               CACHE_NEW_FF_GS_PROG |
-               CACHE_NEW_CLIP_UNIT |
-               CACHE_NEW_SF_UNIT |
-               CACHE_NEW_WM_UNIT |
-               CACHE_NEW_CC_UNIT)
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS |
+             BRW_NEW_URB_FENCE,
+      .cache = CACHE_NEW_CC_UNIT |
+               CACHE_NEW_CLIP_UNIT |
+               CACHE_NEW_FF_GS_PROG |
+               CACHE_NEW_FF_GS_UNIT |
+               CACHE_NEW_SF_UNIT |
+               CACHE_NEW_VS_UNIT |
+               CACHE_NEW_WM_UNIT,
    },
    .emit = upload_psp_urb_cbs,
 };
@@ -753,8 +753,8 @@ static void upload_polygon_stipple(struct brw_context *brw)
 
 const struct brw_tracked_state brw_polygon_stipple = {
    .dirty = {
-      .mesa = (_NEW_POLYGONSTIPPLE |
-              _NEW_POLYGON),
+      .mesa = _NEW_POLYGON |
+              _NEW_POLYGONSTIPPLE,
       .brw = BRW_NEW_CONTEXT,
       .cache = 0
    },
@@ -797,8 +797,8 @@ static void upload_polygon_stipple_offset(struct brw_context *brw)
 
 const struct brw_tracked_state brw_polygon_stipple_offset = {
    .dirty = {
-      .mesa = (_NEW_BUFFERS |
-              _NEW_POLYGON),
+      .mesa = _NEW_BUFFERS |
+              _NEW_POLYGON,
       .brw = BRW_NEW_CONTEXT,
       .cache = 0
    },
@@ -1059,8 +1059,8 @@ static void upload_state_base_address( struct brw_context *brw )
 const struct brw_tracked_state brw_state_base_address = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-             BRW_NEW_PROGRAM_CACHE),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_PROGRAM_CACHE,
       .cache = 0,
    },
    .emit = upload_state_base_address
index ac9506ab6982bae37331ba081bccf9b8896037f2..625c4a5e1de957c6ba94e76575f491537a5931eb 100644 (file)
@@ -217,11 +217,16 @@ brw_upload_sf_prog(struct brw_context *brw)
 
 const struct brw_tracked_state brw_sf_prog = {
    .dirty = {
-      .mesa  = (_NEW_HINT | _NEW_LIGHT | _NEW_POLYGON | _NEW_POINT |
-                _NEW_TRANSFORM | _NEW_BUFFERS | _NEW_PROGRAM),
-      .brw   = (BRW_NEW_REDUCED_PRIMITIVE |
-                BRW_NEW_VUE_MAP_GEOM_OUT |
-                BRW_NEW_INTERPOLATION_MAP)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_HINT |
+               _NEW_LIGHT |
+               _NEW_POINT |
+               _NEW_POLYGON |
+               _NEW_PROGRAM |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_INTERPOLATION_MAP |
+               BRW_NEW_REDUCED_PRIMITIVE |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = brw_upload_sf_prog
 };
index 2fecd1eaeb3cf923dac636963179c5eda6e2d611..a91e87869b0eb7c330a6a489d2dec75914109c81 100644 (file)
@@ -114,9 +114,9 @@ static void upload_sf_vp(struct brw_context *brw)
 
 const struct brw_tracked_state brw_sf_vp = {
    .dirty = {
-      .mesa  = (_NEW_VIEWPORT |
-               _NEW_SCISSOR |
-               _NEW_BUFFERS),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_SCISSOR |
+               _NEW_VIEWPORT,
       .brw   = BRW_NEW_BATCH,
       .cache = 0
    },
@@ -297,18 +297,18 @@ static void upload_sf_unit( struct brw_context *brw )
 
 const struct brw_tracked_state brw_sf_unit = {
    .dirty = {
-      .mesa  = (_NEW_POLYGON |
-               _NEW_PROGRAM |
-               _NEW_LIGHT |
-               _NEW_LINE |
-               _NEW_POINT |
-               _NEW_SCISSOR |
-               _NEW_BUFFERS),
-      .brw   = (BRW_NEW_BATCH |
-               BRW_NEW_PROGRAM_CACHE |
-               BRW_NEW_URB_FENCE),
-      .cache = (CACHE_NEW_SF_VP |
-               CACHE_NEW_SF_PROG)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_LINE |
+               _NEW_POINT |
+               _NEW_POLYGON |
+               _NEW_PROGRAM |
+               _NEW_SCISSOR,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_PROGRAM_CACHE |
+               BRW_NEW_URB_FENCE,
+      .cache = CACHE_NEW_SF_PROG |
+               CACHE_NEW_SF_VP,
    },
    .emit = upload_sf_unit,
 };
index 0f19f6a84697c7103f9c7903d121252d71ce8981..33d7526ef80a3f3456922ce76b2be14a6a80e4c2 100644 (file)
@@ -213,8 +213,8 @@ const struct brw_tracked_state brw_recalculate_urb_fence = {
    .dirty = {
       .mesa = 0,
       .brw = BRW_NEW_CURBE_OFFSETS,
-      .cache = (CACHE_NEW_VS_PROG |
-               CACHE_NEW_SF_PROG)
+      .cache = CACHE_NEW_SF_PROG |
+               CACHE_NEW_VS_PROG,
    },
    .emit = recalculate_urb_fence
 };
index bab72cb8888e5e7687fd2df25ece66a2593863e0..1bfea3d88e6d1d8fa2506ac095fcb801da3ac360 100644 (file)
@@ -512,11 +512,14 @@ static void brw_upload_vs_prog(struct brw_context *brw)
  */
 const struct brw_tracked_state brw_vs_prog = {
    .dirty = {
-      .mesa  = (_NEW_TRANSFORM | _NEW_POLYGON | _NEW_POINT | _NEW_LIGHT |
-               _NEW_TEXTURE |
-               _NEW_BUFFERS),
-      .brw   = (BRW_NEW_VERTEX_PROGRAM |
-               BRW_NEW_VERTICES),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_POINT |
+               _NEW_POLYGON |
+               _NEW_TEXTURE |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_VERTEX_PROGRAM |
+               BRW_NEW_VERTICES,
       .cache = 0
    },
    .emit = brw_upload_vs_prog
index d4a171182eb585cd1a5f5d3387f9f61a137b8794..88592001d1451f0c4713a741a3d5b978c400a7bc 100644 (file)
@@ -187,12 +187,13 @@ brw_upload_vs_unit(struct brw_context *brw)
 const struct brw_tracked_state brw_vs_unit = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM,
-      .brw   = (BRW_NEW_BATCH |
-               BRW_NEW_PROGRAM_CACHE |
-               BRW_NEW_CURBE_OFFSETS |
-               BRW_NEW_URB_FENCE |
-                BRW_NEW_VERTEX_PROGRAM),
-      .cache = CACHE_NEW_VS_PROG | CACHE_NEW_SAMPLER
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CURBE_OFFSETS |
+               BRW_NEW_PROGRAM_CACHE |
+               BRW_NEW_URB_FENCE |
+               BRW_NEW_VERTEX_PROGRAM,
+      .cache = CACHE_NEW_SAMPLER |
+               CACHE_NEW_VS_PROG,
    },
    .emit = brw_upload_vs_unit,
 };
index 4e18c7dce236a8396f5e359abcdebc859e3388b4..36653be11b9d75c86a71d6bb17b321e9dac787aa 100644 (file)
@@ -127,8 +127,9 @@ brw_upload_vs_pull_constants(struct brw_context *brw)
 
 const struct brw_tracked_state brw_vs_pull_constants = {
    .dirty = {
-      .mesa = (_NEW_PROGRAM_CONSTANTS),
-      .brw = (BRW_NEW_BATCH | BRW_NEW_VERTEX_PROGRAM),
+      .mesa = _NEW_PROGRAM_CONSTANTS,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_VERTEX_PROGRAM,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = brw_upload_vs_pull_constants,
@@ -153,7 +154,8 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_vs_ubo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_UNIFORM_BUFFER,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_UNIFORM_BUFFER,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = brw_upload_vs_ubo_surfaces,
@@ -177,7 +179,8 @@ brw_upload_vs_abo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_vs_abo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_ATOMIC_BUFFER,
+      .brw = BRW_NEW_ATOMIC_BUFFER |
+             BRW_NEW_BATCH,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = brw_upload_vs_abo_surfaces,
index 34500e21eeb1a91d14b3d06e44ac46a63962eb00..29d35ccf9299e7ad547d3a49e38e526fd9dba70e 100644 (file)
@@ -587,21 +587,21 @@ brw_upload_wm_prog(struct brw_context *brw)
 
 const struct brw_tracked_state brw_wm_prog = {
    .dirty = {
-      .mesa  = (_NEW_COLOR |
-               _NEW_DEPTH |
-               _NEW_STENCIL |
-               _NEW_POLYGON |
-               _NEW_LINE |
-               _NEW_HINT |
-               _NEW_LIGHT |
-               _NEW_FRAG_CLAMP |
-               _NEW_BUFFERS |
-               _NEW_TEXTURE |
-               _NEW_MULTISAMPLE),
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-               BRW_NEW_REDUCED_PRIMITIVE |
-                BRW_NEW_VUE_MAP_GEOM_OUT |
-                BRW_NEW_STATS_WM)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_COLOR |
+               _NEW_DEPTH |
+               _NEW_FRAG_CLAMP |
+               _NEW_HINT |
+               _NEW_LIGHT |
+               _NEW_LINE |
+               _NEW_MULTISAMPLE |
+               _NEW_POLYGON |
+               _NEW_STENCIL |
+               _NEW_TEXTURE,
+      .brw   = BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_REDUCED_PRIMITIVE |
+               BRW_NEW_STATS_WM |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = brw_upload_wm_prog
 };
index 233260f81098f52e04da5da2047409016b457ac8..94a0b22b4c4676d5cbc79fae666311cf136ef53c 100644 (file)
@@ -248,20 +248,18 @@ brw_upload_wm_unit(struct brw_context *brw)
 
 const struct brw_tracked_state brw_wm_unit = {
    .dirty = {
-      .mesa = (_NEW_POLYGON |
-              _NEW_POLYGONSTIPPLE |
-              _NEW_LINE |
-              _NEW_COLOR |
-              _NEW_BUFFERS),
-
-      .brw = (BRW_NEW_BATCH |
-             BRW_NEW_PROGRAM_CACHE |
-             BRW_NEW_FRAGMENT_PROGRAM |
-             BRW_NEW_CURBE_OFFSETS |
-              BRW_NEW_STATS_WM),
-
-      .cache = (CACHE_NEW_WM_PROG |
-               CACHE_NEW_SAMPLER)
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR |
+              _NEW_LINE |
+              _NEW_POLYGON |
+              _NEW_POLYGONSTIPPLE,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_CURBE_OFFSETS |
+             BRW_NEW_FRAGMENT_PROGRAM |
+             BRW_NEW_PROGRAM_CACHE |
+             BRW_NEW_STATS_WM,
+      .cache = CACHE_NEW_SAMPLER |
+               CACHE_NEW_WM_PROG,
    },
    .emit = brw_upload_wm_unit,
 };
index ef46dd78b9e3387affd3d543c371eaa8ccd1050e..dfe59cf853c8674c33346abda149dcc7a03ca3ad 100644 (file)
@@ -493,8 +493,9 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
 
 const struct brw_tracked_state brw_wm_pull_constants = {
    .dirty = {
-      .mesa = (_NEW_PROGRAM_CONSTANTS),
-      .brw = (BRW_NEW_BATCH | BRW_NEW_FRAGMENT_PROGRAM),
+      .mesa = _NEW_PROGRAM_CONSTANTS,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_FRAGMENT_PROGRAM,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = brw_upload_wm_pull_constants,
@@ -734,8 +735,8 @@ brw_update_renderbuffer_surfaces(struct brw_context *brw)
 
 const struct brw_tracked_state brw_renderbuffer_surfaces = {
    .dirty = {
-      .mesa = (_NEW_COLOR |
-               _NEW_BUFFERS),
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR,
       .brw = BRW_NEW_BATCH,
       .cache = 0
    },
@@ -824,10 +825,10 @@ const struct brw_tracked_state brw_texture_surfaces = {
    .dirty = {
       .mesa = _NEW_TEXTURE,
       .brw = BRW_NEW_BATCH |
-             BRW_NEW_TEXTURE_BUFFER |
-             BRW_NEW_VERTEX_PROGRAM |
+             BRW_NEW_FRAGMENT_PROGRAM |
              BRW_NEW_GEOMETRY_PROGRAM |
-             BRW_NEW_FRAGMENT_PROGRAM,
+             BRW_NEW_TEXTURE_BUFFER |
+             BRW_NEW_VERTEX_PROGRAM,
       .cache = 0
    },
    .emit = brw_update_texture_surfaces,
@@ -890,7 +891,8 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_wm_ubo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_UNIFORM_BUFFER,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_UNIFORM_BUFFER,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = brw_upload_wm_ubo_surfaces,
@@ -940,7 +942,8 @@ brw_upload_wm_abo_surfaces(struct brw_context *brw)
 const struct brw_tracked_state brw_wm_abo_surfaces = {
    .dirty = {
       .mesa = _NEW_PROGRAM,
-      .brw = BRW_NEW_BATCH | BRW_NEW_ATOMIC_BUFFER,
+      .brw = BRW_NEW_ATOMIC_BUFFER |
+             BRW_NEW_BATCH,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = brw_upload_wm_abo_surfaces,
index 4770063fe7ee96c1b7f40273ee1171873865aa36..5ab9fa344e37c255f9a34b07ddf41fd560651587 100644 (file)
@@ -241,10 +241,11 @@ gen6_upload_blend_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_blend_state = {
    .dirty = {
-      .mesa = (_NEW_COLOR |
-               _NEW_BUFFERS |
-               _NEW_MULTISAMPLE),
-      .brw = BRW_NEW_BATCH | BRW_NEW_STATE_BASE_ADDRESS,
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR |
+              _NEW_MULTISAMPLE,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS,
       .cache = 0,
    },
    .emit = gen6_upload_blend_state,
@@ -295,8 +296,10 @@ gen6_upload_color_calc_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_color_calc_state = {
    .dirty = {
-      .mesa = _NEW_COLOR | _NEW_STENCIL,
-      .brw = BRW_NEW_BATCH | BRW_NEW_STATE_BASE_ADDRESS,
+      .mesa = _NEW_COLOR |
+              _NEW_STENCIL,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS,
       .cache = 0,
    },
    .emit = gen6_upload_color_calc_state,
index ab0828135be05ce99c0017e8eb822b2cab4739b0..34341936c6f0937c71d6e8028b0e84258bb37363 100644 (file)
@@ -183,7 +183,9 @@ upload_clip_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_clip_state = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_LIGHT | _NEW_BUFFERS,
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_TRANSFORM,
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_META_IN_PROGRESS |
                BRW_NEW_RASTERIZER_DISCARD,
@@ -194,7 +196,10 @@ const struct brw_tracked_state gen6_clip_state = {
 
 const struct brw_tracked_state gen7_clip_state = {
    .dirty = {
-      .mesa  = _NEW_BUFFERS | _NEW_LIGHT | _NEW_POLYGON | _NEW_TRANSFORM,
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_POLYGON |
+               _NEW_TRANSFORM,
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_META_IN_PROGRESS |
                BRW_NEW_RASTERIZER_DISCARD,
index 7b06c1e90f90984934a4c31a7da8c043b57ac466..4535feb65afe95e078e87299805c124371bb3011 100644 (file)
@@ -104,8 +104,11 @@ gen6_upload_depth_stencil_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_depth_stencil_state = {
    .dirty = {
-      .mesa = _NEW_DEPTH | _NEW_STENCIL | _NEW_BUFFERS,
-      .brw  = BRW_NEW_BATCH | BRW_NEW_STATE_BASE_ADDRESS,
+      .mesa = _NEW_BUFFERS |
+              _NEW_DEPTH |
+              _NEW_STENCIL,
+      .brw  = BRW_NEW_BATCH |
+              BRW_NEW_STATE_BASE_ADDRESS,
       .cache = 0,
    },
    .emit = gen6_upload_depth_stencil_state,
index 85eb46dbd822245e9f92247e5ba07f3c3a90cc19..aeab7541d04c8006880ff2bd0af899cac50bc0f5 100644 (file)
@@ -53,10 +53,11 @@ gen6_upload_gs_push_constants(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_gs_push_constants = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
-      .brw   = (BRW_NEW_BATCH |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION),
+      .mesa  = _NEW_PROGRAM_CONSTANTS |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION,
       .cache = CACHE_NEW_GS_PROG,
    },
    .emit = gen6_upload_gs_push_constants,
@@ -195,12 +196,14 @@ upload_gs_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_gs_state = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
-      .brw   = (BRW_NEW_CONTEXT |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_BATCH),
-      .cache = (CACHE_NEW_GS_PROG | CACHE_NEW_FF_GS_PROG)
+      .mesa  = _NEW_PROGRAM_CONSTANTS |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION,
+      .cache = CACHE_NEW_FF_GS_PROG |
+               CACHE_NEW_GS_PROG,
    },
    .emit = upload_gs_state,
 };
index ee20c0806de3905535b8b41cb8ffbd8ec46c9ac1..912da4d4a7ead3c3d516eaa5d3514103d7b83663 100644 (file)
@@ -203,8 +203,8 @@ static void upload_multisample_state(struct brw_context *brw)
 const struct brw_tracked_state gen6_multisample_state = {
    .dirty = {
       .mesa = _NEW_MULTISAMPLE,
-      .brw = (BRW_NEW_CONTEXT |
-              BRW_NEW_NUM_SAMPLES),
+      .brw = BRW_NEW_CONTEXT |
+             BRW_NEW_NUM_SAMPLES,
       .cache = 0
    },
    .emit = upload_multisample_state
index 9c6c508fb73d75242d0241d42265f1d85ba28bd3..288470a8826c53e0b7752c6da939291270120c6b 100644 (file)
@@ -48,8 +48,8 @@ upload_sampler_state_pointers(struct brw_context *brw)
 const struct brw_tracked_state gen6_sampler_state = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-             BRW_NEW_STATE_BASE_ADDRESS),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS,
       .cache = CACHE_NEW_SAMPLER
    },
    .emit = upload_sampler_state_pointers,
index 6b01cd133f1c69a75b19aca55676469b2c754772..02244b374c0f99d0b4a8d5864ce9be568fb6257c 100644 (file)
@@ -92,7 +92,9 @@ gen6_upload_scissor_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_scissor_state = {
    .dirty = {
-      .mesa = _NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT,
+      .mesa = _NEW_BUFFERS |
+              _NEW_SCISSOR |
+              _NEW_VIEWPORT,
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
index fd7c3958ff5a50445ea14107960dfbfbe3ec956a..29ea4dfe06fa6fe1c76e0a021b79e4d18ba665c6 100644 (file)
@@ -434,19 +434,19 @@ upload_sf_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_sf_state = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT |
-               _NEW_PROGRAM |
-               _NEW_POLYGON |
-               _NEW_LINE |
-               _NEW_SCISSOR |
-               _NEW_BUFFERS |
-               _NEW_POINT |
-                _NEW_MULTISAMPLE),
-      .brw   = (BRW_NEW_CONTEXT |
-                BRW_NEW_FRAGMENT_PROGRAM |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_PRIMITIVE |
-                BRW_NEW_VUE_MAP_GEOM_OUT),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_LINE |
+               _NEW_MULTISAMPLE |
+               _NEW_POINT |
+               _NEW_POLYGON |
+               _NEW_PROGRAM |
+               _NEW_SCISSOR,
+      .brw   = BRW_NEW_CONTEXT |
+               BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_PRIMITIVE |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
       .cache = CACHE_NEW_WM_PROG
    },
    .emit = upload_sf_state,
index 997db1a891f7411751216fb623ecc63732f11904..3866a81f218d4bc3f22cc28a40cd5b5bc47072a2 100644 (file)
@@ -91,10 +91,10 @@ gen6_update_sol_surfaces(struct brw_context *brw)
 const struct brw_tracked_state gen6_sol_surface = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-              BRW_NEW_VERTEX_PROGRAM |
-              BRW_NEW_GEOMETRY_PROGRAM |
-              BRW_NEW_TRANSFORM_FEEDBACK),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_GEOMETRY_PROGRAM |
+             BRW_NEW_VERTEX_PROGRAM |
+             BRW_NEW_TRANSFORM_FEEDBACK,
       .cache = 0
    },
    .emit = gen6_update_sol_surfaces,
@@ -186,10 +186,10 @@ brw_gs_upload_binding_table(struct brw_context *brw)
 const struct brw_tracked_state gen6_gs_binding_table = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-              BRW_NEW_VERTEX_PROGRAM |
-              BRW_NEW_GEOMETRY_PROGRAM |
-              BRW_NEW_SURFACES),
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_GEOMETRY_PROGRAM |
+             BRW_NEW_VERTEX_PROGRAM |
+             BRW_NEW_SURFACES,
       .cache = 0
    },
    .emit = brw_gs_upload_binding_table,
index 46cc4cc2976668445f5ed9145ae4c9695ee2a8dc..99e9d81b207ab7482e64e60bffdd158a5048fa2e 100644 (file)
@@ -127,8 +127,11 @@ gen6_upload_urb( struct brw_context *brw )
 const struct brw_tracked_state gen6_urb = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_CONTEXT | BRW_NEW_GEOMETRY_PROGRAM),
-      .cache = (CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG | CACHE_NEW_FF_GS_PROG),
+      .brw = BRW_NEW_CONTEXT |
+             BRW_NEW_GEOMETRY_PROGRAM,
+      .cache = CACHE_NEW_GS_PROG |
+               CACHE_NEW_VS_PROG |
+               CACHE_NEW_FF_GS_PROG,
    },
    .emit = gen6_upload_urb,
 };
index 0c5de0a2f3850533b5060b94b5d0d8f8e5df677e..0d5284d704f68a31425bc2872265ab93b23040f8 100644 (file)
@@ -111,7 +111,8 @@ gen6_upload_sf_vp(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_sf_vp = {
    .dirty = {
-      .mesa = _NEW_VIEWPORT | _NEW_BUFFERS,
+      .mesa = _NEW_BUFFERS |
+              _NEW_VIEWPORT,
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
@@ -134,11 +135,11 @@ static void upload_viewport_state_pointers(struct brw_context *brw)
 const struct brw_tracked_state gen6_viewport_state = {
    .dirty = {
       .mesa = 0,
-      .brw = (BRW_NEW_BATCH |
-             BRW_NEW_STATE_BASE_ADDRESS),
-      .cache = (CACHE_NEW_CLIP_VP |
-               CACHE_NEW_SF_VP |
-               CACHE_NEW_CC_VP)
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS,
+      .cache = CACHE_NEW_CC_VP |
+               CACHE_NEW_CLIP_VP |
+               CACHE_NEW_SF_VP,
    },
    .emit = upload_viewport_state_pointers,
 };
index 1de3c261b7d9c3b4194c5a6ba251853526bddabf..573c804130122ed68b476618cf9a3779f4478e8a 100644 (file)
@@ -147,10 +147,11 @@ gen6_upload_vs_push_constants(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_vs_push_constants = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
-      .brw   = (BRW_NEW_BATCH |
-                BRW_NEW_VERTEX_PROGRAM |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION),
+      .mesa  = _NEW_PROGRAM_CONSTANTS |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION |
+               BRW_NEW_VERTEX_PROGRAM,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = gen6_upload_vs_push_constants,
@@ -259,11 +260,12 @@ upload_vs_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_vs_state = {
    .dirty = {
-      .mesa  = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
-      .brw   = (BRW_NEW_CONTEXT |
-               BRW_NEW_VERTEX_PROGRAM |
-               BRW_NEW_BATCH |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION),
+      .mesa  = _NEW_PROGRAM_CONSTANTS |
+               _NEW_TRANSFORM,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION |
+               BRW_NEW_VERTEX_PROGRAM,
       .cache = CACHE_NEW_VS_PROG
    },
    .emit = upload_vs_state,
index c6c7f22e859ad29a1fae9f0eff43981848507e1d..ea4e64eae015b37c05bb6e95ba321a3e343e3534 100644 (file)
@@ -57,9 +57,9 @@ gen6_upload_wm_push_constants(struct brw_context *brw)
 const struct brw_tracked_state gen6_wm_push_constants = {
    .dirty = {
       .mesa  = _NEW_PROGRAM_CONSTANTS,
-      .brw   = (BRW_NEW_BATCH |
-                BRW_NEW_FRAGMENT_PROGRAM |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION),
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = gen6_upload_wm_push_constants,
@@ -297,16 +297,16 @@ upload_wm_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_wm_state = {
    .dirty = {
-      .mesa  = (_NEW_LINE |
-               _NEW_COLOR |
-               _NEW_BUFFERS |
-               _NEW_PROGRAM_CONSTANTS |
-               _NEW_POLYGON |
-                _NEW_MULTISAMPLE),
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-               BRW_NEW_BATCH |
-                BRW_NEW_PUSH_CONSTANT_ALLOCATION),
-      .cache = (CACHE_NEW_WM_PROG)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_COLOR |
+               _NEW_LINE |
+               _NEW_MULTISAMPLE |
+               _NEW_POLYGON |
+               _NEW_PROGRAM_CONSTANTS,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_PUSH_CONSTANT_ALLOCATION,
+      .cache = CACHE_NEW_WM_PROG
    },
    .emit = upload_wm_state,
 };
index 4fe1354262e51de349a3c9e7166d3a84d171a22a..362f8733d1b25b854f36ebfa2c50b045b53753f6 100644 (file)
@@ -154,9 +154,9 @@ upload_gs_state(struct brw_context *brw)
 const struct brw_tracked_state gen7_gs_state = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM,
-      .brw   = (BRW_NEW_CONTEXT |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_BATCH),
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_GEOMETRY_PROGRAM,
       .cache = CACHE_NEW_GS_PROG
    },
    .emit = upload_gs_state,
index 22911bf5423db5232a9e06999d8a97585d60cd78..be5abf2aabbe4555c7d7d2b85117514359d7ac94 100644 (file)
@@ -201,7 +201,9 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
  */
 const struct brw_tracked_state gen7_depthbuffer = {
    .dirty = {
-      .mesa = (_NEW_BUFFERS | _NEW_DEPTH | _NEW_STENCIL),
+      .mesa = _NEW_BUFFERS |
+              _NEW_DEPTH |
+              _NEW_STENCIL,
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
index a1fa18ede2b8f4794e90d200f88baf98d5502662..1c2c04e00c2ebf4b7c44393d58997d8178462af4 100644 (file)
@@ -87,15 +87,15 @@ upload_sbe_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_sbe_state = {
    .dirty = {
-      .mesa  = (_NEW_BUFFERS |
-               _NEW_LIGHT |
-               _NEW_POINT |
-               _NEW_PROGRAM),
-      .brw   = (BRW_NEW_CONTEXT |
-                BRW_NEW_FRAGMENT_PROGRAM |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_PRIMITIVE |
-                BRW_NEW_VUE_MAP_GEOM_OUT),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_POINT |
+               _NEW_PROGRAM,
+      .brw   = BRW_NEW_CONTEXT |
+               BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_PRIMITIVE |
+               BRW_NEW_VUE_MAP_GEOM_OUT,
       .cache = CACHE_NEW_WM_PROG
    },
    .emit = upload_sbe_state,
@@ -248,14 +248,14 @@ upload_sf_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_sf_state = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT |
-               _NEW_PROGRAM |
-               _NEW_POLYGON |
-               _NEW_LINE |
-               _NEW_SCISSOR |
-               _NEW_BUFFERS |
-               _NEW_POINT |
-                _NEW_MULTISAMPLE),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_LINE |
+               _NEW_MULTISAMPLE |
+               _NEW_POINT |
+               _NEW_POLYGON |
+               _NEW_PROGRAM |
+               _NEW_SCISSOR,
       .brw   = BRW_NEW_CONTEXT,
       .cache = 0,
    },
index 166720e63497a4cf88e8c0a600941358bba4f75a..7e9b2850ac142a4f18a6cff0463204868a8e4bf1 100644 (file)
@@ -288,10 +288,10 @@ upload_sol_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_sol_state = {
    .dirty = {
-      .mesa  = (_NEW_LIGHT),
-      .brw   = (BRW_NEW_BATCH |
-                BRW_NEW_VUE_MAP_GEOM_OUT |
-                BRW_NEW_TRANSFORM_FEEDBACK)
+      .mesa  = _NEW_LIGHT,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_VUE_MAP_GEOM_OUT |
+               BRW_NEW_TRANSFORM_FEEDBACK,
    },
    .emit = upload_sol_state,
 };
index eb3784a846bd41bd63e2f177ddaf62a714604362..62b37f8591277bf74cb2bc45ccb88035209a762a 100644 (file)
@@ -314,8 +314,10 @@ gen7_emit_urb_state(struct brw_context *brw,
 const struct brw_tracked_state gen7_urb = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_CONTEXT | BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = (CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG),
+      .brw = BRW_NEW_CONTEXT |
+             BRW_NEW_GEOMETRY_PROGRAM,
+      .cache = CACHE_NEW_VS_PROG |
+               CACHE_NEW_GS_PROG,
    },
    .emit = gen7_upload_urb,
 };
index 9e2350517457ee4b923c843fb8fa8778541115af..193ead7853e1064bad7431d4182d105ca055bd3c 100644 (file)
@@ -92,7 +92,8 @@ gen7_upload_sf_clip_viewport(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_sf_clip_viewport = {
    .dirty = {
-      .mesa = _NEW_VIEWPORT | _NEW_BUFFERS,
+      .mesa = _NEW_BUFFERS |
+              _NEW_VIEWPORT,
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
index 7534de28c2e95b60dfeaeddeda8d4fa56a5c19c8..e9144d9cd33adb3b4b4d00898e4b0c7f13830e70 100644 (file)
@@ -112,9 +112,9 @@ upload_vs_state(struct brw_context *brw)
 const struct brw_tracked_state gen7_vs_state = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM,
-      .brw   = (BRW_NEW_CONTEXT |
-               BRW_NEW_VERTEX_PROGRAM |
-               BRW_NEW_BATCH),
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_VERTEX_PROGRAM,
       .cache = CACHE_NEW_VS_PROG
    },
    .emit = upload_vs_state,
index 8f851d80b7547b06a2fda2f9229e8c99d595716b..e966d7b04ee20c4cf1aabdd5a9ce94e7f66a9d5e 100644 (file)
@@ -126,11 +126,13 @@ upload_wm_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_wm_state = {
    .dirty = {
-      .mesa  = (_NEW_LINE | _NEW_POLYGON |
-               _NEW_COLOR | _NEW_BUFFERS |
-                _NEW_MULTISAMPLE),
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-               BRW_NEW_BATCH),
+      .mesa  = _NEW_BUFFERS |
+               _NEW_COLOR |
+               _NEW_LINE |
+               _NEW_MULTISAMPLE |
+               _NEW_POLYGON,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_FRAGMENT_PROGRAM,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = upload_wm_state,
@@ -270,12 +272,12 @@ upload_ps_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen7_ps_state = {
    .dirty = {
-      .mesa  = (_NEW_COLOR |
-                _NEW_BUFFERS |
-                _NEW_MULTISAMPLE),
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-                BRW_NEW_BATCH),
-      .cache = (CACHE_NEW_WM_PROG)
+      .mesa  = _NEW_BUFFERS |
+               _NEW_COLOR |
+               _NEW_MULTISAMPLE,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_FRAGMENT_PROGRAM,
+      .cache = CACHE_NEW_WM_PROG
    },
    .emit = upload_ps_state,
 };
index 9c5eedbf1b42eccb5bf0744793abdc48035cf51a..2e3a33a67c271bfab2adf51b81e3a5bf53cc6300 100644 (file)
@@ -199,8 +199,11 @@ gen8_upload_blend_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_blend_state = {
    .dirty = {
-      .mesa = _NEW_COLOR | _NEW_BUFFERS | _NEW_MULTISAMPLE,
-      .brw = BRW_NEW_BATCH | BRW_NEW_STATE_BASE_ADDRESS,
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR |
+              _NEW_MULTISAMPLE,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS,
       .cache = 0,
    },
    .emit = gen8_upload_blend_state,
@@ -289,8 +292,11 @@ gen8_upload_ps_blend(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_ps_blend = {
    .dirty = {
-      .mesa = _NEW_BUFFERS | _NEW_COLOR | _NEW_MULTISAMPLE,
-      .brw = BRW_NEW_CONTEXT | BRW_NEW_FRAGMENT_PROGRAM,
+      .mesa = _NEW_BUFFERS |
+              _NEW_COLOR |
+              _NEW_MULTISAMPLE,
+      .brw = BRW_NEW_CONTEXT |
+             BRW_NEW_FRAGMENT_PROGRAM,
       .cache = 0,
    },
    .emit = gen8_upload_ps_blend
index 3189a3e83af717b5698c6033958e080c424cecee..c3ceee1056b61430301f440892dbe750e1ee8cc9 100644 (file)
@@ -233,7 +233,8 @@ gen8_emit_vertices(struct brw_context *brw)
 const struct brw_tracked_state gen8_vertices = {
    .dirty = {
       .mesa = _NEW_POLYGON,
-      .brw = BRW_NEW_BATCH | BRW_NEW_VERTICES,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_VERTICES,
       .cache = CACHE_NEW_VS_PROG,
    },
    .emit = gen8_emit_vertices,
@@ -259,7 +260,8 @@ gen8_emit_index_buffer(struct brw_context *brw)
 const struct brw_tracked_state gen8_index_buffer = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_BATCH | BRW_NEW_INDEX_BUFFER,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_INDEX_BUFFER,
       .cache = 0,
    },
    .emit = gen8_emit_index_buffer,
index 927be429747b3e95bb8878d4676ca9c2942a9f4f..1ca43a54de2ea2ffea56f1497fc7e8fd6ed026c2 100644 (file)
@@ -120,9 +120,9 @@ gen8_upload_gs_state(struct brw_context *brw)
 const struct brw_tracked_state gen8_gs_state = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM,
-      .brw   = (BRW_NEW_CONTEXT |
-                BRW_NEW_GEOMETRY_PROGRAM |
-                BRW_NEW_BATCH),
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_GEOMETRY_PROGRAM,
       .cache = CACHE_NEW_GS_PROG
    },
    .emit = gen8_upload_gs_state,
index 723d2271aa33b3c832ebe59be80d139e788e011f..5c54127c20d38bcb85c7bfccadbb3845a51b7127 100644 (file)
@@ -78,7 +78,8 @@ static void upload_state_base_address(struct brw_context *brw)
 const struct brw_tracked_state gen8_state_base_address = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_BATCH | BRW_NEW_PROGRAM_CACHE,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_PROGRAM_CACHE,
       .cache = 0,
    },
    .emit = upload_state_base_address
index daf3e69b3a00dc116ea7ac973be5d5fe061a885f..ff75df6e6edca9f5f9207fbffe7c0337313c3764 100644 (file)
@@ -83,8 +83,8 @@ upload_multisample_state(struct brw_context *brw)
 const struct brw_tracked_state gen8_multisample_state = {
    .dirty = {
       .mesa = _NEW_MULTISAMPLE,
-      .brw = (BRW_NEW_CONTEXT |
-              BRW_NEW_NUM_SAMPLES),
+      .brw = BRW_NEW_CONTEXT |
+             BRW_NEW_NUM_SAMPLES,
       .cache = 0
    },
    .emit = upload_multisample_state
index 0c17243e3fcd8ea6f2292a3d6f6319f0098879dd..ff2c9a9223486dbd19d324693a070cbb486d6114 100644 (file)
@@ -87,7 +87,9 @@ upload_ps_extra(struct brw_context *brw)
 const struct brw_tracked_state gen8_ps_extra = {
    .dirty = {
       .mesa  = _NEW_MULTISAMPLE,
-      .brw   = BRW_NEW_CONTEXT | BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_NUM_SAMPLES,
+      .brw   = BRW_NEW_CONTEXT |
+               BRW_NEW_FRAGMENT_PROGRAM |
+               BRW_NEW_NUM_SAMPLES,
       .cache = CACHE_NEW_WM_PROG,
    },
    .emit = upload_ps_extra,
@@ -124,7 +126,8 @@ upload_wm_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_wm_state = {
    .dirty = {
-      .mesa  = _NEW_LINE | _NEW_POLYGON,
+      .mesa  = _NEW_LINE |
+               _NEW_POLYGON,
       .brw   = BRW_NEW_CONTEXT,
       .cache = CACHE_NEW_WM_PROG,
    },
@@ -248,8 +251,8 @@ upload_ps_state(struct brw_context *brw)
 const struct brw_tracked_state gen8_ps_state = {
    .dirty = {
       .mesa  = _NEW_MULTISAMPLE,
-      .brw   = BRW_NEW_FRAGMENT_PROGRAM |
-               BRW_NEW_BATCH,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_FRAGMENT_PROGRAM,
       .cache = CACHE_NEW_WM_PROG
    },
    .emit = upload_ps_state,
index 6995a6a63f32868a17386ed855731f61321cc014..ff0081bb9b857d4e55d9ef09b028cfa1dcf204bd 100644 (file)
@@ -127,7 +127,10 @@ upload_sbe(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_sbe_state = {
    .dirty = {
-      .mesa  = _NEW_BUFFERS | _NEW_LIGHT | _NEW_POINT | _NEW_PROGRAM,
+      .mesa  = _NEW_BUFFERS |
+               _NEW_LIGHT |
+               _NEW_POINT |
+               _NEW_PROGRAM,
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_VUE_MAP_GEOM_OUT,
index 9c89532580c5c584db9cb5e9893d9412514f65a2..56042d1eaf95c8fe3d2f650825bf8f1b54f86ca0 100644 (file)
@@ -130,7 +130,8 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_sf_clip_viewport = {
    .dirty = {
-      .mesa = _NEW_BUFFERS | _NEW_VIEWPORT,
+      .mesa = _NEW_BUFFERS |
+              _NEW_VIEWPORT,
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
index 0cc4f0cdc5fc6c2493d0f70bd9bb498ac75132dc..63d2294684b524b227a0a22133caceb659342f49 100644 (file)
@@ -82,9 +82,9 @@ upload_vs_state(struct brw_context *brw)
 const struct brw_tracked_state gen8_vs_state = {
    .dirty = {
       .mesa  = _NEW_TRANSFORM,
-      .brw   = BRW_NEW_CONTEXT |
-               BRW_NEW_VERTEX_PROGRAM |
-               BRW_NEW_BATCH,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CONTEXT |
+               BRW_NEW_VERTEX_PROGRAM,
       .cache = CACHE_NEW_VS_PROG
    },
    .emit = upload_vs_state,
index 38212cd3cfdecafe57275ab30f645d3bd1413c61..83a08c5ebb824452218b751b7d40c060ef89ae49 100644 (file)
@@ -108,7 +108,9 @@ gen8_upload_wm_depth_stencil(struct brw_context *brw)
 
 const struct brw_tracked_state gen8_wm_depth_stencil = {
    .dirty = {
-      .mesa = _NEW_BUFFERS | _NEW_DEPTH | _NEW_STENCIL,
+      .mesa = _NEW_BUFFERS |
+              _NEW_DEPTH |
+              _NEW_STENCIL,
       .brw  = BRW_NEW_CONTEXT,
       .cache = 0,
    },