summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/trace
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
commit992382762a74fd834926fd2c3cd9e14a186e2dd5 (patch)
treec4572bb01331b71931b3570b36a7acfc38f79a68 /src/gallium/drivers/trace
parent05863c487756c1c9dc823cf639f77cad4111bd23 (diff)
parenta6e5c6c000df8655de3b41d5809547bb41c88c23 (diff)
Merge branch 'gallium-newclear'
Conflicts: src/gallium/state_trackers/python/p_context.i
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r--src/gallium/drivers/trace/tr_context.c78
1 files changed, 53 insertions, 25 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 344a50b462..9ca916fe7b 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1085,61 +1085,88 @@ trace_context_resource_copy_region(struct pipe_context *_pipe,
static INLINE void
-trace_context_resource_fill_region(struct pipe_context *_pipe,
- struct pipe_resource *dst,
- struct pipe_subresource subdst,
- unsigned dstx, unsigned dsty, unsigned dstz,
- unsigned width, unsigned height,
- unsigned value)
+trace_context_clear(struct pipe_context *_pipe,
+ unsigned buffers,
+ const float *rgba,
+ double depth,
+ unsigned stencil)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- dst = trace_resource_unwrap(tr_ctx, dst);
+ trace_dump_call_begin("pipe_context", "clear");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(uint, buffers);
+ trace_dump_arg_array(float, rgba, 4);
+ trace_dump_arg(float, depth);
+ trace_dump_arg(uint, stencil);
+
+ pipe->clear(pipe, buffers, rgba, depth, stencil);
+
+ trace_dump_call_end();
+}
+
+
+static INLINE void
+trace_context_clear_render_target(struct pipe_context *_pipe,
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
- trace_dump_call_begin("pipe_context", "resource_fill_region");
+ dst = trace_surface_unwrap(tr_ctx, dst);
+
+ trace_dump_call_begin("pipe_context", "clear_render_target");
trace_dump_arg(ptr, pipe);
trace_dump_arg(ptr, dst);
- trace_dump_arg_struct(subresource, subdst);
+ trace_dump_arg_array(float, rgba, 4);
trace_dump_arg(uint, dstx);
trace_dump_arg(uint, dsty);
- trace_dump_arg(uint, dstz);
trace_dump_arg(uint, width);
trace_dump_arg(uint, height);
- trace_dump_arg(uint, value);
- pipe->resource_fill_region(pipe, dst, subdst, dstx, dsty, dstz,
- width, height, value);
+ pipe->clear_render_target(pipe, dst, rgba, dstx, dsty, width, height);
trace_dump_call_end();
}
-
static INLINE void
-trace_context_clear(struct pipe_context *_pipe,
- unsigned buffers,
- const float *rgba,
- double depth,
- unsigned stencil)
+trace_context_clear_depth_stencil(struct pipe_context *_pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- trace_dump_call_begin("pipe_context", "clear");
+ dst = trace_surface_unwrap(tr_ctx, dst);
+
+ trace_dump_call_begin("pipe_context", "clear_depth_stencil");
trace_dump_arg(ptr, pipe);
- trace_dump_arg(uint, buffers);
- trace_dump_arg_array(float, rgba, 4);
+ trace_dump_arg(ptr, dst);
+ trace_dump_arg(uint, clear_flags);
trace_dump_arg(float, depth);
trace_dump_arg(uint, stencil);
+ trace_dump_arg(uint, dstx);
+ trace_dump_arg(uint, dsty);
+ trace_dump_arg(uint, width);
+ trace_dump_arg(uint, height);
- pipe->clear(pipe, buffers, rgba, depth, stencil);
+ pipe->clear_depth_stencil(pipe, dst, clear_flags, depth, stencil,
+ dstx, dsty, width, height);
trace_dump_call_end();
}
-
static INLINE void
trace_context_flush(struct pipe_context *_pipe,
unsigned flags,
@@ -1451,8 +1478,9 @@ trace_context_create(struct trace_screen *tr_scr,
tr_ctx->base.sampler_view_destroy = trace_sampler_view_destroy;
tr_ctx->base.set_vertex_buffers = trace_context_set_vertex_buffers;
tr_ctx->base.resource_copy_region = trace_context_resource_copy_region;
- tr_ctx->base.resource_fill_region = trace_context_resource_fill_region;
tr_ctx->base.clear = trace_context_clear;
+ tr_ctx->base.clear_render_target = trace_context_clear_render_target;
+ tr_ctx->base.clear_depth_stencil = trace_context_clear_depth_stencil;
tr_ctx->base.flush = trace_context_flush;
tr_ctx->base.is_resource_referenced = trace_is_resource_referenced;