i965: Rename CACHE_NEW_*_PROG to BRW_NEW_*_PROG_DATA.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Nov 2014 07:30:51 +0000 (23:30 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Dec 2014 01:00:26 +0000 (17:00 -0800)
Now that we've moved a bunch of CACHE_NEW_* bits to BRW_NEW_*, the only
ones that are left are legitimately related to the program cache.  Yet,
it seems a bit wasteful to have an entire bitfield for only 7 bits.

State upload is one of the hottest paths in the driver.  For each atom
in the list, we call check_state() to see if it needs to be emitted.
Currently, this involves comparing three separate bitfields (mesa, brw,
and cache).  Consolidating the brw and cache bitfields would save a
small amount of CPU overhead per atom.  Broadwell, for example, has
57 state atoms, so this small savings can add up.

CACHE_NEW_*_PROG covers the brw_*_prog_data structures, as well as the
offset into the program cache BO (prog_offset).  Since most uses refer
to brw_*_prog_data, I decided to use BRW_NEW_*_PROG_DATA as the name.

Removing "cache" completely is a bit painful, so I decided to do it in
several patches for easier review, and to separate mechanical changes
from manual ones.  This one simply renames things, and was made via:

$ for file in *.[ch]; do
      sed -i -e 's/CACHE_NEW_\([A-Z_\*]*\)_PROG/BRW_NEW_\1_PROG_DATA/g' \
             -e 's/BRW_NEW_WM_PROG_DATA/BRW_NEW_FS_PROG_DATA/g' $file
  done

Note that BRW_NEW_*_PROG_DATA is still in .cache, not .brw!
The next patch will remedy this flaw.  It will also fix the
alphabetization issues.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Matt Turner <mattst88@gmail.com>
33 files changed:
src/mesa/drivers/dri/i965/brw_binding_tables.c
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_context.h
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_state.c
src/mesa/drivers/dri/i965/brw_gs_surface_state.c
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/brw_urb.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_state.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen6_clip_state.c
src/mesa/drivers/dri/i965/gen6_gs_state.c
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen6_urb.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_sf_state.c
src/mesa/drivers/dri/i965/gen7_urb.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_depth_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_ps_state.c
src/mesa/drivers/dri/i965/gen8_sf_state.c
src/mesa/drivers/dri/i965/gen8_vs_state.c

index bf996899e81407dd659b3b465f692038c75dde84..2e843d5006b3970fabcd1123a0c767e3ba14d129 100644 (file)
@@ -56,7 +56,7 @@ brw_upload_binding_table(struct brw_context *brw,
                          GLbitfield brw_new_binding_table,
                          struct brw_stage_state *stage_state)
 {
-   /* CACHE_NEW_*_PROG */
+   /* BRW_NEW_*_PROG_DATA */
    struct brw_stage_prog_data *prog_data = stage_state->prog_data;
 
    if (prog_data->binding_table.size_bytes == 0) {
@@ -112,7 +112,7 @@ const struct brw_tracked_state brw_vs_binding_table = {
       .brw = BRW_NEW_BATCH |
              BRW_NEW_VS_CONSTBUF |
              BRW_NEW_SURFACES,
-      .cache = CACHE_NEW_VS_PROG
+      .cache = BRW_NEW_VS_PROG_DATA
    },
    .emit = brw_vs_upload_binding_table,
 };
@@ -132,7 +132,7 @@ const struct brw_tracked_state brw_wm_binding_table = {
       .mesa = 0,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_SURFACES,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = brw_upload_wm_binding_table,
 };
@@ -156,7 +156,7 @@ const struct brw_tracked_state brw_gs_binding_table = {
       .brw = BRW_NEW_BATCH |
              BRW_NEW_GS_CONSTBUF |
              BRW_NEW_SURFACES,
-      .cache = CACHE_NEW_GS_PROG
+      .cache = BRW_NEW_GS_PROG_DATA
    },
    .emit = brw_gs_upload_binding_table,
 };
index df334b573cb56f7db4806e74f5f9822d1bb6afb3..0e1aa5860a98982cba66bdaacd15377bd0914ed2 100644 (file)
@@ -67,7 +67,7 @@ brw_upload_clip_unit(struct brw_context *brw)
                          sizeof(*clip), 32, &brw->clip.state_offset);
    memset(clip, 0, sizeof(*clip));
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_CLIP_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_CLIP_PROG_DATA */
    clip->thread0.grf_reg_count = (ALIGN(brw->clip.prog_data->total_grf, 16) /
                                 16 - 1);
    clip->thread0.kernel_start_pointer =
@@ -170,7 +170,7 @@ const struct brw_tracked_state brw_clip_unit = {
                BRW_NEW_CURBE_OFFSETS |
                BRW_NEW_PROGRAM_CACHE |
                BRW_NEW_URB_FENCE,
-      .cache = CACHE_NEW_CLIP_PROG
+      .cache = BRW_NEW_CLIP_PROG_DATA
    },
    .emit = brw_upload_clip_unit,
 };
index b0f699f5d10ffc8e6203925549fa0f655f84a7b4..a671ce168618bfbe498d0fa77a3496c02429f01f 100644 (file)
@@ -248,7 +248,7 @@ struct brw_state_flags {
     *
     * Now almost all of that state is just streamed out on demand, but the
     * flags for those state blobs updating have stayed in the same bitfield.
-    * brw_state_cache.c still flags CACHE_NEW_*_PROG.
+    * brw_state_cache.c still flags BRW_NEW_*_PROG_DATA.
     */
    GLuint cache;
 };
