aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-24 21:12:37 +0200
committerMarek Olšák <[email protected]>2012-04-30 01:14:28 +0200
commit43995c9470dd38cf80a60a169f5875de6798863f (patch)
treecffe218f880325eafec92207b1aa9eee17c869ef
parent4552fd50d959ab99546cfa994f8ba5bdf5d66bc7 (diff)
gallium: remove pipe_context::redefine_user_buffer
-rw-r--r--src/gallium/auxiliary/util/u_transfer.c8
-rw-r--r--src/gallium/auxiliary/util/u_transfer.h5
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c14
-rw-r--r--src/gallium/drivers/i915/i915_state.c1
-rw-r--r--src/gallium/drivers/identity/id_context.c14
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_vertex.c2
-rw-r--r--src/gallium/drivers/noop/noop_state.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c2
-rw-r--r--src/gallium/drivers/r300/r300_state.c1
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c1
-rw-r--r--src/gallium/drivers/r600/r600_state.c1
-rw-r--r--src/gallium/drivers/radeonsi/evergreen_state.c1
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c16
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c1
-rw-r--r--src/gallium/drivers/svga/svga_resource.c1
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.h6
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c18
-rw-r--r--src/gallium/drivers/trace/tr_context.c25
-rw-r--r--src/gallium/include/pipe/p_context.h9
21 files changed, 0 insertions, 131 deletions
diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c
index 673a984fcb2..0b2679ffdb4 100644
--- a/src/gallium/auxiliary/util/u_transfer.c
+++ b/src/gallium/auxiliary/util/u_transfer.c
@@ -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);
-}
diff --git a/src/gallium/auxiliary/util/u_transfer.h b/src/gallium/auxiliary/util/u_transfer.h
index 5b5ddeb4aba..f4fdf9a4840 100644
--- a/src/gallium/auxiliary/util/u_transfer.h
+++ b/src/gallium/auxiliary/util/u_transfer.h
@@ -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
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index f0bbf4e8a95..4dae61ca64a 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -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;
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index d38d1ede5d6..772e229ceff 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -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
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index 29421849079..2d47296f230 100644
--- a/src/gallium/drivers/identity/id_context.c
+++ b/src/gallium/drivers/identity/id_context.c
@@ -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;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
index be86f66de91..a62cfd55334 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
@@ -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;
}
diff --git a/src/gallium/drivers/noop/noop_state.c b/src/gallium/drivers/noop/noop_state.c
index f1387af3a39..dbfe35b668c 100644
--- a/src/gallium/drivers/noop/noop_state.c
+++ b/src/gallium/drivers/noop/noop_state.c
@@ -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;
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 534d1f0794b..3b4cc998877 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -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;
}
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 34d2b6daead..afd6f2e929d 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -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;
}
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index 0a23ecd27b1..9b1ae550fff 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -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;
}
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 058e6f881f0..3822f2fd5d1 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -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;
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 07771c17768..4b9338d3464 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -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;
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 1e7c5a43c02..81ffaa8bfd9 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -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;
diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c
index c70b0b24d79..75d6cadc6cc 100644
--- a/src/gallium/drivers/radeonsi/evergreen_state.c
+++ b/src/gallium/drivers/radeonsi/evergreen_state.c
@@ -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;
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 799b3a30c63..65f0d71031b 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -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;
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index aa0b333c7a9..1dbd79807d0 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -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;
}
diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c
index bb6236dce67..b86469af12d 100644
--- a/src/gallium/drivers/svga/svga_resource.c
+++ b/src/gallium/drivers/svga/svga_resource.c
@@ -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
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index ca8c8d1f5ea..da85f1a002e 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -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 */
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index e5273009d41..94a324d6dba 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -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);
-}
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 23f854ae9b8..11a2b163370 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -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;
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 1871b214610..7709177444f 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -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.
*/