mesa: Stop skipping the FinishRenderTexture calls for winsys FBOs.
authorEric Anholt <eric@anholt.net>
Mon, 3 Mar 2014 17:16:48 +0000 (09:16 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 24 Mar 2014 18:15:04 +0000 (11:15 -0700)
Now that BindRenderbufferTexImage() is a thing that drivers can do, winsys
FBOs *can* have NeedsFinishRenderTexture set.

v2: Keep the short-circuit for non-BindRenderbufferTexImage() drivers
    (review by Ken).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/fbobject.c

index c4083073b2fb5b9bd3c7b32b9aea428497812f89..107919f0b3511f135be8d4b7a2ea60618630bcfc 100644 (file)
@@ -2004,8 +2004,9 @@ check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
 static void
 check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
 {
-   if (_mesa_is_winsys_fbo(fb))
-      return; /* can't render to texture with winsys framebuffers */
+   /* Skip if we know NeedsFinishRenderTexture won't be set. */
+   if (_mesa_is_winsys_fbo(fb) && !ctx->Driver.BindRenderbufferTexImage)
+      return;
 
    if (ctx->Driver.FinishRenderTexture) {
       GLuint i;