spice中opengl加速问题

来源:互联网 发布:c 编程小游戏 编辑:程序博客网 时间:2024/05/17 09:33

一直比较好奇spice中opengl加速部分的代码进度问题。通过git查看历史,opengl相关代码基本没有更新过。

查看了gust系统中qxl驱动代码,采用了Driver Development Part 6: Introduction to Display Drivers(http://www.codeproject.com/Articles/12878/Driver-Development-Part-6-Introduction-to-Display)。支持opengl需要提供installable client driver。spice官方没有提供相应的说明,貌似不支持。

client系统中spice-gtk中1、gl_canvas后端貌似采用的依然是pixman对图像进行操作,而没有采用opengl;2、gtk通过cairo使用opengl路径没有打通;3、即使打通cairo使用opengl的路径(采用第三方gtkglext等,源码中已包含有GTK/glext.h),采用glTexImage2D,纹理的频繁创建销毁搬移效率也比较低

综上,要采用opengl进行spice2D加速,需要做的事情还很多。


最近又开始考虑spice opengl加速问题,发现spice代码中spicec有调用opengl的代码。

使用最新的spice(编译时指定--enable--client, --enable-opengl;使用时指定--canvas-type gl_pbuff或--canvas-type gl_fbo),外加最新的windows qxl(wddm qxl)驱动,就可以通过opengl加速了,不过加速效果不行,正如官方所说:

Spice-gtk currently doesn't support opengl canvas. It may have some support added in the next year (for local virgil support).
However, don't expect better performance from using the gl canvas today (it's ~2x time slower on my laptop). The 2d canvas code isn't probably fitting the gpu very well. (too much upload/read of textures, not enough batching, old gl code lacking optimization etc.)

依然还有太多的变数

原创粉丝点击