freedreno: don't try to shadow layered textures
authorRob Clark <robdclark@gmail.com>
Fri, 7 Oct 2016 15:59:28 +0000 (11:59 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 7 Oct 2016 19:50:46 +0000 (15:50 -0400)
We will only hit this with multi-planar YUV external images, so we would
probably never hit this code path in the first place.  But if we did, it
wouldn't do the right thing so just bail.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index addfc405695f6fc2a32173759d1e707b8a6a6a8c..5a21ca44e30ea7fb337fb905220fb1884bda9129 100644 (file)
@@ -133,6 +133,9 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
        struct pipe_resource *prsc = &rsc->base.b;
        bool fallback = false;
 
+       if (prsc->next)
+               return false;
+
        /* TODO: somehow munge dimensions and format to copy unsupported
         * render target format to something that is supported?
         */