According to Table 6.17 in the GL 2.1 specification, DEPTH_TEXTURE_MODE,
TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC need to be restored on
glPopAttrib(GL_TEXTURE_BIT).

Makes oglconform's shad-compiler advanced.TestShadow2D_VertShader test
a bit less grumbly.

NOTE: This is a candidate for release branches.
Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 src/mesa/main/attrib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 01e7945..07884c1 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -796,6 +796,9 @@ pop_texture_group(struct gl_context *ctx, struct 
texture_state *texstate)
             _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
                                 samp->CompareFailValue);
          }
+         _mesa_TexParameteri(target, GL_DEPTH_TEXTURE_MODE, samp->DepthMode);
+         _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE, 
samp->CompareMode);
+         _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_FUNC, 
samp->CompareFunc);
       }
 
       /* remove saved references to the texture objects */
-- 
1.7.7.6

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to