Commit 591a3b1b authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Use wined3d samplers unconditionally for applying legacy sampler states.

parent 584ec259
...@@ -3611,25 +3611,19 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state ...@@ -3611,25 +3611,19 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
if (state->textures[sampler_idx]) if (state->textures[sampler_idx])
{ {
struct wined3d_texture *texture = state->textures[sampler_idx];
BOOL srgb = state->sampler_states[sampler_idx][WINED3D_SAMP_SRGB_TEXTURE]; BOOL srgb = state->sampler_states[sampler_idx][WINED3D_SAMP_SRGB_TEXTURE];
const DWORD *sampler_states = state->sampler_states[sampler_idx]; const DWORD *sampler_states = state->sampler_states[sampler_idx];
struct wined3d_texture *texture = state->textures[sampler_idx];
struct wined3d_device *device = context->device;
struct wined3d_sampler_desc desc; struct wined3d_sampler_desc desc;
struct wined3d_sampler *sampler;
struct wine_rb_entry *entry;
struct gl_texture *gl_tex; struct gl_texture *gl_tex;
unsigned int base_level; unsigned int base_level;
wined3d_sampler_desc_from_sampler_states(&desc, context, sampler_states, texture); wined3d_sampler_desc_from_sampler_states(&desc, context, sampler_states, texture);
wined3d_texture_bind(texture, context, srgb); wined3d_texture_bind(texture, context, srgb);
if (!gl_info->supported[ARB_SAMPLER_OBJECTS])
{
wined3d_texture_apply_sampler_desc(texture, &desc, context);
}
else
{
struct wined3d_device *device = context->device;
struct wined3d_sampler *sampler;
struct wine_rb_entry *entry;
if ((entry = wine_rb_get(&device->samplers, &desc))) if ((entry = wine_rb_get(&device->samplers, &desc)))
{ {
...@@ -3650,11 +3644,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state ...@@ -3650,11 +3644,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
} }
if (sampler) if (sampler)
{ wined3d_sampler_bind(sampler, mapped_stage, texture, context);
GL_EXTCALL(glBindSampler(mapped_stage, sampler->name));
checkGLcall("glBindSampler");
}
}
if (texture->flags & WINED3D_TEXTURE_COND_NP2) if (texture->flags & WINED3D_TEXTURE_COND_NP2)
base_level = 0; base_level = 0;
......
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