From 7a64870014b22f4c9ce1b2557f1ab18ef425f226 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 8 Nov 2010 11:50:34 +0100 Subject: [PATCH] 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 file changed, 7 insertions(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index f2d6bde70d4..8770f047ab7 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; -- 2.11.4.GIT