summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/trace
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-05-18 16:20:44 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-05-18 16:20:44 +0200
commit43234cee40c48e14a3eab4268181d9b0b2b7cf79 (patch)
tree4eafa9bb75559f0502038796491da1f6ee0ffea3 /src/gallium/drivers/trace
parent2a15553e431f04d13b757a3a76e4eb7d794f1219 (diff)
gallium: implement set_sample_mask() in all drivers
prevents segfault when state trackers try to set default mask. Other option would be to make this required only for drivers supporting multisampling, but this seems more clean. Only dummy implementations (for normal drivers) provided (no driver supports multisampling yet neither).
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r--src/gallium/drivers/trace/tr_context.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 0edb685ac7..64a4316984 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -876,6 +876,22 @@ trace_context_set_clip_state(struct pipe_context *_pipe,
trace_dump_call_end();
}
+static INLINE void
+trace_context_set_sample_mask(struct pipe_context *_pipe,
+ unsigned sample_mask)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "set_sample_mask");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(uint, sample_mask);
+
+ pipe->set_sample_mask(pipe, sample_mask);
+
+ trace_dump_call_end();
+}
static INLINE void
trace_context_set_constant_buffer(struct pipe_context *_pipe,
@@ -1561,6 +1577,7 @@ trace_context_create(struct trace_screen *tr_scr,
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_sample_mask = trace_context_set_sample_mask;
tr_ctx->base.set_constant_buffer = trace_context_set_constant_buffer;
tr_ctx->base.set_framebuffer_state = trace_context_set_framebuffer_state;
tr_ctx->base.set_polygon_stipple = trace_context_set_polygon_stipple;