Hi, to get weston / wayland_egl working on etnaviv, we need to update the texture resources derived from imported buffers every time they are re-imported.
This patchset is based on the github-etnaviv/for_mainline_v1 branch and adds a new pipe_screen::resource_changed callback that is called inside dri2_from_planar and instructs the pipe driver to invalidate the internal (texture) resources that are derived from the re-imported resource. I've also added an updated version of the earlier GL_OES_EGL_image_external patches that now use resource_changed to invalidate internal derived resources when an external texture is (re-)bound, to comply with the specification. The etnaviv implementation of resource_changed just sets the texture seqno to the resource seqno - 1. The initial seqno of imported resources is set to 1 so that texture resources created from them are actually older and trigger the resolve on first use. Changes since v3: - Added resource_changed to ddebug, rbug, and trace wrapper drivers regards Philipp Philipp Zabel (7): gallium: add pipe_screen::resource_changed st/dri: ask the driver to update its internal copies on reimport etnaviv: initialize seqno of imported resources etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers mesa: update external textures when (re-)binding st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures gallium: add pipe_screen::resource_changed callback wrappers src/gallium/docs/source/screen.rst | 14 ++++++++++++++ src/gallium/drivers/ddebug/dd_screen.c | 10 ++++++++++ src/gallium/drivers/etnaviv/etnaviv_resource.c | 15 +++++++++++++++ src/gallium/drivers/rbug/rbug_screen.c | 11 +++++++++++ src/gallium/drivers/trace/tr_screen.c | 20 ++++++++++++++++++++ src/gallium/include/pipe/p_screen.h | 8 ++++++++ src/gallium/state_trackers/dri/dri2.c | 4 ++++ src/mesa/main/texobj.c | 5 +++-- src/mesa/state_tracker/st_atom_texture.c | 4 ++++ 9 files changed, 89 insertions(+), 2 deletions(-) -- 2.10.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev