我遇到了类似的问题这个问题,只有 primusrun 在禁用 vblank 同步的情况下仍然较慢。
编辑:我没有在不关闭 vblank 同步的情况下运行标准 glxspheres。当我这样做时,我得到了
$ vblank_mode=0 glxspheres64
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
139.729257 frames/sec - 155.937850 Mpixels/sec
201.142942 frames/sec - 224.475523 Mpixels/sec
$ glxspheres64
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
60.409773 frames/sec - 67.417306 Mpixels/sec
$ optirun glxspheres64
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 750M/PCIe/SSE2
276.092868 frames/sec - 308.119641 Mpixels/sec
erik@yorda:~$ vblank_mode=0 primusrun glxspheres64
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 750M/PCIe/SSE2
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
198.399436 frames/sec - 221.413770 Mpixels/sec
我不确定为什么 primus 运行速度会变慢。我正在使用带有实验性 310 驱动程序的 Ubuntu 13.10。
编辑:看来 primusrun 并没有为板载英特尔显卡带来任何性能提升。
答案1
Mesa 9.2 中存在纹理上传速度回归问题,Ubuntu 13.10 也附带了这个问题。您可以尝试从 oibaf ppa 或 xorg-edgers ppa 安装 Mesa git 软件包,然后尝试PRIMUS_UPLOAD=2 primusrun
(可能需要明确设置 PRIMUS_UPLOAD=2 来解决 mesa git 中最近才修复的回归问题)。