Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/texture.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index ed1ca21117f..6c8c313ee25 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2159,6 +2159,12 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 return WINED3DERR_INVALIDCALL; } } + if (flags & WINED3D_TEXTURE_GENERATE_MIPMAPS && !gl_info->supported[ARB_FRAMEBUFFER_OBJECT] + && !gl_info->supported[EXT_FRAMEBUFFER_OBJECT]) + { + WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + }
if (FAILED(hr = wined3d_texture_init(texture, &texture2d_ops, layer_count, level_count, desc, flags, device, parent, parent_ops, &texture_resource_ops))) @@ -2601,6 +2607,12 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct return WINED3DERR_INVALIDCALL; } } + if (flags & WINED3D_TEXTURE_GENERATE_MIPMAPS && !gl_info->supported[ARB_FRAMEBUFFER_OBJECT] + && !gl_info->supported[EXT_FRAMEBUFFER_OBJECT]) + { + WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + }
if (desc->usage & WINED3DUSAGE_DYNAMIC && (wined3d_resource_access_is_managed(desc->access) || desc->usage & WINED3DUSAGE_SCRATCH)) @@ -2657,7 +2669,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct texture->resource.map_binding = WINED3D_LOCATION_BUFFER; }
- /* Generate all the surfaces. */ + /* Generate all the sub resources. */ for (i = 0; i < texture->level_count; ++i) { struct wined3d_texture_sub_resource *sub_resource;