r300g: remove dead r300_get_texture_buffer function
authorKeith Whitwell <keithw@vmware.com>
Thu, 4 Mar 2010 13:22:21 +0000 (13:22 +0000)
committerKeith Whitwell <keithw@vmware.com>
Thu, 4 Mar 2010 13:22:21 +0000 (13:22 +0000)
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture.h
src/gallium/drivers/r300/r300_winsys.h

index 86b98a4ba526e1c6eef53fb9d0c082ad9dc65d8d..6308d3a087ccb3a3611991b4e76294c429b7226b 100644 (file)
@@ -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;
 }
 
index 3b39207a4555825af3ea83ea7f547ad9bf03c3da..93224e8d205f169871ce1390f628094e36af841c 100644 (file)
@@ -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;
-}
index 46a5fb6188b6107459813f8132d67d8c6c3a7053..138b62784e6c400a67de3d5743b609c964ffe3f5 100644 (file)
@@ -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 */
index 40fb8a95ca5c994f157879e06a0972466c8955a3..ddf2b790039bf20bc75aaf67345a185193b63d22 100644 (file)
@@ -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