Mesa (master): r300g: remove dead r300_get_texture_buffer function

Keith Whitwell keithw at kemper.freedesktop.org
Mon Mar 8 12:04:19 UTC 2010


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Thu Mar  4 13:22:21 2010 +0000

r300g: remove dead r300_get_texture_buffer function

---

 src/gallium/drivers/r300/r300_context.c |   16 ++++++++++------
 src/gallium/drivers/r300/r300_texture.c |   18 ------------------
 src/gallium/drivers/r300/r300_texture.h |    6 ++----
 src/gallium/drivers/r300/r300_winsys.h  |    5 -----
 4 files changed, 12 insertions(+), 33 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 86b98a4..6308d3a 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -72,11 +72,8 @@ r300_is_texture_referenced(struct pipe_context *pipe,
                            struct pipe_texture *texture,
                            unsigned face, unsigned level)
 {
-    struct pipe_buffer* buf = 0;
-
-    r300_get_texture_buffer(pipe->screen, texture, &buf, NULL);
-
-    return pipe->is_buffer_referenced(pipe, buf);
+    return pipe->is_buffer_referenced(pipe,
+                                      ((struct r300_texture *)texture)->buffer);
 }
 
 static unsigned int
@@ -86,7 +83,14 @@ r300_is_buffer_referenced(struct pipe_context *pipe,
     /* This only checks to see whether actual hardware buffers are
      * referenced. Since we use managed BOs and transfers, it's actually not
      * possible for pipe_buffers to ever reference the actual hardware, so
-     * buffers are never referenced. */
+     * buffers are never referenced. 
+     */
+
+    /* XXX: that doesn't make sense given that
+     * r300_is_texture_referenced is implemented on top of this
+     * function and hardware can certainly refer to textures
+     * directly...
+     */
     return 0;
 }
 
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 3b39207..93224e8 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -974,21 +974,3 @@ void r300_init_screen_texture_functions(struct pipe_screen* screen)
     screen->video_surface_destroy= r300_video_surface_destroy;
 }
 
-boolean r300_get_texture_buffer(struct pipe_screen* screen,
-                                struct pipe_texture* texture,
-                                struct pipe_buffer** buffer,
-                                unsigned* stride)
-{
-    struct r300_texture* tex = (struct r300_texture*)texture;
-    if (!tex) {
-        return FALSE;
-    }
-
-    pipe_buffer_reference(buffer, tex->buffer);
-
-    if (stride) {
-        *stride = r300_texture_get_stride(r300_screen(screen), tex, 0);
-    }
-
-    return TRUE;
-}
diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h
index 46a5fb6..138b627 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -60,13 +60,11 @@ r300_video_surface(struct pipe_video_surface *pvs)
     return (struct r300_video_surface *)pvs;
 }
 
-#ifndef R300_WINSYS_H
-
+/* Used internally for texture_is_referenced()
+ */
 boolean r300_get_texture_buffer(struct pipe_screen* screen,
                                 struct pipe_texture* texture,
                                 struct pipe_buffer** buffer,
                                 unsigned* stride);
 
-#endif /* R300_WINSYS_H */
-
 #endif /* R300_TEXTURE_H */
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index 40fb8a9..ddf2b79 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -40,11 +40,6 @@ struct radeon_winsys;
 struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys);
 
 
-boolean r300_get_texture_buffer(struct pipe_screen* screen,
-                                struct pipe_texture* texture,
-                                struct pipe_buffer** buffer,
-                                unsigned* stride);
-
 #ifdef __cplusplus
 }
 #endif




More information about the mesa-commit mailing list