mesa/src
Eric Anholt e2dce7f7ee intel: Fix rendering from textures after RenderTexture().
There's a serious trap for drivers: RenderTexture() does not indicate
that the texture is currently bound to the draw buffer, despite
FinishRenderTexture() signaling that the texture is just now being
unbound from the draw buffer.

We were acting as if RenderTexture() *was* the start of rendering and
that we could make texturing incoherent with the current contents of
the renderbuffer.  This caused intel oglconform sRGB
Mipmap.1D_textures to fail, because we got a call to TexImage() and
thus RenderTexture() on a texture bound to a framebuffer that wasn't
the draw buffer, so we skipped validating the new image into the
texture object used for rendering.

We can't (easily) make RenderTexture() indicate the start of drawing,
because both our driver and gallium are using it as the moment to set
up the renderbuffer wrapper used for things like MapRenderbuffer().
Instead, postpone the setup of the workaround render target miptree
until update_renderbuffer time, so that we no longer need to skip
validation of miptrees used as render targets.  As a bonus, this
should make GL_NV_texture_barrier possible.

(This also fixes a regression in the gen4 small-mipmap rendering since
3b38b33c16, which switched
set_draw_offset from image->mt to irb->mt but didn't move the irb->mt
replacement up before set_draw_offset).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44961
NOTE: This is a candidate for the 8.0 branch.
2012-02-17 13:31:27 -08:00
..
egl add wayland cflags when building wayland-egl 2012-01-29 16:51:27 +01:00
gallium gallivm: fetch immediates to correct type (v2) 2012-02-17 17:39:02 +00:00
gbm gbm: Add back link flags for udev, dl and glapi 2012-01-26 13:23:25 +01:00
getopt getopt: Make code more portable. 2011-01-12 16:54:21 +00:00
glsl glsl: Avoid excessive loop unrolling. 2012-02-09 21:23:16 +01:00
glu scons: Add Haiku build support 2012-01-17 20:01:14 +00:00
glx dri: Emit a critical error if the swrast driver fails to load. 2012-02-08 17:07:53 -08:00
mapi glapi: Include GLES2 headers for ES2 extension functions 2012-02-15 14:50:00 -08:00
mesa intel: Fix rendering from textures after RenderTexture(). 2012-02-17 13:31:27 -08:00
Makefile
SConscript scons: Add Haiku build support 2012-01-17 20:01:14 +00:00