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 79fd38ef5c15571fb66631f6d2e6f7de04d5def4..c134f13e908043f0a6a25351c11770aa1b504f68 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 089adcf3827122e86c2450b1ee6ce7062af5fae5..a48689ee8be78329b271975a106ba0f68d35676b 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 8a379154d1bf1f2710cbf1d71ee371a9a3470986..d08334d892b7592d95a4d1a8c17c27ec9db81e11 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 0744cc926ae3eac45028b7f17e1b357e51b5be43..0d379497dfc1329f551444a2d2c478d47743482f 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 488fe13c714a92eadc42f9cebe763fcc4a177986..5f9e8a87c9976e9d98a2388d4fc26e80534e27f8 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 1d16b45fbf7f3dfe1c540b5fdb084ecc00b841ec..c8cf5820c7d433cfba667a3b2c10624d373b023b 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 0bda7f78fb56826f817f615b7bea7720a058ddd0..dacfee9799c89f8993ab7a0ecd61560fb96aba84 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 24e0a0c7f65c23ddc76fcffda0062d7a9da5b865..05b824b8f74f57b9e1fab2220b4962743c883f42 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 97b2e5e8b69f10bdaef2ae87daf8447512fe8d25..aeb88e9ac96851cd5741ab8527a0a056d929322c 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 8c215980e23f6b7e511c709e99fb57ce4eeab8f2..360e569f77c8bdcf328f44a947dbc57fd514256a 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 a776ab58311d877298ed1815df00aa5d858b9f19..b2ef27cf57917461bc03b6c4ba5c063e7fe2e7be 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 20a9ffb9f604cb5d322bf66d72295fa5bb8aeb99..3e2b5afe6f439da74b512f62ffc6a63fd6abcc08 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 b795b2e5abe62a845c7109fff84980620536d81d..0dae9ef98b739473185edaa6034ae8dae17be9a5 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 5136b6fc4368c021a5bb23dac1417d92599aeff7..167b6b116175b6e9ecd011f5b06a04dc4e89b0cc 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 cfa7d1015eee362c0267b69bd7f16ee1eddebec1..18eeff9c67e71192235041d20d86998178e5aa0b 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 ab347182ed9ef54553d65e302fbac17f70f4bd07..f148a859ff36544c28b4710686df460013f3be5a 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 24cb266c145839b9ceb42caf1145bdb7d4f18be1..a504757c472687bd34ccb4b1c12013a6f7bbf346 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 89f10284ce610b3f1e2e9d6cdfd2b9c01774df8c..ed113b5dbc3a69b0c5d26ee4ad30ea38f9eaf70a 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 2dcd9a879b9a1a3674d1ff7e689571f9b9de7153..70ba239d07b02cfd24cfc94eb7a381f22a06e179 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;