diff options
author | Benjamin Franzke <[email protected]> | 2011-02-08 19:04:15 +0100 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2011-02-11 16:54:04 -0500 |
commit | 81affb8f4cb1a8e0304002d9cb3630ad42710b4c (patch) | |
tree | b627e3902b1907b94b16693104211881524affa2 /src/mesa/state_tracker/st_manager.c | |
parent | 6c3a82a1a3244880cfe9b72dcfb29d29d0baafc3 (diff) |
st/mesa: Fix surfaceless opengl with non-dummy contexts
main/context.c:check_complatible() detecs an incomplete
framebuffer using its pointer, so do not copy it.
This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34042
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 179e5dc8392..5c8853cfadb 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -426,19 +426,13 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi) struct gl_config mode; gl_buffer_index idx; + if (!stfbi) + return NULL; + stfb = CALLOC_STRUCT(st_framebuffer); if (!stfb) return NULL; - /* for FBO-only context */ - if (!stfbi) { - struct gl_framebuffer *base = _mesa_get_incomplete_framebuffer(); - - stfb->Base = *base; - - return stfb; - } - st_visual_to_context_mode(stfbi->visual, &mode); _mesa_initialize_window_framebuffer(&stfb->Base, &mode); @@ -764,7 +758,8 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, ret = _mesa_make_current(st->ctx, &stdraw->Base, &stread->Base); } else { - ret = FALSE; + struct gl_framebuffer *incomplete = _mesa_get_incomplete_framebuffer(); + ret = _mesa_make_current(st->ctx, incomplete, incomplete); } st_framebuffer_reference(&stdraw, NULL); |