diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-10-09 17:30:03 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-10-09 17:30:03 +0100 |
commit | c9003eb4662f44c61be9c8d7d5c9d4a02d58b560 (patch) | |
tree | f39c06343359cc2d53dee717166329e43e6481e1 /include/hw | |
parent | b37686f7e84b22cfaf7fd01ac5133f2617cc3027 (diff) | |
parent | 925a04000231ad865770ba227876ba518ac3e479 (diff) | |
download | qemu-c9003eb4662f44c61be9c8d7d5c9d4a02d58b560.zip qemu-c9003eb4662f44c61be9c8d7d5c9d4a02d58b560.tar.gz qemu-c9003eb4662f44c61be9c8d7d5c9d4a02d58b560.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-virgl-20151008-1' into staging
virtio-gpu: add 3d rendering support using virgl, misc fixes.
ui/gtk: add opengl context and scanout support (for virtio-gpu).
# gpg: Signature made Thu 08 Oct 2015 10:35:39 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-virgl-20151008-1:
gtk/opengl: add opengl context and scanout support (GtkGLArea)
gtk/opengl: add opengl context and scanout support (egl)
opengl: add egl-context.[ch] helpers
virtio-gpu: add cursor update tracepoint
virtio-gpu: add 3d mode and virgl rendering support.
virtio-gpu: update headers for virgl/3d
virtio-gpu: change licence from GPLv2 to GPLv2+
virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov
ui/console: add opengl context and scanout support interfaces.
sdl2: stop flickering
shaders: initialize vertexes once
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/virtio/virtio-gpu.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 8896761..9b279d7 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -56,8 +56,19 @@ struct virtio_gpu_requested_state { int x, y; }; +enum virtio_gpu_conf_flags { + VIRTIO_GPU_FLAG_VIRGL_ENABLED = 1, + VIRTIO_GPU_FLAG_STATS_ENABLED, +}; + +#define virtio_gpu_virgl_enabled(_cfg) \ + (_cfg.flags & (1 << VIRTIO_GPU_FLAG_VIRGL_ENABLED)) +#define virtio_gpu_stats_enabled(_cfg) \ + (_cfg.flags & (1 << VIRTIO_GPU_FLAG_STATS_ENABLED)) + struct virtio_gpu_conf { uint32_t max_outputs; + uint32_t flags; }; struct virtio_gpu_ctrl_command { @@ -92,11 +103,13 @@ typedef struct VirtIOGPU { int enabled_output_bitmask; struct virtio_gpu_config virtio_config; + bool use_virgl_renderer; + bool renderer_inited; QEMUTimer *fence_poll; QEMUTimer *print_stats; + uint32_t inflight; struct { - uint32_t inflight; uint32_t max_inflight; uint32_t requests; uint32_t req_3d; @@ -139,4 +152,11 @@ int virtio_gpu_create_mapping_iov(struct virtio_gpu_resource_attach_backing *ab, struct iovec **iov); void virtio_gpu_cleanup_mapping_iov(struct iovec *iov, uint32_t count); +/* virtio-gpu-3d.c */ +void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, + struct virtio_gpu_ctrl_command *cmd); +void virtio_gpu_virgl_fence_poll(VirtIOGPU *g); +void virtio_gpu_virgl_reset(VirtIOGPU *g); +int virtio_gpu_virgl_init(VirtIOGPU *g); + #endif |