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 <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
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);