@@ -777,13 +777,13 @@ enum shader_time_shader_type {
 
 /* Flags for brw->state.cache.
  */
-#define CACHE_NEW_WM_PROG                (1 << BRW_CACHE_FS_PROG)
-#define CACHE_NEW_BLORP_BLIT_PROG        (1 << BRW_CACHE_BLORP_BLIT_PROG)
-#define CACHE_NEW_SF_PROG                (1 << BRW_CACHE_SF_PROG)
-#define CACHE_NEW_VS_PROG                (1 << BRW_CACHE_VS_PROG)
-#define CACHE_NEW_FF_GS_PROG             (1 << BRW_CACHE_FF_GS_PROG)
-#define CACHE_NEW_GS_PROG                (1 << BRW_CACHE_GS_PROG)
-#define CACHE_NEW_CLIP_PROG              (1 << BRW_CACHE_CLIP_PROG)
+#define BRW_NEW_FS_PROG_DATA                (1 << BRW_CACHE_FS_PROG)
+#define BRW_NEW_BLORP_BLIT_PROG_DATA        (1 << BRW_CACHE_BLORP_BLIT_PROG)
+#define BRW_NEW_SF_PROG_DATA                (1 << BRW_CACHE_SF_PROG)
+#define BRW_NEW_VS_PROG_DATA                (1 << BRW_CACHE_VS_PROG)
+#define BRW_NEW_FF_GS_PROG_DATA             (1 << BRW_CACHE_FF_GS_PROG)
+#define BRW_NEW_GS_PROG_DATA                (1 << BRW_CACHE_GS_PROG)
+#define BRW_NEW_CLIP_PROG_DATA              (1 << BRW_CACHE_CLIP_PROG)
 
 struct brw_vertex_buffer {
    /** Buffer object containing the uploaded vertex data */
index 56c4316effac94b5aa654231d82ce34ab2c7e11d..15105a52e12f743808cab85fa4c658852d592d2a 100644 (file)
 static void calculate_curbe_offsets( struct brw_context *brw )
 {
    struct gl_context *ctx = &brw->ctx;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const GLuint nr_fp_regs = (brw->wm.prog_data->base.nr_params + 15) / 16;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    const GLuint nr_vp_regs = (brw->vs.prog_data->base.base.nr_params + 15) / 16;
    GLuint nr_clip_regs = 0;
    GLuint total_regs;
@@ -143,8 +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 = BRW_NEW_VS_PROG_DATA |
+               BRW_NEW_FS_PROG_DATA
    },
    .emit = calculate_curbe_offsets
 };
@@ -217,7 +217,7 @@ brw_upload_constant_buffer(struct brw_context *brw)
       /* BRW_NEW_CURBE_OFFSETS */
       GLuint offset = brw->curbe.wm_start * 16;
 
-      /* CACHE_NEW_WM_PROG | _NEW_PROGRAM_CONSTANTS: copy uniform values */
+      /* BRW_NEW_FS_PROG_DATA | _NEW_PROGRAM_CONSTANTS: copy uniform values */
       for (i = 0; i < brw->wm.prog_data->base.nr_params; i++) {
         buf[offset + i] = *brw->wm.prog_data->base.param[i];
       }
@@ -258,7 +258,7 @@ brw_upload_constant_buffer(struct brw_context *brw)
 
       GLuint offset = brw->curbe.vs_start * 16;
 
-      /* CACHE_NEW_VS_PROG | _NEW_PROGRAM_CONSTANTS: copy uniform values */
+      /* BRW_NEW_VS_PROG_DATA | _NEW_PROGRAM_CONSTANTS: copy uniform values */
       for (i = 0; i < brw->vs.prog_data->base.base.nr_params; i++) {
          buf[offset + i] = *brw->vs.prog_data->base.base.param[i];
       }
@@ -313,8 +313,8 @@ const struct brw_tracked_state brw_constant_buffer = {
               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
+      .cache = BRW_NEW_VS_PROG_DATA |
+               BRW_NEW_FS_PROG_DATA
    },
    .emit = brw_upload_constant_buffer,
 };
