From bf4e1c442d397ddc3b5a6de2634104de64f9d08b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B3zef=20Kucia?= Date: Mon, 5 Dec 2016 12:04:25 +0100 Subject: [PATCH] wined3d: Set default sampler minification filter to GL_NEAREST. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5b6497877c3..72fb5b573e4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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. */ -- 2.11.4.GIT