From: Eric Anholt Date: Tue, 15 Jan 2019 20:47:02 +0000 (-0800) Subject: v3d: If the modifier is not known on BO import, default to linear for RO. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d70eb2302b0594c2d097fd857a8bf83f45d05ddc;p=mesa.git v3d: If the modifier is not known on BO import, default to linear for RO. Part of fixing DRI3 rendering with RO on X11. Fixes: e113b21cb779 ("v3d: Add renderonly support.") --- diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c index d95abaa8fd4..c0688d60cee 100644 --- a/src/gallium/drivers/v3d/v3d_resource.c +++ b/src/gallium/drivers/v3d/v3d_resource.c @@ -814,9 +814,11 @@ v3d_resource_from_handle(struct pipe_screen *pscreen, rsc->tiled = false; break; case DRM_FORMAT_MOD_BROADCOM_UIF: - case DRM_FORMAT_MOD_INVALID: rsc->tiled = true; break; + case DRM_FORMAT_MOD_INVALID: + rsc->tiled = screen->ro == NULL; + break; default: fprintf(stderr, "Attempt to import unsupported modifier 0x%llx\n",