mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
virgl: fix checking fences
When calling virgl_fence_wait() with timeout=0,
virgl_{drm,vtest}_resource_is_busy() is called. However, it returns TRUE
for a busy resource, whereace virgl_fence_wait() should return TRUE for
a completed (non-busy) resource.
This fixes running supertuxkart in a VM (I could not reproduce locally
with vtest though there is a similar fix)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: "11.1 11.2 12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
15896a470b
commit
dc81b3ad43
2 changed files with 2 additions and 2 deletions
|
|
@ -734,7 +734,7 @@ static bool virgl_fence_wait(struct virgl_winsys *vws,
|
|||
struct virgl_hw_res *res = virgl_hw_res(fence);
|
||||
|
||||
if (timeout == 0)
|
||||
return virgl_drm_resource_is_busy(vdws, res);
|
||||
return !virgl_drm_resource_is_busy(vdws, res);
|
||||
|
||||
if (timeout != PIPE_TIMEOUT_INFINITE) {
|
||||
int64_t start_time = os_time_get();
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ static bool virgl_fence_wait(struct virgl_winsys *vws,
|
|||
struct virgl_hw_res *res = virgl_hw_res(fence);
|
||||
|
||||
if (timeout == 0)
|
||||
return virgl_vtest_resource_is_busy(vdws, res);
|
||||
return !virgl_vtest_resource_is_busy(vdws, res);
|
||||
|
||||
if (timeout != PIPE_TIMEOUT_INFINITE) {
|
||||
int64_t start_time = os_time_get();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue