Commit 072e1a3f authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Move the EXT_texture3D check to init_format_texture_info.

parent 9def5ff4
......@@ -4490,15 +4490,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
case WINED3D_RTYPE_VOLUME_TEXTURE:
case WINED3D_RTYPE_VOLUME:
/* Volume is to VolumeTexture what Surface is to Texture, but its
* usage caps are not documented. Most driver seem to offer
* (nearly) the same on Volume and VolumeTexture, so do that too. */
if (!gl_info->supported[EXT_TEXTURE3D])
{
TRACE("[FAILED] - No volume texture support.\n");
return WINED3DERR_NOTAVAILABLE;
}
/* The GL_EXT_texture_compression_s3tc spec requires that loading
* an s3tc compressed texture results in an error. While the D3D
* refrast does support s3tc volumes, at least the nvidia Windows
......
......@@ -1852,10 +1852,17 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
format->glFormat = format_texture_info[i].gl_format;
format->glType = format_texture_info[i].gl_type;
format->color_fixup = COLOR_FIXUP_IDENTITY;
format_set_flag(format, format_texture_info[i].flags);
format->height_scale.numerator = 1;
format->height_scale.denominator = 1;
format->flags[WINED3D_GL_RES_TYPE_TEX_1D] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_TEX_2D] |= format_texture_info[i].flags;
if (gl_info->supported[EXT_TEXTURE3D])
format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_TEX_CUBE] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_TEX_RECT] |= format_texture_info[i].flags;
format->flags[WINED3D_GL_RES_TYPE_BUFFER] |= format_texture_info[i].flags;
if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2])
{
query_format_flag(gl_info, format, format->glInternal, GL_VERTEX_TEXTURE,
......
......@@ -748,11 +748,6 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
HRESULT hr;
UINT size;
if (!gl_info->supported[EXT_TEXTURE3D])
{
WARN("Volume cannot be created - no volume texture support.\n");
return WINED3DERR_INVALIDCALL;
}
/* TODO: Write tests for other resources and move this check
* to resource_init, if applicable. */
if (desc->usage & WINED3DUSAGE_DYNAMIC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment