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

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: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6579bd61
......@@ -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. */
......
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