Beispiel #1
0
static void
trace_screen_flush_frontbuffer(struct pipe_screen *_screen,
                               struct pipe_resource *_resource,
                               unsigned level, unsigned layer,
                               void *context_private,
                               struct pipe_box *sub_box)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct trace_resource *tr_res = trace_resource(_resource);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_resource *resource = tr_res->resource;

   trace_dump_call_begin("pipe_screen", "flush_frontbuffer");

   trace_dump_arg(ptr, screen);
   trace_dump_arg(ptr, resource);
   trace_dump_arg(uint, level);
   trace_dump_arg(uint, layer);
   /* XXX: hide, as there is nothing we can do with this
   trace_dump_arg(ptr, context_private);
   */

   screen->flush_frontbuffer(screen, resource, level, layer, context_private, sub_box);

   trace_dump_call_end();
}
static struct pipe_surface *
trace_screen_get_tex_surface(struct pipe_screen *_screen,
                             struct pipe_resource *_texture,
                             unsigned face, unsigned level,
                             unsigned zslice,
                             unsigned usage)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct trace_resource *tr_tex = trace_resource(_texture);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_resource *texture = tr_tex->resource;
   struct pipe_surface *result = NULL;

   assert(texture->screen == screen);

   trace_dump_call_begin("pipe_screen", "get_tex_surface");

   trace_dump_arg(ptr, screen);
   trace_dump_arg(ptr, texture);
   trace_dump_arg(uint, face);
   trace_dump_arg(uint, level);
   trace_dump_arg(uint, zslice);
   trace_dump_arg(uint, usage);

   result = screen->get_tex_surface(screen, texture, face, level, zslice, usage);

   trace_dump_ret(ptr, result);

   trace_dump_call_end();

   result = trace_surface_create(tr_tex, result);

   return result;
}
void trace_dump_resource_ptr(struct pipe_resource *_resource)
{
   if (!dumping)
      return;

   if (_resource) {
      struct trace_resource *tr_resource = trace_resource(_resource);
      trace_dump_ptr(tr_resource->resource);
   } else {
      trace_dump_null();
   }
}
Beispiel #4
0
static boolean
trace_screen_resource_get_handle(struct pipe_screen *_screen,
                                struct pipe_resource *_resource,
                                struct winsys_handle *handle)
{
   struct trace_screen *tr_screen = trace_screen(_screen);
   struct trace_resource *tr_resource = trace_resource(_resource);
   struct pipe_screen *screen = tr_screen->screen;
   struct pipe_resource *resource = tr_resource->resource;

   /* TODO trace call */

   return screen->resource_get_handle(screen, resource, handle);
}
Beispiel #5
0
static void
trace_screen_resource_destroy(struct pipe_screen *_screen,
			      struct pipe_resource *_resource)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct trace_resource *tr_res = trace_resource(_resource);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_resource *resource = tr_res->resource;

   assert(resource->screen == screen);

   trace_dump_call_begin("pipe_screen", "resource_destroy");

   trace_dump_arg(ptr, screen);
   trace_dump_arg(ptr, resource);

   trace_dump_call_end();

   trace_resource_destroy(tr_scr, tr_res);
}
static void
trace_screen_resource_destroy(struct pipe_screen *_screen,
			      struct pipe_resource *_texture)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct trace_resource *tr_tex = trace_resource(_texture);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_resource *texture = tr_tex->resource;

   assert(texture->screen == screen);

   trace_dump_call_begin("pipe_screen", "texture_destroy");

   trace_dump_arg(ptr, screen);
   trace_dump_arg(ptr, texture);

   trace_dump_call_end();

   trace_resource_destroy(tr_scr, tr_tex);
}