From 5285fff5f9681992a1660d34d2369c03701776b5 Mon Sep 17 00:00:00 2001 From: Pierre Moreau Date: Wed, 30 Jan 2019 18:38:18 +0100 Subject: [PATCH] clover: Only use devices supporting IR_NATIVE Currently clover will advertise any device that advertises PIPE_CAP_COMPUTE, even if they do not support PIPE_SHADER_IR_NATIVE, which is the IR used internally by clover. This avoids clover advertising devices as available even though they actually are not supported. Reviewed-by: Karol Herbst Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/core/device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 0c02039eba7..de635454857 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -45,7 +45,8 @@ namespace { device::device(clover::platform &platform, pipe_loader_device *ldev) : platform(platform), ldev(ldev) { pipe = pipe_loader_create_screen(ldev); - if (!pipe || !pipe->get_param(pipe, PIPE_CAP_COMPUTE)) { + if (!pipe || !pipe->get_param(pipe, PIPE_CAP_COMPUTE) || + !supports_ir(PIPE_SHADER_IR_NATIVE)) { if (pipe) pipe->destroy(pipe); throw error(CL_INVALID_DEVICE); -- 2.30.2