summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-10-07 18:16:22 -0600
committerBrian Paul <[email protected]>2013-10-23 10:15:38 -0600
commita3ed98f7aa85636579a5696bf036ec13e5c9104a (patch)
tree104078a2a8b875e5ec7c5524e7797d46d109d7e0 /src/gallium/drivers/trace
parentb11fc226e6b106de8eb777a8e62c4f7303c66fbc (diff)
gallium: new, unified pipe_context::set_sampler_views() function
The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r--src/gallium/drivers/trace/tr_context.c62
1 files changed, 5 insertions, 57 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 1b349863f58..78911aa8f5e 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -903,71 +903,21 @@ trace_context_set_sampler_views(struct pipe_context *_pipe,
}
views = unwrapped_views;
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- trace_dump_call_begin("pipe_context", "set_vertex_sampler_views");
- break;
- case PIPE_SHADER_GEOMETRY:
- trace_dump_call_begin("pipe_context", "set_geometry_sampler_views");
- break;
- case PIPE_SHADER_FRAGMENT:
- trace_dump_call_begin("pipe_context", "set_fragment_sampler_views");
- break;
- default:
- debug_error("Unexpected shader in trace_context_set_sampler_views()");
- }
+ trace_dump_call_begin("pipe_context", "set_sampler_views");
trace_dump_arg(ptr, pipe);
- /*trace_dump_arg(uint, shader);*/
+ trace_dump_arg(uint, shader);
+ trace_dump_arg(uint, start);
trace_dump_arg(uint, num);
trace_dump_arg_array(ptr, views, num);
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- pipe->set_vertex_sampler_views(pipe, num, views);
- break;
- case PIPE_SHADER_GEOMETRY:
- pipe->set_geometry_sampler_views(pipe, num, views);
- break;
- case PIPE_SHADER_FRAGMENT:
- pipe->set_fragment_sampler_views(pipe, num, views);
- break;
- default:
- debug_error("Unexpected shader in trace_context_set_sampler_views()");
- }
+ pipe->set_sampler_views(pipe, shader, start, num, views);
trace_dump_call_end();
}
static INLINE void
-trace_context_set_fragment_sampler_views(struct pipe_context *_pipe,
- unsigned num,
- struct pipe_sampler_view **views)
-{
- trace_context_set_sampler_views(_pipe, PIPE_SHADER_FRAGMENT, 0, num, views);
-}
-
-
-static INLINE void
-trace_context_set_vertex_sampler_views(struct pipe_context *_pipe,
- unsigned num,
- struct pipe_sampler_view **views)
-{
- trace_context_set_sampler_views(_pipe, PIPE_SHADER_VERTEX, 0, num, views);
-}
-
-
-static INLINE void
-trace_context_set_geometry_sampler_views(struct pipe_context *_pipe,
- unsigned num,
- struct pipe_sampler_view **views)
-{
- trace_context_set_sampler_views(_pipe, PIPE_SHADER_GEOMETRY, 0, num, views);
-}
-
-
-static INLINE void
trace_context_set_vertex_buffers(struct pipe_context *_pipe,
unsigned start_slot, unsigned num_buffers,
const struct pipe_vertex_buffer *buffers)
@@ -1556,9 +1506,7 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(set_polygon_stipple);
TR_CTX_INIT(set_scissor_states);
TR_CTX_INIT(set_viewport_states);
- TR_CTX_INIT(set_fragment_sampler_views);
- TR_CTX_INIT(set_vertex_sampler_views);
- TR_CTX_INIT(set_geometry_sampler_views);
+ TR_CTX_INIT(set_sampler_views);
TR_CTX_INIT(create_sampler_view);
TR_CTX_INIT(sampler_view_destroy);
TR_CTX_INIT(create_surface);