From 58a8683d7df7a3c0687ca6bbca39a3d70f6f104e Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 7 Sep 2014 17:26:12 +0200 Subject: [PATCH] gsdx-ogl: disable texture compare mode It seems to be used for depth texture --- plugins/GSdx/GSDeviceOGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 374764e6e3..9f595c803b 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -572,8 +572,11 @@ GLuint GSDeviceOGL::CreateSampler(bool bilinear, bool tau, bool tav) // FIXME: seems there is 2 possibility in opengl // DX: sd.ComparisonFunc = D3D11_COMPARISON_NEVER; // gl_SamplerParameteri(sampler, GL_TEXTURE_COMPARE_MODE, GL_NONE); +#if 0 + // Message:Program undefined behavior warning: Sampler object 5 has depth compare enabled. It is being used with non-depth texture 7, by a program that samples it with a regular sampler. This is undefined behavior. gl_SamplerParameteri(sampler, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE); gl_SamplerParameteri(sampler, GL_TEXTURE_COMPARE_FUNC, GL_NEVER); +#endif // FIXME: need ogl extension sd.MaxAnisotropy = 16; return sampler;