st-api: Rework how drawables are invalidated v3.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 29 Jun 2011 07:00:23 +0000 (09:00 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 29 Jun 2011 10:48:59 +0000 (12:48 +0200)
commitac8fdbc1c723afb19eeaba5457ba78d0bf33b8d4
tree34b7c9d72551aa7976d634738585d65a256760ae
parent1a7e17e44a1129bbd6a0f454fe95b3ce8240cd45
st-api: Rework how drawables are invalidated v3.

The api and the state tracker manager code as well as the state tracker code
assumed that only a single context could be bound to a drawable. That is not
a valid assumption, since multiple contexts can bind to the same drawable.

Fix this by making it the state tracker's responsibility to update all
contexts binding to a drawable

Note that the state trackers themselves don't use atomic stamps on
frame-buffers. Multiple context rendering to the same drawable should
be protected by the application.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 files changed:
src/gallium/include/state_tracker/st_api.h
src/gallium/state_trackers/dri/common/dri_drawable.c
src/gallium/state_trackers/dri/drm/dri2.c
src/gallium/state_trackers/dri/sw/drisw.c
src/gallium/state_trackers/egl/common/egl_g3d.c
src/gallium/state_trackers/egl/common/egl_g3d_api.c
src/gallium/state_trackers/egl/common/egl_g3d_st.c
src/gallium/state_trackers/vega/vg_context.h
src/gallium/state_trackers/vega/vg_manager.c
src/gallium/state_trackers/wgl/stw_context.c
src/gallium/state_trackers/wgl/stw_st.c
src/mesa/state_tracker/st_cb_viewport.c
src/mesa/state_tracker/st_context.h
src/mesa/state_tracker/st_manager.c