wined3d: Use wined3d samplers unconditionally for applying legacy sampler states.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
584ec259b2
commit
591a3b1be8
|
@ -3611,25 +3611,19 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
|||
|
||||
if (state->textures[sampler_idx])
|
||||
{
|
||||
struct wined3d_texture *texture = state->textures[sampler_idx];
|
||||
BOOL srgb = state->sampler_states[sampler_idx][WINED3D_SAMP_SRGB_TEXTURE];
|
||||
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 *sampler;
|
||||
struct wine_rb_entry *entry;
|
||||
struct gl_texture *gl_tex;
|
||||
unsigned int base_level;
|
||||
|
||||
wined3d_sampler_desc_from_sampler_states(&desc, context, sampler_states, texture);
|
||||
|
||||
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)))
|
||||
{
|
||||
|
@ -3650,11 +3644,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
|||
}
|
||||
|
||||
if (sampler)
|
||||
{
|
||||
GL_EXTCALL(glBindSampler(mapped_stage, sampler->name));
|
||||
checkGLcall("glBindSampler");
|
||||
}
|
||||
}
|
||||
wined3d_sampler_bind(sampler, mapped_stage, texture, context);
|
||||
|
||||
if (texture->flags & WINED3D_TEXTURE_COND_NP2)
|
||||
base_level = 0;
|
||||
|
|
Loading…
Reference in New Issue