index 7bf9163136693df9ce4f4dd046230d30fed311b1..ca70fd35b48a41e44d54d4f47f238fc0843955da 100644 (file)
@@ -400,7 +400,7 @@ void
 brw_prepare_vertices(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    GLbitfield64 vs_inputs = brw->vs.prog_data->inputs_read;
    const unsigned char *ptr = NULL;
    GLuint interleaved = 0;
@@ -871,7 +871,7 @@ const struct brw_tracked_state brw_vertices = {
       .mesa = _NEW_POLYGON,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_VERTICES,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = brw_emit_vertices,
 };
index d21243836b48f341c7da6445dacabf86912d79f3..f2e9663c002890fd56c088823c1f0371e7272edd 100644 (file)
@@ -161,7 +161,7 @@ static void populate_key(struct brw_context *brw,
 
    memset(key, 0, sizeof(*key));
 
-   /* CACHE_NEW_VS_PROG (part of VUE map) */
+   /* BRW_NEW_VS_PROG_DATA (part of VUE map) */
    key->attrs = brw->vs.prog_data->base.vue_map.slots_valid;
 
    /* BRW_NEW_PRIMITIVE */
@@ -230,7 +230,7 @@ brw_upload_ff_gs_prog(struct brw_context *brw)
    populate_key(brw, &key);
 
    if (brw->ff_gs.prog_active != key.need_gs_prog) {
-      brw->state.dirty.cache |= CACHE_NEW_FF_GS_PROG;
+      brw->state.dirty.cache |= BRW_NEW_FF_GS_PROG_DATA;
       brw->ff_gs.prog_active = key.need_gs_prog;
    }
 
@@ -253,7 +253,7 @@ const struct brw_tracked_state brw_ff_gs_prog = {
       .mesa  = _NEW_LIGHT,
       .brw   = BRW_NEW_PRIMITIVE |
                BRW_NEW_TRANSFORM_FEEDBACK,
-      .cache = CACHE_NEW_VS_PROG
+      .cache = BRW_NEW_VS_PROG_DATA
    },
    .emit = brw_upload_ff_gs_prog
 };
index 9f4efdf7b7b1487a9bbe3d9f4ca12505b7e5244d..cc646de7370a976149e4f9616542b33dbf736b77 100644 (file)
@@ -45,7 +45,7 @@ brw_upload_gs_unit(struct brw_context *brw)
 
    memset(gs, 0, sizeof(*gs));
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_GS_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_GS_PROG_DATA */
    if (brw->ff_gs.prog_active) {
       gs->thread0.grf_reg_count = (ALIGN(brw->ff_gs.prog_data->total_grf, 16) /
                                   16 - 1);
@@ -95,7 +95,7 @@ const struct brw_tracked_state brw_gs_unit = {
                BRW_NEW_CURBE_OFFSETS |
                BRW_NEW_PROGRAM_CACHE |
                BRW_NEW_URB_FENCE,
-      .cache = CACHE_NEW_FF_GS_PROG
+      .cache = BRW_NEW_FF_GS_PROG_DATA
    },
    .emit = brw_upload_gs_unit,
 };
index 34505994af74cf63e0bcae28796b98380e67c025..267880baec1f93af36f83e02bf5de8a2d00e5b89 100644 (file)
@@ -46,7 +46,7 @@ brw_upload_gs_pull_constants(struct brw_context *brw)
    if (!gp)
       return;
 
-   /* CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GS_PROG_DATA */
    const struct brw_stage_prog_data *prog_data = &brw->gs.prog_data->base.base;
 
    /* _NEW_PROGRAM_CONSTANTS */
@@ -59,7 +59,7 @@ const struct brw_tracked_state brw_gs_pull_constants = {
       .mesa = _NEW_PROGRAM_CONSTANTS,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_GS_PROG_DATA,
    },
    .emit = brw_upload_gs_pull_constants,
 };
@@ -76,7 +76,7 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw)
    if (!prog)
       return;
 
-   /* CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GS_PROG_DATA */
    brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_GEOMETRY],
                           &brw->gs.base, &brw->gs.prog_data->base.base);
 }
@@ -86,7 +86,7 @@ const struct brw_tracked_state brw_gs_ubo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_UNIFORM_BUFFER,
-      .cache = CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_GS_PROG_DATA,
    },
    .emit = brw_upload_gs_ubo_surfaces,
 };
@@ -100,7 +100,7 @@ brw_upload_gs_abo_surfaces(struct brw_context *brw)
       ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
 
    if (prog) {
-      /* CACHE_NEW_GS_PROG */
+      /* BRW_NEW_GS_PROG_DATA */
       brw_upload_abo_surfaces(brw, prog, &brw->gs.base,
                               &brw->gs.prog_data->base.base);
    }
@@ -111,7 +111,7 @@ const struct brw_tracked_state brw_gs_abo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_ATOMIC_BUFFER |
              BRW_NEW_BATCH,
-      .cache = CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_GS_PROG_DATA,
    },
    .emit = brw_upload_gs_abo_surfaces,
 };
index ecbbb7642f984d3c3f612f8e82378e68326d2907..16b4db6b042c98a1187b3aa9fc86af0d4d6ce10d 100644 (file)
@@ -120,7 +120,7 @@ const struct brw_tracked_state brw_psp_urb_cbs = {
              BRW_NEW_GEN4_UNIT_STATE |
              BRW_NEW_STATE_BASE_ADDRESS |
              BRW_NEW_URB_FENCE,
-      .cache = CACHE_NEW_FF_GS_PROG,
+      .cache = BRW_NEW_FF_GS_PROG_DATA,
    },
    .emit = upload_psp_urb_cbs,
 };
index 1b79cc0022b318c304d893b56ae16fb4277039cc..c653e3b18429cd514ee49d3139f929ca5abe1be0 100644 (file)
@@ -136,7 +136,7 @@ static void upload_sf_unit( struct brw_context *brw )
 
    memset(sf, 0, sizeof(*sf));
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_SF_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_SF_PROG_DATA */
    sf->thread0.grf_reg_count = ALIGN(brw->sf.prog_data->total_grf, 16) / 16 - 1;
    sf->thread0.kernel_start_pointer =
       brw_program_reloc(brw,
@@ -150,7 +150,7 @@ static void upload_sf_unit( struct brw_context *brw )
    sf->thread3.dispatch_grf_start_reg = 3;
    sf->thread3.urb_entry_read_offset = BRW_SF_URB_ENTRY_READ_OFFSET;
 
-   /* CACHE_NEW_SF_PROG */
+   /* BRW_NEW_SF_PROG_DATA */
    sf->thread3.urb_entry_read_length = brw->sf.prog_data->urb_read_length;
 
    /* BRW_NEW_URB_FENCE */
@@ -308,7 +308,7 @@ const struct brw_tracked_state brw_sf_unit = {
                BRW_NEW_PROGRAM_CACHE |
                BRW_NEW_SF_VP |
                BRW_NEW_URB_FENCE,
-      .cache = CACHE_NEW_SF_PROG,
+      .cache = BRW_NEW_SF_PROG_DATA,
    },
    .emit = upload_sf_unit,
 };
