diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_surfaces.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_surfaces.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_surfaces.h b/src/gallium/auxiliary/util/u_surfaces.h index da4fbbfc254..9581feda7c8 100644 --- a/src/gallium/auxiliary/util/u_surfaces.h +++ b/src/gallium/auxiliary/util/u_surfaces.h @@ -45,21 +45,21 @@ struct util_surfaces /* Return value indicates if the pipe surface result is new */ boolean util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size, - struct pipe_screen *pscreen, struct pipe_resource *pt, + struct pipe_context *ctx, struct pipe_resource *pt, unsigned level, unsigned layer, unsigned flags, struct pipe_surface **res); /* fast inline path for the very common case */ static INLINE boolean util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size, - struct pipe_screen *pscreen, struct pipe_resource *pt, + struct pipe_context *ctx, struct pipe_resource *pt, unsigned level, unsigned layer, unsigned flags, struct pipe_surface **res) { if(likely((pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT) && us->u.array)) { struct pipe_surface *ps = us->u.array[level]; - if(ps) + if(ps && ps->context == ctx) { p_atomic_inc(&ps->reference.count); *res = ps; @@ -67,7 +67,7 @@ util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size, } } - return util_surfaces_do_get(us, surface_struct_size, pscreen, pt, level, layer, flags, res); + return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, flags, res); } static INLINE struct pipe_surface * |