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

Author: Marek Olšák <[email protected]>
Date:   Sat Dec 22 02:54:52 2012 +0100

r600g: remove redundant parameter alloc_bo from r600_texture_create_object

alloc_bo == !buf

---

 src/gallium/drivers/r600/r600_texture.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c 
b/src/gallium/drivers/r600/r600_texture.c
index e0d8486..0f67739 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -393,7 +393,6 @@ r600_texture_create_object(struct pipe_screen *screen,
                           const struct pipe_resource *base,
                           unsigned pitch_in_bytes_override,
                           struct pb_buffer *buf,
-                          boolean alloc_bo,
                           struct radeon_surface *surface)
 {
        struct r600_texture *rtex;
@@ -423,7 +422,7 @@ r600_texture_create_object(struct pipe_screen *screen,
                return NULL;
        }
 
-       if (base->nr_samples > 1 && !rtex->is_depth && alloc_bo) {
+       if (base->nr_samples > 1 && !rtex->is_depth && !buf) {
                r600_texture_allocate_cmask(rscreen, rtex);
                r600_texture_allocate_fmask(rscreen, rtex);
        }
@@ -476,7 +475,7 @@ r600_texture_create_object(struct pipe_screen *screen,
        }
 
        /* Now create the backing buffer. */
-       if (!buf && alloc_bo) {
+       if (!buf) {
                unsigned base_align = rtex->surface.bo_alignment;
                unsigned usage = R600_TEX_IS_TILED(rtex, 0) ? PIPE_USAGE_STATIC 
: base->usage;
 
@@ -484,7 +483,7 @@ r600_texture_create_object(struct pipe_screen *screen,
                        FREE(rtex);
                        return NULL;
                }
-       } else if (buf) {
+       } else {
                /* This is usually the window framebuffer. We want it in VRAM, 
always. */
                resource->buf = buf;
                resource->cs_buf = rscreen->ws->buffer_get_cs_handle(buf);
@@ -587,7 +586,7 @@ struct pipe_resource *r600_texture_create(struct 
pipe_screen *screen,
                return NULL;
        }
        return (struct pipe_resource *)r600_texture_create_object(screen, templ,
-                                                                 0, NULL, 
TRUE, &surface);
+                                                                 0, NULL, 
&surface);
 }
 
 struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
@@ -673,7 +672,7 @@ struct pipe_resource *r600_texture_from_handle(struct 
pipe_screen *screen,
                return NULL;
        }
        return (struct pipe_resource *)r600_texture_create_object(screen, templ,
-                                                                 stride, buf, 
FALSE, &surface);
+                                                                 stride, buf, 
&surface);
 }
 
 bool r600_init_flushed_depth_texture(struct pipe_context *ctx,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to