Not sure what happened in my testing that made the previous shadow
code fix glxgears swapbuffering, but this also fixes lots of CopyArea
in X (like dragging xlogo around in metacity).
struct pipe_resource tmpl = shadow_parent->base.b;
struct vc4_resource *clone;
+ tmpl.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
tmpl.width0 = u_minify(tmpl.width0, so->u.tex.first_level);
tmpl.height0 = u_minify(tmpl.height0, so->u.tex.first_level);
tmpl.last_level = so->u.tex.last_level - so->u.tex.first_level;
clone->shadow_parent = &shadow_parent->base.b;
/* Flag it as needing update of the contents from the parent. */
clone->writes = shadow_parent->writes - 1;
+
+ assert(clone->vc4_format != VC4_TEXTURE_TYPE_RGBA32R);
}
so->texture = prsc;
so->reference.count = 1;