summaryrefslogtreecommitdiffstats
path: root/hw/display/virtio-gpu-3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/virtio-gpu-3d.c')
-rw-r--r--hw/display/virtio-gpu-3d.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 0b0c11474d..9eb489077b 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -179,10 +179,8 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g,
info.width, info.height,
ss.r.x, ss.r.y, ss.r.width, ss.r.height);
} else {
- if (ss.scanout_id != 0) {
- dpy_gfx_replace_surface(
- g->parent_obj.scanout[ss.scanout_id].con, NULL);
- }
+ dpy_gfx_replace_surface(
+ g->parent_obj.scanout[ss.scanout_id].con, NULL);
dpy_gl_scanout_disable(g->parent_obj.scanout[ss.scanout_id].con);
}
g->parent_obj.scanout[ss.scanout_id].resource_id = ss.resource_id;
@@ -595,9 +593,7 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g)
virgl_renderer_reset();
for (i = 0; i < g->parent_obj.conf.max_outputs; i++) {
- if (i != 0) {
- dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL);
- }
+ dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL);
dpy_gl_scanout_disable(g->parent_obj.scanout[i].con);
}
}