gallium: remove pipe_context::redefine_user_buffer
authorMarek Olšák <maraeo@gmail.com>
Tue, 24 Apr 2012 19:12:37 +0000 (21:12 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 29 Apr 2012 23:14:28 +0000 (01:14 +0200)
21 files changed:
src/gallium/auxiliary/util/u_transfer.c
src/gallium/auxiliary/util/u_transfer.h
src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/llvmpipe/lp_state_vertex.c
src/gallium/drivers/noop/noop_state.c
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/nvc0/nvc0_state.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/radeonsi/evergreen_state.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/softpipe/sp_state_vertex.c
src/gallium/drivers/svga/svga_resource.c
src/gallium/drivers/svga/svga_resource_buffer.h
src/gallium/drivers/svga/svga_resource_buffer_upload.c
src/gallium/drivers/trace/tr_context.c
src/gallium/include/pipe/p_context.h

index 673a984fcb2689fa206bbccfa8eab9721915fb31..0b2679ffdb4c0f10aeaf2be8fbbab3be4b99c0f1 100644 (file)
@@ -125,11 +125,3 @@ void u_default_transfer_destroy(struct pipe_context *pipe,
 {
    FREE(transfer);
 }
-
-void u_default_redefine_user_buffer(struct pipe_context *ctx,
-                                    struct pipe_resource *resource,
-                                    unsigned offset,
-                                    unsigned size)
-{
-   resource->width0 = MAX2(resource->width0, offset + size);
-}
index 5b5ddeb4abacbeb54f16728e1f65095d45831bdc..f4fdf9a48408aa60277e8edb9ebe2cff5244360e 100644 (file)
@@ -124,9 +124,4 @@ void u_transfer_inline_write_vtbl( struct pipe_context *rm_ctx,
                                    unsigned stride,
                                    unsigned layer_stride);
 
-void u_default_redefine_user_buffer(struct pipe_context *ctx,
-                                    struct pipe_resource *resource,
-                                    unsigned offset,
-                                    unsigned size);
-
 #endif
index f0bbf4e8a958a51c4776bb952905868fc77cbded..4dae61ca64a35d719c00e92e2c0dba88f22ff96c 100644 (file)
@@ -948,19 +948,6 @@ galahad_context_transfer_inline_write(struct pipe_context *_context,
 }
 
 
-static void galahad_redefine_user_buffer(struct pipe_context *_context,
-                                         struct pipe_resource *_resource,
-                                         unsigned offset, unsigned size)
-{
-   struct galahad_context *glhd_context = galahad_context(_context);
-   struct galahad_resource *glhd_resource = galahad_resource(_resource);
-   struct pipe_context *context = glhd_context->pipe;
-   struct pipe_resource *resource = glhd_resource->resource;
-
-   context->redefine_user_buffer(context, resource, offset, size);
-}
-
-
 struct pipe_context *
 galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
 {
@@ -1033,7 +1020,6 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    glhd_pipe->base.transfer_unmap = galahad_context_transfer_unmap;
    glhd_pipe->base.transfer_flush_region = galahad_context_transfer_flush_region;
    glhd_pipe->base.transfer_inline_write = galahad_context_transfer_inline_write;
-   glhd_pipe->base.redefine_user_buffer = galahad_redefine_user_buffer;
 
    glhd_pipe->pipe = pipe;
 
index d38d1ede5d6eca18bff6484342ae245fc8f63e52..772e229ceff7d5e1201cf171de2fba7541dad64b 100644 (file)
@@ -1095,7 +1095,6 @@ i915_init_state_functions( struct i915_context *i915 )
    i915->base.set_viewport_state = i915_set_viewport_state;
    i915->base.set_vertex_buffers = i915_set_vertex_buffers;
    i915->base.set_index_buffer = i915_set_index_buffer;
-   i915->base.redefine_user_buffer = u_default_redefine_user_buffer;
 }
 
 void
index 29421849079fd7d1180fc4cc0c1e133cfe6bb758..2d47296f230df969f5c9a5361299a5a654d8a461 100644 (file)
@@ -835,19 +835,6 @@ identity_context_transfer_inline_write(struct pipe_context *_context,
 }
 
 
-static void identity_redefine_user_buffer(struct pipe_context *_context,
-                                          struct pipe_resource *_resource,
-                                          unsigned offset, unsigned size)
-{
-   struct identity_context *id_context = identity_context(_context);
-   struct identity_resource *id_resource = identity_resource(_resource);
-   struct pipe_context *context = id_context->pipe;
-   struct pipe_resource *resource = id_resource->resource;
-
-   context->redefine_user_buffer(context, resource, offset, size);
-}
-
-
 struct pipe_context *
 identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
 {
@@ -920,7 +907,6 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    id_pipe->base.transfer_unmap = identity_context_transfer_unmap;
    id_pipe->base.transfer_flush_region = identity_context_transfer_flush_region;
    id_pipe->base.transfer_inline_write = identity_context_transfer_inline_write;
-   id_pipe->base.redefine_user_buffer = identity_redefine_user_buffer;
 
    id_pipe->pipe = pipe;
 
index be86f66de91aea20287b57e197be06d18501b90f..a62cfd553343d6d0da583729ab4df80b2af71ea0 100644 (file)
@@ -115,6 +115,4 @@ llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe)
 
    llvmpipe->pipe.set_vertex_buffers = llvmpipe_set_vertex_buffers;
    llvmpipe->pipe.set_index_buffer = llvmpipe_set_index_buffer;
-
-   llvmpipe->pipe.redefine_user_buffer = u_default_redefine_user_buffer;
 }
index f1387af3a39c90bc644a4487951a834ed4a81f2b..dbfe35b668c9fcba9bc11834d1e3dd062d119049 100644 (file)
@@ -320,7 +320,6 @@ void noop_init_state_functions(struct pipe_context *ctx)
        ctx->sampler_view_destroy = noop_sampler_view_destroy;
        ctx->surface_destroy = noop_surface_destroy;
        ctx->draw_vbo = noop_draw_vbo;
-       ctx->redefine_user_buffer = u_default_redefine_user_buffer;
        ctx->create_stream_output_target = noop_create_stream_output_target;
        ctx->stream_output_target_destroy = noop_stream_output_target_destroy;
        ctx->set_stream_output_targets = noop_set_stream_output_targets;
index 534d1f0794b3b8982e7468e4453d9689f41470b8..3b4cc99887721248f81bbeb4bb865894c4c33c67 100644 (file)
@@ -443,6 +443,4 @@ nv30_state_init(struct pipe_context *pipe)
 
    pipe->set_vertex_buffers = nv30_set_vertex_buffers;
    pipe->set_index_buffer = nv30_set_index_buffer;
-
-   pipe->redefine_user_buffer = u_default_redefine_user_buffer;
 }
