summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
authorXavier Chantry <chantry.xavier@gmail.com>2010-12-05 12:09:30 +0100
committerPatrice Mandin <patmandin@gmail.com>2010-12-05 12:09:38 +0100
commite3256ccb045032960f099318938991392b896b44 (patch)
treef8402da232504712c69c691b9454d4e79e6dd88c /src/gallium/auxiliary/util/u_inlines.h
parentaf5345d9371e927019d51ce3ad198958f8cd42a9 (diff)
init ps->context with util_surfaces_get and do_get
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com> Signed-off-by: Patrice Mandin <patmandin@gmail.com>
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index d5bc114fce..e55aafe90f 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -136,8 +136,9 @@ pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_
}
static INLINE void
-pipe_surface_reset(struct pipe_surface* ps, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags)
+pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
+ struct pipe_resource *pt, unsigned level, unsigned layer,
+ unsigned flags)
{
pipe_resource_reference(&ps->texture, pt);
ps->format = pt->format;
@@ -146,15 +147,17 @@ pipe_surface_reset(struct pipe_surface* ps, struct pipe_resource *pt,
ps->usage = flags;
ps->u.tex.level = level;
ps->u.tex.first_layer = ps->u.tex.last_layer = layer;
+ ps->context = ctx;
}
static INLINE void
-pipe_surface_init(struct pipe_surface* ps, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags)
+pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
+ struct pipe_resource *pt, unsigned level, unsigned layer,
+ unsigned flags)
{
ps->texture = 0;
pipe_reference_init(&ps->reference, 1);
- pipe_surface_reset(ps, pt, level, layer, flags);
+ pipe_surface_reset(ctx, ps, pt, level, layer, flags);
}
/*