From: Jakob Bornecrantz Date: Mon, 25 Jan 2010 11:27:47 +0000 (+0100) Subject: vmware/xorg: Do buffer round-robin logic differently X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6877c5de3c3ff39da514a74928ea270138cddff9;p=mesa.git vmware/xorg: Do buffer round-robin logic differently --- diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c index b065b96346a..ff3b992d078 100644 --- a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c +++ b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c @@ -649,7 +649,8 @@ vmw_video_port_play(ScrnInfoPtr pScrn, struct vmw_video_port *port, return XvBadAlloc; } - port->currBuf = ++port->currBuf & (VMWARE_VID_NUM_BUFFERS - 1); + if (++(port->currBuf) >= VMWARE_VID_NUM_BUFFERS) + port->currBuf = 0; return Success; }