[PATCH 5/5] wined3d: Print an ERR instead of crashing in context_check_fbo_status().

Henri Verbeet hverbeet at codeweavers.com
Mon Oct 26 04:12:19 CDT 2009


Some version of Mesa will claim the window system provided framebuffer is
incomplete when using indirect rendering, although the framebuffer objects
spec says this can never happen. Printing an ERR instead of crashing should
make it clearer that this isn't a wined3d problem.
---
 dlls/wined3d/context.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 66ba358..de50f9e 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -288,6 +288,12 @@ static void context_check_fbo_status(struct wined3d_context *context)
         unsigned int i;
         FIXME("FBO status %s (%#x)\n", debug_fbostatus(status), status);
 
+        if (!context->current_fbo)
+        {
+            ERR("FBO 0 is incomplete, driver bug?\n");
+            return;
+        }
+
         /* Dump the FBO attachments */
         for (i = 0; i < gl_info->max_buffers; ++i)
         {
-- 
1.6.4.4




More information about the wine-patches mailing list