index 57c451900ee6bc95ab437c4ee7add6df0673cd26..5ad06682f9f112b2b570e327ef282b51b1282be0 100644 (file)
@@ -528,13 +528,13 @@ static struct dirty_bit_map brw_bits[] = {
 };
 
 static struct dirty_bit_map cache_bits[] = {
-   DEFINE_BIT(CACHE_NEW_WM_PROG),
-   DEFINE_BIT(CACHE_NEW_BLORP_BLIT_PROG),
-   DEFINE_BIT(CACHE_NEW_SF_PROG),
-   DEFINE_BIT(CACHE_NEW_VS_PROG),
-   DEFINE_BIT(CACHE_NEW_FF_GS_PROG),
-   DEFINE_BIT(CACHE_NEW_GS_PROG),
-   DEFINE_BIT(CACHE_NEW_CLIP_PROG),
+   DEFINE_BIT(BRW_NEW_FS_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_BLORP_BLIT_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_SF_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_VS_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_FF_GS_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_GS_PROG_DATA),
+   DEFINE_BIT(BRW_NEW_CLIP_PROG_DATA),
    {0, 0, 0}
 };
 
index 33d7526ef80a3f3456922ce76b2be14a6a80e4c2..09a906514e78f3d6349b84eee7a87cb863b1071a 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_SF_PROG |
-               CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_SF_PROG_DATA |
+               BRW_NEW_VS_PROG_DATA,
    },
    .emit = recalculate_urb_fence
 };
index f9ee2d04a1d8d3f196823e0134fa337f5d8548ec..09ecd3a102e1182522fbc4a4edc8179e6aec2de4 100644 (file)
@@ -47,7 +47,7 @@ brw_upload_vs_unit(struct brw_context *brw)
                        sizeof(*vs), 32, &stage_state->state_offset);
    memset(vs, 0, sizeof(*vs));
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_VS_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_VS_PROG_DATA */
    vs->thread0.grf_reg_count =
       ALIGN(brw->vs.prog_data->base.total_grf, 16) / 16 - 1;
    vs->thread0.kernel_start_pointer =
@@ -193,7 +193,7 @@ const struct brw_tracked_state brw_vs_unit = {
                BRW_NEW_SAMPLER_STATE_TABLE |
                BRW_NEW_URB_FENCE |
                BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = brw_upload_vs_unit,
 };
index 36653be11b9d75c86a71d6bb17b321e9dac787aa..263f391f66d66d40213ce7e31ce98dc0b5e07a5a 100644 (file)
@@ -72,7 +72,7 @@ brw_upload_pull_constants(struct brw_context *brw,
     */
    _mesa_load_state_parameters(&brw->ctx, prog->Parameters);
 
-   /* CACHE_NEW_*_PROG | _NEW_PROGRAM_CONSTANTS */
+   /* BRW_NEW_*_PROG_DATA | _NEW_PROGRAM_CONSTANTS */
    uint32_t size = prog_data->nr_pull_params * 4;
    drm_intel_bo *const_bo = NULL;
    uint32_t const_offset;
@@ -117,7 +117,7 @@ brw_upload_vs_pull_constants(struct brw_context *brw)
    struct brw_vertex_program *vp =
       (struct brw_vertex_program *) brw->vertex_program;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    const struct brw_stage_prog_data *prog_data = &brw->vs.prog_data->base.base;
 
    /* _NEW_PROGRAM_CONSTANTS */
@@ -130,7 +130,7 @@ const struct brw_tracked_state brw_vs_pull_constants = {
       .mesa = _NEW_PROGRAM_CONSTANTS,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = brw_upload_vs_pull_constants,
 };
@@ -146,7 +146,7 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw)
    if (!prog)
       return;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
                           &brw->vs.base, &brw->vs.prog_data->base.base);
 }
@@ -156,7 +156,7 @@ const struct brw_tracked_state brw_vs_ubo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_UNIFORM_BUFFER,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = brw_upload_vs_ubo_surfaces,
 };
@@ -170,7 +170,7 @@ brw_upload_vs_abo_surfaces(struct brw_context *brw)
       ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
 
    if (prog) {
-      /* CACHE_NEW_VS_PROG */
+      /* BRW_NEW_VS_PROG_DATA */
       brw_upload_abo_surfaces(brw, prog, &brw->vs.base,
                               &brw->vs.prog_data->base.base);
    }
@@ -181,7 +181,7 @@ const struct brw_tracked_state brw_vs_abo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_ATOMIC_BUFFER |
              BRW_NEW_BATCH,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = brw_upload_vs_abo_surfaces,
 };
index 763ea5ff4d07a3d48f270eac54fca5682a846ff2..51f48b4e101afc954d07834f21b380e9d7e42fe2 100644 (file)
@@ -77,7 +77,7 @@ brw_upload_wm_unit(struct brw_context *brw)
    struct gl_context *ctx = &brw->ctx;
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct gl_fragment_program *fp = brw->fragment_program;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
    struct brw_wm_unit_state *wm;
 
