svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM, flags);
ss->texture_timestamp++;
- tex->view_age[transfer->level] = ++(tex->age);
+ svga_age_texture_view(tex, transfer->level);
if (transfer->resource->target == PIPE_TEXTURE_CUBE)
tex->defined[transfer->box.z][transfer->level] = TRUE;
else
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
#include "util/u_inlines.h"
+#include "util/u_memory.h"
#include "util/u_transfer.h"
#include "svga_screen_cache.h"
}
+/**
+ * Increment the age of a view into a texture
+ * This is used to track updates to textures when we draw into
+ * them via a surface.
+ */
+static INLINE void
+svga_age_texture_view(struct svga_texture *tex, unsigned level)
+{
+ assert(level < Elements(tex->view_age));
+ tex->view_age[level] = ++(tex->age);
+}
+
struct pipe_resource *
svga_texture_create(struct pipe_screen *screen,