index 34d2b6daeadfb51d9269ecc0a016cd35d566649c..afd6f2e929d122164cc42d7b0134f47686c74ce3 100644 (file)
@@ -965,7 +965,5 @@ nv50_init_state_functions(struct nv50_context *nv50)
 
    pipe->set_vertex_buffers = nv50_set_vertex_buffers;
    pipe->set_index_buffer = nv50_set_index_buffer;
-
-   pipe->redefine_user_buffer = u_default_redefine_user_buffer;
 }
 
index 0a23ecd27b1ad46be4356d8da323c8d0795cdeb2..9b1ae550fff9613804ab1ab7345af608b0348e52 100644 (file)
@@ -947,7 +947,5 @@ nvc0_init_state_functions(struct nvc0_context *nvc0)
    pipe->create_stream_output_target = nvc0_so_target_create;
    pipe->stream_output_target_destroy = nvc0_so_target_destroy;
    pipe->set_stream_output_targets = nvc0_set_transform_feedback_targets;
-
-   pipe->redefine_user_buffer = u_default_redefine_user_buffer;
 }
 
index 058e6f881f0fafbb0e832d756e76b07e568b549f..3822f2fd5d1e878f7b5db55b22bf40b6703ded01 100644 (file)
@@ -1934,7 +1934,6 @@ void r300_init_state_functions(struct r300_context* r300)
 
     r300->context.set_vertex_buffers = r300_set_vertex_buffers;
     r300->context.set_index_buffer = r300_set_index_buffer;
-    r300->context.redefine_user_buffer = u_default_redefine_user_buffer;
 
     r300->context.create_vertex_elements_state = r300_create_vertex_elements_state;
     r300->context.bind_vertex_elements_state = r300_bind_vertex_elements_state;
