tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
vulkan-loader: 1.0.39.1 -> 1.0.42.2
ralith.com
9 years ago
20196092
d9b36c36
+15
-425
6 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
glslang
default.nix
install-headers.patch
libraries
vulkan-loader
default.nix
fallback-paths.patch
use-xdg-paths.patch
tools
spirv-tools
default.nix
+5
-6
pkgs/development/compilers/glslang/default.nix
···
2
2
3
3
stdenv.mkDerivation rec {
4
4
name = "glslang-git-${version}";
5
5
-
version = "2016-12-21";
5
5
+
version = "2017-03-29";
6
6
7
7
# `vulkan-loader` requires a specific version of `glslang` as specified in
8
8
-
# `<vulkan-loader-repo>/glslang_revision`.
8
8
+
# `<vulkan-loader-repo>/external_revisions/glslang_revision`.
9
9
src = fetchFromGitHub {
10
10
owner = "KhronosGroup";
11
11
repo = "glslang";
12
12
-
rev = "807a0d9e2f4e176f75d62ac3c179c81800ec2608";
13
13
-
sha256 = "02jckgihqhagm73glipb4c6ri5fr3pnbxb5vrznn2vppyfdfghbj";
12
12
+
rev = "714e58b2fc5a45714596e6aa2f6ac8f64260365c";
13
13
+
sha256 = "0ihnd0c4mr6ppbv9g7z1abrn8vx66simfzx5q48nqcpnywn35jxv";
14
14
};
15
15
-
16
16
-
patches = [ ./install-headers.patch ];
17
15
18
16
buildInputs = [ cmake bison ];
19
17
enableParallelBuilding = true;
···
23
21
description = "Khronos reference front-end for GLSL and ESSL";
24
22
license = licenses.asl20;
25
23
platforms = platforms.linux;
24
24
+
maintainers = [ maintainers.ralith ];
26
25
};
27
26
}
-35
pkgs/development/compilers/glslang/install-headers.patch
···
1
1
-
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
2
2
-
index c538e84..6ece1ab 100755
3
3
-
--- a/SPIRV/CMakeLists.txt
4
4
-
+++ b/SPIRV/CMakeLists.txt
5
5
-
@@ -34,8 +34,9 @@ if(ENABLE_AMD_EXTENSIONS)
6
6
-
endif(ENABLE_AMD_EXTENSIONS)
7
7
-
8
8
-
if(ENABLE_NV_EXTENSIONS)
9
9
-
- set(HEADERS
10
10
-
- GLSL.ext.NV.h)
11
11
-
+ list(APPEND
12
12
-
+ HEADERS
13
13
-
+ GLSL.ext.NV.h)
14
14
-
endif(ENABLE_NV_EXTENSIONS)
15
15
-
16
16
-
add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
17
17
-
@@ -51,3 +52,5 @@ endif(WIN32)
18
18
-
19
19
-
install(TARGETS SPIRV SPVRemapper
20
20
-
ARCHIVE DESTINATION lib)
21
21
-
+
22
22
-
+install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION include/SPIRV/)
23
23
-
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
24
24
-
index 95d4bdd..e7fda90 100644
25
25
-
--- a/glslang/CMakeLists.txt
26
26
-
+++ b/glslang/CMakeLists.txt
27
27
-
@@ -93,3 +93,8 @@ endif(WIN32)
28
28
-
29
29
-
install(TARGETS glslang
30
30
-
ARCHIVE DESTINATION lib)
31
31
-
+
32
32
-
+foreach(file ${HEADERS})
33
33
-
+ get_filename_component(dir ${file} DIRECTORY)
34
34
-
+ install(FILES ${file} DESTINATION include/glslang/${dir})
35
35
-
+endforeach()
+3
-4
pkgs/development/libraries/vulkan-loader/default.nix
···
3
3
libXext, wayland, mesa_noglu }:
4
4
5
5
let
6
6
-
version = "1.0.39.1";
6
6
+
version = "1.0.42.2";
7
7
src = fetchFromGitHub {
8
8
owner = "KhronosGroup";
9
9
repo = "Vulkan-LoaderAndValidationLayers";
10
10
rev = "sdk-${version}";
11
11
-
sha256 = "0y9zzrnjjjza2kkf5jfsdqhn98md6rsq0hb7jg62z2dipzky7zdp";
11
11
+
sha256 = "0na1ax2cgv6w29213mby56mndfsj3iizj3n5pbpy4s4p7ij9kdgn";
12
12
};
13
13
in
14
14
···
25
25
"-DBUILD_WSI_MIR_SUPPORT=OFF"
26
26
"-DFALLBACK_DATA_DIRS=${mesa_noglu.driverLink}/share:/usr/local/share:/usr/share"
27
27
];
28
28
-
29
29
-
patches = [ ./use-xdg-paths.patch ./fallback-paths.patch ];
30
28
31
29
outputs = [ "out" "dev" "demos" ];
32
30
···
59
57
homepage = "http://www.lunarg.com";
60
58
platforms = platforms.linux;
61
59
license = licenses.asl20;
60
60
+
maintainers = [ maintainers.ralith ];
62
61
};
63
62
}
-52
pkgs/development/libraries/vulkan-loader/fallback-paths.patch
···
1
1
-
commit a59b141559a8c1813da438b97e5f79eeb6cc7642
2
2
-
Author: Benjamin Saunders <ben.e.saunders@gmail.com>
3
3
-
Date: Sun Feb 19 11:14:24 2017 -0800
4
4
-
5
5
-
loader: Configurable fallback search paths
6
6
-
7
7
-
This makes it easier for non-FHS distributions to behave well when the loader
8
8
-
is used by a SUID process or in an otherwise unusual environment.
9
9
-
10
10
-
diff --git a/CMakeLists.txt b/CMakeLists.txt
11
11
-
index a43d264..d28b3f5 100644
12
12
-
--- a/CMakeLists.txt
13
13
-
+++ b/CMakeLists.txt
14
14
-
@@ -16,6 +16,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
15
15
-
find_package(PythonInterp 3 REQUIRED)
16
16
-
17
17
-
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
18
18
-
+ set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING
19
19
-
+ "Search path to use when XDG_CONFIG_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")
20
20
-
+ set(FALLBACK_DATA_DIRS "/usr/local/share:/usr/share" CACHE STRING
21
21
-
+ "Search path to use when XDG_DATA_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")
22
22
-
+
23
23
-
include(FindPkgConfig)
24
24
-
option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
25
25
-
option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
26
26
-
@@ -285,7 +290,10 @@ run_vk_xml_generate(dispatch_table_generator.py vk_dispatch_table_helper.h)
27
27
-
if(NOT WIN32)
28
28
-
include(GNUInstallDirs)
29
29
-
30
30
-
+ add_definitions(-DFALLBACK_CONFIG_DIRS="${FALLBACK_CONFIG_DIRS}")
31
31
-
+ add_definitions(-DFALLBACK_DATA_DIRS="${FALLBACK_DATA_DIRS}")
32
32
-
add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
33
33
-
+
34
34
-
# Make sure /etc is searched by the loader
35
35
-
if(NOT (CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc"))
36
36
-
add_definitions(-DEXTRASYSCONFDIR="/etc")
37
37
-
diff --git a/loader/loader.c b/loader/loader.c
38
38
-
index 81c37c4..83378eb 100644
39
39
-
--- a/loader/loader.c
40
40
-
+++ b/loader/loader.c
41
41
-
@@ -2644,9 +2644,9 @@ static VkResult loader_get_manifest_files(const struct loader_instance *inst, co
42
42
-
const char *xdgconfdirs = secure_getenv("XDG_CONFIG_DIRS");
43
43
-
const char *xdgdatadirs = secure_getenv("XDG_DATA_DIRS");
44
44
-
if (xdgconfdirs == NULL || xdgconfdirs[0] == '\0')
45
45
-
- xdgconfdirs = "/etc/xdg";
46
46
-
+ xdgconfdirs = FALLBACK_CONFIG_DIRS;
47
47
-
if (xdgdatadirs == NULL || xdgdatadirs[0] == '\0')
48
48
-
- xdgdatadirs = "/usr/local/share:/usr/share";
49
49
-
+ xdgdatadirs = FALLBACK_DATA_DIRS;
50
50
-
const size_t rel_size = strlen(relative_location);
51
51
-
// Leave space for trailing separators
52
52
-
loc_size += strlen(xdgconfdirs) + strlen(xdgdatadirs) + 2*rel_size + 2;
-322
pkgs/development/libraries/vulkan-loader/use-xdg-paths.patch
···
1
1
-
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
-
index 27ab6e5..e59256e 100644
3
3
-
--- a/CMakeLists.txt
4
4
-
+++ b/CMakeLists.txt
5
5
-
@@ -256,17 +256,10 @@ if(NOT WIN32)
6
6
-
include(GNUInstallDirs)
7
7
-
8
8
-
add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
9
9
-
- add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
10
10
-
-
11
11
-
# Make sure /etc is searched by the loader
12
12
-
- if (NOT (CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc"))
13
13
-
+ if(NOT (CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc"))
14
14
-
add_definitions(-DEXTRASYSCONFDIR="/etc")
15
15
-
endif()
16
16
-
-
17
17
-
- # Make sure /usr/share is searched by the loader
18
18
-
- if (NOT (CMAKE_INSTALL_FULL_DATADIR STREQUAL "/usr/share"))
19
19
-
- add_definitions(-DEXTRADATADIR="/usr/share")
20
20
-
- endif()
21
21
-
endif()
22
22
-
23
23
-
if(UNIX)
24
24
-
diff --git a/loader/loader.c b/loader/loader.c
25
25
-
index 24758f4..af7cc85 100644
26
26
-
--- a/loader/loader.c
27
27
-
+++ b/loader/loader.c
28
28
-
@@ -2909,7 +2909,7 @@ static VkResult
29
29
-
loader_get_manifest_files(const struct loader_instance *inst,
30
30
-
const char *env_override, const char *source_override,
31
31
-
bool is_layer, bool warn_if_not_present,
32
32
-
- const char *location, const char *home_location,
33
33
-
+ const char *location, const char *relative_location,
34
34
-
struct loader_manifest_files *out_files) {
35
35
-
const char * override = NULL;
36
36
-
char *override_getenv = NULL;
37
37
-
@@ -2941,9 +2941,9 @@ loader_get_manifest_files(const struct loader_instance *inst,
38
38
-
}
39
39
-
40
40
-
#if !defined(_WIN32)
41
41
-
- if (location == NULL && home_location == NULL) {
42
42
-
+ if (location == NULL && relative_location == NULL) {
43
43
-
#else
44
44
-
- home_location = NULL;
45
45
-
+ relative_location = NULL;
46
46
-
if (location == NULL) {
47
47
-
#endif
48
48
-
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
49
49
-
@@ -2962,16 +2962,89 @@ loader_get_manifest_files(const struct loader_instance *inst,
50
50
-
// Make a copy of the input we are using so it is not modified
51
51
-
// Also handle getting the location(s) from registry on Windows
52
52
-
if (override == NULL) {
53
53
-
- loc = loader_stack_alloc(strlen(location) + 1);
54
54
-
+ size_t loc_size = strlen(location) + 1;
55
55
-
+#if !defined(_WIN32)
56
56
-
+ const char *xdgconfdirs = secure_getenv("XDG_CONFIG_DIRS");
57
57
-
+ const char *xdgdatadirs = secure_getenv("XDG_DATA_DIRS");
58
58
-
+ if (xdgconfdirs == NULL || xdgconfdirs[0] == '\0')
59
59
-
+ xdgconfdirs = "/etc/xdg";
60
60
-
+ if (xdgdatadirs == NULL || xdgdatadirs[0] == '\0')
61
61
-
+ xdgdatadirs = "/usr/local/share:/usr/share";
62
62
-
+ const size_t rel_size = strlen(relative_location);
63
63
-
+ // Leave space for trailing separators
64
64
-
+ loc_size += strlen(xdgconfdirs) + strlen(xdgdatadirs) + 2*rel_size + 2;
65
65
-
+ for (const char *x = xdgconfdirs; *x; ++x)
66
66
-
+ if (*x == PATH_SEPARATOR) loc_size += rel_size;
67
67
-
+ for (const char *x = xdgdatadirs; *x; ++x)
68
68
-
+ if (*x == PATH_SEPARATOR) loc_size += rel_size;
69
69
-
+ loc_size += strlen(SYSCONFDIR) + rel_size + 1;
70
70
-
+#ifdef EXTRASYSCONFDIR
71
71
-
+ loc_size += strlen(EXTRASYSCONFDIR) + rel_size + 1;
72
72
-
+#endif
73
73
-
+#endif
74
74
-
+ loc = loader_stack_alloc(loc_size);
75
75
-
if (loc == NULL) {
76
76
-
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
77
77
-
"loader_get_manifest_files: Failed to allocate "
78
78
-
"%d bytes for manifest file location.",
79
79
-
- strlen(location));
80
80
-
+ loc_size);
81
81
-
res = VK_ERROR_OUT_OF_HOST_MEMORY;
82
82
-
goto out;
83
83
-
}
84
84
-
- strcpy(loc, location);
85
85
-
+ char *loc_write = loc;
86
86
-
+#if !defined(_WIN32)
87
87
-
+ const char *loc_read;
88
88
-
+
89
89
-
+ loc_read = &xdgconfdirs[0];
90
90
-
+ for (const char *x = loc_read;; ++x) {
91
91
-
+ if (*x == PATH_SEPARATOR || *x == '\0') {
92
92
-
+ const size_t s = x - loc_read;
93
93
-
+ memcpy(loc_write, loc_read, s);
94
94
-
+ loc_write += s;
95
95
-
+ memcpy(loc_write, relative_location, rel_size);
96
96
-
+ loc_write += rel_size;
97
97
-
+ *loc_write++ = PATH_SEPARATOR;
98
98
-
+ if (*x == 0)
99
99
-
+ break;
100
100
-
+ loc_read = ++x;
101
101
-
+ }
102
102
-
+ }
103
103
-
+
104
104
-
+ memcpy(loc_write, SYSCONFDIR, strlen(SYSCONFDIR));
105
105
-
+ loc_write += strlen(SYSCONFDIR);
106
106
-
+ memcpy(loc_write, relative_location, rel_size);
107
107
-
+ loc_write += rel_size;
108
108
-
+ *loc_write++ = PATH_SEPARATOR;
109
109
-
+
110
110
-
+#ifdef EXTRASYSCONFDIR
111
111
-
+ memcpy(loc_write, EXTRASYSCONFDIR, strlen(EXTRASYSCONFDIR));
112
112
-
+ loc_write += strlen(EXTRASYSCONFDIR);
113
113
-
+ memcpy(loc_write, relative_location, rel_size);
114
114
-
+ loc_write += rel_size;
115
115
-
+ *loc_write++ = PATH_SEPARATOR;
116
116
-
+#endif
117
117
-
+
118
118
-
+ loc_read = &xdgdatadirs[0];
119
119
-
+ for (const char *x = loc_read;; ++x) {
120
120
-
+ if (*x == PATH_SEPARATOR || *x == '\0') {
121
121
-
+ const size_t s = x - loc_read;
122
122
-
+ memcpy(loc_write, loc_read, s);
123
123
-
+ loc_write += s;
124
124
-
+ memcpy(loc_write, relative_location, rel_size);
125
125
-
+ loc_write += rel_size;
126
126
-
+ *loc_write++ = PATH_SEPARATOR;
127
127
-
+ if (*x == 0)
128
128
-
+ break;
129
129
-
+ loc_read = ++x;
130
130
-
+ }
131
131
-
+ }
132
132
-
+ --loc_write;
133
133
-
+ *loc_write = '\0';
134
134
-
+#else
135
135
-
+ memcpy(loc_write, location, loc_size);
136
136
-
+ loc[loc_size-1] = '\0';
137
137
-
+#endif
138
138
-
+
139
139
-
#if defined(_WIN32)
140
140
-
VkResult reg_result = loaderGetRegistryFiles(inst, loc, ®);
141
141
-
if (VK_SUCCESS != reg_result || NULL == reg) {
142
142
-
@@ -3122,14 +3195,14 @@ loader_get_manifest_files(const struct loader_instance *inst,
143
143
-
}
144
144
-
file = next_file;
145
145
-
#if !defined(_WIN32)
146
146
-
- if (home_location != NULL &&
147
147
-
+ if (relative_location != NULL &&
148
148
-
(next_file == NULL || *next_file == '\0') && override == NULL) {
149
149
-
char *xdgdatahome = secure_getenv("XDG_DATA_HOME");
150
150
-
size_t len;
151
151
-
if (xdgdatahome != NULL) {
152
152
-
153
153
-
char *home_loc = loader_stack_alloc(strlen(xdgdatahome) + 2 +
154
154
-
- strlen(home_location));
155
155
-
+ strlen(relative_location));
156
156
-
if (home_loc == NULL) {
157
157
-
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
158
158
-
"loader_get_manifest_files: Failed to allocate "
159
159
-
@@ -3139,15 +3212,15 @@ loader_get_manifest_files(const struct loader_instance *inst,
160
160
-
}
161
161
-
strcpy(home_loc, xdgdatahome);
162
162
-
// Add directory separator if needed
163
163
-
- if (home_location[0] != DIRECTORY_SYMBOL) {
164
164
-
+ if (relative_location[0] != DIRECTORY_SYMBOL) {
165
165
-
len = strlen(home_loc);
166
166
-
home_loc[len] = DIRECTORY_SYMBOL;
167
167
-
home_loc[len + 1] = '\0';
168
168
-
}
169
169
-
- strcat(home_loc, home_location);
170
170
-
+ strcat(home_loc, relative_location);
171
171
-
file = home_loc;
172
172
-
next_file = loader_get_next_path(file);
173
173
-
- home_location = NULL;
174
174
-
+ relative_location = NULL;
175
175
-
176
176
-
loader_log(
177
177
-
inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
178
178
-
@@ -3160,7 +3233,7 @@ loader_get_manifest_files(const struct loader_instance *inst,
179
179
-
char *home = secure_getenv("HOME");
180
180
-
if (home != NULL) {
181
181
-
char *home_loc = loader_stack_alloc(strlen(home) + 16 +
182
182
-
- strlen(home_location));
183
183
-
+ strlen(relative_location));
184
184
-
if (home_loc == NULL) {
185
185
-
loader_log(
186
186
-
inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
187
187
-
@@ -3178,15 +3251,15 @@ loader_get_manifest_files(const struct loader_instance *inst,
188
188
-
}
189
189
-
strcat(home_loc, ".local/share");
190
190
-
191
191
-
- if (home_location[0] != DIRECTORY_SYMBOL) {
192
192
-
+ if (relative_location[0] != DIRECTORY_SYMBOL) {
193
193
-
len = strlen(home_loc);
194
194
-
home_loc[len] = DIRECTORY_SYMBOL;
195
195
-
home_loc[len + 1] = '\0';
196
196
-
}
197
197
-
- strcat(home_loc, home_location);
198
198
-
+ strcat(home_loc, relative_location);
199
199
-
file = home_loc;
200
200
-
next_file = loader_get_next_path(file);
201
201
-
- home_location = NULL;
202
202
-
+ relative_location = NULL;
203
203
-
204
204
-
loader_log(
205
205
-
inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
206
206
-
@@ -3263,7 +3336,7 @@ VkResult loader_icd_scan(const struct loader_instance *inst,
207
207
-
// Get a list of manifest files for ICDs
208
208
-
res = loader_get_manifest_files(inst, "VK_ICD_FILENAMES", NULL, false, true,
209
209
-
DEFAULT_VK_DRIVERS_INFO,
210
210
-
- HOME_VK_DRIVERS_INFO, &manifest_files);
211
211
-
+ RELATIVE_VK_DRIVERS_INFO, &manifest_files);
212
212
-
if (VK_SUCCESS != res || manifest_files.count == 0) {
213
213
-
goto out;
214
214
-
}
215
215
-
@@ -3490,7 +3563,7 @@ void loader_layer_scan(const struct loader_instance *inst,
216
216
-
if (VK_SUCCESS !=
217
217
-
loader_get_manifest_files(inst, LAYERS_PATH_ENV, LAYERS_SOURCE_PATH,
218
218
-
true, true, DEFAULT_VK_ELAYERS_INFO,
219
219
-
- HOME_VK_ELAYERS_INFO, &manifest_files[0])) {
220
220
-
+ RELATIVE_VK_ELAYERS_INFO, &manifest_files[0])) {
221
221
-
goto out;
222
222
-
}
223
223
-
224
224
-
@@ -3499,7 +3572,7 @@ void loader_layer_scan(const struct loader_instance *inst,
225
225
-
// overridden by LAYERS_PATH_ENV
226
226
-
if (VK_SUCCESS != loader_get_manifest_files(inst, NULL, NULL, true, false,
227
227
-
DEFAULT_VK_ILAYERS_INFO,
228
228
-
- HOME_VK_ILAYERS_INFO,
229
229
-
+ RELATIVE_VK_ILAYERS_INFO,
230
230
-
&manifest_files[1])) {
231
231
-
goto out;
232
232
-
}
233
233
-
@@ -3569,7 +3642,7 @@ void loader_implicit_layer_scan(const struct loader_instance *inst,
234
234
-
// overridden by LAYERS_PATH_ENV
235
235
-
VkResult res = loader_get_manifest_files(
236
236
-
inst, NULL, NULL, true, false, DEFAULT_VK_ILAYERS_INFO,
237
237
-
- HOME_VK_ILAYERS_INFO, &manifest_files);
238
238
-
+ RELATIVE_VK_ILAYERS_INFO, &manifest_files);
239
239
-
if (VK_SUCCESS != res || manifest_files.count == 0) {
240
240
-
return;
241
241
-
}
242
242
-
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
243
243
-
index dc4ac10..50a7966 100644
244
244
-
--- a/loader/vk_loader_platform.h
245
245
-
+++ b/loader/vk_loader_platform.h
246
246
-
@@ -57,47 +57,9 @@
247
247
-
#define VULKAN_ILAYERCONF_DIR "implicit_layer.d"
248
248
-
#define VULKAN_LAYER_DIR "layer"
249
249
-
250
250
-
-#if defined(EXTRASYSCONFDIR)
251
251
-
-#define EXTRA_DRIVERS_SYSCONFDIR_INFO ":" \
252
252
-
- EXTRASYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR
253
253
-
-#define EXTRA_ELAYERS_SYSCONFDIR_INFO ":" \
254
254
-
- EXTRASYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR
255
255
-
-#define EXTRA_ILAYERS_SYSCONFDIR_INFO ":" \
256
256
-
- EXTRASYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR
257
257
-
-#else
258
258
-
-#define EXTRA_DRIVERS_SYSCONFDIR_INFO
259
259
-
-#define EXTRA_ELAYERS_SYSCONFDIR_INFO
260
260
-
-#define EXTRA_ILAYERS_SYSCONFDIR_INFO
261
261
-
-#endif
262
262
-
-
263
263
-
-#if defined(EXTRADATADIR)
264
264
-
-#define EXTRA_DRIVERS_DATADIR_INFO ":" \
265
265
-
- EXTRADATADIR VULKAN_DIR VULKAN_ICDCONF_DIR
266
266
-
-#define EXTRA_ELAYERS_DATADIR_INFO ":" \
267
267
-
- EXTRADATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR
268
268
-
-#define EXTRA_ILAYERS_DATADIR_INFO ":" \
269
269
-
- EXTRADATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR
270
270
-
-#else
271
271
-
-#define EXTRA_DRIVERS_DATADIR_INFO
272
272
-
-#define EXTRA_ELAYERS_DATADIR_INFO
273
273
-
-#define EXTRA_ILAYERS_DATADIR_INFO
274
274
-
-#endif
275
275
-
-
276
276
-
-#define DEFAULT_VK_DRIVERS_INFO \
277
277
-
- SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":" \
278
278
-
- DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR \
279
279
-
- EXTRA_DRIVERS_SYSCONFDIR_INFO \
280
280
-
- EXTRA_DRIVERS_DATADIR_INFO
281
281
-
-#define DEFAULT_VK_ELAYERS_INFO \
282
282
-
- SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":" \
283
283
-
- DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR \
284
284
-
- EXTRA_ELAYERS_SYSCONFDIR_INFO \
285
285
-
- EXTRA_ELAYERS_DATADIR_INFO
286
286
-
-#define DEFAULT_VK_ILAYERS_INFO \
287
287
-
- SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":" \
288
288
-
- DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR \
289
289
-
- EXTRA_ILAYERS_SYSCONFDIR_INFO \
290
290
-
- EXTRA_ILAYERS_DATADIR_INFO
291
291
-
+#define DEFAULT_VK_DRIVERS_INFO ""
292
292
-
+#define DEFAULT_VK_ELAYERS_INFO ""
293
293
-
+#define DEFAULT_VK_ILAYERS_INFO ""
294
294
-
295
295
-
#define DEFAULT_VK_DRIVERS_PATH ""
296
296
-
#if !defined(DEFAULT_VK_LAYERS_PATH)
297
297
-
@@ -109,9 +71,9 @@
298
298
-
#endif
299
299
-
#define LAYERS_PATH_ENV "VK_LAYER_PATH"
300
300
-
301
301
-
-#define HOME_VK_DRIVERS_INFO VULKAN_DIR VULKAN_ICDCONF_DIR
302
302
-
-#define HOME_VK_ELAYERS_INFO VULKAN_DIR VULKAN_ELAYERCONF_DIR
303
303
-
-#define HOME_VK_ILAYERS_INFO VULKAN_DIR VULKAN_ILAYERCONF_DIR
304
304
-
+#define RELATIVE_VK_DRIVERS_INFO VULKAN_DIR VULKAN_ICDCONF_DIR
305
305
-
+#define RELATIVE_VK_ELAYERS_INFO VULKAN_DIR VULKAN_ELAYERCONF_DIR
306
306
-
+#define RELATIVE_VK_ILAYERS_INFO VULKAN_DIR VULKAN_ILAYERCONF_DIR
307
307
-
308
308
-
// C99:
309
309
-
#define PRINTF_SIZE_T_SPECIFIER "%zu"
310
310
-
@@ -251,9 +213,9 @@ loader_platform_thread_cond_broadcast(loader_platform_thread_cond *pCond) {
311
311
-
#define LAYERS_SOURCE_PATH NULL
312
312
-
#endif
313
313
-
#define LAYERS_PATH_ENV "VK_LAYER_PATH"
314
314
-
-#define HOME_VK_DRIVERS_INFO ""
315
315
-
-#define HOME_VK_ELAYERS_INFO ""
316
316
-
-#define HOME_VK_ILAYERS_INFO ""
317
317
-
+#define RELATIVE_VK_DRIVERS_INFO ""
318
318
-
+#define RELATIVE_VK_ELAYERS_INFO ""
319
319
-
+#define RELATIVE_VK_ILAYERS_INFO ""
320
320
-
#define PRINTF_SIZE_T_SPECIFIER "%Iu"
321
321
-
322
322
-
// File IO
+7
-6
pkgs/development/tools/spirv-tools/default.nix
···
4
4
5
5
spirv_sources = {
6
6
# `vulkan-loader` requires a specific version of `spirv-tools` and `spirv-headers` as specified in
7
7
-
# `<vulkan-loader-repo>/spirv-tools_revision`.
7
7
+
# `<vulkan-loader-repo>/external_revisions/spirv-tools_revision`.
8
8
tools = fetchFromGitHub {
9
9
owner = "KhronosGroup";
10
10
repo = "SPIRV-Tools";
11
11
-
rev = "37422e9dba1a3a8cb8028b779dd546d43add6ef8";
12
12
-
sha256 = "0sp2p4wg902clq0fr94vj19vyv43cq333jjxr0mjzay8dw2h4yzk";
11
11
+
rev = "7fe8a57a5bd72094e91f9f93e51dac2f2461dcb4";
12
12
+
sha256 = "0rh25y1k3m3f1nqs032lh3mng5qfw9kqn6xv9yzzm47i1i0b6hmr";
13
13
};
14
14
headers = fetchFromGitHub {
15
15
owner = "KhronosGroup";
16
16
repo = "SPIRV-Headers";
17
17
-
rev = "c470b68225a04965bf87d35e143ae92f831e8110";
18
18
-
sha256 = "18jgcpmm0ixp6314r5w144l3wayxjkmwqgx8dk5jgyw36dammkwd";
17
17
+
rev = "6c08995e6e7b94129e6086c78198c77111f2f262";
18
18
+
sha256 = "07m12wm9prib7hldj7pbc8vwnj0x6llgx4shzgy8x4xbhbafawws";
19
19
};
20
20
};
21
21
···
23
23
24
24
stdenv.mkDerivation rec {
25
25
name = "spirv-tools-${version}";
26
26
-
version = "2016-12-19";
26
26
+
version = "2017-03-23";
27
27
28
28
src = spirv_sources.tools;
29
29
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
···
40
40
description = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules";
41
41
license = licenses.asl20;
42
42
platforms = platforms.linux;
43
43
+
maintainers = [ maintainers.ralith ];
43
44
};
44
45
}