trace: adapt to clear interface changes
authorRoland Scheidegger <sroland@vmware.com>
Fri, 28 May 2010 23:19:59 +0000 (01:19 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 28 May 2010 23:19:59 +0000 (01:19 +0200)
src/gallium/drivers/trace/tr_context.c

index 5cc244d4b779ea0bd73cad4b40660b567cbe4767..e8ac33f6e512b277d4d8af82fcf422db8043025e 100644 (file)
@@ -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_clearRT(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", "clearRT");
 
    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->clearRT(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_clearDS(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", "clearDS");
 
    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->clearDS(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.clearRT = trace_context_clearRT;
+   tr_ctx->base.clearDS = trace_context_clearDS;
    tr_ctx->base.flush = trace_context_flush;
    tr_ctx->base.is_resource_referenced = trace_is_resource_referenced;