index 07771c177681caa5fbbca0732e4fc99d071988e7..4b9338d3464ecbb952a1fbe6cb4bbfe917077e17 100644 (file)
@@ -1868,7 +1868,6 @@ void evergreen_init_state_functions(struct r600_context *rctx)
        rctx->context.set_vertex_sampler_views = evergreen_set_vs_sampler_view;
        rctx->context.set_viewport_state = evergreen_set_viewport_state;
        rctx->context.sampler_view_destroy = r600_sampler_view_destroy;
-       rctx->context.redefine_user_buffer = u_default_redefine_user_buffer;
        rctx->context.texture_barrier = r600_texture_barrier;
        rctx->context.create_stream_output_target = r600_create_so_target;
        rctx->context.stream_output_target_destroy = r600_so_target_destroy;
index 1e7c5a43c02be85d7337d88480aa5b6176cbd693..81ffaa8bfd9346b1a16a47bc0ac72288c1027794 100644 (file)
@@ -1832,7 +1832,6 @@ void r600_init_state_functions(struct r600_context *rctx)
        rctx->context.set_vertex_sampler_views = r600_set_vs_sampler_views;
        rctx->context.set_viewport_state = r600_set_viewport_state;
        rctx->context.sampler_view_destroy = r600_sampler_view_destroy;
-       rctx->context.redefine_user_buffer = u_default_redefine_user_buffer;
        rctx->context.texture_barrier = r600_texture_barrier;
        rctx->context.create_stream_output_target = r600_create_so_target;
        rctx->context.stream_output_target_destroy = r600_so_target_destroy;
index c70b0b24d79e34260b5436b4e58ed0db956bfce3..75d6cadc6cccab60284f20fd2751ae92d0e8f629 100644 (file)
@@ -1825,7 +1825,6 @@ void cayman_init_state_functions(struct r600_context *rctx)
        rctx->context.set_vertex_sampler_views = evergreen_set_vs_sampler_view;
        rctx->context.set_viewport_state = evergreen_set_viewport_state;
        rctx->context.sampler_view_destroy = r600_sampler_view_destroy;
-       rctx->context.redefine_user_buffer = u_default_redefine_user_buffer;
        rctx->context.texture_barrier = r600_texture_barrier;
        rctx->context.create_stream_output_target = r600_create_so_target;
        rctx->context.stream_output_target_destroy = r600_so_target_destroy;
index 799b3a30c6302a5b4fe438f4c3067f025528e8ed..65f0d71031ba3555bc4c8e837d0bdbc9e1c8616a 100644 (file)
@@ -1139,21 +1139,6 @@ rbug_context_transfer_inline_write(struct pipe_context *_context,
 }
 
 
-static void rbug_redefine_user_buffer(struct pipe_context *_context,
-                                      struct pipe_resource *_resource,
-                                      unsigned offset, unsigned size)
-{
-   struct rbug_context *rb_pipe = rbug_context(_context);
-   struct rbug_resource *rb_resource = rbug_resource(_resource);
-   struct pipe_context *context = rb_pipe->pipe;
-   struct pipe_resource *resource = rb_resource->resource;
-
-   pipe_mutex_lock(rb_pipe->call_mutex);
-   context->redefine_user_buffer(context, resource, offset, size);
-   pipe_mutex_unlock(rb_pipe->call_mutex);
-}
-
-
 struct pipe_context *
 rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
 {
@@ -1237,7 +1222,6 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    rb_pipe->base.transfer_unmap = rbug_context_transfer_unmap;
    rb_pipe->base.transfer_flush_region = rbug_context_transfer_flush_region;
    rb_pipe->base.transfer_inline_write = rbug_context_transfer_inline_write;
-   rb_pipe->base.redefine_user_buffer = rbug_redefine_user_buffer;
 
    rb_pipe->pipe = pipe;
 
index aa0b333c7a9ae348145f5a8e57cbf852fd8c83e2..1dbd79807d0e7f466a535094ade59f9d489039aa 100644 (file)
@@ -120,5 +120,4 @@ softpipe_init_vertex_funcs(struct pipe_context *pipe)
 
    pipe->set_vertex_buffers = softpipe_set_vertex_buffers;
    pipe->set_index_buffer = softpipe_set_index_buffer;
-   pipe->redefine_user_buffer = u_default_redefine_user_buffer;
 }
