if (flag_diff & XA_FLAG_RENDER_TARGET)
return ((new_flags & XA_FLAG_RENDER_TARGET) == 0);
+ /*
+ * Don't recreate if we're dropping the scanout flag.
+ */
+ if (flag_diff & XA_FLAG_SCANOUT)
+ return ((new_flags & XA_FLAG_SCANOUT) == 0);
+
/*
* Always recreate for unknown / unimplemented flags.
*/
bind |= PIPE_BIND_SHARED;
if (flags & XA_FLAG_RENDER_TARGET)
bind |= PIPE_BIND_RENDER_TARGET;
+ if (flags & XA_FLAG_SCANOUT)
+ bind |= PIPE_BIND_SCANOUT;
if (!xa->screen->is_format_supported(xa->screen, fdesc.format,
PIPE_TEXTURE_2D, 0, bind))
template->bind |= PIPE_BIND_SHARED;
if (flags & XA_FLAG_RENDER_TARGET)
template->bind |= PIPE_BIND_RENDER_TARGET;
+ if (flags & XA_FLAG_SCANOUT)
+ template->bind |= PIPE_BIND_SCANOUT;
srf->tex = xa->screen->resource_create(xa->screen, template);
if (!srf->tex)
template->bind |= PIPE_BIND_SHARED;
if (new_flags & XA_FLAG_RENDER_TARGET)
template->bind |= PIPE_BIND_RENDER_TARGET;
+ if (new_flags & XA_FLAG_SCANOUT)
+ template->bind |= PIPE_BIND_SCANOUT;
if (copy_contents) {
if (!xa_format_type_is_color(fdesc.xa_format) ||
#include <stdint.h>
#define XA_TRACKER_VERSION_MAJOR 0
-#define XA_TRACKER_VERSION_MINOR 4
+#define XA_TRACKER_VERSION_MINOR 5
#define XA_TRACKER_VERSION_PATCH 0
#define XA_FLAG_SHARED (1 << 0)
#define XA_FLAG_RENDER_TARGET (1 << 1)
+#define XA_FLAG_SCANOUT (1 << 2)
#define XA_MAP_READ (1 << 0)
#define XA_MAP_WRITE (1 << 1)