Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/view.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index 4463fabb6ae5..3322baa2b5b7 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -842,7 +842,7 @@ void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view * base_level = view->desc.u.texture.level_idx; max_level = base_level + level_count - 1;
- srgb = !!(texture->flags & WINED3D_TEXTURE_IS_SRGB); + srgb = texture->flags & WINED3D_TEXTURE_IS_SRGB; location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB; for (i = 0; i < layer_count; ++i) wined3d_texture_load_location(texture, i * level_count + base_level, context, location); @@ -874,11 +874,8 @@ void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view * } }
- gl_info->gl_ops.gl.p_glTexParameteri(texture->target, GL_TEXTURE_MAX_LEVEL, level_count - 1); - if (srgb) - texture->texture_srgb.base_level = base_level; - else - texture->texture_rgb.base_level = base_level; + gl_info->gl_ops.gl.p_glTexParameteri(texture->target, GL_TEXTURE_MAX_LEVEL, texture->level_count - 1); + gl_tex->base_level = base_level;
context_release(context); }