summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_context.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-04-08 15:29:50 +0100
committerJosé Fonseca <[email protected]>2009-04-08 16:26:05 +0100
commit927eb8fe4cc8a5ed583aad1dafa98d091d7602f4 (patch)
treeea0a4f8fd44d86a382e74b5568198a6e3018e4d0 /src/gallium/drivers/trace/tr_context.c
parent7000b9d74a4b9690c236ee40ddbeba1f24df1ab4 (diff)
trace: Simplify cast wrappers.
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r--src/gallium/drivers/trace/tr_context.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index d50d872a777..d8d5821a1d1 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -58,16 +58,14 @@ 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_texture *tr_tex;
if(!texture)
return NULL;
- tr_tex = trace_texture(tr_scr, texture);
+ tr_tex = trace_texture(texture);
assert(tr_tex->texture);
- assert(tr_tex->texture->screen == tr_scr->screen);
return tr_tex->texture;
}
@@ -77,7 +75,6 @@ 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_texture *tr_tex;
struct trace_surface *tr_surf;
if(!surface)
@@ -87,8 +84,7 @@ trace_surface_unwrap(struct trace_context *tr_ctx,
if(!surface->texture)
return surface;
- tr_tex = trace_texture(tr_scr, surface->texture);
- tr_surf = trace_surface(tr_tex, surface);
+ tr_surf = trace_surface(surface);
assert(tr_surf->surface);
assert(tr_surf->surface->texture->screen == tr_scr->screen);