Re: [Mesa-dev] [PATCH] mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).

2012-06-04 Thread Ian Romanick

On 06/01/2012 06:32 PM, Eric Anholt wrote:

On Fri,  1 Jun 2012 03:52:19 -0700, Kenneth Graunkekenn...@whitecape.org  
wrote:

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 a number of oglconform tests happier.

v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture
 extensions, as suggested by Brian.  I'm not sure that any
 implementations still remain that don't support those, but why not?


i830 :(


And radeon, r200, and nouveau.  Basically, all the classic drivers 
except i965 and i915.



Reviewed-by: Eric Anholte...@anholt.net

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


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


[Mesa-dev] [PATCH] mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).

2012-06-01 Thread Kenneth Graunke
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 a number of oglconform tests happier.

v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture
extensions, as suggested by Brian.  I'm not sure that any
implementations still remain that don't support those, but why not?

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/mesa/main/attrib.c |8 
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index b114ec9..318d576 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -799,6 +799,14 @@ pop_texture_group(struct gl_context *ctx, struct 
texture_state *texstate)
 _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
 samp-CompareFailValue);
  }
+ if (ctx-Extensions.ARB_shadow) {
+_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE,
+samp-CompareMode);
+_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_FUNC,
+samp-CompareFunc);
+ }
+ if (ctx-Extensions.ARB_depth_texture)
+_mesa_TexParameteri(target, GL_DEPTH_TEXTURE_MODE, 
samp-DepthMode);
   }
 
   /* remove saved references to the texture objects */
-- 
1.7.10.3

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


Re: [Mesa-dev] [PATCH] mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).

2012-06-01 Thread Brian Paul

On 06/01/2012 04:52 AM, Kenneth Graunke wrote:

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 a number of oglconform tests happier.

v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture
 extensions, as suggested by Brian.  I'm not sure that any
 implementations still remain that don't support those, but why not?

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunkekenn...@whitecape.org
---
  src/mesa/main/attrib.c |8 
  1 file changed, 8 insertions(+)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index b114ec9..318d576 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -799,6 +799,14 @@ pop_texture_group(struct gl_context *ctx, struct 
texture_state *texstate)
  _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
  samp-CompareFailValue);
   }
+ if (ctx-Extensions.ARB_shadow) {
+_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE,
+samp-CompareMode);
+_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_FUNC,
+samp-CompareFunc);
+ }
+ if (ctx-Extensions.ARB_depth_texture)
+_mesa_TexParameteri(target, GL_DEPTH_TEXTURE_MODE, 
samp-DepthMode);
}

/* remove saved references to the texture objects */



Reviewed-by: Brian Paul bri...@vmware.com

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


Re: [Mesa-dev] [PATCH] mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).

2012-06-01 Thread Eric Anholt
On Fri,  1 Jun 2012 03:52:19 -0700, Kenneth Graunke kenn...@whitecape.org 
wrote:
 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 a number of oglconform tests happier.
 
 v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture
 extensions, as suggested by Brian.  I'm not sure that any
 implementations still remain that don't support those, but why not?

i830 :(

Reviewed-by: Eric Anholt e...@anholt.net


pgpzpag4qsYCV.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).

2012-01-27 Thread Kenneth Graunke
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