diff options
author | Marek Olšák <[email protected]> | 2014-02-03 03:42:17 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-02-06 17:37:34 +0100 |
commit | c32114460dbb7f33885c181a0d7dee07b15b8751 (patch) | |
tree | fd6d0a17ed48e93e42d61138d0bef80d8577f0a8 /src/gallium/drivers | |
parent | eeb5a4a50e1317a7f8d9e168c962ce3b1d7b36f9 (diff) |
gallium: remove PIPE_USAGE_STATIC
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_buffer.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_video.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_uvd.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_uvd.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_draw_arrays.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_draw_elements.c | 2 |
17 files changed, 25 insertions, 27 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c index 0b21530e19b..5b0b93b4a62 100644 --- a/src/gallium/drivers/nouveau/nouveau_buffer.c +++ b/src/gallium/drivers/nouveau/nouveau_buffer.c @@ -626,7 +626,6 @@ nouveau_buffer_create(struct pipe_screen *pscreen, switch (buffer->base.usage) { case PIPE_USAGE_DEFAULT: case PIPE_USAGE_IMMUTABLE: - case PIPE_USAGE_STATIC: buffer->domain = NOUVEAU_BO_VRAM; break; case PIPE_USAGE_DYNAMIC: diff --git a/src/gallium/drivers/nouveau/nouveau_video.c b/src/gallium/drivers/nouveau/nouveau_video.c index f72a0967fc1..8795c9d3bc2 100644 --- a/src/gallium/drivers/nouveau/nouveau_video.c +++ b/src/gallium/drivers/nouveau/nouveau_video.c @@ -811,7 +811,7 @@ nouveau_video_buffer_create(struct pipe_context *pipe, templ.depth0 = 1; templ.array_size = 1; templ.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - templ.usage = PIPE_USAGE_STATIC; + templ.usage = PIPE_USAGE_DEFAULT; templ.flags = NOUVEAU_RESOURCE_FLAG_LINEAR; buffer->resources[0] = pipe->screen->resource_create(pipe->screen, &templ); diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 696a61dc5f5..cc9ea8a8e0d 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -772,7 +772,7 @@ static void r300_msaa_resolve(struct pipe_context *pipe, templ.height0 = info->src.resource->height0; templ.depth0 = 1; templ.array_size = 1; - templ.usage = PIPE_USAGE_STATIC; + templ.usage = PIPE_USAGE_DEFAULT; templ.flags = R300_RESOURCE_FORCE_MICROTILING; tmp = screen->resource_create(screen, &templ); diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 5627aafec59..e28dbfb4034 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -451,7 +451,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, memset(&vb, 0, sizeof(vb)); vb.target = PIPE_BUFFER; vb.format = PIPE_FORMAT_R8_UNORM; - vb.usage = PIPE_USAGE_STATIC; + vb.usage = PIPE_USAGE_DEFAULT; vb.width0 = sizeof(float) * 16; vb.height0 = 1; vb.depth0 = 1; diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index cd54fb88785..2cf36778383 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -278,7 +278,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void } rctx->allocator_fetch_shader = u_suballocator_create(&rctx->b.b, 64 * 1024, 256, - 0, PIPE_USAGE_STATIC, FALSE); + 0, PIPE_USAGE_DEFAULT, FALSE); if (!rctx->allocator_fetch_shader) goto fail; @@ -647,7 +647,7 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) templ.array_size = 1; templ.target = PIPE_TEXTURE_2D; templ.format = PIPE_FORMAT_R8G8B8A8_UNORM; - templ.usage = PIPE_USAGE_STATIC; + templ.usage = PIPE_USAGE_DEFAULT; struct r600_resource *res = r600_resource(rscreen->screen.resource_create(&rscreen->screen, &templ)); unsigned char *map = ws->buffer_map(res->cs_buf, NULL, PIPE_TRANSFER_WRITE); diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 1b73ce30213..0dfd4260a82 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1244,7 +1244,7 @@ static struct r600_resource *r600_buffer_create_helper(struct r600_screen *rscre buffer.target = PIPE_BUFFER; buffer.format = PIPE_FORMAT_R8_UNORM; buffer.bind = PIPE_BIND_CUSTOM; - buffer.usage = PIPE_USAGE_STATIC; + buffer.usage = PIPE_USAGE_DEFAULT; buffer.flags = 0; buffer.width0 = size; buffer.height0 = 1; diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 208c073a7a8..22f2b062a96 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1109,14 +1109,14 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable) unsigned size = 0x1C000; rctx->gs_rings.esgs_ring.buffer = pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, size); + PIPE_USAGE_DEFAULT, size); rctx->gs_rings.esgs_ring.buffer_size = size; size = 0x4000000; rctx->gs_rings.gsvs_ring.buffer = pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, size); + PIPE_USAGE_DEFAULT, size); rctx->gs_rings.gsvs_ring.buffer_size = size; } diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c index e0db492cf25..f42384c12ee 100644 --- a/src/gallium/drivers/r600/r600_uvd.c +++ b/src/gallium/drivers/r600/r600_uvd.c @@ -76,7 +76,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, template.width = align(tmpl->width, VL_MACROBLOCK_WIDTH); template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); - vl_video_buffer_template(&templ, &template, resource_formats[0], 1, array_size, PIPE_USAGE_STATIC, 0); + vl_video_buffer_template(&templ, &template, resource_formats[0], 1, array_size, PIPE_USAGE_DEFAULT, 0); if (ctx->b.chip_class < EVERGREEN || tmpl->interlaced) templ.bind = PIPE_BIND_LINEAR; resources[0] = (struct r600_texture *) @@ -85,7 +85,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, goto error; if (resource_formats[1] != PIPE_FORMAT_NONE) { - vl_video_buffer_template(&templ, &template, resource_formats[1], 1, array_size, PIPE_USAGE_STATIC, 1); + vl_video_buffer_template(&templ, &template, resource_formats[1], 1, array_size, PIPE_USAGE_DEFAULT, 1); if (ctx->b.chip_class < EVERGREEN || tmpl->interlaced) templ.bind = PIPE_BIND_LINEAR; resources[1] = (struct r600_texture *) @@ -95,7 +95,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, } if (resource_formats[2] != PIPE_FORMAT_NONE) { - vl_video_buffer_template(&templ, &template, resource_formats[2], 1, array_size, PIPE_USAGE_STATIC, 2); + vl_video_buffer_template(&templ, &template, resource_formats[2], 1, array_size, PIPE_USAGE_DEFAULT, 2); if (ctx->b.chip_class < EVERGREEN || tmpl->interlaced) templ.bind = PIPE_BIND_LINEAR; resources[2] = (struct r600_texture *) diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 59578e1ad53..068141c347d 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -115,7 +115,6 @@ bool r600_init_resource(struct r600_common_screen *rscreen, res->domains = RADEON_DOMAIN_GTT; break; case PIPE_USAGE_DEFAULT: - case PIPE_USAGE_STATIC: case PIPE_USAGE_IMMUTABLE: default: /* Not listing GTT here improves performance in some apps. */ diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index b324d8e0f17..7af8124eb34 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -61,7 +61,7 @@ bool r600_common_context_init(struct r600_common_context *rctx, r600_query_init(rctx); rctx->allocator_so_filled_size = u_suballocator_create(&rctx->b, 4096, 4, - 0, PIPE_USAGE_STATIC, TRUE); + 0, PIPE_USAGE_DEFAULT, TRUE); if (!rctx->allocator_so_filled_size) return false; diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 84c3daa7728..356e0af35b7 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -453,7 +453,7 @@ void r600_texture_init_cmask(struct r600_common_screen *rscreen, rtex->cmask_buffer = (struct r600_resource *) pipe_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, rtex->cmask.size); + PIPE_USAGE_DEFAULT, rtex->cmask.size); if (rtex->cmask_buffer == NULL) { rtex->cmask.size = 0; } @@ -546,7 +546,7 @@ static void r600_texture_allocate_htile(struct r600_common_screen *rscreen, /* XXX don't allocate it separately */ rtex->htile_buffer = (struct r600_resource*) pipe_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, htile_size); + PIPE_USAGE_DEFAULT, htile_size); if (rtex->htile_buffer == NULL) { /* this is not a fatal error as we can still keep rendering * without htile buffer */ @@ -827,7 +827,7 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx, resource.array_size = texture->array_size; resource.last_level = texture->last_level; resource.nr_samples = texture->nr_samples; - resource.usage = staging ? PIPE_USAGE_STAGING : PIPE_USAGE_STATIC; + resource.usage = staging ? PIPE_USAGE_STAGING : PIPE_USAGE_DEFAULT; resource.bind = texture->bind & ~PIPE_BIND_DEPTH_STENCIL; resource.flags = texture->flags | R600_RESOURCE_FLAG_FLUSHED_DEPTH; @@ -861,7 +861,7 @@ static void r600_init_temp_resource_from_box(struct pipe_resource *res, res->height0 = box->height; res->depth0 = 1; res->array_size = 1; - res->usage = flags & R600_RESOURCE_FLAG_TRANSFER ? PIPE_USAGE_STAGING : PIPE_USAGE_STATIC; + res->usage = flags & R600_RESOURCE_FLAG_TRANSFER ? PIPE_USAGE_STAGING : PIPE_USAGE_DEFAULT; res->flags = flags; /* We must set the correct texture target and dimensions for a 3D box. */ diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index f717371bb2a..d45bc805129 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -126,7 +126,7 @@ static void si_init_descriptors(struct si_context *sctx, desc->buffer = (struct r600_resource*) pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, + PIPE_USAGE_DEFAULT, SI_NUM_CONTEXTS * desc->context_size); r600_context_bo_reloc(&sctx->b, &sctx->b.rings.gfx, desc->buffer, RADEON_USAGE_READWRITE); diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 14dfd30bfb0..1c899269f04 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -183,7 +183,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void * * with a NULL buffer). We need to use a dummy buffer instead. */ if (sctx->b.chip_class == CIK) { sctx->null_const_buf.buffer = pipe_buffer_create(screen, PIPE_BIND_CONSTANT_BUFFER, - PIPE_USAGE_STATIC, 16); + PIPE_USAGE_DEFAULT, 16); sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0; for (shader = 0; shader < SI_NUM_SHADERS; shader++) { diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 7c8fe766951..480e3f8a520 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -548,13 +548,13 @@ static void si_init_gs_rings(struct si_context *sctx) sctx->esgs_ring.buffer = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, size); + PIPE_USAGE_DEFAULT, size); sctx->esgs_ring.buffer_size = size; size = 64 * 1024 * 1024; sctx->gsvs_ring.buffer = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STATIC, size); + PIPE_USAGE_DEFAULT, size); sctx->gsvs_ring.buffer_size = size; if (sctx->b.chip_class >= CIK) { diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 98f1340f6aa..241288f08bd 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -62,7 +62,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, template.width = align(tmpl->width, VL_MACROBLOCK_WIDTH); template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); - vl_video_buffer_template(&templ, &template, resource_formats[0], 1, array_size, PIPE_USAGE_STATIC, 0); + vl_video_buffer_template(&templ, &template, resource_formats[0], 1, array_size, PIPE_USAGE_DEFAULT, 0); /* TODO: get tiling working */ templ.bind = PIPE_BIND_LINEAR; resources[0] = (struct r600_texture *) @@ -71,7 +71,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, goto error; if (resource_formats[1] != PIPE_FORMAT_NONE) { - vl_video_buffer_template(&templ, &template, resource_formats[1], 1, array_size, PIPE_USAGE_STATIC, 1); + vl_video_buffer_template(&templ, &template, resource_formats[1], 1, array_size, PIPE_USAGE_DEFAULT, 1); templ.bind = PIPE_BIND_LINEAR; resources[1] = (struct r600_texture *) pipe->screen->resource_create(pipe->screen, &templ); @@ -80,7 +80,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, } if (resource_formats[2] != PIPE_FORMAT_NONE) { - vl_video_buffer_template(&templ, &template, resource_formats[2], 1, array_size, PIPE_USAGE_STATIC, 2); + vl_video_buffer_template(&templ, &template, resource_formats[2], 1, array_size, PIPE_USAGE_DEFAULT, 2); templ.bind = PIPE_BIND_LINEAR; resources[2] = (struct r600_texture *) pipe->screen->resource_create(pipe->screen, &templ); diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c index 89a5dc1da77..d4d77200f59 100644 --- a/src/gallium/drivers/svga/svga_draw_arrays.c +++ b/src/gallium/drivers/svga/svga_draw_arrays.c @@ -50,7 +50,7 @@ generate_indices(struct svga_hwtnl *hwtnl, void *dst_map = NULL; dst = pipe_buffer_create(pipe->screen, - PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_STATIC, size); + PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_DEFAULT, size); if (dst == NULL) goto fail; diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c index 411b8d9b9f1..3384095e6f5 100644 --- a/src/gallium/drivers/svga/svga_draw_elements.c +++ b/src/gallium/drivers/svga/svga_draw_elements.c @@ -58,7 +58,7 @@ translate_indices(struct svga_hwtnl *hwtnl, struct pipe_resource *src, size = index_size * nr; dst = pipe_buffer_create(pipe->screen, - PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_STATIC, size); + PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_DEFAULT, size); if (dst == NULL) goto fail; |