124 Star 0 Fork 14

src-openEuler/mesa-demos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
xdriinfo-1.0.4-glvnd.patch 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-11-19 11:50 . Package init
diff -up xdriinfo-1.0.4/xdriinfo.c~ xdriinfo-1.0.4/xdriinfo.c
--- xdriinfo-1.0.4/xdriinfo.c~ 2009-10-16 23:39:10.000000000 +0200
+++ xdriinfo-1.0.4/xdriinfo.c 2017-03-13 12:01:53.419636100 +0100
@@ -101,23 +101,9 @@ int main (int argc, char *argv[]) {
return 1;
}
}
- /* if the argument to the options command is a driver name, we can handle
- * it without opening an X connection */
- if (func == OPTIONS && screenNum == -1) {
- const char *options = (*GetDriverConfig) (funcArg);
- if (!options) {
- fprintf (stderr,
- "Driver \"%s\" is not installed or does not support configuration.\n",
- funcArg);
- return 1;
- }
- printf ("%s", options);
- if (isatty (STDOUT_FILENO))
- printf ("\n");
- return 0;
- }
+
/* driver command needs a valid screen number */
- else if (func == DRIVER && screenNum == -1) {
+ if (func == DRIVER && screenNum == -1) {
fprintf (stderr, "Invalid screen number \"%s\".\n", funcArg);
return 1;
}
@@ -135,6 +121,9 @@ int main (int argc, char *argv[]) {
return 1;
}
+ /* Call glXGetClientString to load vendor libs on glvnd enabled systems */
+ glXGetClientString (dpy, GLX_EXTENSIONS);
+
switch (func) {
case NSCREENS:
printf ("%d", nScreens);
@@ -154,7 +143,13 @@ int main (int argc, char *argv[]) {
break;
}
case OPTIONS: {
- const char *name = (*GetScreenDriver) (dpy, screenNum), *options;
+ const char *name, *options;
+
+ if (screenNum == -1) {
+ name = funcArg;
+ } else {
+ name = (*GetScreenDriver) (dpy, screenNum);
+ }
if (!name) {
fprintf (stderr, "Screen \"%d\" is not direct rendering capable.\n",
screenNum);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/mesa-demos.git
git@gitee.com:src-openeuler/mesa-demos.git
src-openeuler
mesa-demos
mesa-demos
master

搜索帮助