[PATCH v3 0/6] etnaviv: update derived texture resources of (re)imported buffers

Philipp Zabel p.zabel at pengutronix.de
Tue Dec 6 13:57:01 UTC 2016


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 v2:
 - Added resource_changed paragraph to screen.rst

regards
Philipp

Philipp Zabel (6):
  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

 src/gallium/docs/source/screen.rst             | 14 ++++++++++++++
 src/gallium/drivers/etnaviv/etnaviv_resource.c | 15 +++++++++++++++
 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 ++++
 6 files changed, 48 insertions(+), 2 deletions(-)

-- 
2.10.2



More information about the etnaviv mailing list