summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
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 d5bc114fce6..e55aafe90f0 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);
}
/*