summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-05-17 21:25:07 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-05-17 21:25:07 +0200
commitbd771cda8e11a5f9a8bc5b8eab9ef4293df316e0 (patch)
tree7edf41d4f294825e916776fe4bd84530a23c8e05
parenta02ddd48c5f7350366115ac07c15113402a79ee2 (diff)
trace: adapt to interface changes
-rw-r--r--src/gallium/drivers/trace/tr_context.c63
-rw-r--r--src/gallium/drivers/trace/tr_screen.c5
2 files changed, 40 insertions, 28 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 3d1fb96b91..0edb685ac7 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1157,61 +1157,72 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe,
static INLINE void
-trace_context_surface_copy(struct pipe_context *_pipe,
- struct pipe_surface *dest,
- unsigned destx, unsigned desty,
- struct pipe_surface *src,
- unsigned srcx, unsigned srcy,
- unsigned width, unsigned height)
+trace_context_resource_copy_region(struct pipe_context *_pipe,
+ struct pipe_resource *dst,
+ struct pipe_subresource subdst,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src,
+ struct pipe_subresource subsrc,
+ unsigned srcx, unsigned srcy, unsigned srcz,
+ unsigned width, unsigned height)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- dest = trace_surface_unwrap(tr_ctx, dest);
- src = trace_surface_unwrap(tr_ctx, src);
+ dst = trace_resource_unwrap(tr_ctx, dst);
+ src = trace_resource_unwrap(tr_ctx, src);
- trace_dump_call_begin("pipe_context", "surface_copy");
+ trace_dump_call_begin("pipe_context", "resource_copy_region");
trace_dump_arg(ptr, pipe);
- trace_dump_arg(ptr, dest);
- trace_dump_arg(uint, destx);
- trace_dump_arg(uint, desty);
+ trace_dump_arg(ptr, dst);
+ trace_dump_arg_struct(subresource, subdst);
+ trace_dump_arg(uint, dstx);
+ trace_dump_arg(uint, dsty);
+ trace_dump_arg(uint, dstz);
trace_dump_arg(ptr, src);
+ trace_dump_arg_struct(subresource, subsrc);
trace_dump_arg(uint, srcx);
trace_dump_arg(uint, srcy);
+ trace_dump_arg(uint, srcz);
trace_dump_arg(uint, width);
trace_dump_arg(uint, height);
- pipe->surface_copy(pipe,
- dest, destx, desty,
- src, srcx, srcy, width, height);
+ pipe->resource_copy_region(pipe,
+ dst, subdst, dstx, dsty, dstz,
+ src, subsrc, srcx, srcy, srcz, width, height);
trace_dump_call_end();
}
static INLINE void
-trace_context_surface_fill(struct pipe_context *_pipe,
- struct pipe_surface *dst,
- unsigned dstx, unsigned dsty,
- unsigned width, unsigned height,
- unsigned value)
+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)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- dst = trace_surface_unwrap(tr_ctx, dst);
+ dst = trace_resource_unwrap(tr_ctx, dst);
- trace_dump_call_begin("pipe_context", "surface_fill");
+ trace_dump_call_begin("pipe_context", "resource_fill_region");
trace_dump_arg(ptr, pipe);
trace_dump_arg(ptr, dst);
+ trace_dump_arg_struct(subresource, subdst);
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->surface_fill(pipe, dst, dstx, dsty, width, height, value);
+ pipe->resource_fill_region(pipe, dst, subdst, dstx, dsty, dstz,
+ width, height, value);
trace_dump_call_end();
}
@@ -1560,10 +1571,8 @@ trace_context_create(struct trace_screen *tr_scr,
tr_ctx->base.create_sampler_view = trace_create_sampler_view;
tr_ctx->base.sampler_view_destroy = trace_sampler_view_destroy;
tr_ctx->base.set_vertex_buffers = trace_context_set_vertex_buffers;
- if (pipe->surface_copy)
- tr_ctx->base.surface_copy = trace_context_surface_copy;
- if (pipe->surface_fill)
- tr_ctx->base.surface_fill = trace_context_surface_fill;
+ 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.flush = trace_context_flush;
tr_ctx->base.is_resource_referenced = trace_is_resource_referenced;
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index 63a45d7e51..ffae6e94d1 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -134,6 +134,7 @@ static boolean
trace_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
+ unsigned sample_count,
unsigned tex_usage,
unsigned geom_flags)
{
@@ -146,10 +147,12 @@ trace_screen_is_format_supported(struct pipe_screen *_screen,
trace_dump_arg(ptr, screen);
trace_dump_arg(format, format);
trace_dump_arg(int, target);
+ trace_dump_arg(uint, sample_count);
trace_dump_arg(uint, tex_usage);
trace_dump_arg(uint, geom_flags);
- result = screen->is_format_supported(screen, format, target, tex_usage, geom_flags);
+ result = screen->is_format_supported(screen, format, target, sample_count,
+ tex_usage, geom_flags);
trace_dump_ret(bool, result);