问题描述
许多 GLSL 程序使用宏
#ifdef
#else
#endif
针对不同的配置,vulkan构建管道布局和描述符集时有没有什么优雅的方法来解决这个问题?
解决方法
在大多数情况下,使用普通的 0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node','/usr/bin/npm','run','json-server' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose run-script [ 'prejson-server','json-server','postjson-server' ]
5 info lifecycle learn@0.1.0~prejson-server: learn@0.1.0
6 info lifecycle learn@0.1.0~json-server: learn@0.1.0
7 verbose lifecycle learn@0.1.0~json-server: unsafe-perm in lifecycle true
8 verbose lifecycle learn@0.1.0~json-server: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/iamparasbansal/G Volume/Quantel/node_modules/.bin:/usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/iamparasbansal/G Volume/Quantel/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle learn@0.1.0~json-server: CWD: /media/iamparasbansal/G Volume/Quantel
10 silly lifecycle learn@0.1.0~json-server: Args: [ '-c','json-server --watch db.json --port 3001' ]
11 info lifecycle learn@0.1.0~json-server: Failed to exec json-server script
12 verbose stack Error: learn@0.1.0 json-server: `json-server --watch db.json --port 3001`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid learn@0.1.0
14 verbose cwd /media/iamparasbansal/G Volume/Quantel
15 verbose Linux 5.8.0-45-generic
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "json-server"
17 verbose node v10.19.0
18 verbose npm v6.14.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error learn@0.1.0 json-server: `json-server --watch db.json --port 3001`
23 error spawn ENOENT
24 error Failed at the learn@0.1.0 json-server script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1,true ]
块和 Vulkan 特化常量应该可以解决这个问题。如果专业化常量在编译时为零,我希望任何明智的编译器都能优化整个 if()\else()
基本块。