aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-06 15:56:56 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-27 17:08:56 +0200
commitbf41ab61908b340e5745c334586349bc8a3a0349 (patch)
tree1b2f2023e914e486123b81c4baad21a700b82a07 /hw
parent06c63a34e633601caea8fe88abfeff0911809da3 (diff)
downloadqemu-bf41ab61908b340e5745c334586349bc8a3a0349.zip
qemu-bf41ab61908b340e5745c334586349bc8a3a0349.tar.gz
qemu-bf41ab61908b340e5745c334586349bc8a3a0349.tar.bz2
ui: add optional d3d texture pointer to scanout texture
The following patch will get the underlying D3D11 Texture2D from the virgl renderer scanout. Pass it along to the texture scanout callbacks as a priliminary step, to simplify review. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230606115658.677673-20-marcandre.lureau@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/display/virtio-gpu-virgl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 9831c48..8fa9809 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -154,6 +154,7 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g,
{
struct virtio_gpu_set_scanout ss;
struct virgl_renderer_resource_info info;
+ void *d3d_tex2d = NULL;
int ret;
VIRTIO_GPU_FILL_CMD(ss);
@@ -186,7 +187,8 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g,
g->parent_obj.scanout[ss.scanout_id].con, info.tex_id,
info.flags & VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP,
info.width, info.height,
- ss.r.x, ss.r.y, ss.r.width, ss.r.height);
+ ss.r.x, ss.r.y, ss.r.width, ss.r.height,
+ d3d_tex2d);
} else {
dpy_gfx_replace_surface(
g->parent_obj.scanout[ss.scanout_id].con, NULL);