v3d: SHARED but not necessarily SCANOUT buffers on RO must be linear.
authorEric Anholt <eric@anholt.net>
Mon, 14 Jan 2019 18:39:43 +0000 (10:39 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 14 Jan 2019 23:40:55 +0000 (15:40 -0800)
We don't have a way to talk to RO about modifiers it can do yet, so assume
the minimum.

src/gallium/drivers/v3d/v3d_resource.c

index fba1661cd3f8b55d2b661ea3551366a10f474298..d95abaa8fd4d8af0da0624787b76108a71f8a1ff 100644 (file)
@@ -764,7 +764,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,
          * the modifiers to see if we're allocating a scanout object.
          */
         if (screen->ro &&
-            ((tmpl->bind & PIPE_BIND_SCANOUT) ||
+            ((tmpl->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_SHARED)) ||
              (count == 1 && modifiers[0] == DRM_FORMAT_MOD_LINEAR))) {
                 struct winsys_handle handle;
                 rsc->scanout =