Mesa (master): freedreno: allow INVALID modifier

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 13 19:33:07 UTC 2020


Module: Mesa
Branch: master
Commit: 334788d4cc9bb8a0a6b3166e609638687efa0f3f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=334788d4cc9bb8a0a6b3166e609638687efa0f3f

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Feb 13 10:26:08 2020 -0800

freedreno: allow INVALID modifier

Re-allow INVALID modifier in import path.  The legacy import path
(createImageFromFds()), which is used by android, uses the INVALID
modifier.  Previously we would ignore this and just setup the imported
buffer as linear.  Restore this behavior to unbreak the legacy import
path.

Fixes: 9891062642a freedreno/a6xx: Implement layout for DRM_FORMAT_MOD_QCOM_COMPRESSED
Signed-off-by: Rob Clark <robdclark at chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3817>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3817>

---

 src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
index 2018c3afdd9..30a42ea557e 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c
@@ -199,6 +199,7 @@ fd6_layout_resource_for_modifier(struct fd_resource *rsc, uint64_t modifier)
 	case DRM_FORMAT_MOD_QCOM_COMPRESSED:
 		return fill_ubwc_buffer_sizes(rsc);
 	case DRM_FORMAT_MOD_LINEAR:
+	case DRM_FORMAT_MOD_INVALID:
 		return 0;
 	default:
 		return -1;



More information about the mesa-commit mailing list