**************************************************************************/
#include "util/u_memory.h"
+#include "util/u_simple_list.h"
+
#include "pipe/p_screen.h"
#include "tr_dump.h"
if(!buffer)
return NULL;
- tr_buf = trace_buffer(tr_scr, buffer);
+ tr_buf = trace_buffer(buffer);
assert(tr_buf->buffer);
assert(tr_buf->buffer->screen == tr_scr->screen);
unsigned indexSize,
unsigned mode, unsigned start, unsigned count)
{
- struct trace_screen *tr_scr = trace_screen(_pipe->screen);
struct trace_context *tr_ctx = trace_context(_pipe);
- struct trace_buffer *tr_buf = trace_buffer(tr_scr, _indexBuffer);
+ struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
struct pipe_context *pipe = tr_ctx->pipe;
struct pipe_buffer *indexBuffer = tr_buf->buffer;
boolean result;
unsigned start,
unsigned count)
{
- struct trace_screen *tr_scr = trace_screen(_pipe->screen);
struct trace_context *tr_ctx = trace_context(_pipe);
- struct trace_buffer *tr_buf = trace_buffer(tr_scr, _indexBuffer);
+ struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
struct pipe_context *pipe = tr_ctx->pipe;
struct pipe_buffer *indexBuffer = tr_buf->buffer;
boolean result;
static INLINE void
trace_context_destroy(struct pipe_context *_pipe)
{
+ struct trace_screen *tr_scr = trace_screen(_pipe->screen);
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
trace_dump_call_begin("pipe_context", "destroy");
-
trace_dump_arg(ptr, pipe);
+ trace_dump_call_end();
- pipe->destroy(pipe);
+ trace_screen_remove_from_list(tr_scr, contexts, tr_ctx);
- trace_dump_call_end();
+ pipe->destroy(pipe);
FREE(tr_ctx);
}
static unsigned int
trace_is_texture_referenced( struct pipe_context *_pipe,
- struct pipe_texture *texture,
+ struct pipe_texture *_texture,
unsigned face, unsigned level)
{
struct trace_context *tr_ctx = trace_context(_pipe);
+ struct trace_texture *tr_tex = trace_texture(_texture);
struct pipe_context *pipe = tr_ctx->pipe;
+ struct pipe_texture *texture = tr_tex->texture;
unsigned int referenced;
trace_dump_call_begin("pipe_context", "is_texture_referenced");
static unsigned int
trace_is_buffer_referenced( struct pipe_context *_pipe,
- struct pipe_buffer *buf)
+ 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_ret(ptr, pipe);
trace_dump_call_end();
+ trace_screen_add_to_list(tr_scr, contexts, tr_ctx);
+
return &tr_ctx->base;
error1: