gallium: fix some render to texture bugs
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 22:44:33 +0000 (16:44 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 22:44:33 +0000 (16:44 -0600)
commit1a82d9648b3db780e58e4966924157542d148c58
treeff2df9236856e1b13c3f38622d297008a1cbbd95
parent8f76459f62aaf6f3a130e9be75aa7fe565406d28
gallium: fix some render to texture bugs

Before, we were sometimes rendering into a stale texture because
st_finalize_texture() would discard the old texture and create a new one.

Moved st_update_framebuffer atom after texture validation so that we
can create a new renderbuffer surface if the texture changes.

Also, split texture validation into two parts: finalize_textures and
update_textures.  Do finalize_textures first to avoid getting into the
situtation where we're doing a pipe->surface_copy() mid-way through
state validation.

Some debug code still in place, but disabled...
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom.h
src/mesa/state_tracker/st_atom_framebuffer.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_fbo.h
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_context.h
src/mesa/state_tracker/st_texture.c