Module: wine
Branch: master
Commit: 7599520321e3fbb7fe6ed4cfe237c564c4647f5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7599520321e3fbb7fe6ed4cfe…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Fri Jun 12 09:46:04 2009 +0200
wined3d: Avoid checking depth/stencil and compressed formats in init_format_fbo_compat_info().
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));
Module: wine
Branch: master
Commit: 669891c817ae359e01758b6f32e367835a940813
URL: http://source.winehq.org/git/wine.git/?a=commit;h=669891c817ae359e01758b6f3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Fri Jun 12 09:46:04 2009 +0200
wined3d: Respect the "srgb" parameter to IWineD3DSurfaceImpl_BindTexture().
This is mostly for consistency, standalone surfaces can't be used for
texturing, so in practice "srgb" should always be FALSE in this path.
---
dlls/wined3d/surface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5cf28a1..116cff0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2479,7 +2479,7 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL
ERR("Mipmap surface has a glTexture bound to it!\n");
}
- glBindTexture(This->glDescription.target, This->glDescription.textureName);
+ glBindTexture(This->glDescription.target, *name);
checkGLcall("glBindTexture");
LEAVE_GL();