From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/state.c | 9 ++------- dlls/wined3d/texture.c | 9 +++++++-- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 6eaec9acb55..a858120df7d 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3469,8 +3469,7 @@ static enum wined3d_texture_address wined3d_texture_gl_address_mode(const struct }
static void wined3d_sampler_desc_from_sampler_states(struct wined3d_sampler_desc *desc, - const struct wined3d_context_gl *context_gl, const uint32_t *sampler_states, - const struct wined3d_texture_gl *texture_gl) + const uint32_t *sampler_states, const struct wined3d_texture_gl *texture_gl) { union { @@ -3518,11 +3517,7 @@ static void wined3d_sampler_desc_from_sampler_states(struct wined3d_sampler_desc }
if (texture_gl->t.flags & WINED3D_TEXTURE_COND_NP2) - { desc->mip_filter = WINED3D_TEXF_NONE; - if (context_gl->gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) - desc->min_filter = WINED3D_TEXF_POINT; - } }
/* Enabling and disabling texture dimensions is done by texture stage state / @@ -3557,7 +3552,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state struct wined3d_sampler *sampler; struct wine_rb_entry *entry;
- wined3d_sampler_desc_from_sampler_states(&desc, context_gl, sampler_states, texture_gl); + wined3d_sampler_desc_from_sampler_states(&desc, sampler_states, texture_gl);
wined3d_texture_gl_bind(texture_gl, context_gl, srgb);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 08e95db10f5..56593a34432 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1466,9 +1466,14 @@ void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl if (sampler_desc->min_filter != gl_tex->sampler_desc.min_filter || sampler_desc->mip_filter != gl_tex->sampler_desc.mip_filter) { + enum wined3d_texture_filter_type min_filter = sampler_desc->min_filter; + + if (gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) + min_filter = WINED3D_TEXF_POINT; + gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MIN_FILTER, - wined3d_gl_min_mip_filter(sampler_desc->min_filter, sampler_desc->mip_filter)); - gl_tex->sampler_desc.min_filter = sampler_desc->min_filter; + wined3d_gl_min_mip_filter(min_filter, sampler_desc->mip_filter)); + gl_tex->sampler_desc.min_filter = min_filter; gl_tex->sampler_desc.mip_filter = sampler_desc->mip_filter; }