From 6877c5de3c3ff39da514a74928ea270138cddff9 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 25 Jan 2010 12:27:47 +0100 Subject: [PATCH] vmware/xorg: Do buffer round-robin logic differently --- src/gallium/winsys/drm/vmware/xorg/vmw_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2