@@ -94,7 +94,7 @@ brw_upload_wm_unit(struct brw_context *brw)
             prog_data->dispatch_grf_start_reg_16);
    }
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_WM_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_FS_PROG_DATA */
    wm->thread0.grf_reg_count = prog_data->reg_blocks;
    wm->wm9.grf_reg_count_2 = prog_data->reg_blocks_16;
 
@@ -258,7 +258,7 @@ const struct brw_tracked_state brw_wm_unit = {
              BRW_NEW_PROGRAM_CACHE |
              BRW_NEW_SAMPLER_STATE_TABLE |
              BRW_NEW_STATS_WM,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = brw_upload_wm_unit,
 };
index dfe59cf853c8674c33346abda149dcc7a03ca3ad..f74c320ac7de78221244b1bef7268cc14e2243ce 100644 (file)
@@ -483,7 +483,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    struct brw_fragment_program *fp =
       (struct brw_fragment_program *) brw->fragment_program;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    struct brw_stage_prog_data *prog_data = &brw->wm.prog_data->base;
 
    /* _NEW_PROGRAM_CONSTANTS */
@@ -496,7 +496,7 @@ const struct brw_tracked_state brw_wm_pull_constants = {
       .mesa = _NEW_PROGRAM_CONSTANTS,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = brw_upload_wm_pull_constants,
 };
@@ -883,7 +883,7 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw)
    if (!prog)
       return;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_FRAGMENT],
                            &brw->wm.base, &brw->wm.prog_data->base);
 }
@@ -893,7 +893,7 @@ const struct brw_tracked_state brw_wm_ubo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_UNIFORM_BUFFER,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = brw_upload_wm_ubo_surfaces,
 };
@@ -933,7 +933,7 @@ brw_upload_wm_abo_surfaces(struct brw_context *brw)
    struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
 
    if (prog) {
-      /* CACHE_NEW_WM_PROG */
+      /* BRW_NEW_FS_PROG_DATA */
       brw_upload_abo_surfaces(brw, prog, &brw->wm.base,
                               &brw->wm.prog_data->base);
    }
@@ -944,7 +944,7 @@ const struct brw_tracked_state brw_wm_abo_surfaces = {
       .mesa = _NEW_PROGRAM,
       .brw = BRW_NEW_ATOMIC_BUFFER |
              BRW_NEW_BATCH,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = brw_upload_wm_abo_surfaces,
 };
