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); }
The context_acquire() function does that.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/view.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index 3322baa2b5b7..bae68133f754 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -833,8 +833,6 @@ void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *
TRACE("view %p.\n", view);
- wined3d_from_cs(view->resource->device->cs); - context = context_acquire(view->resource->device, NULL, 0); gl_info = context->gl_info; layer_count = view->desc.u.texture.layer_count;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
On Thu, Dec 7, 2017 at 12:39 PM, Józef Kucia jkucia@codeweavers.com wrote:
Signed-off-by: Józef Kucia jkucia@codeweavers.com
dlls/wined3d/view.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
This patch is wrong, please ignore.