winsys/radeon: remove a redundant parameter 'size' from buffer_from_handle
authorMarek Olšák <maraeo@gmail.com>
Tue, 27 Sep 2011 00:08:15 +0000 (02:08 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 30 Sep 2011 21:19:52 +0000 (23:19 +0200)
It's part of pb_buffer already.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.c
src/gallium/winsys/radeon/drm/radeon_winsys.h

index d2b3f3c2e6b111fdc8db8fc2dd82083c7411add2..067ec072f67955dc7d84557e70a31372da825d79 100644 (file)
@@ -969,7 +969,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
         return NULL;
     }
 
-    buffer = rws->buffer_from_handle(rws, whandle, &stride, NULL);
+    buffer = rws->buffer_from_handle(rws, whandle, &stride);
     if (!buffer)
         return NULL;
 
index 99eb1aa46929119e9addd189813f64ca0d146297..bbda2cbecd79f752209b35bd293a6c5557f500ef 100644 (file)
@@ -555,7 +555,7 @@ struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
              templ->depth0 != 1 || templ->last_level != 0)
                return NULL;
 
-       buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle, &stride, NULL);
+       buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle, &stride);
        if (!buf)
                return NULL;
 
index 6a8dabf1c24e4a819dd40273ce82bbc440b3fe43..20139b42c68a1083fdae0c637a65848fcbb3b5a8 100644 (file)
@@ -533,9 +533,8 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
 }
 
 static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws,
-                                                           struct winsys_handle *whandle,
-                                                           unsigned *stride,
-                                                           unsigned *size)
+                                                      struct winsys_handle *whandle,
+                                                      unsigned *stride)
 {
     struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
     struct radeon_bo *bo;
@@ -591,8 +590,6 @@ done:
 
     if (stride)
         *stride = whandle->stride;
-    if (size)
-        *size = bo->base.size;
 
     return (struct pb_buffer*)bo;
 
index b92dad8155e7dc16c90dac9260e673416788606f..31d39e9bdcb1102121b79363204d1ae84ce83f4f 100644 (file)
@@ -230,12 +230,10 @@ struct radeon_winsys {
      * \param whandle   A winsys handle pointer as was received from a state
      *                  tracker.
      * \param stride    The returned buffer stride in bytes.
-     * \param size      The returned buffer size.
      */
     struct pb_buffer *(*buffer_from_handle)(struct radeon_winsys *ws,
                                             struct winsys_handle *whandle,
-                                            unsigned *stride,
-                                            unsigned *size);
+                                            unsigned *stride);
 
     /**
      * Get a winsys handle from a winsys buffer. The internal structure