wined3d: Set default sampler minification filter to GL_NEAREST.

This seems to be required for reading stencil values. The GL spec says
"When sampling the stencil index only NEAREST filtering is supported.".
The GL spec is inconsistent about this, but Mesa refuses to sample
stencil index values with the GL_NEAREST_MIPMAP_NEAREST filter.

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:
Józef Kucia 2016-12-05 12:04:25 +01:00 committed by Alexandre Julliard
parent 6579bd619f
commit bf4e1c442d
1 changed files with 1 additions and 1 deletions

View File

@ -811,7 +811,7 @@ static void create_default_samplers(struct wined3d_device *device, struct wined3
*/
GL_EXTCALL(glGenSamplers(1, &device->default_sampler));
GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST));
GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
checkGLcall("Create default sampler");
/* In D3D10+, a NULL sampler maps to the default sampler state. */