diff options
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index ec8be27077f..42146daf7a0 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -36,42 +36,42 @@ #include "tr_context.h" -static INLINE struct pipe_texture * +static INLINE struct pipe_texture * trace_texture_unwrap(struct trace_context *tr_ctx, struct pipe_texture *texture) { - struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); + struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); struct trace_texture *tr_tex; - + if(!texture) return NULL; - + tr_tex = trace_texture(tr_scr, texture); - + assert(tr_tex->texture); assert(tr_tex->texture->screen == tr_scr->screen); return tr_tex->texture; } -static INLINE struct pipe_surface * +static INLINE struct pipe_surface * trace_surface_unwrap(struct trace_context *tr_ctx, struct pipe_surface *surface) { - struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); + struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); struct trace_texture *tr_tex; struct trace_surface *tr_surf; - + if(!surface) return NULL; assert(surface->texture); if(!surface->texture) return surface; - + tr_tex = trace_texture(tr_scr, surface->texture); tr_surf = trace_surface(tr_tex, surface); - + assert(tr_surf->surface); assert(tr_surf->surface->texture->screen == tr_scr->screen); return tr_surf->surface; @@ -86,7 +86,7 @@ trace_context_set_edgeflags(struct pipe_context *_pipe, struct pipe_context *pipe = tr_ctx->pipe; trace_dump_call_begin("pipe_context", "set_edgeflags"); - + trace_dump_arg(ptr, pipe); /* FIXME: we don't know how big this array is */ trace_dump_arg(ptr, bitfield); @@ -115,9 +115,9 @@ trace_context_draw_arrays(struct pipe_context *_pipe, result = pipe->draw_arrays(pipe, mode, start, count);; trace_dump_ret(bool, result); - + trace_dump_call_end(); - + return result; } @@ -146,9 +146,9 @@ trace_context_draw_elements(struct pipe_context *_pipe, result = pipe->draw_elements(pipe, indexBuffer, indexSize, mode, start, count);; trace_dump_ret(bool, result); - + trace_dump_call_end(); - + return result; } @@ -159,8 +159,8 @@ trace_context_draw_range_elements(struct pipe_context *_pipe, unsigned indexSize, unsigned minIndex, unsigned maxIndex, - unsigned mode, - unsigned start, + unsigned mode, + unsigned start, unsigned count) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -180,15 +180,15 @@ trace_context_draw_range_elements(struct pipe_context *_pipe, trace_dump_arg(uint, start); trace_dump_arg(uint, count); - result = pipe->draw_range_elements(pipe, - indexBuffer, - indexSize, minIndex, maxIndex, + result = pipe->draw_range_elements(pipe, + indexBuffer, + indexSize, minIndex, maxIndex, mode, start, count); - + trace_dump_ret(bool, result); - + trace_dump_call_end(); - + return result; } @@ -209,9 +209,9 @@ trace_context_create_query(struct pipe_context *_pipe, result = pipe->create_query(pipe, query_type);; trace_dump_ret(ptr, result); - + trace_dump_call_end(); - + return result; } @@ -235,7 +235,7 @@ trace_context_destroy_query(struct pipe_context *_pipe, static INLINE void -trace_context_begin_query(struct pipe_context *_pipe, +trace_context_begin_query(struct pipe_context *_pipe, struct pipe_query *query) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -253,7 +253,7 @@ trace_context_begin_query(struct pipe_context *_pipe, static INLINE void -trace_context_end_query(struct pipe_context *_pipe, +trace_context_end_query(struct pipe_context *_pipe, struct pipe_query *query) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -271,7 +271,7 @@ trace_context_end_query(struct pipe_context *_pipe, static INLINE boolean -trace_context_get_query_result(struct pipe_context *_pipe, +trace_context_get_query_result(struct pipe_context *_pipe, struct pipe_query *query, boolean wait, uint64_t *presult) @@ -290,9 +290,9 @@ trace_context_get_query_result(struct pipe_context *_pipe, trace_dump_arg(uint, result); trace_dump_ret(bool, _result); - + trace_dump_call_end(); - + return _result; } @@ -315,13 +315,13 @@ trace_context_create_blend_state(struct pipe_context *_pipe, trace_dump_ret(ptr, result); trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_blend_state(struct pipe_context *_pipe, +trace_context_bind_blend_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -339,7 +339,7 @@ trace_context_bind_blend_state(struct pipe_context *_pipe, static INLINE void -trace_context_delete_blend_state(struct pipe_context *_pipe, +trace_context_delete_blend_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -372,15 +372,15 @@ trace_context_create_sampler_state(struct pipe_context *_pipe, result = pipe->create_sampler_state(pipe, state);; trace_dump_ret(ptr, result); - + trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_sampler_states(struct pipe_context *_pipe, +trace_context_bind_sampler_states(struct pipe_context *_pipe, unsigned num_states, void **states) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -399,7 +399,7 @@ trace_context_bind_sampler_states(struct pipe_context *_pipe, static INLINE void -trace_context_delete_sampler_state(struct pipe_context *_pipe, +trace_context_delete_sampler_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -432,15 +432,15 @@ trace_context_create_rasterizer_state(struct pipe_context *_pipe, result = pipe->create_rasterizer_state(pipe, state);; trace_dump_ret(ptr, result); - + trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_rasterizer_state(struct pipe_context *_pipe, +trace_context_bind_rasterizer_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -458,7 +458,7 @@ trace_context_bind_rasterizer_state(struct pipe_context *_pipe, static INLINE void -trace_context_delete_rasterizer_state(struct pipe_context *_pipe, +trace_context_delete_rasterizer_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -489,17 +489,17 @@ trace_context_create_depth_stencil_alpha_state(struct pipe_context *_pipe, trace_dump_arg(ptr, pipe); trace_dump_arg(depth_stencil_alpha_state, state); - + trace_dump_ret(ptr, result); trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_depth_stencil_alpha_state(struct pipe_context *_pipe, +trace_context_bind_depth_stencil_alpha_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -517,7 +517,7 @@ trace_context_bind_depth_stencil_alpha_state(struct pipe_context *_pipe, static INLINE void -trace_context_delete_depth_stencil_alpha_state(struct pipe_context *_pipe, +trace_context_delete_depth_stencil_alpha_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -550,15 +550,15 @@ trace_context_create_fs_state(struct pipe_context *_pipe, result = pipe->create_fs_state(pipe, state);; trace_dump_ret(ptr, result); - + trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_fs_state(struct pipe_context *_pipe, +trace_context_bind_fs_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -576,7 +576,7 @@ trace_context_bind_fs_state(struct pipe_context *_pipe, static INLINE void -trace_context_delete_fs_state(struct pipe_context *_pipe, +trace_context_delete_fs_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -609,15 +609,15 @@ trace_context_create_vs_state(struct pipe_context *_pipe, result = pipe->create_vs_state(pipe, state);; trace_dump_ret(ptr, result); - + trace_dump_call_end(); - + return result; } static INLINE void -trace_context_bind_vs_state(struct pipe_context *_pipe, +trace_context_bind_vs_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -635,7 +635,7 @@ trace_context_bind_vs_state(struct pipe_context *_pipe, static INLINE void -trace_context_delete_vs_state(struct pipe_context *_pipe, +trace_context_delete_vs_state(struct pipe_context *_pipe, void *state) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -697,7 +697,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe, struct pipe_context *pipe = tr_ctx->pipe; trace_winsys_user_buffer_update(_pipe->winsys, (struct pipe_buffer *)buffer); - + trace_dump_call_begin("pipe_context", "set_constant_buffer"); trace_dump_arg(ptr, pipe); @@ -719,7 +719,7 @@ trace_context_set_framebuffer_state(struct pipe_context *_pipe, struct pipe_context *pipe = tr_ctx->pipe; struct pipe_framebuffer_state unwrapped_state; unsigned i; - + /* Unwrap the input state */ memcpy(&unwrapped_state, state, sizeof(unwrapped_state)); for(i = 0; i < state->nr_cbufs; ++i) @@ -728,7 +728,7 @@ trace_context_set_framebuffer_state(struct pipe_context *_pipe, unwrapped_state.cbufs[i] = NULL; unwrapped_state.zsbuf = trace_surface_unwrap(tr_ctx, state->zsbuf); state = &unwrapped_state; - + trace_dump_call_begin("pipe_context", "set_framebuffer_state"); trace_dump_arg(ptr, pipe); @@ -803,7 +803,7 @@ trace_context_set_sampler_textures(struct pipe_context *_pipe, struct pipe_context *pipe = tr_ctx->pipe; struct pipe_texture *unwrapped_textures[PIPE_MAX_SAMPLERS]; unsigned i; - + for(i = 0; i < num_textures; ++i) unwrapped_textures[i] = trace_texture_unwrap(tr_ctx, textures[i]); textures = unwrapped_textures; @@ -836,7 +836,7 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe, 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(); @@ -884,7 +884,7 @@ trace_context_surface_copy(struct pipe_context *_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); @@ -898,10 +898,10 @@ trace_context_surface_copy(struct pipe_context *_pipe, trace_dump_arg(uint, width); trace_dump_arg(uint, height); - pipe->surface_copy(pipe, do_flip, - dest, destx, desty, + pipe->surface_copy(pipe, do_flip, + dest, destx, desty, src, srcx, srcy, width, height); - + trace_dump_call_end(); } @@ -934,7 +934,7 @@ trace_context_surface_fill(struct pipe_context *_pipe, static INLINE void -trace_context_clear(struct pipe_context *_pipe, +trace_context_clear(struct pipe_context *_pipe, struct pipe_surface *surface, unsigned clearValue) { @@ -988,7 +988,7 @@ trace_context_destroy(struct pipe_context *_pipe) trace_dump_arg(ptr, pipe); pipe->destroy(pipe); - + trace_dump_call_end(); FREE(tr_ctx); @@ -996,17 +996,17 @@ trace_context_destroy(struct pipe_context *_pipe) struct pipe_context * -trace_context_create(struct pipe_screen *screen, +trace_context_create(struct pipe_screen *screen, struct pipe_context *pipe) { struct trace_context *tr_ctx; - + if(!pipe) goto error1; - + if(!trace_dump_enabled()) goto error1; - + tr_ctx = CALLOC_STRUCT(trace_context); if(!tr_ctx) goto error1; @@ -1057,7 +1057,7 @@ trace_context_create(struct pipe_screen *screen, tr_ctx->base.flush = trace_context_flush; tr_ctx->pipe = pipe; - + trace_dump_call_begin("", "pipe_context_create"); trace_dump_arg_begin("screen"); trace_dump_ptr(pipe->screen); @@ -1066,7 +1066,7 @@ trace_context_create(struct pipe_screen *screen, trace_dump_call_end(); return &tr_ctx->base; - + error1: return pipe; } |