From 383508cb9fe6c220f25788d3a19f99b2d22d7ecd Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 3 Oct 2025 14:57:27 -0700 Subject: [PATCH] freedreno/a6xx: Drop arbitrary import restrictions As long as fdl is happy to layout the imported buffer type, we shouldn't restrict it further. The cl_gl_sharing extends import/export beyond winsys buffers, and these restrictions were getting in the way. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_resource.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc index bf1ca27d288..956a07d9d4d 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc @@ -118,15 +118,7 @@ ok_ubwc_format(struct pipe_screen *pscreen, enum pipe_format pfmt, unsigned nr_s static bool can_do_ubwc(struct pipe_resource *prsc) { - /* limit things to simple single level 2d for now: */ - if ((prsc->depth0 != 1) || (prsc->array_size != 1) || - (prsc->last_level != 0)) - return false; - if (prsc->target != PIPE_TEXTURE_2D) - return false; - if (!ok_ubwc_format(prsc->screen, prsc->format, prsc->nr_samples)) - return false; - return true; + return ok_ubwc_format(prsc->screen, prsc->format, prsc->nr_samples); } static bool