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...
This commit is contained in:
@@ -183,6 +183,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
struct gl_pixelstore_attrib clippedPacking = *pack;
|
||||
struct pipe_surface *surf;
|
||||
|
||||
assert(ctx->ReadBuffer->Width > 0);
|
||||
|
||||
/* XXX convolution not done yet */
|
||||
assert((transferOps & IMAGE_CONVOLUTION_BIT) == 0);
|
||||
|
||||
|
Reference in New Issue
Block a user