svga: move surface context member onto internal surface type

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
This commit is contained in:
Mike Blumenkrantz 2026-03-16 12:55:54 -04:00 committed by Marge Bot
parent e8ced90aab
commit 9ffc4f43f9
2 changed files with 6 additions and 4 deletions

View file

@ -294,7 +294,7 @@ svga_create_surface_view(struct pipe_context *pipe,
pipe_reference_init(&s->base.reference, 1);
pipe_resource_reference(&s->base.texture, pt);
s->base.context = pipe;
s->context = pipe;
s->base.format = surf_tmpl->format;
s->base.level = surf_tmpl->level;
s->base.first_layer = surf_tmpl->first_layer;
@ -491,7 +491,7 @@ create_backed_surface_view(struct svga_context *svga, struct svga_surface *s,
svga_mark_surface_dirty(s->backed);
s->backed->age = tex->age;
assert(s->backed->base.context == &svga->pipe);
assert(s->backed->context == &svga->pipe);
done:
return s->backed;
@ -541,7 +541,7 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
* Create an alternate surface view for the specified context if the
* view was created for another context.
*/
if (s && s->base.context != &svga->pipe) {
if (s && s->context != &svga->pipe) {
s = create_backed_surface_view(svga, s, false);
if (s)
@ -660,7 +660,7 @@ svga_surface_destroy(struct pipe_context *pipe,
* Similar to shader resource view, in this case, we will skip
* the destroy for now.
*/
if (surf->context != pipe) {
if (s->context != pipe) {
_debug_printf("context mismatch in %s\n", __func__);
}
else {

View file

@ -26,6 +26,8 @@ struct svga_surface
{
struct pipe_surface base;
struct pipe_context *context;
struct svga_host_surface_cache_key key;
/*