From 38ffdb883df97db7c916a8122ccf65b9ab261c41 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Mon, 6 Nov 2023 12:34:19 -0300 Subject: [PATCH] rusticl/device: Verify for PIPE_CAP_CL_GL_SHARING when enabling gl_sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think it's better to keep the other checks (check for dmabuf, uuid, ...) as we can use them to know the features required. Reviewed-by: Karol Herbst Reviewed-by: Marek Olšák Part-of: --- src/gallium/frontends/rusticl/core/device.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index da422cde928..6df7593fc27 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -725,7 +725,8 @@ impl Device { } pub fn is_gl_sharing_supported(&self) -> bool { - self.screen.param(pipe_cap::PIPE_CAP_DMABUF) != 0 + self.screen.param(pipe_cap::PIPE_CAP_CL_GL_SHARING) != 0 + && self.screen.param(pipe_cap::PIPE_CAP_DMABUF) != 0 && !self.is_device_software() && self.screen.is_res_handle_supported() && self.screen.device_uuid().is_some()