summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Moreau <[email protected]>2019-01-30 18:38:18 +0100
committerKarol Herbst <[email protected]>2019-02-26 21:02:07 +0100
commit5285fff5f9681992a1660d34d2369c03701776b5 (patch)
treea0335e80fb2381577e11b2abddacd759c772d843
parent8f9b4a2be673c6b398caa62149828013a81039e4 (diff)
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 <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r--src/gallium/state_trackers/clover/core/device.cpp3
1 files changed, 2 insertions, 1 deletions
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);