ralloc_free(mem_ctx);
}
+static bool
+brw_ff_gs_state_dirty(struct brw_context *brw)
+{
+ return brw_state_dirty(brw,
+ _NEW_LIGHT,
+ BRW_NEW_PRIMITIVE |
+ BRW_NEW_TRANSFORM_FEEDBACK |
+ BRW_NEW_VS_PROG_DATA);
+}
+
static void
brw_ff_gs_populate_key(struct brw_context *brw,
struct brw_ff_gs_prog_key *key)
{
struct brw_ff_gs_prog_key key;
- if (!brw_state_dirty(brw,
- _NEW_LIGHT,
- BRW_NEW_PRIMITIVE |
- BRW_NEW_TRANSFORM_FEEDBACK |
- BRW_NEW_VS_PROG_DATA))
+ if (!brw_ff_gs_state_dirty(brw))
return;
/* Populate the key:
return true;
}
+static bool
+brw_gs_state_dirty(struct brw_context *brw)
+{
+ return brw_state_dirty(brw,
+ _NEW_TEXTURE,
+ BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_TRANSFORM_FEEDBACK |
+ BRW_NEW_VUE_MAP_VS);
+}
+
static void
brw_gs_populate_key(struct brw_context *brw,
struct brw_gs_prog_key *key)
struct brw_geometry_program *gp =
(struct brw_geometry_program *) brw->geometry_program;
- if (!brw_state_dirty(brw,
- _NEW_TEXTURE,
- BRW_NEW_GEOMETRY_PROGRAM |
- BRW_NEW_TRANSFORM_FEEDBACK |
- BRW_NEW_VUE_MAP_VS))
+ if (!brw_gs_state_dirty(brw))
return;
if (gp == NULL) {
}
}
+static bool
+brw_vs_state_dirty(struct brw_context *brw)
+{
+ return brw_state_dirty(brw,
+ _NEW_BUFFERS |
+ _NEW_LIGHT |
+ _NEW_POINT |
+ _NEW_POLYGON |
+ _NEW_TEXTURE |
+ _NEW_TRANSFORM,
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_VS_ATTRIB_WORKAROUNDS);
+}
+
static void
brw_vs_populate_key(struct brw_context *brw,
struct brw_vs_prog_key *key)
struct brw_vertex_program *vp =
(struct brw_vertex_program *)brw->vertex_program;
- if (!brw_state_dirty(brw,
- _NEW_BUFFERS |
- _NEW_LIGHT |
- _NEW_POINT |
- _NEW_POLYGON |
- _NEW_TEXTURE |
- _NEW_TRANSFORM,
- BRW_NEW_VERTEX_PROGRAM |
- BRW_NEW_VS_ATTRIB_WORKAROUNDS))
+ if (!brw_vs_state_dirty(brw))
return;
brw_vs_populate_key(brw, &key);
}
}
+static bool
+brw_wm_state_dirty (struct brw_context *brw)
+{
+ return brw_state_dirty(brw,
+ _NEW_BUFFERS |
+ _NEW_COLOR |
+ _NEW_DEPTH |
+ _NEW_FRAG_CLAMP |
+ _NEW_HINT |
+ _NEW_LIGHT |
+ _NEW_LINE |
+ _NEW_MULTISAMPLE |
+ _NEW_POLYGON |
+ _NEW_STENCIL |
+ _NEW_TEXTURE,
+ BRW_NEW_FRAGMENT_PROGRAM |
+ BRW_NEW_REDUCED_PRIMITIVE |
+ BRW_NEW_STATS_WM |
+ BRW_NEW_VUE_MAP_GEOM_OUT);
+}
+
static void brw_wm_populate_key( struct brw_context *brw,
struct brw_wm_prog_key *key )
{
struct brw_fragment_program *fp = (struct brw_fragment_program *)
brw->fragment_program;
- if (!brw_state_dirty(brw,
- _NEW_BUFFERS |
- _NEW_COLOR |
- _NEW_DEPTH |
- _NEW_FRAG_CLAMP |
- _NEW_HINT |
- _NEW_LIGHT |
- _NEW_LINE |
- _NEW_MULTISAMPLE |
- _NEW_POLYGON |
- _NEW_STENCIL |
- _NEW_TEXTURE,
- BRW_NEW_FRAGMENT_PROGRAM |
- BRW_NEW_REDUCED_PRIMITIVE |
- BRW_NEW_STATS_WM |
- BRW_NEW_VUE_MAP_GEOM_OUT))
+ if (!brw_wm_state_dirty(brw))
return;
brw_wm_populate_key(brw, &key);