summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-05-27 16:01:00 -0700
committerEric Anholt <[email protected]>2015-05-27 17:29:11 -0700
commitb0edc19a521853371a63e9ffbc519424c8f82942 (patch)
tree519e55a1c4c252b8bf64b26576ac28556740ec1f /src/gallium/drivers/vc4
parent41630c0653578db0c237296aaeec0a85a4e7f4ad (diff)
vc4: Don't forget to make our raster shadow textures non-raster.
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).
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
index 80e963ea2ee..7875eff0325 100644
--- a/src/gallium/drivers/vc4/vc4_state.c
+++ b/src/gallium/drivers/vc4/vc4_state.c
@@ -538,6 +538,7 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
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;
@@ -547,6 +548,8 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
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;