From 0786f38b46c1dd33a0a0032c238b92742b5d71e2 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 10 Feb 2010 19:07:26 +0100 Subject: trace: adapt to stencil ref changes --- src/gallium/drivers/trace/tr_context.c | 19 +++++++++++++++++++ src/gallium/drivers/trace/tr_dump_state.c | 17 ++++++++++++++++- src/gallium/drivers/trace/tr_dump_state.h | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 34ceaa41c1..866e228cec 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -791,6 +791,24 @@ trace_context_set_blend_color(struct pipe_context *_pipe, } +static INLINE void +trace_context_set_stencil_ref(struct pipe_context *_pipe, + const struct pipe_stencil_ref *state) +{ + struct trace_context *tr_ctx = trace_context(_pipe); + struct pipe_context *pipe = tr_ctx->pipe; + + trace_dump_call_begin("pipe_context", "set_stencil_ref"); + + trace_dump_arg(ptr, pipe); + trace_dump_arg(stencil_ref, state); + + pipe->set_stencil_ref(pipe, state); + + trace_dump_call_end(); +} + + static INLINE void trace_context_set_clip_state(struct pipe_context *_pipe, const struct pipe_clip_state *state) @@ -1291,6 +1309,7 @@ trace_context_create(struct trace_screen *tr_scr, tr_ctx->base.bind_vs_state = trace_context_bind_vs_state; tr_ctx->base.delete_vs_state = trace_context_delete_vs_state; tr_ctx->base.set_blend_color = trace_context_set_blend_color; + tr_ctx->base.set_stencil_ref = trace_context_set_stencil_ref; tr_ctx->base.set_clip_state = trace_context_set_clip_state; tr_ctx->base.set_constant_buffer = trace_context_set_constant_buffer; tr_ctx->base.set_framebuffer_state = trace_context_set_framebuffer_state; diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c index 6648539a0f..62fa09accf 100644 --- a/src/gallium/drivers/trace/tr_dump_state.c +++ b/src/gallium/drivers/trace/tr_dump_state.c @@ -301,7 +301,6 @@ void trace_dump_depth_stencil_alpha_state(const struct pipe_depth_stencil_alpha_ trace_dump_member(uint, &state->stencil[i], fail_op); trace_dump_member(uint, &state->stencil[i], zpass_op); trace_dump_member(uint, &state->stencil[i], zfail_op); - trace_dump_member(uint, &state->stencil[i], ref_value); trace_dump_member(uint, &state->stencil[i], valuemask); trace_dump_member(uint, &state->stencil[i], writemask); trace_dump_struct_end(); @@ -381,6 +380,22 @@ void trace_dump_blend_color(const struct pipe_blend_color *state) trace_dump_struct_end(); } +void trace_dump_stencil_ref(const struct pipe_stencil_ref *state) +{ + if (!trace_dumping_enabled_locked()) + return; + + if(!state) { + trace_dump_null(); + return; + } + + trace_dump_struct_begin("pipe_stencil_ref"); + + trace_dump_member_array(uint, state, ref_value); + + trace_dump_struct_end(); +} void trace_dump_framebuffer_state(const struct pipe_framebuffer_state *state) { diff --git a/src/gallium/drivers/trace/tr_dump_state.h b/src/gallium/drivers/trace/tr_dump_state.h index c7860fd6e1..825519d044 100644 --- a/src/gallium/drivers/trace/tr_dump_state.h +++ b/src/gallium/drivers/trace/tr_dump_state.h @@ -59,6 +59,8 @@ void trace_dump_blend_state(const struct pipe_blend_state *state); void trace_dump_blend_color(const struct pipe_blend_color *state); +void trace_dump_stencil_ref(const struct pipe_stencil_ref *state); + void trace_dump_framebuffer_state(const struct pipe_framebuffer_state *state); void trace_dump_sampler_state(const struct pipe_sampler_state *state); -- cgit v1.2.3