[Mesa-dev] [PATCH 1/2] mesa: Stop skipping the FinishRenderTexture calls for winsys FBOs.

Eric Anholt eric at anholt.net
Fri Mar 21 18:27:33 PDT 2014


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).
---
 src/mesa/main/fbobject.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index dfe2f1e..b9c4217 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -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;
-- 
1.9.0



More information about the mesa-dev mailing list