Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
opencl_drivers_blacklist.h
Go to the documentation of this file.
1
/*
2
This file is part of darktable,
3
Copyright (C) 2010 Henrik Andersson.
4
Copyright (C) 2010 Stuart Henderson.
5
Copyright (C) 2011-2012 johannes hanika.
6
Copyright (C) 2012 Richard Wonka.
7
Copyright (C) 2014, 2016 Tobias Ellinghaus.
8
Copyright (C) 2016 Roman Lebedev.
9
Copyright (C) 2019 Andy Dodd.
10
Copyright (C) 2019-2020 Pascal Obry.
11
Copyright (C) 2022 Hanno Schwalm.
12
Copyright (C) 2022 Martin Bařinka.
13
Copyright (C) 2023, 2025 Aurélien PIERRE.
14
15
darktable is free software: you can redistribute it and/or modify
16
it under the terms of the GNU General Public License as published by
17
the Free Software Foundation, either version 3 of the License, or
18
(at your option) any later version.
19
20
darktable is distributed in the hope that it will be useful,
21
but WITHOUT ANY WARRANTY; without even the implied warranty of
22
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
GNU General Public License for more details.
24
25
You should have received a copy of the GNU General Public License
26
along with darktable. If not, see <http://www.gnu.org/licenses/>.
27
*/
28
29
#ifndef DT_SYSTEM_OPENCL_DRIVERS_BLACKLIST_H
30
#define DT_SYSTEM_OPENCL_DRIVERS_BLACKLIST_H
31
32
#include <string.h>
33
34
// FIXME: in the future, we may want to also take DRIVER_VERSION into account
35
static
const
gchar *
bad_opencl_drivers
[] =
36
{
37
// clang-format off
38
39
"beignet"
,
40
"pocl"
,
41
NULL
42
43
// clang-format on
44
};
45
46
// returns TRUE if blacklisted
47
static
gboolean
dt_opencl_check_driver_blacklist
(
const
char
*device_version)
48
{
49
gchar *device = g_ascii_strdown(device_version, -1);
50
51
for
(
int
i
= 0;
bad_opencl_drivers
[
i
];
i
++)
52
{
53
if
(!g_strrstr(device,
bad_opencl_drivers
[
i
]))
continue
;
54
55
// oops, found in black list
56
dt_free
(device);
57
return
TRUE
;
58
}
59
60
// did not find in the black list, guess it's ok.
61
dt_free
(device);
62
return
FALSE
;
63
}
64
65
#endif
// DT_SYSTEM_OPENCL_DRIVERS_BLACKLIST_H
66
67
// clang-format off
68
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
69
// vim: shiftwidth=2 expandtab tabstop=2 cindent
70
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
71
// clang-format on
TRUE
#define TRUE
Definition
ashift_lsd.c:162
FALSE
#define FALSE
Definition
ashift_lsd.c:158
i
const float i
Definition
colorspaces_inline_conversions.h:441
dt_free
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
Definition
mem_alloc.h:171
dt_opencl_check_driver_blacklist
static gboolean dt_opencl_check_driver_blacklist(const char *device_version)
Definition
opencl_drivers_blacklist.h:47
bad_opencl_drivers
static const gchar * bad_opencl_drivers[]
Definition
opencl_drivers_blacklist.h:35
src
system
opencl_drivers_blacklist.h
Generated by
1.9.8