i965: Perform program state upload outside of atom handling
[mesa.git] / src / mesa / drivers / dri / i965 / brw_state.h
index f195407e88279d8b41a732a4e4752798f9a837e0..71210b9410c01e8d9a52d89653505f276a7cb3b5 100644 (file)
@@ -152,6 +152,13 @@ extern const struct brw_tracked_state gen8_vertices;
 extern const struct brw_tracked_state gen8_vf_topology;
 extern const struct brw_tracked_state gen8_vs_state;
 
+static inline bool
+brw_state_dirty(struct brw_context *brw, GLuint mesa_flags, uint64_t brw_flags)
+{
+   return ((brw->state.dirty.mesa & mesa_flags) |
+           (brw->state.dirty.brw & brw_flags)) != 0;
+}
+
 /* brw_misc_state.c */
 void brw_upload_invariant_state(struct brw_context *brw);
 uint32_t