index 34341936c6f0937c71d6e8028b0e84258bb37363..defceba6855c9d77eb4d09d5ab19d1b4758c67af 100644 (file)
@@ -43,7 +43,7 @@ upload_clip_state(struct brw_context *brw)
    /* _NEW_BUFFERS */
    struct gl_framebuffer *fb = ctx->DrawBuffer;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    if (brw->wm.prog_data->barycentric_interp_modes &
        BRW_WM_NONPERSPECTIVE_BARYCENTRIC_BITS) {
       dw2 |= GEN6_CLIP_NON_PERSPECTIVE_BARYCENTRIC_ENABLE;
@@ -189,7 +189,7 @@ const struct brw_tracked_state gen6_clip_state = {
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_META_IN_PROGRESS |
                BRW_NEW_RASTERIZER_DISCARD,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_clip_state,
 };
@@ -203,7 +203,7 @@ const struct brw_tracked_state gen7_clip_state = {
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_META_IN_PROGRESS |
                BRW_NEW_RASTERIZER_DISCARD,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_clip_state,
 };
index aeab7541d04c8006880ff2bd0af899cac50bc0f5..4ac591cffffb2a4a9132db0d02665bb0cf88d844 100644 (file)
@@ -40,7 +40,7 @@ gen6_upload_gs_push_constants(struct brw_context *brw)
       (struct brw_geometry_program *) brw->geometry_program;
 
    if (gp) {
-      /* CACHE_NEW_GS_PROG */
+      /* BRW_NEW_GS_PROG_DATA */
       struct brw_stage_prog_data *prog_data = &brw->gs.prog_data->base.base;
 
       gen6_upload_push_constants(brw, &gp->program.Base, prog_data,
@@ -58,7 +58,7 @@ const struct brw_tracked_state gen6_gs_push_constants = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_GEOMETRY_PROGRAM |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION,
-      .cache = CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_GS_PROG_DATA,
    },
    .emit = gen6_upload_gs_push_constants,
 };
@@ -90,7 +90,7 @@ upload_gs_state(struct brw_context *brw)
 {
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
-   /* CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GS_PROG_DATA */
    const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
    const struct brw_stage_state *stage_state = &brw->gs.base;
 
@@ -202,8 +202,8 @@ const struct brw_tracked_state gen6_gs_state = {
                BRW_NEW_CONTEXT |
                BRW_NEW_GEOMETRY_PROGRAM |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION,
-      .cache = CACHE_NEW_FF_GS_PROG |
-               CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_FF_GS_PROG_DATA |
+               BRW_NEW_GS_PROG_DATA,
    },
    .emit = upload_gs_state,
 };
index 29ea4dfe06fa6fe1c76e0a021b79e4d18ba665c6..591890d995808e98f417bdbb607aed497664aee5 100644 (file)
@@ -190,7 +190,7 @@ calculate_attr_overrides(const struct brw_context *brw,
       enum glsl_interp_qualifier interp_qualifier =
          brw->fragment_program->InterpQualifier[attr];
       bool is_gl_Color = attr == VARYING_SLOT_COL0 || attr == VARYING_SLOT_COL1;
-      /* CACHE_NEW_WM_PROG */
+      /* BRW_NEW_FS_PROG_DATA */
       int input_index = brw->wm.prog_data->urb_setup[attr];
 
       if (input_index < 0)
@@ -259,7 +259,7 @@ static void
 upload_sf_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
    uint32_t dw1, dw2, dw3, dw4;
    uint32_t point_sprite_enables;
@@ -405,7 +405,7 @@ upload_sf_state(struct brw_context *brw)
    }
 
    /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM |
-    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | CACHE_NEW_WM_PROG
+    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
     */
    uint32_t urb_entry_read_length;
    calculate_attr_overrides(brw, attr_overrides, &point_sprite_enables,
@@ -447,7 +447,7 @@ const struct brw_tracked_state gen6_sf_state = {
                BRW_NEW_GEOMETRY_PROGRAM |
                BRW_NEW_PRIMITIVE |
                BRW_NEW_VUE_MAP_GEOM_OUT,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_sf_state,
 };
index 99e9d81b207ab7482e64e60bffdd158a5048fa2e..7fb24e49c2cb9d9a9f919b73911eee09c267f395 100644 (file)
@@ -54,7 +54,7 @@ gen6_upload_urb( struct brw_context *brw )
 
    bool gs_present = brw->ff_gs.prog_active || brw->geometry_program;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    unsigned vs_size = MAX2(brw->vs.prog_data->base.urb_entry_size, 1);
 
    /* Whe using GS to do transform feedback only we use the same VUE layout for
@@ -129,9 +129,9 @@ const struct brw_tracked_state gen6_urb = {
       .mesa = 0,
       .brw = BRW_NEW_CONTEXT |
              BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = CACHE_NEW_GS_PROG |
-               CACHE_NEW_VS_PROG |
-               CACHE_NEW_FF_GS_PROG,
+      .cache = BRW_NEW_GS_PROG_DATA |
+               BRW_NEW_VS_PROG_DATA |
+               BRW_NEW_FF_GS_PROG_DATA,
    },
    .emit = gen6_upload_urb,
 };
index 573c804130122ed68b476618cf9a3779f4478e8a..100f567c6960d5c6920df56475c0e5a386fe7646 100644 (file)
@@ -130,7 +130,7 @@ gen6_upload_vs_push_constants(struct brw_context *brw)
    /* _BRW_NEW_VERTEX_PROGRAM */
    const struct brw_vertex_program *vp =
       brw_vertex_program_const(brw->vertex_program);
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    const struct brw_stage_prog_data *prog_data = &brw->vs.prog_data->base.base;
 
    gen6_upload_push_constants(brw, &vp->program.Base, prog_data,
@@ -152,7 +152,7 @@ const struct brw_tracked_state gen6_vs_push_constants = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION |
                BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = gen6_upload_vs_push_constants,
 };
@@ -266,7 +266,7 @@ const struct brw_tracked_state gen6_vs_state = {
                BRW_NEW_CONTEXT |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION |
                BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG
+      .cache = BRW_NEW_VS_PROG_DATA
    },
    .emit = upload_vs_state,
 };
index ea4e64eae015b37c05bb6e95ba321a3e343e3534..d83d4c8d2b03ba945b366795d0ebca042bd8d9c0 100644 (file)
@@ -42,7 +42,7 @@ gen6_upload_wm_push_constants(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
 
    gen6_upload_push_constants(brw, &fp->program.Base, &prog_data->base,
@@ -60,7 +60,7 @@ const struct brw_tracked_state gen6_wm_push_constants = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = gen6_upload_wm_push_constants,
 };
@@ -72,7 +72,7 @@ upload_wm_state(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
    uint32_t dw2, dw4, dw5, dw6, ksp0, ksp2;
 
@@ -164,7 +164,7 @@ upload_wm_state(struct brw_context *brw)
       ksp0 = brw->wm.base.prog_offset;
    }
 
-   /* CACHE_NEW_WM_PROG | _NEW_COLOR */
+   /* BRW_NEW_FS_PROG_DATA | _NEW_COLOR */
    if (prog_data->dual_src_blend &&
        (ctx->Color.BlendEnabled & 1) &&
        ctx->Color.Blend[0]._UsesDualSrc) {
@@ -306,7 +306,7 @@ const struct brw_tracked_state gen6_wm_state = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_PUSH_CONSTANT_ALLOCATION,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_wm_state,
 };
index 362f8733d1b25b854f36ebfa2c50b045b53753f6..820c496baf2d455470727fe3a27b70be1611aafa 100644 (file)
@@ -34,7 +34,7 @@ upload_gs_state(struct brw_context *brw)
       HSW_GS_MAX_THREADS_SHIFT : GEN6_GS_MAX_THREADS_SHIFT;
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
-   /* CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GS_PROG_DATA */
    const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
 
    /**
@@ -157,7 +157,7 @@ const struct brw_tracked_state gen7_gs_state = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_CONTEXT |
                BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = CACHE_NEW_GS_PROG
+      .cache = BRW_NEW_GS_PROG_DATA
    },
    .emit = upload_gs_state,
 };
index 1c2c04e00c2ebf4b7c44393d58997d8178462af4..ae6bf13d6cdeece1c7719de397eda65a2d9de829 100644 (file)
@@ -33,7 +33,7 @@ static void
 upload_sbe_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
    uint32_t dw1;
    uint32_t point_sprite_enables;
@@ -61,7 +61,7 @@ upload_sbe_state(struct brw_context *brw)
    dw1 |= point_sprite_origin;
 
    /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM
-    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | CACHE_NEW_WM_PROG
+    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
     */
    uint32_t urb_entry_read_length;
    calculate_attr_overrides(brw, attr_overrides, &point_sprite_enables,
@@ -96,7 +96,7 @@ const struct brw_tracked_state gen7_sbe_state = {
                BRW_NEW_GEOMETRY_PROGRAM |
                BRW_NEW_PRIMITIVE |
                BRW_NEW_VUE_MAP_GEOM_OUT,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_sbe_state,
 };
index 62b37f8591277bf74cb2bc45ccb88035209a762a..bcf20ff904c940a19e636ce49cbe84eeca1b09c8 100644 (file)
@@ -142,10 +142,10 @@ gen7_upload_urb(struct brw_context *brw)
    const int push_size_kB =
       (brw->gen >= 8 || (brw->is_haswell && brw->gt == 3)) ? 32 : 16;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    unsigned vs_size = MAX2(brw->vs.prog_data->base.urb_entry_size, 1);
    unsigned vs_entry_size_bytes = vs_size * 64;
-   /* BRW_NEW_GEOMETRY_PROGRAM, CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GEOMETRY_PROGRAM, BRW_NEW_GS_PROG_DATA */
    bool gs_present = brw->geometry_program;
    unsigned gs_size = gs_present ? brw->gs.prog_data->base.urb_entry_size : 1;
    unsigned gs_entry_size_bytes = gs_size * 64;
@@ -316,8 +316,8 @@ const struct brw_tracked_state gen7_urb = {
       .mesa = 0,
       .brw = BRW_NEW_CONTEXT |
              BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG |
-               CACHE_NEW_GS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA |
+               BRW_NEW_GS_PROG_DATA,
    },
    .emit = gen7_upload_urb,
 };
index e9144d9cd33adb3b4b4d00898e4b0c7f13830e70..1d3ac88d61c5b02e63e9765d9ac02c57ecdad38e 100644 (file)
@@ -115,7 +115,7 @@ const struct brw_tracked_state gen7_vs_state = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_CONTEXT |
                BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG
+      .cache = BRW_NEW_VS_PROG_DATA
    },
    .emit = upload_vs_state,
 };
