summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_resource.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-02-08 18:07:37 -0800
committerGert Wollny <[email protected]>2019-02-15 11:19:05 +0100
commitab6ea6e9cee07dea561426d86f93eff670a53efd (patch)
tree600d19bc63d2bbdd4529ef73a134dab22a8fa765 /src/gallium/drivers/virgl/virgl_resource.c
parentd98fbd9c92e1567c3c5d7084ce7d4d2c4b53ce51 (diff)
virgl: pass virgl transfer to virgl_res_needs_flush_wait
Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_resource.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_resource.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c
index e9ccf66f8d0..9b42bd14c42 100644
--- a/src/gallium/drivers/virgl/virgl_resource.c
+++ b/src/gallium/drivers/virgl/virgl_resource.c
@@ -28,12 +28,13 @@
#include "virgl_screen.h"
bool virgl_res_needs_flush_wait(struct virgl_context *vctx,
- struct virgl_resource *res,
- unsigned usage)
+ struct virgl_transfer *trans)
{
struct virgl_screen *vs = virgl_screen(vctx->base.screen);
+ struct virgl_resource *res = virgl_resource(trans->base.resource);
- if ((!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) && vs->vws->res_is_referenced(vs->vws, vctx->cbuf, res->hw_res)) {
+ if ((!(trans->base.usage & PIPE_TRANSFER_UNSYNCHRONIZED)) &&
+ vs->vws->res_is_referenced(vs->vws, vctx->cbuf, res->hw_res)) {
return true;
}
return false;