On 7 April 2011 18:51, Adam Martinson <amartinson(a)codeweavers.com> wrote:
- context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE); + + if (rt_count == device->adapter->gl_info.limits.buffers && + rts == device->render_targets && + depth_stencil == device->depth_stencil) + { + if (context->device_fbo != NULL) + { + context_apply_device_fbo(context); + } + else + { + context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE); + context->device_fbo = context->current_fbo; + } + } + else + { + context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE); + } That's not very pretty.
@@ -6709,6 +6721,7 @@ void device_resource_released(struct IWineD3DDeviceImpl *device, struct wined3d_ { ERR("Surface %p is still in use as render target %u.\n", surface, i); device->render_targets[i] = NULL; + fbo_dirty = TRUE; } }
@@ -6716,7 +6729,10 @@ void device_resource_released(struct IWineD3DDeviceImpl *device, struct wined3d_ { ERR("Surface %p is still in use as depth/stencil buffer.\n", surface); device->depth_stencil = NULL; + fbo_dirty = TRUE; That code should never execute, hence the ERR.