Пример #1
0
struct pipe_screen *
trace_screen_create(struct pipe_screen *screen)
{
   struct trace_screen *tr_scr;

   if(!screen)
      goto error1;

   if (!trace_enabled())
      goto error1;

   trace_dump_call_begin("", "pipe_screen_create");

   tr_scr = CALLOC_STRUCT(trace_screen);
   if(!tr_scr)
      goto error2;

   tr_scr->base.destroy = trace_screen_destroy;
   tr_scr->base.get_name = trace_screen_get_name;
   tr_scr->base.get_vendor = trace_screen_get_vendor;
   tr_scr->base.get_param = trace_screen_get_param;
   tr_scr->base.get_shader_param = trace_screen_get_shader_param;
   tr_scr->base.get_paramf = trace_screen_get_paramf;
   tr_scr->base.is_format_supported = trace_screen_is_format_supported;
   assert(screen->context_create);
   tr_scr->base.context_create = trace_screen_context_create;
   tr_scr->base.resource_create = trace_screen_resource_create;
   tr_scr->base.resource_from_handle = trace_screen_resource_from_handle;
   tr_scr->base.resource_get_handle = trace_screen_resource_get_handle;
   tr_scr->base.resource_destroy = trace_screen_resource_destroy;
   tr_scr->base.fence_reference = trace_screen_fence_reference;
   tr_scr->base.fence_signalled = trace_screen_fence_signalled;
   tr_scr->base.fence_finish = trace_screen_fence_finish;
   tr_scr->base.flush_frontbuffer = trace_screen_flush_frontbuffer;
   tr_scr->base.get_timestamp = trace_screen_get_timestamp;

   tr_scr->screen = screen;

   trace_dump_ret(ptr, screen);
   trace_dump_call_end();

   return &tr_scr->base;

error2:
   trace_dump_ret(ptr, screen);
   trace_dump_call_end();
error1:
   return screen;
}
Пример #2
0
static INLINE void
trace_context_draw_arrays(struct pipe_context *_pipe,
                          unsigned mode, unsigned start, unsigned count)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
      return;

   trace_context_draw_block(tr_ctx, 1);

   trace_dump_call_begin("pipe_context", "draw_arrays");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(uint, mode);
   trace_dump_arg(uint, start);
   trace_dump_arg(uint, count);

   pipe->draw_arrays(pipe, mode, start, count);

   trace_dump_call_end();

   trace_context_draw_block(tr_ctx, 2);
}
Пример #3
0
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)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   dst = trace_surface_unwrap(tr_ctx, dst);

   trace_dump_call_begin("pipe_context", "surface_fill");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, dst);
   trace_dump_arg(uint, dstx);
   trace_dump_arg(uint, dsty);
   trace_dump_arg(uint, width);
   trace_dump_arg(uint, height);

   pipe->surface_fill(pipe, dst, dstx, dsty, width, height, value);

   trace_dump_call_end();
}
Пример #4
0
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)
{
   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);

   trace_dump_call_begin("pipe_context", "surface_copy");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, dest);
   trace_dump_arg(uint, destx);
   trace_dump_arg(uint, desty);
   trace_dump_arg(ptr, src);
   trace_dump_arg(uint, srcx);
   trace_dump_arg(uint, srcy);
   trace_dump_arg(uint, width);
   trace_dump_arg(uint, height);

   pipe->surface_copy(pipe,
                      dest, destx, desty,
                      src, srcx, srcy, width, height);

   trace_dump_call_end();
}
Пример #5
0
static INLINE void
trace_context_set_vertex_buffers(struct pipe_context *_pipe,
                                 unsigned num_buffers,
                                 const struct pipe_vertex_buffer *buffers)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;
   unsigned i;

   for(i = 0; i < num_buffers; ++i)
      trace_screen_user_buffer_update(_pipe->screen, buffers[i].buffer);

   trace_dump_call_begin("pipe_context", "set_vertex_buffers");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(uint, num_buffers);

   trace_dump_arg_begin("buffers");
   trace_dump_struct_array(vertex_buffer, buffers, num_buffers);
   trace_dump_arg_end();

   if (num_buffers) {
      struct pipe_vertex_buffer *_buffers = malloc(num_buffers * sizeof(*_buffers));
      memcpy(_buffers, buffers, num_buffers * sizeof(*_buffers));
      for (i = 0; i < num_buffers; i++)
         _buffers[i].buffer = trace_buffer_unwrap(tr_ctx, buffers[i].buffer);
      pipe->set_vertex_buffers(pipe, num_buffers, _buffers);
      free(_buffers);
   } else {
      pipe->set_vertex_buffers(pipe, num_buffers, NULL);
   }

   trace_dump_call_end();
}
Пример #6
0
static INLINE void
trace_context_draw_elements(struct pipe_context *_pipe,
                          struct pipe_buffer *_indexBuffer,
                          unsigned indexSize,
                          unsigned mode, unsigned start, unsigned count)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
   struct pipe_context *pipe = tr_ctx->pipe;
   struct pipe_buffer *indexBuffer = tr_buf->buffer;

   if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
      return;

   trace_context_draw_block(tr_ctx, 1);

   trace_screen_user_buffer_update(_pipe->screen, indexBuffer);

   trace_dump_call_begin("pipe_context", "draw_elements");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, indexBuffer);
   trace_dump_arg(uint, indexSize);
   trace_dump_arg(uint, mode);
   trace_dump_arg(uint, start);
   trace_dump_arg(uint, count);

   pipe->draw_elements(pipe, indexBuffer, indexSize, mode, start, count);

   trace_dump_call_end();

   trace_context_draw_block(tr_ctx, 2);
}
Пример #7
0
static INLINE void
trace_context_set_vertex_sampler_textures(struct pipe_context *_pipe,
                                          unsigned num_textures,
                                          struct pipe_texture **textures)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct trace_texture *tr_tex;
   struct pipe_context *pipe = tr_ctx->pipe;
   struct pipe_texture *unwrapped_textures[PIPE_MAX_VERTEX_SAMPLERS];
   unsigned i;

   tr_ctx->curr.num_vert_texs = num_textures;
   for(i = 0; i < num_textures; ++i) {
      tr_tex = trace_texture(textures[i]);
      tr_ctx->curr.vert_tex[i] = tr_tex;
      unwrapped_textures[i] = tr_tex ? tr_tex->texture : NULL;
   }
   textures = unwrapped_textures;

   trace_dump_call_begin("pipe_context", "set_vertex_sampler_textures");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(uint, num_textures);
   trace_dump_arg_array(ptr, textures, num_textures);

   pipe->set_vertex_sampler_textures(pipe, num_textures, textures);

   trace_dump_call_end();
}
Пример #8
0
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;
}
Пример #9
0
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)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct pipe_screen *screen = tr_scr->screen;
   boolean result;

   trace_dump_call_begin("pipe_screen", "is_format_supported");

   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);

   result = screen->is_format_supported(screen, format, target, sample_count,
                                        tex_usage);

   trace_dump_ret(bool, result);

   trace_dump_call_end();

   return result;
}
Пример #10
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();
}
Пример #11
0
static struct pipe_buffer *
trace_winsys_buffer_create(struct pipe_winsys *_winsys, 
                           unsigned alignment, 
                           unsigned usage,
                           unsigned size)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;
   struct pipe_buffer *buffer;
   
   trace_dump_call_begin("pipe_winsys", "buffer_create");
   
   trace_dump_arg(ptr, winsys);
   trace_dump_arg(uint, alignment);
   trace_dump_arg(uint, usage);
   trace_dump_arg(uint, size);

   buffer = winsys->buffer_create(winsys, alignment, usage, size);
   
   trace_dump_ret(ptr, buffer);
   
   trace_dump_call_end();

   /* Zero the buffer to avoid dumping uninitialized memory */
   if(buffer->usage & PIPE_BUFFER_USAGE_CPU_WRITE) {
      void *map;
      map = winsys->buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
      if(map) {
         memset(map, 0, buffer->size);
         winsys->buffer_unmap(winsys, buffer);
      }
   }
   
   return buffer;
}
Пример #12
0
static struct pipe_buffer *
trace_winsys_user_buffer_create(struct pipe_winsys *_winsys, 
                                void *data,
                                unsigned size)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;
   struct pipe_buffer *result;
   
   trace_dump_call_begin("pipe_winsys", "user_buffer_create");
   
   trace_dump_arg(ptr, winsys);
   trace_dump_arg_begin("data");
   trace_dump_bytes(data, size);
   trace_dump_arg_end();
   trace_dump_arg(uint, size);

   result = winsys->user_buffer_create(winsys, data, size);
   
   trace_dump_ret(ptr, result);
   
   trace_dump_call_end();
   
   /* XXX: Mark the user buffers. (we should wrap pipe_buffers, but is is 
    * impossible to do so while texture-less surfaces are still around */
   if(result) {
      assert(!(result->usage & TRACE_BUFFER_USAGE_USER));
      result->usage |= TRACE_BUFFER_USAGE_USER;
   }
   
   return result;
}
Пример #13
0
static INLINE void
trace_context_set_constant_buffer(struct pipe_context *_pipe,
                                  uint shader, uint index,
                                  const struct pipe_constant_buffer *buffer)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   if (buffer)
      trace_screen_user_buffer_update(_pipe->screen, buffer->buffer);

   trace_dump_call_begin("pipe_context", "set_constant_buffer");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(uint, shader);
   trace_dump_arg(uint, index);
   trace_dump_arg(constant_buffer, buffer);

   if (buffer) {
      struct pipe_constant_buffer _buffer;
      _buffer.buffer = trace_buffer_unwrap(tr_ctx, buffer->buffer);
      pipe->set_constant_buffer(pipe, shader, index, &_buffer);
   } else {
      pipe->set_constant_buffer(pipe, shader, index, buffer);
   }

   trace_dump_call_end();
}
Пример #14
0
void
trace_winsys_user_buffer_update(struct pipe_winsys *_winsys, 
                                struct pipe_buffer *buffer)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;
   const void *map;
   
   if(buffer && buffer->usage & TRACE_BUFFER_USAGE_USER) {
      map = winsys->buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_READ);
      if(map) {
         trace_dump_call_begin("pipe_winsys", "buffer_write");
         
         trace_dump_arg(ptr, winsys);
         
         trace_dump_arg(ptr, buffer);
         
         trace_dump_arg_begin("data");
         trace_dump_bytes(map, buffer->size);
         trace_dump_arg_end();
      
         trace_dump_arg_begin("size");
         trace_dump_uint(buffer->size);
         trace_dump_arg_end();
      
         trace_dump_call_end();
         
         winsys->buffer_unmap(winsys, buffer);
      }
   }
}
Пример #15
0
static void
trace_winsys_buffer_unmap(struct pipe_winsys *_winsys, 
                          struct pipe_buffer *buffer)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;
   const void *map;
   
   map = hash_table_get(tr_ws->buffer_maps, buffer);
   if(map) {
      trace_dump_call_begin("pipe_winsys", "buffer_write");
      
      trace_dump_arg(ptr, winsys);
      
      trace_dump_arg(ptr, buffer);
      
      trace_dump_arg_begin("data");
      trace_dump_bytes(map, buffer->size);
      trace_dump_arg_end();

      trace_dump_arg_begin("size");
      trace_dump_uint(buffer->size);
      trace_dump_arg_end();
   
      trace_dump_call_end();

      hash_table_remove(tr_ws->buffer_maps, buffer);
   }
   
   winsys->buffer_unmap(winsys, buffer);
}
Пример #16
0
static void 
trace_winsys_flush_frontbuffer(struct pipe_winsys *_winsys,
                               struct pipe_surface *surface,
                               void *context_private)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;

   assert(surface);
   if(surface->texture) {
      struct trace_screen *tr_scr = trace_screen(surface->texture->screen);
      struct trace_texture *tr_tex = trace_texture(tr_scr, surface->texture);
      struct trace_surface *tr_surf = trace_surface(tr_tex, surface);
      surface = tr_surf->surface;
   }
   
   trace_dump_call_begin("pipe_winsys", "flush_frontbuffer");
   
   trace_dump_arg(ptr, winsys);
   trace_dump_arg(ptr, surface);
   /* XXX: hide, as there is nothing we can do with this
   trace_dump_arg(ptr, context_private);
   */

   winsys->flush_frontbuffer(winsys, surface, context_private);
   
   trace_dump_call_end();
}
Пример #17
0
static INLINE boolean
trace_context_get_query_result(struct pipe_context *_pipe,
                               struct pipe_query *query,
                               boolean wait,
                               uint64_t *presult)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;
   uint64_t result;
   boolean _result;

   trace_dump_call_begin("pipe_context", "get_query_result");

   trace_dump_arg(ptr, pipe);

   _result = pipe->get_query_result(pipe, query, wait, presult);
   result = *presult;

   trace_dump_arg(uint, result);
   trace_dump_ret(bool, _result);

   trace_dump_call_end();

   return _result;
}
Пример #18
0
static struct pipe_resource *
trace_screen_user_buffer_create(struct pipe_screen *_screen,
                                void *data,
                                unsigned size,
				unsigned usage)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_resource *result;

   trace_dump_call_begin("pipe_screen", "user_buffer_create");

   trace_dump_arg(ptr, screen);
   trace_dump_arg_begin("data");
   trace_dump_bytes(data, size);
   trace_dump_arg_end();
   trace_dump_arg(uint, size);
   trace_dump_arg(uint, usage);

   result = screen->user_buffer_create(screen, data, size, usage);

   trace_dump_ret(ptr, result);

   trace_dump_call_end();

   if(result) {
      assert(!(result->flags & TRACE_FLAG_USER_BUFFER));
      result->flags |= TRACE_FLAG_USER_BUFFER;
   }

   return trace_resource_create(tr_scr, result);
}
Пример #19
0
static void
trace_screen_destroy(struct pipe_screen *_screen)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct pipe_screen *screen = tr_scr->screen;

   trace_dump_call_begin("pipe_screen", "destroy");
   trace_dump_arg(ptr, screen);
   trace_dump_call_end();

   screen->destroy(screen);

   FREE(tr_scr);
}
Пример #20
0
static INLINE void
trace_context_set_blend_color(struct pipe_context *_pipe,
                              const struct pipe_blend_color *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "set_blend_color");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(blend_color, state);

   pipe->set_blend_color(pipe, state);

   trace_dump_call_end();
}
Пример #21
0
static INLINE void
trace_context_bind_rasterizer_state(struct pipe_context *_pipe,
                                    void *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "bind_rasterizer_state");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, state);

   pipe->bind_rasterizer_state(pipe, state);

   trace_dump_call_end();
}
Пример #22
0
static void
trace_winsys_buffer_destroy(struct pipe_winsys *_winsys,
                            struct pipe_buffer *buffer)
{
   struct trace_winsys *tr_ws = trace_winsys(_winsys);
   struct pipe_winsys *winsys = tr_ws->winsys;
   