index e966d7b04ee20c4cf1aabdd5a9ce94e7f66a9d5e..83a5152c67ac84828435330a3bfe8130d3586fc8 100644 (file)
@@ -39,7 +39,7 @@ upload_wm_state(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
    bool writes_depth = false;
    uint32_t dw1, dw2;
@@ -133,7 +133,7 @@ const struct brw_tracked_state gen7_wm_state = {
                _NEW_POLYGON,
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = upload_wm_state,
 };
@@ -146,7 +146,7 @@ upload_ps_state(struct brw_context *brw)
    const int max_threads_shift = brw->is_haswell ?
       HSW_PS_MAX_THREADS_SHIFT : IVB_PS_MAX_THREADS_SHIFT;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
 
    dw2 = dw4 = dw5 = ksp2 = 0;
@@ -203,7 +203,7 @@ upload_ps_state(struct brw_context *brw)
    else
       dw4 |= GEN7_PS_POSOFFSET_NONE;
 
-   /* CACHE_NEW_WM_PROG | _NEW_COLOR
+   /* BRW_NEW_FS_PROG_DATA | _NEW_COLOR
     *
     * The hardware wedges if you have this bit set but don't turn on any dual
     * source blend factors.
@@ -214,7 +214,7 @@ upload_ps_state(struct brw_context *brw)
       dw4 |= GEN7_PS_DUAL_SOURCE_BLEND_ENABLE;
    }
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    if (prog_data->num_varying_inputs != 0)
       dw4 |= GEN7_PS_ATTRIBUTE_ENABLE;
 
@@ -277,7 +277,7 @@ const struct brw_tracked_state gen7_ps_state = {
                _NEW_MULTISAMPLE,
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_ps_state,
 };
index 8efc7c5d4aeee6d0e5d70d750c10584638f5dae4..9a862c51f923c72645160ac926f8624afba896ec 100644 (file)
@@ -286,8 +286,8 @@ pma_fix_enable(const struct brw_context *brw)
       (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) &&
       fp->FragDepthLayout != FRAG_DEPTH_LAYOUT_UNCHANGED;
 
-   /* CACHE_NEW_WM_PROG:        3DSTATE_PS_EXTRA::PixelShaderKillsPixels
-    * CACHE_NEW_WM_PROG:        3DSTATE_PS_EXTRA::oMask Present to RenderTarget
+   /* BRW_NEW_FS_PROG_DATA:        3DSTATE_PS_EXTRA::PixelShaderKillsPixels
+    * BRW_NEW_FS_PROG_DATA:        3DSTATE_PS_EXTRA::oMask Present to RenderTarget
     * _NEW_MULTISAMPLE:         3DSTATE_PS_BLEND::AlphaToCoverageEnable
     * _NEW_COLOR:               3DSTATE_PS_BLEND::AlphaTestEnable
     *
@@ -373,7 +373,7 @@ const struct brw_tracked_state gen8_pma_fix = {
               _NEW_MULTISAMPLE |
               _NEW_STENCIL,
       .brw = BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = gen8_emit_pma_stall_workaround
 };
index c3ceee1056b61430301f440892dbe750e1ee8cc9..a189c19052ed25b74315ec01d2ad0388832fdec1 100644 (file)
@@ -235,7 +235,7 @@ const struct brw_tracked_state gen8_vertices = {
       .mesa = _NEW_POLYGON,
       .brw = BRW_NEW_BATCH |
              BRW_NEW_VERTICES,
-      .cache = CACHE_NEW_VS_PROG,
+      .cache = BRW_NEW_VS_PROG_DATA,
    },
    .emit = gen8_emit_vertices,
 };
index 1ca43a54de2ea2ffea56f1497fc7e8fd6ed026c2..2901538afea67628319ecedb20edc9a0d8344d9a 100644 (file)
@@ -33,7 +33,7 @@ gen8_upload_gs_state(struct brw_context *brw)
    const struct brw_stage_state *stage_state = &brw->gs.base;
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
-   /* CACHE_NEW_GS_PROG */
+   /* BRW_NEW_GS_PROG_DATA */
    const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
 
    if (active) {
@@ -123,7 +123,7 @@ const struct brw_tracked_state gen8_gs_state = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_CONTEXT |
                BRW_NEW_GEOMETRY_PROGRAM,
-      .cache = CACHE_NEW_GS_PROG
+      .cache = BRW_NEW_GS_PROG_DATA
    },
    .emit = gen8_upload_gs_state,
 };
