Beispiel #1
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);
}
Beispiel #2
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;
}
Beispiel #3
0
static INLINE struct pipe_buffer *
trace_buffer_unwrap(struct trace_context *tr_ctx,
                     struct pipe_buffer *buffer)
{
   struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen);
   struct trace_buffer *tr_buf;

   if(!buffer)
      return NULL;

   tr_buf = trace_buffer(buffer);

   assert(tr_buf->buffer);
   assert(tr_buf->buffer->screen == tr_scr->screen);
   (void) tr_scr;
   return tr_buf->buffer;
}
Beispiel #4
0
static unsigned int
trace_is_buffer_referenced( struct pipe_context *_pipe,
			    struct pipe_buffer *_buf)
{
   struct trace_context *tr_ctx = trace_context(_pipe);
   struct trace_buffer *tr_buf = trace_buffer(_buf);
   struct pipe_context *pipe = tr_ctx->pipe;
   struct pipe_buffer *buf = tr_buf->buffer;
   unsigned int referenced;

   trace_dump_call_begin("pipe_context", "is_buffer_referenced");
   trace_dump_arg(ptr, pipe);
   trace_dump_arg(ptr, buf);

   referenced = pipe->is_buffer_referenced(pipe, buf);

   trace_dump_ret(uint, referenced);
   trace_dump_call_end();

   return referenced;
}