gallium: replace pipe_resource::_usage with pipe_resource::usage
authorBrian Paul <brianp@vmware.com>
Tue, 20 Apr 2010 16:00:03 +0000 (10:00 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Apr 2010 16:00:03 +0000 (10:00 -0600)
19 files changed:
src/gallium/auxiliary/util/u_dump_state.c
src/gallium/auxiliary/util/u_inlines.h
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/i915/i915_resource_buffer.c
src/gallium/drivers/i965/brw_resource_buffer.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/nv50/nv50_buffer.c
src/gallium/drivers/nvfx/nvfx_buffer.c
src/gallium/drivers/nvfx/nvfx_miptree.c
src/gallium/drivers/nvfx/nvfx_state_fb.c
src/gallium/drivers/nvfx/nvfx_transfer.c
src/gallium/drivers/r300/r300_screen_buffer.c
src/gallium/drivers/r300/r300_transfer.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/svga/svga_resource_buffer.c
src/gallium/drivers/trace/tr_dump_state.c
src/gallium/include/pipe/p_state.h
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.c

index 79fd38e..c134f13 100644 (file)
@@ -280,7 +280,7 @@ util_dump_template(struct os_stream *stream, const struct pipe_resource *templat
    util_dump_member_end(stream);
 
    util_dump_member(stream, uint, templat, last_level);
-   util_dump_member(stream, uint, templat, _usage);
+   util_dump_member(stream, uint, templat, usage);
    util_dump_member(stream, uint, templat, bind);
    util_dump_member(stream, uint, templat, flags);
 
index 089adcf..a48689e 100644 (file)
@@ -159,7 +159,7 @@ pipe_buffer_create( struct pipe_screen *screen,
    buffer.target = PIPE_BUFFER;
    buffer.format = PIPE_FORMAT_R8_UNORM; /* want TYPELESS or similar */
    buffer.bind = bind;
-   buffer._usage = PIPE_USAGE_DEFAULT;
+   buffer.usage = PIPE_USAGE_DEFAULT;
    buffer.flags = 0;
    buffer.width0 = size;
    buffer.height0 = 1;
index 8a37915..d08334d 100644 (file)
@@ -600,7 +600,7 @@ cell_user_buffer_create(struct pipe_screen *screen,
    buffer->base.screen = screen;
    buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */
    buffer->base.bind = PIPE_BIND_TRANSFER_READ | bind_flags;
-   buffer->base._usage = PIPE_USAGE_IMMUTABLE;
+   buffer->base.usage = PIPE_USAGE_IMMUTABLE;
    buffer->base.flags = 0;
    buffer->base.width0 = bytes;
    buffer->base.height0 = 1;
index 0744cc9..0d37949 100644 (file)
@@ -146,7 +146,7 @@ i915_user_buffer_create(struct pipe_screen *screen,
    buf->b.vtbl = &i915_buffer_vtbl;
    buf->b.b.screen = screen;
    buf->b.b.format = PIPE_FORMAT_R8_UNORM; /* ?? */
-   buf->b.b._usage = PIPE_USAGE_IMMUTABLE;
+   buf->b.b.usage = PIPE_USAGE_IMMUTABLE;
    buf->b.b.bind = bind;
    buf->b.b.flags = 0;
    buf->b.b.width0 = bytes;
index 488fe13..5f9e8a8 100644 (file)
@@ -189,7 +189,7 @@ brw_user_buffer_create(struct pipe_screen *screen,
    buf->b.vtbl = &brw_buffer_vtbl;
    buf->b.b.screen = screen;
    buf->b.b.format = PIPE_FORMAT_R8_UNORM; /* ?? */
-   buf->b.b._usage = PIPE_USAGE_IMMUTABLE;
+   buf->b.b.usage = PIPE_USAGE_IMMUTABLE;
    buf->b.b.bind = bind;
    buf->b.b.width0 = bytes;
    buf->b.b.height0 = 1;
index 1d16b45..c8cf582 100644 (file)
@@ -646,7 +646,7 @@ llvmpipe_user_buffer_create(struct pipe_screen *screen,
    buffer->base.screen = screen;
    buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */
    buffer->base.bind = bind_flags;
-   buffer->base._usage = PIPE_USAGE_IMMUTABLE;
+   buffer->base.usage = PIPE_USAGE_IMMUTABLE;
    buffer->base.flags = 0;
    buffer->base.width0 = bytes;
    buffer->base.height0 = 1;
index 0bda7f7..dacfee9 100644 (file)
@@ -100,7 +100,7 @@ nv50_buffer_create(struct pipe_screen *pscreen,
 
        buffer->bo = nouveau_screen_bo_new(pscreen,
                                           16,
-                                          buffer->base._usage,
+                                          buffer->base.usage,
                                           buffer->base.bind,
                                           buffer->base.width0);
 
@@ -131,7 +131,7 @@ nv50_user_buffer_create(struct pipe_screen *pscreen,
        buffer->vtbl = &nv50_buffer_vtbl;
        buffer->base.screen = pscreen;
        buffer->base.format = PIPE_FORMAT_R8_UNORM;
-       buffer->base._usage = PIPE_USAGE_IMMUTABLE;
+       buffer->base.usage = PIPE_USAGE_IMMUTABLE;
        buffer->base.bind = bind;
        buffer->base.width0 = bytes;
        buffer->base.height0 = 1;
index 24e0a0c..05b824b 100644 (file)
@@ -103,7 +103,7 @@ nvfx_buffer_create(struct pipe_screen *pscreen,
 
        buffer->bo = nouveau_screen_bo_new(pscreen,
                                           16,
-                                          buffer->base._usage,
+                                          buffer->base.usage,
                                           buffer->base.bind,
                                           buffer->base.width0);
 
@@ -134,7 +134,7 @@ nvfx_user_buffer_create(struct pipe_screen *pscreen,
        buffer->vtbl = &nvfx_buffer_vtbl;
        buffer->base.screen = pscreen;
        buffer->base.format = PIPE_FORMAT_R8_UNORM;
-       buffer->base._usage = PIPE_USAGE_IMMUTABLE;
+       buffer->base.usage = PIPE_USAGE_IMMUTABLE;
        buffer->base.bind = usage;
        buffer->base.width0 = bytes;
        buffer->base.height0 = 1;
index 97b2e5e..aeb88e9 100644 (file)
@@ -145,7 +145,7 @@ nvfx_miptree_create(struct pipe_screen *pscreen, const struct pipe_resource *pt)
                        PIPE_BIND_DEPTH_STENCIL))
                mt->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
        else
-       if (pt->_usage == PIPE_USAGE_DYNAMIC)
+       if (pt->usage == PIPE_USAGE_DYNAMIC)
                mt->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
        else {
                switch (pt->format) {
@@ -185,7 +185,7 @@ nvfx_miptree_create(struct pipe_screen *pscreen, const struct pipe_resource *pt)
        nvfx_miptree_layout(mt);
 
        mt->base.bo = nouveau_screen_bo_new(pscreen, 256,
-            pt->_usage, pt->bind, mt->total_size);
+            pt->usage, pt->bind, mt->total_size);
        if (!mt->base.bo) {
                FREE(mt);
                return NULL;
index 8c21598..360e569 100644 (file)
@@ -67,7 +67,7 @@ nvfx_state_framebuffer_validate(struct nvfx_context *nvfx)
                depth_only = 1;
 
                /* Render to depth buffer only */
-               if (!(fb->zsbuf->texture->_usage & NVFX_RESOURCE_FLAG_LINEAR)) {
+               if (!(fb->zsbuf->texture->usage & NVFX_RESOURCE_FLAG_LINEAR)) {
                        assert(!(fb->width & (fb->width - 1)) && !(fb->height & (fb->height - 1)));
 
                        rt_format = NV34TCL_RT_FORMAT_TYPE_SWIZZLED |
index a776ab5..b2ef27c 100644 (file)
@@ -31,7 +31,7 @@ nvfx_compatible_transfer_tex(struct pipe_resource *pt, unsigned width, unsigned
        template->last_level = 0;
        template->nr_samples = pt->nr_samples;
        template->bind = bind;
-       template->_usage = PIPE_USAGE_DYNAMIC;
+       template->usage = PIPE_USAGE_DYNAMIC;
        template->flags = NVFX_RESOURCE_FLAG_LINEAR;
 }
 
@@ -81,7 +81,7 @@ nvfx_miptree_transfer_new(struct pipe_context *pipe,
        tx->base.stride = mt->level[sr.level].pitch;
 
        /* Direct access to texture */
-       if ((pt->_usage == PIPE_USAGE_DYNAMIC ||
+       if ((pt->usage == PIPE_USAGE_DYNAMIC ||
             no_transfer) &&
            pt->flags & NVFX_RESOURCE_FLAG_LINEAR)
        {
index 20a9ffb..3e2b5af 100644 (file)
@@ -310,7 +310,7 @@ struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen,
     rbuf->b.vtbl = &r300_buffer_vtbl;
     rbuf->b.b.screen = screen;
     rbuf->b.b.format = PIPE_FORMAT_R8_UNORM;
-    rbuf->b.b._usage = PIPE_USAGE_IMMUTABLE;
+    rbuf->b.b.usage = PIPE_USAGE_IMMUTABLE;
     rbuf->b.b.bind = bind;
     rbuf->b.b.width0 = bytes;
     rbuf->b.b.height0 = 1;
index b795b2e..0dae9ef 100644 (file)
@@ -150,7 +150,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
             base.depth0 = 0;
             base.last_level = 0;
             base.nr_samples = 0;
-            base._usage = PIPE_USAGE_DYNAMIC;
+            base.usage = PIPE_USAGE_DYNAMIC;
             base.bind = 0;
            base.flags = R300_RESOURCE_FLAG_TRANSFER;
 
index 5136b6f..167b6b1 100644 (file)
@@ -423,7 +423,7 @@ softpipe_user_buffer_create(struct pipe_screen *screen,
    buffer->base.screen = screen;
    buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */
    buffer->base.bind = bind_flags;
-   buffer->base._usage = PIPE_USAGE_IMMUTABLE;
+   buffer->base.usage = PIPE_USAGE_IMMUTABLE;
    buffer->base.flags = 0;
    buffer->base.width0 = bytes;
    buffer->base.height0 = 1;
index cfa7d10..18eeff9 100644 (file)
@@ -336,7 +336,7 @@ svga_user_buffer_create(struct pipe_screen *screen,
    sbuf->b.vtbl = &svga_buffer_vtbl;
    sbuf->b.b.screen = screen;
    sbuf->b.b.format = PIPE_FORMAT_R8_UNORM; /* ?? */
-   sbuf->b.b._usage = PIPE_USAGE_IMMUTABLE;
+   sbuf->b.b.usage = PIPE_USAGE_IMMUTABLE;
    sbuf->b.b.bind = bind;
    sbuf->b.b.width0 = bytes;
    sbuf->b.b.height0 = 1;
index ab34718..f148a85 100644 (file)
@@ -72,7 +72,7 @@ void trace_dump_resource_template(const struct pipe_resource *templat)
    trace_dump_member_end();
 
    trace_dump_member(uint, templat, last_level);
-   trace_dump_member(uint, templat, _usage);
+   trace_dump_member(uint, templat, usage);
    trace_dump_member(uint, templat, bind);
    trace_dump_member(uint, templat, flags);
 
index 24cb266..a504757 100644 (file)
@@ -336,7 +336,7 @@ struct pipe_resource
 
    unsigned last_level:8;    /**< Index of last mipmap level present/defined */
    unsigned nr_samples:8;    /**< for multisampled surfaces, nr of samples */
-   unsigned _usage:8;       /**< PIPE_USAGE_x (not a bitmask) */
+   unsigned usage:8;         /**< PIPE_USAGE_x (not a bitmask) */
 
    unsigned bind;           /**< bitmask of PIPE_BIND_x */
    unsigned flags;          /**< bitmask of PIPE_RESOURCE_FLAG_x */
index 89f1028..ed113b5 100644 (file)
@@ -422,7 +422,7 @@ compress_with_blit(GLcontext * ctx,
    templ.height0 = height;
    templ.depth0 = 1;
    templ.last_level = 0;
-   templ._usage = PIPE_USAGE_DEFAULT;
+   templ.usage = PIPE_USAGE_DEFAULT;
    templ.bind = PIPE_BIND_SAMPLER_VIEW;
    src_tex = screen->resource_create(screen, &templ);
 
index 2dcd9a8..70ba239 100644 (file)
@@ -100,7 +100,7 @@ st_texture_create(struct st_context *st,
    pt.width0 = width0;
    pt.height0 = height0;
    pt.depth0 = depth0;
-   pt._usage = PIPE_USAGE_DEFAULT;
+   pt.usage = PIPE_USAGE_DEFAULT;
    pt.bind = bind;
    pt.flags = 0;