rusticl/device: Verify for PIPE_CAP_CL_GL_SHARING when enabling gl_sharing

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 <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
This commit is contained in:
Antonio Gomes 2023-11-06 12:34:19 -03:00 committed by Marge Bot
parent d43f9f9c60
commit 38ffdb883d

View file

@ -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()