svga/winsys: Make sure a flush always inserts and returns a fence if requested
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 11 Oct 2011 13:34:37 +0000 (15:34 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 14 Oct 2011 07:53:01 +0000 (09:53 +0200)
Needed for throttling.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrant <jakob@vmware.com>
src/gallium/winsys/svga/drm/vmw_context.c

index 666e198954bdd55908b9d65ec20ee22aef4b1ce8..b5ca84164402795708f77283bd493bde739b45dd 100644 (file)
@@ -158,7 +158,7 @@ vmw_swc_flush(struct svga_winsys_context *swc,
       throttle_us = vswc->throttle_set ?
         vswc->throttle_us : vswc->vws->default_throttle_us;
 
-      if (vswc->command.used)
+      if (vswc->command.used || pfence != NULL)
          vmw_ioctl_command(vswc->vws,
                           vswc->base.cid,
                           throttle_us,