Module: Mesa
Branch: mesa_7_7_branch
Commit: 6877c5de3c3ff39da514a74928ea270138cddff9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6877c5de3c3ff39da514a74928ea270138cddff9

Author: Jakob Bornecrantz <ja...@vmware.com>
Date:   Mon Jan 25 12:27:47 2010 +0100

vmware/xorg: Do buffer round-robin logic differently

---

 src/gallium/winsys/drm/vmware/xorg/vmw_video.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c 
b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
index b065b96..ff3b992 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;
 }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to