summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-09-12 15:08:10 -0600
committerBrian Paul <[email protected]>2013-10-03 14:05:26 -0600
commit6ef9fc791e289de2cec036fa4d648d061b47b35e (patch)
treea3dbc58cf40a8d1878068a3e09ee4f8b576d3cd0 /src/gallium/drivers/trace/tr_context.c
parente64112b1f95e2ce4d7172e286f6c097d82387f01 (diff)
trace: implement pipe_context::bind_sampler_states()
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r--src/gallium/drivers/trace/tr_context.c70
1 files changed, 42 insertions, 28 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index fdd5a7a1285..787028acf8b 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -302,36 +302,49 @@ trace_context_bind_sampler_states(struct pipe_context *_pipe,
/* remove this when we have pipe->bind_sampler_states(..., start, ...) */
assert(start == 0);
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- trace_dump_call_begin("pipe_context", "bind_vertex_sampler_states");
- break;
- case PIPE_SHADER_GEOMETRY:
- trace_dump_call_begin("pipe_context", "bind_geometry_sampler_states");
- break;
- case PIPE_SHADER_FRAGMENT:
- trace_dump_call_begin("pipe_context", "bind_fragment_sampler_states");
- break;
- default:
- debug_error("Unexpected shader in trace_context_bind_sampler_states()");
- }
+ if (pipe->bind_sampler_states) {
+ trace_dump_call_begin("pipe_context", "bind_sampler_states");
- trace_dump_arg(ptr, pipe);
- trace_dump_arg(uint, num_states);
- trace_dump_arg_array(ptr, states, num_states);
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(uint, shader);
+ trace_dump_arg(uint, start);
+ trace_dump_arg(uint, num_states);
+ trace_dump_arg_array(ptr, states, num_states);
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- pipe->bind_vertex_sampler_states(pipe, num_states, states);
- break;
- case PIPE_SHADER_GEOMETRY:
- pipe->bind_geometry_sampler_states(pipe, num_states, states);
- break;
- case PIPE_SHADER_FRAGMENT:
- pipe->bind_fragment_sampler_states(pipe, num_states, states);
- break;
- default:
- debug_error("Unexpected shader in trace_context_bind_sampler_states()");
+ pipe->bind_sampler_states(pipe, shader, start, num_states, states);
+ }
+ else {
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ trace_dump_call_begin("pipe_context", "bind_vertex_sampler_states");
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ trace_dump_call_begin("pipe_context", "bind_geometry_sampler_states");
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ trace_dump_call_begin("pipe_context", "bind_fragment_sampler_states");
+ break;
+ default:
+ debug_error("Unexpected shader in trace_context_bind_sampler_states()");
+ }
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(uint, num_states);
+ trace_dump_arg_array(ptr, states, num_states);
+
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ pipe->bind_vertex_sampler_states(pipe, num_states, states);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ pipe->bind_geometry_sampler_states(pipe, num_states, states);
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ pipe->bind_fragment_sampler_states(pipe, num_states, states);
+ break;
+ default:
+ debug_error("Unexpected shader in trace_context_bind_sampler_states()");
+ }
}
trace_dump_call_end();
@@ -1579,6 +1592,7 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(bind_blend_state);
TR_CTX_INIT(delete_blend_state);
TR_CTX_INIT(create_sampler_state);
+ TR_CTX_INIT(bind_sampler_states);
TR_CTX_INIT(bind_fragment_sampler_states);
TR_CTX_INIT(bind_vertex_sampler_states);
TR_CTX_INIT(bind_geometry_sampler_states);