From d70eb2302b0594c2d097fd857a8bf83f45d05ddc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Jan 2019 12:47:02 -0800 Subject: 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.") --- src/gallium/drivers/v3d/v3d_resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium') 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", -- cgit v1.2.3