   trace_dump_call_begin("pipe_winsys", "buffer_destroy");
   
   trace_dump_arg(ptr, winsys);
   trace_dump_arg(ptr, buffer);

   winsys->buffer_destroy(winsys, buffer);
   
   trace_dump_call_end();
}
Пример #23
0
static INLINE void
trace_context_set_stencil_ref(struct pipe_context *_pipe,
                              const struct pipe_stencil_ref *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "set_stencil_ref");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(stencil_ref, state);

   pipe->set_stencil_ref(pipe, state);

   trace_dump_call_end();
}
Пример #24
0
static INLINE void
trace_context_set_polygon_stipple(struct pipe_context *_pipe,
                                  const struct pipe_poly_stipple *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "set_polygon_stipple");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(poly_stipple, state);

   pipe->set_polygon_stipple(pipe, state);

   trace_dump_call_end();
}
Пример #25
0
static INLINE void
trace_context_set_viewport_state(struct pipe_context *_pipe,
                                 const struct pipe_viewport_state *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "set_viewport_state");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(viewport_state, state);

   pipe->set_viewport_state(pipe, state);

   trace_dump_call_end();
}
Пример #26
0
static INLINE void
trace_context_delete_depth_stencil_alpha_state(struct pipe_context *_pipe,
                                               void *state)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "delete_depth_stencil_alpha_state");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, state);

   pipe->delete_depth_stencil_alpha_state(pipe, state);

   trace_dump_call_end();
}
Пример #27
0
static INLINE void
trace_context_end_query(struct pipe_context *_pipe,
                        struct pipe_query *query)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct pipe_context *pipe = tr_ctx->pipe;

   trace_dump_call_begin("pipe_context", "end_query");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, query);

   pipe->end_query(pipe, query);

   trace_dump_call_end();
}
Пример #28
0
static INLINE boolean
trace_context_draw_range_elements(struct pipe_context *_pipe,
                                  struct pipe_buffer *_indexBuffer,
                                  unsigned indexSize,
                                  unsigned minIndex,
                                  unsigned maxIndex,
                                  unsigned mode,
                                  unsigned start,
                                  unsigned count)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
   struct pipe_context *pipe = tr_ctx->pipe;
   struct pipe_buffer *indexBuffer = tr_buf->buffer;
   boolean result;

   if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
      return 0;

   trace_context_draw_block(tr_ctx, 1);

   trace_screen_user_buffer_update(_pipe->screen, indexBuffer);

   trace_dump_call_begin("pipe_context", "draw_range_elements");

   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, indexBuffer);
   trace_dump_arg(uint, indexSize);
   trace_dump_arg(uint, minIndex);
   trace_dump_arg(uint, maxIndex);
   trace_dump_arg(uint, mode);
   trace_dump_arg(uint, start);
   trace_dump_arg(uint, count);

   result = pipe->draw_range_elements(pipe,
                                      indexBuffer,
                                      indexSize, minIndex, maxIndex,
                                      mode, start, count);

   trace_dump_ret(bool, result);

   trace_dump_call_end();

   trace_context_draw_block(tr_ctx, 2);

   return result;
}
Пример #29
0
static void
trace_screen_tex_surface_destroy(struct pipe_surface *_surface)
{
   struct trace_screen *tr_scr = trace_screen(_surface->texture->screen);
   struct trace_surface *tr_surf = trace_surface(_surface);
   struct pipe_screen *screen = tr_scr->screen;
   struct pipe_surface *surface = tr_surf->surface;

   trace_dump_call_begin("pipe_screen", "tex_surface_destroy");

   trace_dump_arg(ptr, screen);
   trace_dump_arg(ptr, surface);

   trace_dump_call_end();

   trace_surface_destroy(tr_surf);
}
Пример #30
0
static uint64_t
trace_screen_get_timestamp(struct pipe_screen *_screen)
{
   struct trace_screen *tr_scr = trace_screen(_screen);
   struct pipe_screen *screen = tr_scr->screen;
   uint64_t result;

   trace_dump_call_begin("pipe_screen", "get_timestamp");
   trace_dump_arg(ptr, screen);

   result = screen->get_timestamp(screen);

   trace_dump_ret(uint, result);
   trace_dump_call_end();

   return result;
}