Переглянути джерело

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 <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
tags/19.1-branchpoint
Pierre Moreau 6 роки тому
джерело
коміт
5285fff5f9

+ 2
- 1
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);

Завантаження…
Відмінити
Зберегти