index ff2c9a9223486dbd19d324693a070cbb486d6114..24e19d411a4cfbb42c820236d5e91be5b6ddc3b5 100644 (file)
@@ -34,7 +34,7 @@ upload_ps_extra(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
    uint32_t dw1 = 0;
 
@@ -90,7 +90,7 @@ const struct brw_tracked_state gen8_ps_extra = {
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_NUM_SAMPLES,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = upload_ps_extra,
 };
@@ -114,7 +114,7 @@ upload_wm_state(struct brw_context *brw)
    if (ctx->Polygon.StippleFlag)
       dw1 |= GEN7_WM_POLYGON_STIPPLE_ENABLE;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    dw1 |= brw->wm.prog_data->barycentric_interp_modes <<
       GEN7_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT;
 
@@ -129,7 +129,7 @@ const struct brw_tracked_state gen8_wm_state = {
       .mesa  = _NEW_LINE |
                _NEW_POLYGON,
       .brw   = BRW_NEW_CONTEXT,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = upload_wm_state,
 };
@@ -140,7 +140,7 @@ upload_ps_state(struct brw_context *brw)
    struct gl_context *ctx = &brw->ctx;
    uint32_t dw3 = 0, dw6 = 0, dw7 = 0, ksp0, ksp2 = 0;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    const struct brw_wm_prog_data *prog_data = brw->wm.prog_data;
 
    /* Initialize the execution mask with VMask.  Otherwise, derivatives are
@@ -152,7 +152,7 @@ upload_ps_state(struct brw_context *brw)
    dw3 |=
       (ALIGN(brw->wm.base.sampler_count, 4) / 4) << GEN7_PS_SAMPLER_COUNT_SHIFT;
 
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    dw3 |=
       ((prog_data->base.binding_table.size_bytes / 4) <<
        GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT);
@@ -253,7 +253,7 @@ const struct brw_tracked_state gen8_ps_state = {
       .mesa  = _NEW_MULTISAMPLE,
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = CACHE_NEW_WM_PROG
+      .cache = BRW_NEW_FS_PROG_DATA
    },
    .emit = upload_ps_state,
 };
index ff0081bb9b857d4e55d9ef09b028cfa1dcf204bd..edeab1e6d752709898d57798c11ceb546fad98f0 100644 (file)
@@ -33,7 +33,7 @@ static void
 upload_sbe(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
-   /* CACHE_NEW_WM_PROG */
+   /* BRW_NEW_FS_PROG_DATA */
    uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
    uint16_t attr_overrides[VARYING_SLOT_MAX];
    uint32_t urb_entry_read_length;
@@ -61,7 +61,7 @@ upload_sbe(struct brw_context *brw)
       dw1 |= GEN6_SF_POINT_SPRITE_UPPERLEFT;
 
    /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM |
-    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | CACHE_NEW_WM_PROG
+    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
     */
    calculate_attr_overrides(brw, attr_overrides,
                             &point_sprite_enables,
@@ -134,7 +134,7 @@ const struct brw_tracked_state gen8_sbe_state = {
       .brw   = BRW_NEW_CONTEXT |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_VUE_MAP_GEOM_OUT,
-      .cache = CACHE_NEW_WM_PROG,
+      .cache = BRW_NEW_FS_PROG_DATA,
    },
    .emit = upload_sbe,
 };
index 63d2294684b524b227a0a22133caceb659342f49..cc13fc6d1284e996607047ff31472564e77f0a65 100644 (file)
@@ -36,7 +36,7 @@ upload_vs_state(struct brw_context *brw)
    const struct brw_stage_state *stage_state = &brw->vs.base;
    uint32_t floating_point_mode = 0;
 
-   /* CACHE_NEW_VS_PROG */
+   /* BRW_NEW_VS_PROG_DATA */
    const struct brw_vec4_prog_data *prog_data = &brw->vs.prog_data->base;
 
    /* Use ALT floating point mode for ARB vertex programs, because they
@@ -85,7 +85,7 @@ const struct brw_tracked_state gen8_vs_state = {
       .brw   = BRW_NEW_BATCH |
                BRW_NEW_CONTEXT |
                BRW_NEW_VERTEX_PROGRAM,
-      .cache = CACHE_NEW_VS_PROG
+      .cache = BRW_NEW_VS_PROG_DATA
    },
    .emit = upload_vs_state,
 };