Mesa (master): winsys/svga: Remove some unneeded debug code

Thomas Hellstrom thomash at kemper.freedesktop.org
Wed Oct 19 06:35:55 PDT 2011


Module: Mesa
Branch: master
Commit: 60f67cd1f17d13c0be3caa9a8c0b9a4600970230
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60f67cd1f17d13c0be3caa9a8c0b9a4600970230

Author: Thomas Hellstrom <thellstrom at vmware.com>
Date:   Wed Oct 19 13:49:09 2011 +0200

winsys/svga: Remove some unneeded debug code

This code isn't really relevant since the kernel takes care not
to destroy busy GMR buffers.

Also with the advent of fence objects, the code was incorrect since
it didn't refcount fence handles.

Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob at vmware.com>

---

 src/gallium/winsys/svga/drm/vmw_buffer.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.c b/src/gallium/winsys/svga/drm/vmw_buffer.c
index 69f0787..66ab808 100644
--- a/src/gallium/winsys/svga/drm/vmw_buffer.c
+++ b/src/gallium/winsys/svga/drm/vmw_buffer.c
@@ -63,10 +63,6 @@ struct vmw_gmr_buffer
    
    struct vmw_region *region;
    void *map;
-   
-#ifdef DEBUG
-   struct pipe_fence_handle *last_fence;
-#endif
 };
 
 
@@ -103,13 +99,6 @@ vmw_gmr_buffer_destroy(struct pb_buffer *_buf)
 {
    struct vmw_gmr_buffer *buf = vmw_gmr_buffer(_buf);
 
-#ifdef DEBUG
-   if(buf->last_fence) {
-      struct svga_winsys_screen *sws = &buf->mgr->vws->base;
-      assert(sws->fence_signalled(sws, buf->last_fence, 0) == 0);
-   }
-#endif
-
    vmw_ioctl_region_unmap(buf->region);
    
    vmw_ioctl_region_destroy(buf->region);
@@ -162,11 +151,6 @@ vmw_gmr_buffer_fence( struct pb_buffer *_buf,
 {
    /* We don't need to do anything, as the pipebuffer library
     * will take care of delaying the destruction of fenced buffers */  
-#ifdef DEBUG
-   struct vmw_gmr_buffer *buf = vmw_gmr_buffer(_buf);
-   if(fence)
-      buf->last_fence = fence;
-#endif
 }
 
 



More information about the mesa-commit mailing list