wined3d: Avoid checking depth/stencil and compressed formats in init_format_fbo_compat_info().
Henri Verbeet
hverbeet at codeweavers.com
Fri Jun 12 02:46:04 CDT 2009
Checking these is somewhat pointless since they should never be
color-renderable according to the FBO spec. This patch also happens to avoid
dereferencing a NULL pointer inside fglrx.
---
dlls/wined3d/utils.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 211e717..1e3e3fb 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -596,6 +596,20 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info)
if (!desc->glInternal) continue;
+ if (desc->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
+ {
+ TRACE("Skipping format %s because it's a depth/stencil format.\n",
+ debug_d3dformat(desc->format));
+ continue;
+ }
+
+ if (desc->Flags & WINED3DFMT_FLAG_COMPRESSED)
+ {
+ TRACE("Skipping format %s because it's a compressed format.\n",
+ debug_d3dformat(desc->format));
+ continue;
+ }
+
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
TRACE("Checking if format %s is supported as FBO color attachment...\n", debug_d3dformat(desc->format));
--
1.6.0.6
--------------070905070608030204020208--
More information about the wine-patches
mailing list