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.
This commit is contained in:
Henri Verbeet 2010-11-08 11:50:34 +01:00 committed by Alexandre Julliard
parent 7e3985e1fe
commit 7a64870014
1 changed files with 7 additions and 0 deletions

View File

@ -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;