Mesa (9.1): mesa: Generate a renderbuffer wrapper even if the texture has no image
Carl Worth
cworth at kemper.freedesktop.org
Thu Oct 3 23:15:58 UTC 2013
Module: Mesa
Branch: 9.1
Commit: 64d3c2b7d5c6d81d0c83340bc53f9b17bd2170ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=64d3c2b7d5c6d81d0c83340bc53f9b17bd2170ac
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Sun Jul 28 13:08:27 2013 -0700
mesa: Generate a renderbuffer wrapper even if the texture has no image
This prevents a segfault in check_begin_texture_render when an FBO is
rebound while in this state. This fixes the piglit test
fbo-incomplete-invalid-texture.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Acked-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "9.1 9.2" mesa-stable at lists.freedesktop.org
(cherry picked from commit 2f9fe2d80a35b8857682771fddbee628213da7b3)
Conflicts:
src/mesa/main/fbobject.c
---
src/mesa/main/fbobject.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 07bebe1..434e47a 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -385,8 +385,6 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
struct gl_renderbuffer *rb;
texImage = _mesa_get_attachment_teximage(att);
- if (!texImage)
- return;
rb = att->Renderbuffer;
if (!rb) {
@@ -405,6 +403,9 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
rb->NeedsFinishRenderTexture = ctx->Driver.FinishRenderTexture != NULL;
}
+ if (!texImage)
+ return;
+
if (driver_RenderTexture_is_safe(att))
ctx->Driver.RenderTexture(ctx, fb, att);
}
More information about the mesa-commit
mailing list