+static inline void
+svga_set_texture_dirty(struct svga_texture *tex,
+ unsigned face, unsigned level)
+{
+ check_face_level(tex, face, level);
+ tex->dirty[face] |= 1 << level;
+}
+
+static inline void
+svga_clear_texture_dirty(struct svga_texture *tex)
+{
+ unsigned i;
+ for (i = 0; i < tex->b.b.depth0 * tex->b.b.array_size; i++) {
+ tex->dirty[i] = 0;
+ }
+}
+
+static inline boolean
+svga_is_texture_dirty(const struct svga_texture *tex,
+ unsigned face, unsigned level)
+{
+ check_face_level(tex, face, level);
+ return !!(tex->dirty[face] & (1 << level));
+}