It's optional, only implemented by the etnaviv driver so far.
Fixes: 501d0edeca32 "st/mesa: call resource_changed when binding a
EGLImage to a texture"
Fixes: a37cf630b4d1 "gallium: add pipe_screen::resource_changed callback
wrappers"
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
{
struct pipe_screen *screen = dd_screen(_screen)->screen;
- screen->resource_changed(screen, res);
+ if (screen->resource_changed)
+ screen->resource_changed(screen, res);
}
static void
struct pipe_screen *screen = rb_screen->screen;
struct pipe_resource *resource = rb_resource->resource;
- screen->resource_changed(screen, resource);
+ if (screen->resource_changed)
+ screen->resource_changed(screen, resource);
}
static void
trace_dump_arg(ptr, screen);
trace_dump_arg(ptr, resource);
- screen->resource_changed(screen, resource);
+ if (screen->resource_changed)
+ screen->resource_changed(screen, resource);
trace_dump_call_end();
}
pipe_resource_reference(&stObj->pt, stimg->texture);
st_texture_release_all_sampler_views(st, stObj);
pipe_resource_reference(&stImage->pt, stObj->pt);
- st->pipe->screen->resource_changed(st->pipe->screen, stImage->pt);
+ if (st->pipe->screen->resource_changed)
+ st->pipe->screen->resource_changed(st->pipe->screen, stImage->pt);
stObj->surface_format = stimg->format;
stObj->level_override = stimg->level;