Henri Verbeet : wined3d: Don' t use floating point textures without ARB_texture_float.

Alexandre Julliard julliard at winehq.org
Mon Nov 8 11:46:23 CST 2010


Module: wine
Branch: master
Commit: 7a64870014b22f4c9ce1b2557f1ab18ef425f226
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7a64870014b22f4c9ce1b2557f1ab18ef425f226

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov  8 11:50:34 2010 +0100

wined3d: Don't use floating point textures without ARB_texture_float.

The floating point formats from ARB_texture_rg are only defined when
ARB_texture_float is also supported. It would have been nice if the formats
table itself was able to express this, but as far as I'm aware this is only an
issue for ARB_texture_rg, so it's probably not worth changing.

---

 dlls/wined3d/utils.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index f2d6bde..8770f04 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1174,6 +1174,13 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info)
         if (!gl_info->supported[format_texture_info[i].extension]) continue;
 
         format = &gl_info->formats[fmt_idx];
+
+        /* ARB_texture_rg defines floating point formats, but only if
+         * ARB_texture_float is also supported. */
+        if (!gl_info->supported[ARB_TEXTURE_FLOAT]
+                && (format->Flags & WINED3DFMT_FLAG_FLOAT))
+            continue;
+
         format->glInternal = format_texture_info[i].gl_internal;
         format->glGammaInternal = format_texture_info[i].gl_srgb_internal;
         format->rtInternal = format_texture_info[i].gl_rt_internal;




More information about the wine-cvs mailing list