wined3d: Create a FBO for each combination of render targets and depth stencil.
The main reason for this change is crappy performance for reconfiguring FBOs.
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 654c585..d347807 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -613,9 +613,8 @@
GLint aux_buffers;
/* FBOs */
- IWineD3DSurface **fbo_color_attachments;
- IWineD3DSurface *fbo_depth_attachment;
- GLuint fbo;
+ struct list fbo_list;
+ struct fbo_entry *current_fbo;
GLuint src_fbo;
GLuint dst_fbo;
};
@@ -1260,6 +1259,15 @@
UINT height;
} renderbuffer_entry_t;
+struct fbo_entry
+{
+ struct list entry;
+ IWineD3DSurface **render_targets;
+ IWineD3DSurface *depth_stencil;
+ BOOL attached;
+ GLuint id;
+};
+
/*****************************************************************************
* IWineD3DClipp implementation structure
*/
@@ -2435,4 +2443,5 @@
IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip);
void depth_blt(IWineD3DDevice *iface, GLuint texture, GLsizei w, GLsizei h);
+void context_destroy_fbo_entry(IWineD3DDeviceImpl *This, struct fbo_entry *entry);
#endif