Mesa (master): virgl: add driver for virtio-gpu 3D (v2)

Dave Airlie airlied at kemper.freedesktop.org
Thu Oct 22 21:41:38 PDT 2015


Module: Mesa
Branch: master
Commit: a8987b88ff1db4ac00720a9b56c4bc3aeb666537
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8987b88ff1db4ac00720a9b56c4bc3aeb666537

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jan 22 15:11:47 2015 +1000

virgl: add driver for virtio-gpu 3D (v2)

virgl is the 3D acceleration backend for the
virtio-gpu shipping with qemu.

The 3D acceleration is designed around gallium
and TGSI as the virtualisation layer. The backend
renderer translates the virgl interface into
OpenGL currently.

This is the initial import of the driver to mesa.

The kernel driver portions are lined up for drm-next.

Currently this driver supports up to GL3.3 and some
misc extensions if the host driver exposes it. It is
planned to iterate the virgl API to new GL levels
as mesa host drivers gain features.

v2: fix resource tracking across flushes to avoid
->bind hack in mapping.
consolidate mapping and waiting code for transfers.
use u_range for dirt tracking.
handle larger shaders in protocol.
include virtgpu_drm.h in mesa for now.
add translation layer for gallium tgsi to virgl tgsi.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 configure.ac                                       |   11 +-
 src/gallium/Makefile.am                            |    5 +
 .../auxiliary/target-helpers/inline_drm_helper.h   |   42 +
 src/gallium/drivers/virgl/Automake.inc             |   10 +
 src/gallium/drivers/virgl/Makefile.am              |   43 +
 src/gallium/drivers/virgl/virgl.h                  |   51 ++
 src/gallium/drivers/virgl/virgl_buffer.c           |  170 ++++
 src/gallium/drivers/virgl/virgl_context.c          |  962 ++++++++++++++++++++
 src/gallium/drivers/virgl/virgl_context.h          |  100 ++
 src/gallium/drivers/virgl/virgl_encode.c           |  863 ++++++++++++++++++
 src/gallium/drivers/virgl/virgl_encode.h           |  232 +++++
 src/gallium/drivers/virgl/virgl_protocol.h         |  468 ++++++++++
 src/gallium/drivers/virgl/virgl_public.h           |   32 +
 src/gallium/drivers/virgl/virgl_query.c            |  169 ++++
 src/gallium/drivers/virgl/virgl_resource.c         |   89 ++
 src/gallium/drivers/virgl/virgl_resource.h         |  134 +++
 src/gallium/drivers/virgl/virgl_screen.c           |  557 ++++++++++++
 src/gallium/drivers/virgl/virgl_streamout.c        |   87 ++
 src/gallium/drivers/virgl/virgl_texture.c          |  349 +++++++
 src/gallium/drivers/virgl/virgl_tgsi.c             |   66 ++
 src/gallium/drivers/virgl/virgl_winsys.h           |  110 +++
 src/gallium/targets/dri/Makefile.am                |    2 +
 src/gallium/winsys/virgl/drm/Makefile.am           |   34 +
 src/gallium/winsys/virgl/drm/Makefile.sources      |    2 +
 src/gallium/winsys/virgl/drm/virgl_drm_public.h    |   30 +
 src/gallium/winsys/virgl/drm/virgl_drm_winsys.c    |  764 ++++++++++++++++
 src/gallium/winsys/virgl/drm/virgl_drm_winsys.h    |   98 ++
 src/gallium/winsys/virgl/drm/virgl_hw.h            |  286 ++++++
 src/gallium/winsys/virgl/drm/virtgpu_drm.h         |  163 ++++
 29 files changed, 5928 insertions(+), 1 deletion(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=a8987b88ff1db4ac00720a9b56c4bc3aeb666537


More information about the mesa-commit mailing list