diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 992fb53623e..ec5631f68dd 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -347,7 +347,6 @@ pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps, ps->format = pt->format; ps->level = level; ps->first_layer = ps->last_layer = layer; - ps->context = ctx; } static inline void diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c index 41243e89b8b..ca57498a0ee 100644 --- a/src/gallium/drivers/crocus/crocus_state.c +++ b/src/gallium/drivers/crocus/crocus_state.c @@ -2863,7 +2863,6 @@ crocus_create_surface(struct pipe_context *ctx, pipe_reference_init(&psurf->reference, 1); pipe_resource_reference(&psurf->texture, tex); - psurf->context = ctx; psurf->format = tmpl->format; psurf->first_layer = tmpl->first_layer; psurf->last_layer = tmpl->last_layer; diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c index 4efe4f1339c..f703c585146 100644 --- a/src/gallium/drivers/i915/i915_surface.c +++ b/src/gallium/drivers/i915/i915_surface.c @@ -406,7 +406,6 @@ i915_create_surface_custom(struct pipe_context *ctx, struct pipe_resource *pt, ps->level = surf_tmpl->level; ps->first_layer = surf_tmpl->first_layer; ps->last_layer = surf_tmpl->last_layer; - ps->context = ctx; if (util_format_is_depth_or_stencil(ps->format)) { surf->buf_info = BUF_3D_ID_DEPTH; diff --git a/src/gallium/drivers/lima/lima_blit.c b/src/gallium/drivers/lima/lima_blit.c index cece032e0a6..03916bf8690 100644 --- a/src/gallium/drivers/lima/lima_blit.c +++ b/src/gallium/drivers/lima/lima_blit.c @@ -202,7 +202,6 @@ lima_set_blit_surface(struct pipe_surface *psurf, unsigned level) { memset(psurf, 0, sizeof(*psurf)); - psurf->context = pctx; psurf->format = prsc->format; psurf->level = level; psurf->first_layer = 0; diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index 9f62584194c..0f19ea78600 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -231,7 +231,6 @@ llvmpipe_create_surface(struct pipe_context *pipe, if (ps) { pipe_reference_init(&ps->reference, 1); pipe_resource_reference(&ps->texture, pt); - ps->context = pipe; ps->format = surf_tmpl->format; assert(surf_tmpl->level <= pt->last_level); assert(surf_tmpl->first_layer <= surf_tmpl->last_layer); diff --git a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c index b4a9fce219b..f8139418327 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c @@ -557,7 +557,6 @@ nv30_miptree_surface_new(struct pipe_context *pipe, ps = &ns->base; pipe_resource_reference(&ps->texture, pt); - ps->context = pipe; ps->format = tmpl->format; ps->level = tmpl->level; ps->first_layer = tmpl->first_layer; diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index e66015f5d58..01a6ce06cd0 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -1178,7 +1178,6 @@ struct pipe_surface* r300_create_surface_custom(struct pipe_context * ctx, pipe_reference_init(&surface->base.reference, 1); pipe_resource_reference(&surface->base.texture, texture); - surface->base.context = ctx; surface->base.format = surf_tmpl->format; surface->base.level = level; surface->base.first_layer = surf_tmpl->first_layer; diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index c27bbbc00b6..6c4e17cf570 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -1573,7 +1573,6 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe, pipe_reference_init(&surface->reference, 1); pipe_resource_reference(&surface->texture, texture); - surface->context = pipe; surface->format = templ->format; surface->level = templ->level; surface->first_layer = templ->first_layer; diff --git a/src/gallium/drivers/v3d/v3d_blit.c b/src/gallium/drivers/v3d/v3d_blit.c index bf3c073fa07..66c499880e6 100644 --- a/src/gallium/drivers/v3d/v3d_blit.c +++ b/src/gallium/drivers/v3d/v3d_blit.c @@ -151,7 +151,6 @@ v3d_set_blit_surface(struct pipe_surface *psurf, int16_t layer) { memset(psurf, 0, sizeof(*psurf)); - psurf->context = pctx; psurf->format = format; psurf->level = level; psurf->first_layer = layer; diff --git a/src/gallium/drivers/vc4/vc4_blit.c b/src/gallium/drivers/vc4/vc4_blit.c index d413bd53d92..c06fb9551a3 100644 --- a/src/gallium/drivers/vc4/vc4_blit.c +++ b/src/gallium/drivers/vc4/vc4_blit.c @@ -35,7 +35,6 @@ vc4_set_blit_surface(struct pipe_surface *psurf, struct pipe_context *pctx, unsigned layer) { memset(psurf, 0, sizeof(*psurf)); - psurf->context = pctx; psurf->format = prsc->format; psurf->level = level; psurf->first_layer = layer; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 98d6e6feeb9..926deb65b32 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -424,7 +424,6 @@ struct pipe_surface unsigned level; struct pipe_resource *texture; /**< resource into which this is a view */ - struct pipe_context *context; /**< context this surface belongs to */ }; /** diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 55d9e5ea90d..c36dead5a4d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1940,7 +1940,6 @@ try_pbo_upload(struct gl_context *ctx, GLuint dims, templ.level = level; templ.first_layer = MIN2(zoffset, max_layer); templ.last_layer = MIN2(zoffset + depth - 1, max_layer); - templ.context = st->pipe; templ.texture = texture; success = try_pbo_upload_common(ctx, &templ, &addr, src_format); @@ -2558,7 +2557,6 @@ st_CompressedTexSubImage(struct gl_context *ctx, GLuint dims, memset(&templ, 0, sizeof(templ)); templ.format = copy_format; templ.texture = texture; - templ.context = st->pipe; templ.level = level; templ.first_layer = MIN2(layer, max_layer); templ.last_layer = MIN2(layer + d - 1, max_layer);