index bb6236dce6778fc5bc92286d0dbbd38a49bd4280..b86469af12d602bc3c4e140c43d06566910f67dd 100644 (file)
@@ -64,7 +64,6 @@ svga_init_resource_functions(struct svga_context *svga)
    svga->pipe.transfer_unmap = u_transfer_unmap_vtbl;
    svga->pipe.transfer_destroy = u_transfer_destroy_vtbl;
    svga->pipe.transfer_inline_write = u_transfer_inline_write_vtbl;
-   svga->pipe.redefine_user_buffer = svga_redefine_user_buffer;
 }
 
 void
index ca8c8d1f5ea3a37d5d47fe939aa17922667d85df..da85f1a002e662bd3b9a8721cc3dfe5be05bac8e 100644 (file)
@@ -243,10 +243,4 @@ svga_winsys_buffer_create(struct svga_context *svga,
                           unsigned usage,
                           unsigned size);
 
-void
-svga_redefine_user_buffer(struct pipe_context *ctx,
-                          struct pipe_resource *resource,
-                          unsigned offset,
-                          unsigned size);
-
 #endif /* SVGA_BUFFER_H */
index e5273009d417f89306faf56d6d47a46a5035c399..94a324d6dba719315fa8e08840c20ab58ae0a867 100644 (file)
@@ -644,21 +644,3 @@ svga_context_flush_buffers(struct svga_context *svga)
       next = curr->next;
    }
 }
-
-
-void
-svga_redefine_user_buffer(struct pipe_context *pipe,
-                          struct pipe_resource *resource,
-                          unsigned offset,
-                          unsigned size)
-{
-   struct svga_buffer *sbuf = svga_buffer(resource);
-
-   assert(sbuf->user);
-   assert(!sbuf->dma.pending);
-   assert(!sbuf->handle);
-   assert(!sbuf->hwbuf);
-
-   /* use the default action of simply resizing the user buffer's size */
-   u_default_redefine_user_buffer(pipe, resource, offset, size);
-}
index 23f854ae9b85a27d4342ecdf2481140670667d62..11a2b16337075bdf5da0c172586937402680832b 100644 (file)
@@ -1480,30 +1480,6 @@ trace_context_transfer_inline_write(struct pipe_context *_context,
 }
 
 
-static void trace_redefine_user_buffer(struct pipe_context *_context,
-                                       struct pipe_resource *_resource,
-                                       unsigned offset, unsigned size)
-{
-   struct trace_context *tr_context = trace_context(_context);
-   struct trace_resource *tr_res = trace_resource(_resource);
-   struct pipe_context *context = tr_context->pipe;
-   struct pipe_resource *resource = tr_res->resource;
-
-   assert(resource->screen == context->screen);
-
-   trace_dump_call_begin("pipe_context", "redefine_user_buffer");
-
-   trace_dump_arg(ptr, context);
-   trace_dump_arg(ptr, resource);
-   trace_dump_arg(uint, offset);
-   trace_dump_arg(uint, size);
-
-   trace_dump_call_end();
-
-   context->redefine_user_buffer(context, resource, offset, size);
-}
-
-
 static void trace_render_condition(struct pipe_context *_context,
                                    struct pipe_query *query,
                                    uint mode)
@@ -1626,7 +1602,6 @@ trace_context_create(struct trace_screen *tr_scr,
    tr_ctx->base.transfer_unmap = trace_context_transfer_unmap;
    tr_ctx->base.transfer_flush_region = trace_context_transfer_flush_region;
    tr_ctx->base.transfer_inline_write = trace_context_transfer_inline_write;
-   tr_ctx->base.redefine_user_buffer = trace_redefine_user_buffer;
 
    tr_ctx->pipe = pipe;
 
index 1871b21461004fb350898de5faede857c9797233..7709177444f5db177fc125c29a9efafc3df98e5d 100644 (file)
@@ -390,15 +390,6 @@ struct pipe_context {
                                   unsigned stride,
                                   unsigned layer_stride);
 
-
-   /* Notify a driver that a content of a user buffer has been changed.
-    * The changed range is [offset, offset+size-1].
-    * The new width0 of the buffer is offset+size. */
-   void (*redefine_user_buffer)(struct pipe_context *,
-                                struct pipe_resource *,
-                                unsigned offset,
-                                unsigned size);
-
    /**
     * Flush any pending framebuffer writes and invalidate texture caches.
     */