virtio-gpu-3d.c: change virtio_gpu_fence_poll timer scale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
We use virtio-gpu to accelerate Unigine Heaven Benchmark in VM. But we get only 5 FPS when we use AMD RX460 in our host.
We found that guest os spent a lot of time in waiting for the return of glMapBufferRang
ms to us, Benchmark result raise up to 22 FPS.
From a4003af5c4fe92d
From: chen wei <email address hidden>
Date: Fri, 8 Jun 2018 17:34:45 +0800
Subject: [PATCH] virtio-gpu:improve 3d performance greatly
opengl function need fence support.when CPU execute opengl function, it need wait fence for synchronize GPU.
so qemu must deal with fence timely as possible. but now the expire time of the timer to deal with fence is 10 ms.
I think it is too long for opengl. So i will change it to 20 ns.
Before change, when i play Unigine_Heaven 3d game with virglrenderer, the fps is 3. atfer change the fps up to 23.
Signed-off-by: chen wei <email address hidden>
Signed-off-by: wang qiang <email address hidden>
---
hw/display/
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/
index 3558f38..c0a5d21 100644
--- a/hw/display/
+++ b/hw/display/
@@ -582,7 +582,7 @@ static void virtio_
virgl_
virtio_
if (!QTAILQ_
- timer_mod(
+ timer_mod(
}
}
@@ -629,7 +629,7 @@ int virtio_
return ret;
}
- g->fence_poll = timer_new_
+ g->fence_poll = timer_new_
if (virtio_
--
2.7.4
Please don't use the bug tracker for providing patches, and send it to the mailing list instead, see: https:/ /wiki.qemu. org/Contribute/ SubmitAPatch